コード例 #1
0
 public function actionsaveUser()
 {
     //Метод сохранения пользователей
     $parse_str = array();
     parse_str($_POST['post'], $parse_str);
     foreach ($parse_str as $k => $v) {
         $this->post[$k] = MYChtml::fromUTF8($v);
         // iconv("UTF-8","windows-1251",$v);
     }
     if (Users::checkDoubleLogin($this->post['login'])) {
         $this->ajaxMessages('dphone');
     }
     if (strlen($this->post['email']) > 0) {
         if (Users::checkDoubleEmail($this->post['email'])) {
             $this->ajaxMessages('demail');
         }
         if (!AccessoryFunctions::emailValidation($this->post['email'])) {
             $this->ajaxMessages('femail');
         }
     }
     if ($this->post['password'] != $this->post['password_repeat']) {
         $this->ajaxMessages('dpassword');
     }
     echo Users::saveUser($this->post);
 }
コード例 #2
0
 public function actionCheckplate($plate)
 {
     if (Trucks::checkPlate(MYChtml::fromUTF8($plate))) {
         echo "true";
     } else {
         echo "false";
     }
 }