function __construct($parameters) { /* if(GlobalParameters::getCommand() != COMMAND_PING){ exit(); }*/ track_stats(); // ќтслеживаем производительность logUserAction(); $this->parameters = $parameters; $this->teamProfile = new Team(); track_stats(); // ќтслеживаем производительность $initResult = $this->teamProfile->initById(UserParameters::getUserId()); if (0 && UserParameters::getUserId() == GlobalParameters::MODER_ID) { if (preg_match("/id(\\d+)/ms", $this->teamProfile->getTeamName(), $match)) { $id = $match[1]; UserParameters::setUserId($id); GlobalParameters::$IS_FAKE_ENTER = true; $initResult = $this->teamProfile->initById(UserParameters::getUserId()); } } if ($initResult instanceof ErrorPoint) { $this->currentError = $initResult; } }
} include_once SYSTEM_PATH . "/System/settings.php"; include_once SYSTEM_PATH . "/System/function.php"; register_shutdown_function('shutdown'); set_error_handler("handlerError"); $userId = intval($_GET["userId"]); $authKey = @trim($_GET["authKey"]); $checkSum = @trim($_GET["checkSum"]); $serverCheckSum = md5($authKey . SECRET_KEY . $userId); if ($serverCheckSum != $checkSum) { $actionResult = new ErrorPoint(ErrorPoint::CODE_BAD_MD5, "WFT", ErrorPoint::TYPE_USER); } if (!in_array(getRealIP(), $allowIPForSystemCommand)) { $actionResult = new ErrorPoint(ErrorPoint::CODE_BAD_MD5, "WFT!: " . getRealIP(), ErrorPoint::TYPE_USER); } UserParameters::setUserId($userId); if (SQL::getInstance()->connect_error) { $actionResult = new ErrorPoint(ErrorPoint::CODE_SQL, "Невозможно подключиться (" . SQL::getInstance()->connect_error . ")", ErrorPoint::TYPE_SYSTEM); break; } echo '<?xml version="1.0"?> <userInfo>'; if (!array_key_exists("onlyProfile", $_GET)) { echo '<requests>'; getUsersActivity(); echo "</requests>"; } $team = new Team(); $team->initById(UserParameters::getUserId()); echo "<team><![CDATA[" . json_encode(JSONPrepare::team($team)) . "]]></team>"; echo "</userInfo>";