///////////////////////////////////////////////////////////////
// //
// X7 Chat Version 1.3.0 Beta //
// Released February 2, 2004 //
// Copyright (c) 2004 By the X7 Group //
// Website: http://www.x7chat.com //
// //
// This program is free software. You may //
// modify and/or redistribute it under the //
// terms of the included license as written //
// and published by the X7 Group. //
// //
// By using this software you agree to the //
// terms and conditions set forth in the //
// enclosed file "license.txt". If you did //
// not recieve the file "license.txt" please //
// visist our website and obtain an official //
// copy of X7 Chat. //
// //
// Removing this copyright and/or any other //
// X7 Group or X7 chat copyright from any //
// of the files included in this distribution //
// is forbidden and doing so will terminate //
// your right to use this software. //
// //
///////////////////////////////////////////////////////////////
?>
if($SERVER['ENABLE_REG'] == 1){
printct(700,700,"
$txt[2]
","
$txt[190]
","$CS[1]","$CS[2]","$CS[3]");
exit;
}
if($AUTH['CAN_REG'] == 0){
printct(700,700,"
$AUTH[REG_NOTICE_HEADER]
","
$AUTH[REG_NOTICE]
","$CS[1]","$CS[2]","$CS[3]");
exit;
}
if(!isset($step)){
$body = "
";
printct(700,700,"
$txt[192]
",$body,"$CS[1]","$CS[2]","$CS[3]");
exit;
}
if($pass1 != $pass2 || $pass1 == ""){
$body = "$txt[44]
";
$error = 1;
}
if($username == ""){
$body = "$txt[193]
";
$error = 1;
}
if($email == "" || !eregi("^.*@[^.]*\..+$",$email)){
$body = "$txt[45]
";
$error =1;
}
DoConnect($DATABASE['HOST'],$DATABASE['USER'],$DATABASE['PASS']);
DoSelectDb($DATABASE['DATABASE']);
$q = DoQuery("SELECT * FROM $SERVER[TBL_PREFIX]users WHERE username='$username'");
while($row = Do_Fetch_Row($q)){
$body = "$txt[194]";
$error = 1;
}
if(strtoupper($username) == "DEFAULT_4" || strtoupper($username) == "DEFAULT_1"){
$body = "$txt[194]";
$error = 1;
}
$q = DoQuery("SELECT * FROM $SERVER[TBL_PREFIX]users WHERE email='$email'");
while($row = Do_Fetch_Row($q)){
$body = "$txt[440]";
$error = 1;
}
$pass1 = doXEncrypt($pass1);
if(!isset($error)){
$q = DoQuery("SELECT value FROM $SERVER[TBL_PREFIX]settings WHERE name='serveroffset'");
$row = Do_Fetch_Row($q);
$settings = "14000,5000,1,1,0,3,1,$row[0],0,1";
$time = time();
$err = DoQuery("INSERT INTO $SERVER[TBL_PREFIX]users
VALUES('0','$username','$pass1','$email','1','$avatar','$realname','$location',
'$hobbies','$bio','','1','$time','$settings')");
if($err == 1){
$body = "
$txt[195]
$txt[196]";
}else{
$body = "Sorry a database error occured:
$err
";
}
}
printct(700,700,"
$txt[197]
","
$body
","$CS[1]","$CS[2]","$CS[3]");
?>