Advertisement
scriptz-team

DEiONCUBE

Dec 28th, 2011
247
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 7.06 KB | None | 0 0
  1. <?php
  2. /**
  3. *
  4. *    
  5. *      _____ _____ _ _____ _____         _____ _____ _____ _____
  6. *  ___|     | __  |_|  _  |_   _|___ ___|_   _|   __|  _  |     |
  7. * |_ -|   --|    -| |   __| | | |- _|___| | | |   __|     | | | |
  8. * |___|_____|__|__|_|__|    |_| |___|     |_| |_____|__|__|_|_|_|
  9. * |s C R i P T z - T E A M . i N F O|
  10. *
  11. * This file was created by sCRiPTz-TEAM.iNFO [DEiONCUBE TEAM]
  12. * @ IonCube & Zend & NuSphere DeCoder
  13. *
  14. * @    Version             :    1.0.0.3
  15. * @    Author              :    sCRiPTz-TEAM.iNFO
  16. * @    Released            :    26-December-2011
  17. * @    Official site       :    http://sCRiPTz-TEAM.iNFO
  18. *
  19. */
  20.  
  21. class PHPKD_VBLVB
  22. {
  23.  
  24.     public $hosts = array( );
  25.     public $masks = array( );
  26.     public $punishments = array( );
  27.     public $staff_reports = array( );
  28.     public $user_reports = array( );
  29.     public $protocols = array( );
  30.     public $threadmodes = array( );
  31.     public $postmodes = array( );
  32.     public $bbcodes = array( );
  33.     public $hooks = array( );
  34.     public $vbphrase = null;
  35.     public $registry = null;
  36.     public $dmhandle = null;
  37.     public $errors = array( );
  38.     public $error_handler = ERRTYPE_SILENT;
  39.     public $failure_callback = null;
  40.  
  41.     public function PHPKD_VBLVB( &$registry, $initparams = array( ), $errtype = ERRTYPE_SILENT )
  42.     {
  43.         if ( is_object( $registry ) )
  44.         {
  45.             $this->registry =& $registry;
  46.             if ( !is_object( $registry->db ) )
  47.             {
  48.                 trigger_error( "Database object is not an object!", E_USER_ERROR );
  49.             }
  50.         }
  51.         else
  52.         {
  53.             trigger_error( "Registry object is not an object!", E_USER_ERROR );
  54.         }
  55.         $this->set_error_handler( $errtype );
  56.         if ( !defined( "PHPKD_VBLVB" ) )
  57.         {
  58.             define( "PHPKD_VBLVB", TRUE );
  59.         }
  60.         $this->initialize( $initparams );
  61.     }
  62.  
  63.     public function initialize( $initparams )
  64.     {
  65.         if ( is_array( $initparams ) && !empty( $initparams ) )
  66.         {
  67.             if ( file_exists( DIR."/includes/phpkd/vblvb/init.php" ) )
  68.             {
  69.                 return require( DIR."/includes/phpkd/vblvb/init.php" );
  70.             }
  71.             trigger_error( "Required initialization failed!", E_USER_ERROR );
  72.         }
  73.     }
  74.  
  75.     public function fetch_hook( $hookname, $params = array( ) )
  76.     {
  77.         if ( isset( $this->hooks["{$hookname}"] ) && file_exists( DIR."/includes/phpkd/vblvb/hooks/".$hookname.".php" ) )
  78.         {
  79.             return require( DIR."/includes/phpkd/vblvb/hooks/".$hookname.".php" );
  80.         }
  81.         trigger_error( "Invalid hook \"".$hookname."\"!", E_USER_ERROR );
  82.     }
  83.  
  84.     public function has_errors( $die = true )
  85.     {
  86.         if ( !empty( $this->errors ) )
  87.         {
  88.             if ( $this->error_handler == ERRTYPE_SILENT || $die == false )
  89.             {
  90.                 return true;
  91.             }
  92.             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 );
  93.             return true;
  94.         }
  95.         return false;
  96.     }
  97.  
  98.     public function set_error_handler( $errtype = ERRTYPE_SILENT )
  99.     {
  100.         switch ( $errtype )
  101.         {
  102.         case ERRTYPE_ECHO :
  103.             break;
  104.         case ERRTYPE_ARRAY :
  105.             break;
  106.         case ERRTYPE_STANDARD :
  107.             break;
  108.         case ERRTYPE_CP :
  109.             break;
  110.         case ERRTYPE_SILENT :
  111.         }
  112.         $this->error_handler = $errtype;
  113.         break;
  114.         $this->error_handler = ERRTYPE_SILENT;
  115.         break;
  116.     }
  117.  
  118.     public function error( $errorphrase )
  119.     {
  120.         $args = func_get_args( );
  121.         if ( is_array( $errorphrase ) )
  122.         {
  123.             $error = fetch_error( $errorphrase );
  124.         }
  125.         else
  126.         {
  127.             $error = call_user_func_array( "fetch_error", $args );
  128.         }
  129.         $this->errors[] = $error;
  130.         if ( $this->failure_callback && is_callable( $this->failure_callback ) )
  131.         {
  132.             call_user_func_array( $this->failure_callback, array(
  133.                 $this,
  134.                 $errorphrase
  135.             ) );
  136.         }
  137.         switch ( $this->error_handler )
  138.         {
  139.         case ERRTYPE_ECHO :
  140.             echo "<br />".$error."<br />";
  141.             break;
  142.         default :
  143.             switch ( $this->error_handler )
  144.             {
  145.             case ERRTYPE_ARRAY :
  146.             case ERRTYPE_SILENT :
  147.                 break;
  148.             default :
  149.                 switch ( $this->error_handler )
  150.                 {
  151.                 case ERRTYPE_STANDARD :
  152.                     eval( standard_error( $error ) );
  153.                     break;
  154.                 default :
  155.                     switch ( $this->error_handler )
  156.                     {
  157.                     case ERRTYPE_CP :
  158.                         print_cp_message( $error );
  159.                     }
  160.                 }
  161.             }
  162.         }
  163.     }
  164.  
  165.     public function set_failure_callback( $callback )
  166.     {
  167.         $this->failure_callback = $callback;
  168.     }
  169.  
  170.     public function verify_hook_params( $params )
  171.     {
  172.         return TRUE;
  173.     }
  174.  
  175.     public function dm( $initparams = array( ) )
  176.     {
  177.         if ( isset( $this->dmhandle ) )
  178.         {
  179.             return $this->dmhandle;
  180.         }
  181.         if ( file_exists( DIR."/includes/phpkd/vblvb/class_dm.php" ) )
  182.         {
  183.             if ( is_array( $initparams ) && !empty( $initparams ) )
  184.             {
  185.                 foreach ( $initparams as $key => $value )
  186.                 {
  187.                     if ( isset( $this->$key ) )
  188.                     {
  189.                         unset( $initparams[$key] );
  190.                     }
  191.                 }
  192.             }
  193.             if ( is_array( $initparams ) && !empty( $initparams ) )
  194.             {
  195.                 $this->initialize( $initparams );
  196.             }
  197.             require_once( DIR."/includes/phpkd/vblvb/class_dm.php" );
  198.             $this->dmhandle = new PHPKD_VBLVB_DM( $this->registry, $this );
  199.             return $this->dmhandle;
  200.         }
  201.         return FALSE;
  202.     }
  203.  
  204.     public function verify_license( )
  205.     {
  206.         if ( substr( $this->registry->options['phpkd_vblvb_license_key'], 0, 5 ) != PHPKD_VBLVB_LICENSE_KEY )
  207.         {
  208.             return false;
  209.         }
  210.         require_once( DIR."/includes/phpkd/vblvb/class_dml.php" );
  211.         $license = new PHPKD_VBLVB_DML( $this->registry );
  212.         if ( $license->special_token( ) == md5( md5( md5( PHPKD_VBLVB_TOCKEN ).md5( $this->registry->userinfo['securitytoken'] ).md5( TIMENOW ) ) ) )
  213.         {
  214.             return $license->process_license( );
  215.         }
  216.         return false;
  217.     }
  218.  
  219. }
  220.  
  221. if ( !defined( "VB_AREA" ) )
  222. {
  223.     echo "Can not be called from outside vBulletin Framework!";
  224.     exit( );
  225. }
  226. define( "PHPKD_PRODUCT", "phpkd_vblvb" );
  227. define( "PHPKD_VBLVB_VERSION", "4.0.132" );
  228. define( "PHPKD_VBLVB_SVERSION", "40132" );
  229. define( "PHPKD_VBLVB_TOCKEN", "36ecd440be05eeaed0b451233505ca66" );
  230. define( "PHPKD_VBLVB_LICENSE_KEY", "TRAIL" );
  231. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement