} //如果已经登录直接跳转到首页 $ERROR_MSG = ''; if (!empty($commit)) { //处理注册操作 if (empty($regNickName) || empty($regPassword) || empty($regRePassword) || empty($regEmail)) { $ERROR_MSG = "用户名密码和邮箱必须填写!"; } if ($regPassword != $regRePassword) { $ERROR_MSG = "两次输入的密码不一致!"; } if (empty($ERROR_MSG)) { $uarray = array(); include INC_PATH . "/member.class.php"; $m = new memberclass(); $msg = $m->reg($regNickName, $regPassword, $regEmail, $uarray); //注册动作 if ($msg == "OK") { $emailhttp = substr(strstr($regEmail, '@'), 1); $emailhttp = "http://mail." . $emailhttp; if ($cfg_reg_checkemail == 'N') { print "<script language='javascript'>alert('注册成功!');</script>"; jumpurl(url("index.php")); exit; } include template('register_ok'); //包含输出指定模板 exit; } else { $ERROR_MSG = $msg; }