loadClass('RESTResponse'); loadClass('REST_Errors'); if ($application->getCurrentProtocol() !== "https") { $e = new REST_Errors(); $e->IncorrectRestProtocol(); $e->send(); exit; } if (!isset($_GET['alogin']) || !isset($_GET['apassword'])) { $e = new REST_Errors(); $e->UndefinedLoginPassword(); $e->send(); exit; } loadActionClass('SignIn'); $signin = new SignIn(); $acountInfo = null; if ($signin->isValidAcount($_GET['alogin'], md5($_GET['apassword']), $acountInfo)) { modApiFunc("Users", "setCurrentUserID", $acountInfo['id']); } else { $e = new REST_Errors(); $e->IncorrectLoginPassword(); $e->send(); exit; } if ($usr->isUserSignedIn() == FALSE) { } $_GET['asc_action'] = 'REST_Request_Action'; CProfiler::start('processAction'); $application->processAction(); CProfiler::stop('processAction');