public function __construct() { $this->logs = new cLogs(get_class()); $this->logs->on(); //$this->db = new cDb(); if (isset($_GET["logout"])) { $this->logout(); } /* /// script for login process /// if(isset($_POST['login']) && isset($_POST['challenge'])){ $this->logs->addLog($_POST['login'],"POST: login"); if(isset($_POST['password_hmac'])){ $login = self::login($_POST['login'], $_POST['password_hmac'], $_POST['challenge']); }else if(isset($_POST['password'])){ $login = self::login($_POST['login'], $_POST['password'], $_POST['challenge'], false); } /// successful login proces /// if($login){ header('Location:'.cBuildIndex::getActionUrl(cCfg::$sPageAfterLofin)); } } */ if (!cAuthentication::$bInit) { cAuthentication::$bInit = true; /// delete all expired records /// cDb::delete('core_challenges', array('timecreated', '<', getDateToDb(time()))); cDb::delete('core_authentications', array('timeinit', '<', getDateToDb(time()))); } }