$faqkey = isset($faqkey) && is_numeric($faqkey) ? $faqkey : 0;
if($safe_faq_reg == '1')
{
if($safefaqs[$faqkey]['answer'] != $rsafeanswer || $rsafeanswer=='')
{
ShowMsg('验证问题答案错误', '-1');
exit();
}
}
$userid = trim($userid);
$pwd = trim($userpwd);
$pwdc = trim($userpwdok);
$rs = CheckUserID($userid, '用户名');
if($rs != 'ok')
{
ShowMsg($rs, '-1');
exit();
}
if(strlen($userid) > 20 || strlen($uname) > 36)
{
ShowMsg('你的用户名或用户笔名过长,不允许注册!', '-1');
exit();
}
if(strlen($userid) < $cfg_mb_idmin || strlen($pwd) < $cfg_mb_pwdmin)
{
ShowMsg("你的用户名或密码过短,不允许注册!","-1");
exit();
}
if($pwdc != $pwd)
{
ShowMsg('你两次输入的密码不一致!', '-1');
exit();
}
$uname = HtmlReplace($uname, 1);
//用户笔名重复检测
if($cfg_mb_wnameone=='N')
{
$row = $dsql->GetOne("Select * From `dede_member` where uname like '$uname' ");
if(is_array($row))
{