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;
     }
 }
Example #2
0
require_once 'register_new_user.php';
require_once 'register_page.php';
require_once 'update_page_rating.php';
require_once 'update_title.php';
require_once 'user_login.php';
require_once 'user_logout.php';
require_once 'ip_to_country.php';
session_start();
if ($_REQUEST['command'] == "verify_user") {
    header("Content-type: text/html");
} else {
    header("Content-type: text/xml");
}
$connection = connectDb();
$response = "";
logUserAction();
switch ($_REQUEST['command']) {
    case "check_login_status":
        $response = checkLoginStatus();
        break;
    case "user_login":
        $response = userLogin($_REQUEST['user_name'], $_REQUEST['password']);
        break;
    case "user_logout":
        $response = userLogout();
        break;
    case "get_comments":
        $response = getComments($_REQUEST['url']);
        break;
    case "new_comment":
        $response = newComment($_REQUEST['url'], $_REQUEST['content'], $_REQUEST['parent_id']);