public function __construct() { if (isset($_GET['c'])) { $c = trim($_GET['c']); if (\CORE::isValid($c, '/^[a-z]+$/')) { $this->c = $c; // controller if (isset($_GET['act'])) { $act = trim($_GET['act']); if (\CORE::isValid($act, '/^[a-zA-Z0-9]+$/')) { $this->act = $act; // action } else { \CORE::msg('error', 'Unregistered action'); } } } else { \CORE::msg('error', 'Incorrect module name'); } } }
public function CheckLogin($login) { $len = strlen($login); if (\CORE::isValid($login, '/^[a-zA-Z0-9]+$/') && $len >= 3 && $len < 128) { return true; } else { return false; } }
public static function remove($key) { if (CORE::isValid($key)) { unset($_SESSION[PREFX . $key]); } }