session_start();
/**********************************************************************************************************************************************
ScriptBux Version 2.50 beta
This Script has been created and coded by Gabrola and edited by hassan ahmady.
If you find any bugs in the script report at support@thealternatif.info or contact hassan ahmady.
Copywrite ScriptBux 2008;
Please make donations if you use this sript for commercial use
to My paypal account "bisnis-usd@plasa.com"
************************************************************************************************************************************************/
if($_GET['r'] and !$_SESSION['r']) { $_SESSION['r'] = $_GET['r']; }
if(($_SESSION['r'] and !$_GET['r']) or (($_SESSION['r'] and $_GET['r']) and $_GET['r'] != $_SESSION['r'])) { $_GET['r'] = $_SESSION['r']; }
include "config.php";
global $c;
include "data.php";
global $config;
?>
include "header2.php"; ?>
|
";
echo "Install directory is exist,
Please Remove or Delete Install Directory";
echo "
";
} else {
echo "
";
echo "Website is Undder Re-Constructions,
Please Check Back Soon!";
echo "
Please Contact The Administrator";
echo "";
}
} else {
echo "
";
echo "Website is Undder Re-Constructions,
Please Check Back Soon!";
echo "
Please Contact The Administrator";
echo "";
}
}
else {
?>
|
|
|
include "footer.php";
exit();
}
?>
require('funciones.php');
if ($_POST) {
//round 1
$username = $_POST["username"];
$password = $_POST["password"];
$cpassword = $_POST["cpassword"];
$email = $_POST["email"];
$cemail = $_POST["cemail"];
$pemail = $_POST["pemail"];
$country = $_POST["country"];
//round 2
$username = uc($username);
$password = uc($password);
$cpassword = uc($cpassword);
$email = securedata($email);
$cemail = securedata($cemail);
$pemail = securedata($pemail);
$country = securedata($country);
//round 3
$laip = getRealIP();
$username=limitatexto($username,15);
$password=limitatexto($password,15);
$cpassword=limitatexto($cpassword,15);
$email=limitatexto($email,100);
$cemail=limitatexto($cemail,100);
$pemail=limitatexto($pemail,100);
$country=limitatexto($country,15);
$checkip = mysql_query("SELECT ip FROM tb_users WHERE ip='$laip'");
$ip_exist = mysql_num_rows($checkip);
minimo($username);
minimopass($password);
ValidaMail($email);
ValidaMail($pemail);
$checkuser = mysql_query("SELECT username FROM tb_users WHERE username='$username'");
$username_exist = mysql_num_rows($checkuser);
$checkemail = mysql_query("SELECT email FROM tb_users WHERE email='$email'");
$email_exist = mysql_num_rows($checkemail);
$checkpemail = mysql_query("SELECT pemail FROM tb_users WHERE pemail='$pemail'");
$pemail_exist = mysql_num_rows($checkpemail);
$referer = securedata($_SESSION["r"]);
$referer=limitatexto($referer,15);
$checkref = mysql_query("SELECT username FROM tb_users WHERE username='$referer'");
$referer_exist = mysql_num_rows($checkref);
if(!$username)
{
$error = 1;
$errormsg .= "Error - Please supply a username.";
}
if(!$password)
{
$error = 1;
$errormsg .= "Error - Please supply a password.";
}
if(!$_POST['tos'])
{
$error = 1;
$errormsg .= "Error - You must agree to the TOS to sign up.";
}
if(strlen($password) < 6)
{
$error = 1;
$errormsg .= "Error - Your password must be over 6 characters.";
}
if(!$cpassword)
{
$error = 1;
$errormsg .= "Error - Please supply a confirm password.";
}
if(!$email)
{
$error = 1;
$errormsg .= "Error - Please supply a email.";
}
if(!$cemail)
{
$error = 1;
$errormsg .= "Error - Please supply a confirmation email.";
}
if(!$pemail)
{
$error = 1;
$errormsg .= "Error - Please supply an Alertpay email.";
}
if(!$country)
{
$error = 1;
$errormsg .= "Error - Please supply a country.";
}
if ($referer_exist<1 and $_POST['referer'] != "")
{
$error = 1;
$errormsg .= "Error - That referrer does not exist, Please leave it blank if you cannot find a referer.";
$_SESSION['r'] = false;
$_GET['r'] = false;
}
if ($pemail_exist>0) {
$error = 1;
$errormsg .= "Error - That Alertpay address is already in use.";
}
if($password!=$cpassword) {
$error = 1;
$errormsg .= "Error - The passwords do not match.";
}
if($email!=$cemail) {
$error = 1;
$errormsg .= "Error - The emails do not match.";
}
if($_POST['code']!=$_SESSION['string']){
$error = 1;
$errormsg .= "Error - The captcha was entered incorrectly.";
$_SESSION['string'] = false;
}
if($laip=="127.0.0.1")
{
$error = 1;
$errormsg .= "Error - The IP 127.0.0.1 is disabled to use.";
}
if ($ip_exist>0)
{
$error = 1;
$errormsg .= "Error - You already have one account";
}
if ($email_exist>0)
{
$error = 1;
$errormsg .= "Error - That email address is already in use.";
}
if($username_exist>0) {
$error = 1;
$errormsg .= "Error - That username is already in use.";
}
if($error == 1)
{
print $errormsg;
} else {
// If it has introduced a referer see that there
if ($_POST["referer"] != "") {
// Sanitizamos la variable
$referer = securedata($_SESSION["r"]);
$referer=limitatexto($referer,15);
$checkref = mysql_query("SELECT username FROM tb_users WHERE username='$referer'");
$referer_exist = mysql_num_rows($checkref);
if ($referer_exist>0) {
// If everything seems fine proceed with the insertion
$sqlz = "SELECT * FROM tb_users WHERE username='$referer'";
$resultz = mysql_query($sqlz);
$myrowz = mysql_fetch_array($resultz);
$numero=$myrowz["referals"];
$sqlex = "UPDATE tb_users SET referals='$numero'+1 WHERE username='$referer'";
$resultex = mysql_query($sqlex);
}
}
// Si todo parece correcto procedemos con la inserccion
$joindate=time();
$query = "INSERT INTO tb_users (username, password, ip, email, pemail, referer, country, joindate, money,visits) VALUES('$username','$password','$laip','$email','$pemail','$referer','$country','$joindate', '0.05', '0')";
mysql_query($query) or die(mysql_error());
echo "You have been registered correctly $username. Now you can login.";
?>
|