// url_msg_redirect("您填写的昵称长度不合法!!","/active.php"); if ($bAjax) { exit("result=0&msg=" . $arrLanguage["10215"]['content']); } else { Com_System::url_redirect($webUrl . "/active.php?e_code=-17"); } } if (preg_match($nknamePattern, $name)) { // url_msg_redirect("您填写的昵称不合法!!","/active.php"); if ($bAjax) { exit("result=0&msg=" . $arrLanguage["10214"]['content']); } else { Com_System::url_redirect($webUrl . "/active.php?e_code=-16"); } } if (!Com_Filter::check_badWord($name)) { // url_msg_redirect("您填写的昵称不合法!!","/active.php"); if ($bAjax) { exit("result=0&msg=" . $arrLanguage["10214"]['content']); } else { Com_System::url_redirect($webUrl . "/active.php?e_code=-16"); } } if (is_numeric($name)) { // url_msg_redirect("您填写的昵称不合法!!","/active.php"); if ($bAjax) { exit("result=0&msg=" . $arrLanguage["10214"]['content']); } else { Com_System::url_redirect($webUrl . "/active.php?e_code=-16"); } }
/** * 检测宣言内容是否合法 * @param unknown $introduce */ protected function check_introduce($introduce) { if ($introduce) { $introduceLen = Com_Filter::get_length($introduce); if ($introduceLen > 280) { //长度不符 $this->throw_error('170108'); } else { if (is_numeric($introduce)) { //不为纯数字){ $this->throw_error('10238'); } else { if (!Com_Filter::check_badWord($introduce)) { //内容不合法 $this->throw_error('170109'); } } } } }
public function check_exact_param($cost_gold, $red_num, $message) { if ($cost_gold > 9999) { $this->throw_error('1744001'); } if ($cost_gold <= 0) { $this->throw_error('20004'); } if ($red_num <= 0) { $this->throw_error('1744003'); } if ($red_num > 15) { $this->throw_error('1744002'); } if ($red_num > $cost_gold) { $this->throw_error('1744005'); } $message = trim($message); $len = Com_Filter::get_length($message); if ($len > 50) { $this->throw_error('10219'); } else { if (is_numeric($message)) { //不为纯数字){ $this->throw_error('10238'); } else { if (!Com_Filter::check_badWord($message)) { //内容不合法 $this->throw_error('10220'); } } } }