代码如下:
}
else
{
if (isset($_POST['n_register']))
{
$mail = trim($db->EscapeString($_POST[' reg_mail']));
$mail_re = trim($db->EscapeString($_POST['reg_mail_re']));
if (!preg_match("/^[a-zA-Z_\-][\w\.\-_]*[a-zA-Z0-9_\-]@[a-zA-Z0-9] [\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]$/i", $mail ))
{
$errorMsg = $langBase->get('home-08');
}
elseif ($mail !== $mail_re)
{
$errorMsg = $langBase->get('home-09');
}
elseif ($db->GetNumRows($db->Query("SELECT id FROM `[users]` WHERE `email`='".$mail."' LIMIT 1")) > 0)
{
$errorMsg = $langBase->get('home-10');
}
elseif ($db->GetNumRows($db->Query("SELECT id FROM `[users]` WHERE `IP_regged_with`='".$_SERVER['REMOTE_ADDR']."' LIMIT 1") ) > 0)
{
$errorMsg = $langBase->get('home-11');
}
elseif ($db->GetNumRows($db->Query("SELECT id FROM `temporary` WHERE `playerid`='".$mail."' AND `active`='1' AND `area `='register' AND `time_added`+`expires`>'".time()."' LIMIT 1")) > 0)
{
$errorMsg = $langBase->get('home-111 ');
}
elseif (!isset($_POST['acc_tos']))
{
$errorMsg = $langBase->get('home-12');
}
else
{
$extra = array(
'mail' => $mail,
'enlist' => isset($_GET['e']) ? $db->EscapeString($_GET[ 'e']) : $ref_id
);
$enlist_id = isset($_GET['e']) ? $db->EscapeString($_GET['e']) : $ref_id;
$tempID = substr(sha1(uniqid(rand())), 0, 6);
$db->Query("INSERT INTO `temporary` (`id`, `playerid`, `area`, `expires`, `time_added`, `extra`)VALUES('".$tempID."', '".$mail."','register','3600','".time()."','".serialize($extra)."')");
mail($mail, $admin_config['game_name']['value'].' ?Signup',
'
« サインアップ |
こんにちは 以下をクリックしてステップ 2 に進みます: '.$config['base_url'].'?side=signup&step=2&v='.$tempID. ' このリンクは '.View::Time(time()+3600, true) まで有効です。' |
よろしくお願いします。 '.$admin_config['game_name']['value'].' |