Advertisement
Guest User

decodeDRVY-Elhacker

a guest
Jan 30th, 2012
705
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.89 KB | None | 0 0
  1. <?php
  2.  
  3. // Application flag
  4. define('SPF', true);
  5.  
  6. // Determine our absolute document root
  7. define('DOC_ROOT', realpath(dirname(__FILE__) . '/../'));
  8.  
  9. // Global include files
  10. require DOC_ROOT . '/includes/functions.inc.php'; // __autoload() is contained in this file
  11. require DOC_ROOT . '/includes/class.dbobject.php';
  12. require DOC_ROOT . '/includes/class.objects.php';
  13.  
  14. // Fix magic quotes
  15. if (get_magic_quotes_gpc())
  16. {
  17.     $_POST = fix_slashes($_POST);
  18.     $_GET = fix_slashes($_GET);
  19.     $_REQUEST = fix_slashes($_REQUEST);
  20.     $_COOKIE = fix_slashes($_COOKIE);
  21. }
  22.  
  23. // Load our config settings
  24. $Config = Config::getConfig();
  25.  
  26. /* * ***************************** check licence details ****************************** */
  27.  
  28. if (!file_exists(DOC_ROOT . "/_licence_key.inc.php"))
  29.     die("<b>ERROR:</b> Could not locate licence file (_licence_key.inc.php), please add and try again or contact mfscripts.com.");
  30. include_once(DOC_ROOT . "/_licence_key.inc.php");
  31. if (!defined("_SCRIPT_LICENCE_KEY"))
  32.     define("_SCRIPT_LICENCE_KEY", "");
  33.  
  34. // clear the vars to be used just encase they are passed in
  35. $licence_key = "N2h+" . substr(_SCRIPT_LICENCE_KEY, 5, 200);
  36. $actual_licence = base64_decode($licence_key);
  37. if (substr($actual_licence, 0, 18) != "7h~@}-=sdte!@*AP;s")
  38.     die("<b>ERROR:</b> The structure of your licence key is invalid, please contact support@mfscripts.com for further support.");
  39.  
  40. // clear the vars used above
  41. unset($licence_key, $actual_licence, $current_url, $vars, $lookup, $timeout, $old, $file, $buffer, $lock_file, $new_data, $padding_start, $padding_end, $start, $end, $last_check, $runcheck);
  42.  
  43. /* * ***************************** end check licence details ****************************** */
  44.  
  45. /* load db config settings into constants */
  46. $db = Database::getDatabase();
  47. $rows = $db->getRows("SELECT config_key, config_value FROM site_config ORDER BY config_group, config_key");
  48. if (COUNT($rows))
  49. {
  50.     foreach ($rows AS $row)
  51.     {
  52.         $constantName = "SITE_CONFIG_" . strtoupper($row['config_key']);
  53.         define($constantName, $row['config_value']);
  54.     }
  55. }
  56.  
  57. /* setup translations */
  58. translate::setUpTranslationConstants();
  59.  
  60. // Store session info in the database?
  61. if ($Config->useDBSessions === true)
  62.     DBSession::register();
  63.  
  64. // Initialize our session
  65. session_name($Config->sessionName);
  66. session_start();
  67.  
  68. // Initialize current user
  69. $Auth = Auth::getAuth();
  70.  
  71. // Object for tracking and displaying error messages
  72. $Error = Error::getError();
  73.  
  74. define("SITE_IMAGE_PATH", WEB_ROOT . "/themes/" . SITE_CONFIG_SITE_THEME . "/images");
  75. define("SITE_CSS_PATH", WEB_ROOT . "/themes/" . SITE_CONFIG_SITE_THEME . "/styles");
  76. define("SITE_JS_PATH", WEB_ROOT . "/themes/" . SITE_CONFIG_SITE_THEME . "/js");
  77.  
  78. /* check for banned ip */
  79. $bannedIP = bannedIP::getBannedType();
  80. if (strtolower($bannedIP) == "whole site")
  81. {
  82.     header('HTTP/1.1 404 Not Found');
  83.     die();
  84. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement