Advertisement
Guest User

Untitled

a guest
Apr 14th, 2012
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.79 KB | None | 0 0
  1. <?php
  2. /**
  3. *
  4. * @ This file is created by deZender.Net
  5. * @ deZender (PHP5 Decoder for ionCube Encoder)
  6. *
  7. * @ Version : 1.1.4.0
  8. * @ Author : DeZender
  9. * @ Release on : 30.03.2012
  10. * @ Official site : http://DeZender.Net
  11. *
  12. */
  13.  
  14. class MainClass {
  15. public static $protocol = "http://";
  16. public static $domain = NULL;
  17. public static $site_path = NULL;
  18. public static $default_component = __FILE__;
  19. public static $randstr = "2jt9vjs045@_u8j%^E#smv889475^%";
  20. public static $_source = "aHR0cDovL2FwaS5saWdodG1vbi5ydS8=";
  21. public static $filename = NULL;
  22. public static $os = NULL;
  23. public static $service = NULL;
  24. public static $ip = NULL;
  25. public static $lang = NULL;
  26. public static $gzip = true;
  27. public static $content_type = "text/html";
  28. public static $langs = array( );
  29. public static $var = array( );
  30. public static $db = NULL;
  31. public static $session = NULL;
  32. public static $modules = NULL;
  33. public static $tpl = NULL;
  34. public static $email = NULL;
  35. public static $update = NULL;
  36. private static $Instance = NULL;
  37.  
  38. function getInstance($_method) {
  39. if (!isset( self::$Instance )) {
  40. self::$Instance = new self( );
  41. self::$ip = $_SERVER['REMOTE_ADDR'];
  42. self::$os = (stripos( PHP_OS, 'win' ) === 0 ? 'w' : 'u');
  43. self::$domain = $_SERVER['HTTP_HOST'];
  44. self::$site_path = rtrim( dirname( $_SERVER['PHP_SELF'] ), '/\\' ) . '/';
  45. self::$filename = basename( $_SERVER['SCRIPT_FILENAME'] );
  46.  
  47. if (get_magic_quotes_gpc( )) {
  48. array_walk_recursive( $_GET, 'stripslashes_gpc' );
  49. array_walk_recursive( $_POST, 'stripslashes_gpc' );
  50. array_walk_recursive( $_COOKIE, 'stripslashes_gpc' );
  51. array_walk_recursive( $_REQUEST, 'stripslashes_gpc' );
  52. }
  53.  
  54. self::$var['general'] = include_once( DATA_DIR . '/config/general.config.php' );
  55. self::$var['user'] = include_once( DATA_DIR . '/config/user.config.php' );
  56. self::$var['gaming'] = include_once( DATA_DIR . '/config/gaming.config.php' );
  57. self::$var['other'] = include_once( DATA_DIR . '/config/other.config.php' );
  58. self::$var['service'] = include_once( DATA_DIR . '/config/service.config.php' );
  59.  
  60. if (!defined( 'INSTALL' )) {
  61. if (( file_exists( ROOT_DIR . '/install' ) && !file_exists( ROOT_DIR . '/install/install.lock' ) )) {
  62. header( 'Location: ' . self::$protocol . self::$domain . self::$site_path . 'install/index.php' );
  63. } else {
  64. self::$c = include_once( DATA_DIR . '/config/mysqli.config.php' );
  65. self::$db = new DBClass( array( 'host' => $c['lm_serv'], 'user' => $c['lm_user'], 'pass' => $c['lm_pass'], 'db' => $c['lm_name'] ) );
  66. self::$modules = new ModulesClass( );
  67. self::$session = new SessionClass( );
  68. }
  69. }
  70.  
  71. self::$tpl = new TemplateClass( );
  72. self::$email = new EmailClass( );
  73. self::$update = new selfUpdateClass( );
  74. }
  75.  
  76. (true ? method_exists( 'MainClass', $_method ) : $Instance);
  77. exit( );
  78. }
  79.  
  80. function __construct() {
  81. }
  82.  
  83. function __clone() {
  84. }
  85.  
  86. function SetCookie($n, $v = '', &$t = false) {
  87. if ($t === false) {
  88. $t = time( ) + 60 * 60 * 24 * (int)self::$var['user']['time_of_life_session'];
  89. } else {
  90. if ($t) {
  91. switch (substr( $t, 0 - 1 )) {
  92. case 's': {
  93. $t = (int)$t;
  94. break;
  95. }
  96.  
  97. case 'm': {
  98. $t = (int)$t * 60;
  99. break;
  100. }
  101.  
  102. case 'h': {
  103. $t = (int)$t * 3600;
  104. break;
  105. }
  106.  
  107. default: {
  108. $t = (int)$t * 86400;
  109. }
  110. }
  111.  
  112. $t += time( );
  113. }
  114. }
  115.  
  116. return setcookie( 'lm_' . $n, $v, $t, self::$site_path );
  117. }
  118.  
  119. function GetCookie($n) {
  120. $n = 'lm_' . $n;
  121. return (isset( $_COOKIE[$n] ) ? $_COOKIE[$n] : false);
  122. }
  123. .....................................................
  124. ....................................
  125. ...........
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement