Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- *
- *
- * _____ _____ _ _____ _____ _____ _____ _____ _____
- * ___| | __ |_| _ |_ _|___ ___|_ _| __| _ | |
- * |_ -| --| -| | __| | | |- _|___| | | | __| | | | |
- * |___|_____|__|__|_|__| |_| |___| |_| |_____|__|__|_|_|_|
- * |s C R i P T z - T E A M . i N F O|
- *
- * This file was created by sCRiPTz-TEAM.iNFO [DEiONCUBE TEAM]
- * @ IonCube & Zend & NuSphere DeCoder
- *
- * @ Version : 1.0.0.3
- * @ Author : sCRiPTz-TEAM.iNFO
- * @ Released : 26-December-2011
- * @ Official site : http://sCRiPTz-TEAM.iNFO
- *
- */
- class PHPKD_VBLVB
- {
- public $hosts = array( );
- public $masks = array( );
- public $punishments = array( );
- public $staff_reports = array( );
- public $user_reports = array( );
- public $protocols = array( );
- public $threadmodes = array( );
- public $postmodes = array( );
- public $bbcodes = array( );
- public $hooks = array( );
- public $vbphrase = null;
- public $registry = null;
- public $dmhandle = null;
- public $errors = array( );
- public $error_handler = ERRTYPE_SILENT;
- public $failure_callback = null;
- public function PHPKD_VBLVB( &$registry, $initparams = array( ), $errtype = ERRTYPE_SILENT )
- {
- if ( is_object( $registry ) )
- {
- $this->registry =& $registry;
- if ( !is_object( $registry->db ) )
- {
- trigger_error( "Database object is not an object!", E_USER_ERROR );
- }
- }
- else
- {
- trigger_error( "Registry object is not an object!", E_USER_ERROR );
- }
- $this->set_error_handler( $errtype );
- if ( !defined( "PHPKD_VBLVB" ) )
- {
- define( "PHPKD_VBLVB", TRUE );
- }
- $this->initialize( $initparams );
- }
- public function initialize( $initparams )
- {
- if ( is_array( $initparams ) && !empty( $initparams ) )
- {
- if ( file_exists( DIR."/includes/phpkd/vblvb/init.php" ) )
- {
- return require( DIR."/includes/phpkd/vblvb/init.php" );
- }
- trigger_error( "Required initialization failed!", E_USER_ERROR );
- }
- }
- public function fetch_hook( $hookname, $params = array( ) )
- {
- if ( isset( $this->hooks["{$hookname}"] ) && file_exists( DIR."/includes/phpkd/vblvb/hooks/".$hookname.".php" ) )
- {
- return require( DIR."/includes/phpkd/vblvb/hooks/".$hookname.".php" );
- }
- trigger_error( "Invalid hook \"".$hookname."\"!", E_USER_ERROR );
- }
- public function has_errors( $die = true )
- {
- if ( !empty( $this->errors ) )
- {
- if ( $this->error_handler == ERRTYPE_SILENT || $die == false )
- {
- return true;
- }
- trigger_error( "<ul><li>".implode( $this->errors, "</li><li>" )."</ul>Unable to proceed with save while \$errors array is not empty in class <strong>".get_class( $this )."</strong>", E_USER_ERROR );
- return true;
- }
- return false;
- }
- public function set_error_handler( $errtype = ERRTYPE_SILENT )
- {
- switch ( $errtype )
- {
- case ERRTYPE_ECHO :
- break;
- case ERRTYPE_ARRAY :
- break;
- case ERRTYPE_STANDARD :
- break;
- case ERRTYPE_CP :
- break;
- case ERRTYPE_SILENT :
- }
- $this->error_handler = $errtype;
- break;
- $this->error_handler = ERRTYPE_SILENT;
- break;
- }
- public function error( $errorphrase )
- {
- $args = func_get_args( );
- if ( is_array( $errorphrase ) )
- {
- $error = fetch_error( $errorphrase );
- }
- else
- {
- $error = call_user_func_array( "fetch_error", $args );
- }
- $this->errors[] = $error;
- if ( $this->failure_callback && is_callable( $this->failure_callback ) )
- {
- call_user_func_array( $this->failure_callback, array(
- $this,
- $errorphrase
- ) );
- }
- switch ( $this->error_handler )
- {
- case ERRTYPE_ECHO :
- echo "<br />".$error."<br />";
- break;
- default :
- switch ( $this->error_handler )
- {
- case ERRTYPE_ARRAY :
- case ERRTYPE_SILENT :
- break;
- default :
- switch ( $this->error_handler )
- {
- case ERRTYPE_STANDARD :
- eval( standard_error( $error ) );
- break;
- default :
- switch ( $this->error_handler )
- {
- case ERRTYPE_CP :
- print_cp_message( $error );
- }
- }
- }
- }
- }
- public function set_failure_callback( $callback )
- {
- $this->failure_callback = $callback;
- }
- public function verify_hook_params( $params )
- {
- return TRUE;
- }
- public function dm( $initparams = array( ) )
- {
- if ( isset( $this->dmhandle ) )
- {
- return $this->dmhandle;
- }
- if ( file_exists( DIR."/includes/phpkd/vblvb/class_dm.php" ) )
- {
- if ( is_array( $initparams ) && !empty( $initparams ) )
- {
- foreach ( $initparams as $key => $value )
- {
- if ( isset( $this->$key ) )
- {
- unset( $initparams[$key] );
- }
- }
- }
- if ( is_array( $initparams ) && !empty( $initparams ) )
- {
- $this->initialize( $initparams );
- }
- require_once( DIR."/includes/phpkd/vblvb/class_dm.php" );
- $this->dmhandle = new PHPKD_VBLVB_DM( $this->registry, $this );
- return $this->dmhandle;
- }
- return FALSE;
- }
- public function verify_license( )
- {
- if ( substr( $this->registry->options['phpkd_vblvb_license_key'], 0, 5 ) != PHPKD_VBLVB_LICENSE_KEY )
- {
- return false;
- }
- require_once( DIR."/includes/phpkd/vblvb/class_dml.php" );
- $license = new PHPKD_VBLVB_DML( $this->registry );
- if ( $license->special_token( ) == md5( md5( md5( PHPKD_VBLVB_TOCKEN ).md5( $this->registry->userinfo['securitytoken'] ).md5( TIMENOW ) ) ) )
- {
- return $license->process_license( );
- }
- return false;
- }
- }
- if ( !defined( "VB_AREA" ) )
- {
- echo "Can not be called from outside vBulletin Framework!";
- exit( );
- }
- define( "PHPKD_PRODUCT", "phpkd_vblvb" );
- define( "PHPKD_VBLVB_VERSION", "4.0.132" );
- define( "PHPKD_VBLVB_SVERSION", "40132" );
- define( "PHPKD_VBLVB_TOCKEN", "36ecd440be05eeaed0b451233505ca66" );
- define( "PHPKD_VBLVB_LICENSE_KEY", "TRAIL" );
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement