Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Feb 6th, 2012  |  syntax: None  |  size: 5.96 KB  |  hits: 254  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <?php
  2. /**
  3. *
  4. * @ This file is created by deZender.Net
  5. * @ deZender (PHP5 Decoder for Zend Encoder/SafeGuard & PhpExpress)
  6. *
  7. * @     Version                 :       1.1.3.0
  8. * @     Author                  :       DeZender
  9. * @     Release on              :       17.05.2011
  10. * @     Official site   :       http://DeZender.Net
  11. *
  12. */
  13.  
  14.         if (( ( ( ( ( !isset( $_GET['pg'] ) || !in_array( $_GET['pg'], array( 'graph', 'graph_pareto', 'file', 'file.staffphoto', 'excel', 'excel_filter', 'ajax_gateway', 'mobile' ) ) ) && isset( $_SERVER['HTTP_ACCEPT_ENCODING'] ) ) && extension_loaded( 'zlib' ) ) && !ini_get( 'zlib.output_compression' ) ) && function_exists( 'ob_gzhandler' ) )) {
  15.                 $encodings = explode( ',', strtolower( preg_replace( '/\s+/', '', $_SERVER['HTTP_ACCEPT_ENCODING'] ) ) );
  16.  
  17.                 if (( in_array( 'gzip', $encodings ) || in_array( 'x-gzip', $encodings ) )) {
  18.                         ob_start( 'ob_gzhandler' );
  19.                         header( 'Content-Encoding: ' . (in_array( 'x-gzip', $encodings ) ? 'x-gzip' : 'gzip') );
  20.                 } else {
  21.                         ob_start(  );
  22.                 }
  23.         } else {
  24.                 ob_start(  );
  25.         }
  26.  
  27.         error_reporting( 1 | 4 );
  28.         set_magic_quotes_runtime( 0 );
  29.  
  30.         if (( isset( $_SERVER['HTTP_X_MOZ'] ) && strtoupper( $_SERVER['HTTP_X_MOZ'] ) == 'PREFETCH' )) {
  31.                 header( 'HTTP/1.0 403 Forbidden' );
  32.                 echo 'HelpSpot cannot run with the Google Web Accelerator installed in your browser. Please uninstall it and try again or use a different browser.';
  33.                 exit(  );
  34.         }
  35.  
  36.         define( 'SSKEY', md5( 'wookie fulton $2Zgh91' ) );
  37.  
  38.         if (file_exists( 'config.php' )) {
  39.                 ob_start(  );
  40.                 include( 'config.php' );
  41.                 ob_end_clean(  );
  42.         } else {
  43.                 header( 'Location: installer.php' );
  44.                 exit(  );
  45.         }
  46.  
  47.         set_include_path( cBASEPATH . '/helpspot/pear' );
  48.         include_once( cBASEPATH . '/helpspot/lib/util.lib.php' );
  49.  
  50.         if (( ( isset( $_GET['pg'] ) && $_GET['pg'] == 'custompg' ) && isset( $_GET['file'] ) )) {
  51.                 $custom_file = clean_filename( $_GET['file'] );
  52.  
  53.                 if (file_exists( 'custom_pages/' . trim( $custom_file ) . '.php' )) {
  54.                         ob_start(  );
  55.                         include( 'custom_pages/' . trim( $custom_file ) . '.php' );
  56.                         $custom_pagebody = ob_get_clean(  );
  57.                 }
  58.         }
  59.  
  60.         include_once( cBASEPATH . '/helpspot/lib/auth.adodb.php' );
  61.         include_once( cBASEPATH . '/helpspot/pear/Auth/Auth.php' );
  62.         include_once( cBASEPATH . '/helpspot/lib/utf8.lib.php' );
  63.         include_once( cBASEPATH . '/helpspot/lib/error.lib.php' );
  64.         include_once( cBASEPATH . '/helpspot/lib/platforms.lib.php' );
  65.         include_once( cBASEPATH . '/helpspot/lib/display.lib.php' );
  66.         include_once( cBASEPATH . '/helpspot/pear/Crypt_RC4/Rc4.php' );
  67.         include_once( cBASEPATH . '/helpspot/lib/api.lib.php' );
  68.         include_once( cBASEPATH . '/helpspot/lib/class.notify.php' );
  69.         include_once( cBASEPATH . '/helpspot/lib/phpMailer/class.phpmailer.php' );
  70.         include_once( cBASEPATH . '/helpspot/lib/class.hsmailer.php' );
  71.         include_once( cBASEPATH . '/helpspot/lib/class.userscape.bayesian.classifier.php' );
  72.         include_once( cBASEPATH . '/helpspot/lib/class.license.php' );
  73.         include_once( cBASEPATH . '/helpspot/lib/class.array2recordset.php' );
  74.         include_once( cBASEPATH . '/helpspot/pear/Net/UserAgent/Detect.php' );
  75.         include_once( cBASEPATH . '/helpspot/lib/class.filter.php' );
  76.         include_once( cBASEPATH . '/helpspot/lib/class.auto.rule.php' );
  77.         include_once( cBASEPATH . '/helpspot/lib/class.triggers.php' );
  78.         include_once( cBASEPATH . '/helpspot/lib/class.person.status.php' );
  79.         include_once( cBASEPATH . '/helpspot/lib/class.business_hours.php' );
  80.         include_once( cBASEPATH . '/helpspot/lib/class.language.php' );
  81.         include_once( cBASEPATH . '/helpspot/lib/phpass/PasswordHash.php' );
  82.  
  83.         if ($_GET['pg'] == 'iphone') {
  84.                 hs_redirect( 'Location: admin.php?pg=mobile' );
  85.         }
  86.  
  87.         clean_data(  );
  88.  
  89.         if (!hsinitdb(  )) {
  90.                 exit( 'Cannot connect to database. Check your config.php file.' );
  91.         }
  92.  
  93.         hsinitsettings(  );
  94.         define( 'IN_PORTAL', false );
  95.         $licenseObj = new usLicense( cHD_CUSTOMER_ID, cHD_LICENSE, SSKEY );
  96.         $GLOBALS['license'] = $licenseObj->getLicense(  );
  97.  
  98.         if ($GLOBALS['license']['Beta']) {
  99.                 exit( 'Beta license does not work with this version.' );
  100.         }
  101.  
  102.         $page = (isset( $_GET['pg'] ) ? clean_filename( $_GET['pg'] ) : 'workspace');
  103.         $action = (isset( $_GET['action'] ) ? $_GET['action'] : '');
  104.         $hidePageFrame = 0;
  105.         $htmldirect = false;
  106.         $formerrors = array(  );
  107.         $errorbox = '';
  108.         $pagebody = '';
  109.         $pagetitle = '';
  110.         $tab = 'nav_hd';
  111.         $subtab = '';
  112.         $headscript = '';
  113.         $onload = '';
  114.         $GLOBALS['lang'] = new language( $page );
  115.         include( cBASEPATH . '/helpspot/lib/lookup.lib.php' );
  116.  
  117.         if (( ( $page != 'admin.settings' && isset( $_POST['vmode'] ) ) && $_POST['vmode'] == 'license_upload' )) {
  118.                 if (( isset( $_FILES['license']['tmp_name'] ) && is_uploaded_file( $_FILES['license']['tmp_name'] ) )) {
  119.                         $activestaff = $GLOBALS['DB']->Execute( 'SELECT xPerson FROM HS_Person WHERE fDeleted = ?', array( 0 ) );
  120.                         $license_string = file_get_contents( $_FILES['license']['tmp_name'] );
  121.                         $licenseObj = new usLicense( cHD_CUSTOMER_ID, $license_string, SSKEY );
  122.                         $license = $licenseObj->getLicense(  );
  123.  
  124.                         if (( ( ( isset( $license['CustomerID'] ) && isset( $license['Users'] ) ) && trim( $license['Users'] ) != 'unlimited' ) && $license['Users'] < $activestaff->RecordCount(  ) )) {
  125.                                 storeglobalvar( 'cHD_LICENSE', $license_string, __FILE__, 170 );
  126.                                 $GLOBALS['license'] = $license;
  127.                                 $user_dif = $activestaff->RecordCount(  ) - $license['Users'];
  128.                                 $ct = 0;
  129.  
  130.                                 if (0 < $user_dif) {
  131.                                         while ($row = $activestaff->FetchRow(  )) {
  132.                                                 if ($user['xPerson'] != $row['xPerson']) {
  133.                                                         apideleteresource( 'HS_Person', 'xPerson', $row['xPerson'], 'delete', __FILE__, 183 );
  134.                                                         $ct++;
  135.  
  136.                                                         if ($user_dif == $ct) {
  137.                                                                 break;
  138.                                                         }
  139.                                                 }
  140.                                         }
  141.                                 }
  142.  
  143.                                 $onload = 'alert("' . hs_jshtmlentities( lg_licenseuploader ) . '");';
  144.                         } else {
  145.                                 if (isset( $license['CustomerID'] )) {
  146.                                         storeglobalvar( 'cHD_LICENSE', $license_string, __FILE__, 195 );
  147.                                         $GLOBALS['license'] = $license;
  148.                                 } else {
  149.                                         $error = lg_licnotvalid;
  150.                                 }
  151.                         }
  152.                 } else {
  153.                         $error = lg_licnotvalid;
  154.                 }
  155. ..................................
  156. ....................
  157. .........