Автор: Kill Spirit: Дата: 04.17.2010
if (!eregi("index.php", $_SERVER['PHP_SELF']))
{
die ("You can't access this file directly...");
}
echo '';
echo ''.$lang['reg_msg'].$config_server_name.':
';
echo '';
if($_POST['Submit'])
{
$code = $_POST['code'];
$codeinput = $_POST['codeinput'];
$user = $_POST['user'];
$pass = $_POST['pass'];
$email = $_POST['email'];
$gender = $_POST['gender'];
$que = mysql_query("select * from login where userid='$nick' or email='$email'") ;
$count_test = mysql_num_rows($que);
if($code != $codeinput)
{
echo $lang['code_err'];
}
elseif(eregi("admin", $user))
{
echo $lang['fx_1'];
}
elseif(eregi("mod", $user))
{
echo $lang['fx_2'];
}
elseif(empty($user) || empty($pass) || empty($email) || empty($gender))
{
echo $lang['reg_err'];
}
elseif(!ereg("[a-z||0-9]@[a-z||0-9].[a-z]", $email))
{
echo $lang['reg2_err'];
}
elseif($count_test!= 0)
{
echo $lang['reg3_err'];
}
else
{
$ok = mysql_query("INSERT INTO `login` (`userid`, `user_pass`, `sex`, `email`) VALUES ('$user', '$pass', '$gender', '$email')") ;
if($ok)
{
echo $lang['succ_reg'];
header( 'refresh: 1; url=?nav=main' );
}
else
{
echo $lang['reg4_err'];
}
}
}
?>
Автор: : Дата: 01.01.1970