public function __construct($params) { global $_ENV; global $_SETTINGS; global $_LANG; global $PAGES; $this->params = array_merge($params, $_ENV, $_SETTINGS, $_LANG, $PAGES); $this->_API = new ApiCaller($this->params['api']['user_key'], $this->params['api']['api_key'], $this->params['api']['core_api_url']); if (!isset($_SESSION['email'])) { require 'controllers/AuthController.php'; $obj = new AuthController($this->params); $obj->loginAction(); exit; } else { if (isset($_SESSION['password'])) { global $_OPERATORS; if ($_OPERATORS[$_SESSION['email']] == !$_SESSION['password']) { $this->params['page_title'] = $this->params['wrong_password_text']; View::render('auth/nopasswd', $this->params); exit; } } else { $this->params['page_title'] = $this->params['wrong_password_text']; View::render('auth/nopasswd', $this->params); exit; } } }
if (preg_match('/^([^?]*[^\\/?]+)$/Uui', $url)) { go(preg_replace('/^([^?]*[^\\/?]+)$/Uui', '$1/', $url)); } if (preg_match('/^' . addcslashes(core::$config['http_root'], '\\/') . '(' . join('|', array_keys(Core::$config['languages'])) . ')\\/(.*)$/Uu', $url, $matches)) { Core::$config['current_language'] = $matches[1]; $url = $matches[2]; /* if (Core::$config['current_language'] == 'en') { go('/ru/'); } */ core::$config['http_home'] = core::$config['http_root'] . core::$config['current_language'] . '/'; if (preg_match('/^login\\/(|\\?.*)$/Uu', $url, $matches)) { require_once 'AuthController.php'; $controller = new AuthController(); echo $controller->loginAction(); die; } if (preg_match('/^logout\\/(|\\?.*)$/Uu', $url, $matches)) { require_once 'AuthController.php'; $controller = new AuthController(); echo $controller->logoutAction(); die; } if (preg_match('/^register\\/(|\\?.*)$/Uu', $url, $matches)) { require_once 'AuthController.php'; $controller = new AuthController(); echo $controller->registerAction(); die; } if (preg_match('/^lost_password\\//Uu', $url, $matches)) {