Example #1
0
 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');
         }
     }
 }
Example #2
0
 public function CheckLogin($login)
 {
     $len = strlen($login);
     if (\CORE::isValid($login, '/^[a-zA-Z0-9]+$/') && $len >= 3 && $len < 128) {
         return true;
     } else {
         return false;
     }
 }
Example #3
0
File: core.php Project: sniyozov/mt
 public static function remove($key)
 {
     if (CORE::isValid($key)) {
         unset($_SESSION[PREFX . $key]);
     }
 }