|
The Acquainted
Join Date: Oct 2008
Location: Cincinnati
Posts: 151
Thanks: 14
|
t3st mentioned it would be better if I posted the whole code so I will do that here it is.
<?
include("game_html.php");
$html = mysql_fetch_array(mysql_query("SELECT rules,tos FROM $tab[html];"));
if($ref){ setcookie("refer",$refer, time()+7776000); }
if($ref){ setcookie("ref",$ref); }
if(!$step){$step=1;}
if(($step1 == 1) && ($agree == yes)){ header("Location: ?step=2"); }
elseif(($step1 == 1) && ($agree != yes)){ header("Location: ?warn=yes"); }
elseif(($step2 == 1) && ($agree == yes)){ header("Location: ?step=3"); }
elseif(($step2 == 1) && ($agree != yes)){ header("Location: ?step=2&warn=yes"); }
if($signup)
{
$host=gethostbyaddr("$REMOTE_ADDR");
$code = md5($username.trucode.$password);
$pin = md5($email.trucode);
if ((!preg_match ('/^[a-z0-9][a-z0-9\.\-_]*$/i', $username)) || (strstr($username,".")))
{ $msg="• Invalid username: a-Z 0-9 -_ charactors only."; $username=""; }
elseif ((strlen($username) <= 2) || (strlen($username) >= 19))
{ $msg="• Invalid username: must be at least 3-18 in length."; $username=""; }
elseif (fetch("SELECT username FROM $tab[user] WHERE username='$username';"))
{ $msg="• Invalid username: already taken."; $username="";}
elseif ((!preg_match ('/^[a-z0-9][a-z0-9\.\-_]*$/i', $password)) || (strstr($password,".")))
{ $msg="• Invalid password: a-Z 0-9 -_ charactors only."; $password=""; $cpassword=""; }
elseif ((strlen($password) <= 2) || (strlen($password) >= 13))
{ $msg="• Invalid password: must be at least 3-12 in length."; $password=""; $cpassword=""; }
elseif ($password != $cpassword)
{ $msg="• Invalid password: your passwords do not match."; $password=""; $cpassword=""; }
elseif (!ereg("^.+@.+\\..+$", $email))
{ $msg="• Invalid email: that is not a valid e-mail address."; $email=""; }
elseif (fetch("SELECT email FROM $tab[user] WHERE email='$email';"))
{ $msg="• That e-mail address has already been used."; $email="";}
elseif ((!preg_match ('/^[a-z]*$/i', $first)) || (strstr($first,".")))
{ $msg="• Invalid first name: a-Z charactors only."; $first=""; }
elseif ((!preg_match ('/^[a-z]*$/i', $last)) || (strstr($last,".")))
{ $msg="• Invalid last name: a-Z charactors only."; $last=""; }
elseif (($age <= 13) || ($age >= 100))
{ $msg="• Invalid age: you must be 14 years or older to play."; $age=""; }
elseif (($messager == AIM) && (!preg_match ('/^[a-z0-9][a-z0-9]*$/i', $messager_id)))
{ $msg="• Invalid screen name: sould only contain a-Z 0-9 charactors, no spaces."; $messager=""; $messager_id=""; }
elseif (($messager == MSN) && (!ereg("^.+@.+\\..+$", $messager_id)))
{ $msg="• Invalid msn email: that is not a valid e-mail address.."; $messager=""; $messager_id=""; }
elseif (($messager == YaHoO) && (!preg_match ('/^[a-z0-9][a-z0-9]*$/i', $messager_id)))
{ $msg="• Invalid screen name: sould only contain a-Z 0-9 charactors, no spaces."; $messager=""; $messager_id=""; }
elseif (fetch("SELECT ip FROM $tab[user] WHERE ip='$REMOTE_ADDR';"))
{ $msg="• There is already an account registered from your computer. If you think this is a mistake, please email the Administrator. Jamaicanguy202@hotmail.com";}
else {
/*mysql_query("UPDATE $tab[user] SET credits=credits+2000 WHERE id=$refer");
mysql_query("UPDATE $tab[user] SET referrals=referrals+1 WHERE id=$refer");
mysql_query("UPDATE $tab[user] SET refcredits=refcredits+2000 WHERE id=$refer");*/
mysql_query("INSERT INTO $tab[user] (username,password,email,fullname,age,messager,onl ine,ip,host,code,membersince,referredby,refcredits ) VALUES ('$username','$password','$email','$first $last','$age','$messager: $messager_id','$time','$REMOTE_ADDR','$host','$cod e','$time','$refer','$refcredits');");
mail_1("Welcome to ClubbinKings!","\nWelcome to ClubbinKings!\n\nYour account information:\n Username: $username\n Password: $password\n Pin: $pin\n\nBefore you can login, you must verify your email address.\n\nTo confirm this email address click on the bottom link, or copy and paste it to your browser.\n$site[location]confirm.php?verify=yes&email=$email&pin=$pin&refer er=$refer\n\nIf that link doesnt work, go to $site[location], login and enter in this pin:\n\n $pin\n\n-Admin\n\n\n-----------------------------\n-----------------------------\nAlso upon signup you were added to our Mailing list automatically! If you would like to be removed from this list please wait until you recieve the first letter and use the link at the botttom of the page to unsubscribe yourself!\n","$email");
mail_2("Welcome to ClubbinKings.com!","\nWelcome to the ClubbinKings.net!\n\nYour account information:\n Username: $username\n Password: $password\n Pin: $pin\n\nBefore you can login, you must verify your email address.\n\nTo confirm this email address click on the bottom link, or copy and paste it to your browser.\n$site[location]confirm.php?verify=yes&email=$email&pin=$pin&refer er=$refer\n\nIf that link doesnt work, go to $site[location], login and enter in this pin:\n\n $pin\n\n-Admin\n\n\n-----------------------------\n-----------------------------\nAlso upon signup you were added to our Mailing list automatically! If you would like to be removed from this list please wait until you recieve the first letter and use the link at the botttom of the page to unsubscribe yourself but doing this you wont be first to hear our new news!\n","$email");
header("Location: signup.php?step=4&email=$email&referer=$refer");
}
}
siteheader();
//LAMER CHECK//////////////
$getbans =mysql_query("SELECT banned FROM $tab[banned];");
$bans = array();
while($ban=mysql_fetch_array($getbans)) {
array_push($bans, $ban[0]);
}
foreach ($bans as $correct){
if(strstr($host,"$correct")){
$banreason = mysql_fetch_array(mysql_query("SELECT reason FROM $tab[banned] WHERE banned='$correct';"));
?>
<link href="style.css" rel="stylesheet" type="text/css" />
<table width="99%" height="100%">
<tr>
<td valign="top">
<br>
<b>Your account has been permenatly banned from ClubbinKings.com!!.
<br>
Here is our stated reason:</b><br><br><font color="#7777CC"><?=$banreason[0]?></font>
</td>
</tr>
</table>
<?
$lamerstop=bitch;
}
}
////////////////////////////
if($lamerstop!=bitch){
?>
<table width="100%" class="maintxt" height="100%">
<tr>
<td height="12"><b>Signing up: <font color="#FFCC00">Step <?=$step?></font></b></td>
</tr>
<tr>
<td valign="top">
<?
if($step==4){?>
<br>THANKS FOR JOINING ClubbinKings.com! An E-mail has been sent to <font color="#ff0000"><?=$email?></font> containing instructions and a pin number you need to verify your account!
<br>
<br><a href="confirm.php?referer=<?=$referer?>"><font color="#FFFFFF">Click</font> here <font color="#FFFFFF">to enter your pin number!</font></a>
<br>
<br>Didnt receive your pin number? Our Bad!
<br><a href="resend.php">Request it again</a>!
<br>
<br>Still having problems?
<br><a href="support.php">GET HELP</a>!
<br>
<?}elseif($step==3){?>
<form method="post" action="signup.php?step=3">
<?if($msg){?><center><b><font color="#FFCC00"><?=$msg?></font></b></center><?}?>
<table align="center" cellspacing="2" cellpadding="2" class="maintxt">
<tr bgcolor="#FFFFFF">
<td colspan="2" bgcolor="#000000"> </td>
</tr>
<tr bgcolor="#000000">
<td colspan="2" class="border"><b>Login Info:</b> <font color="#CCCCCC">Required</font></td>
</tr>
<tr>
<td align="right" bgcolor="#000000"> </td>
<td bgcolor="#000000"> </td>
</tr>
<tr bgcolor="#000000">
<td align="right" bgcolor="#000000">Username:</td>
<td><input type="text" name="username" maxlength="18" value="<?=$username?>"> <font color="#CCCCCC" size="1">3-18 length, a-Z 0-9 Charactors.</font></td>
</tr>
<tr>
<td align="right" bgcolor="#000000">Password:</td>
<td><input type="password" name="password" maxlength="18" value="<?=$password?>"> <font color="#CCCCCC" size="1">3-12 length, a-Z 0-9 Charactors.</font></td>
</tr>
<tr>
<td align="right" bgcolor="#000000">Confirm Password:</td>
<td><input type="password" name="cpassword" maxlength="18" value="<?=$cpassword?>"></td>
</tr>
<tr>
<td align="right" bgcolor="#000000">E-mail Address:</td>
<td><input type="text" name="email" maxlength="100" value="<?=$email?>">
</tr>
<tr bgcolor="#000000">
<td align="right" bgcolor="#000000"> </td>
<td> </td>
</tr>
<tr bgcolor="#000000">
<td colspan="2" bgcolor="#000000" class="border"><b>Personal:</b> <font color="#CCCCCC">Required</font></td>
</tr>
<tr bgcolor="#000000">
<td align="right" bgcolor="#000000"> </td>
<td> </td>
</tr>
<tr bgcolor="#000000">
<td align="right" bgcolor="#000000">First Name:</td>
<td><input type="text" name="first" maxlength="25" value="<?=$first?>"></td>
</tr>
<tr bgcolor="#000000">
<td align="right" bgcolor="#000000">Last Name:</td>
<td><input type="text" name="last" maxlength="25" value="<?=$last?>"></td>
</tr>
<tr bgcolor="#000000">
<td align="right" bgcolor="#000000">Age:</td>
<td><input type="text" name="age" size="4" maxlength="2" value="<?=$age?>">
<font color="#CCCCCC" size="1">15+ only.</font></td>
</tr>
<tr bgcolor="#000000">
<td align="right" bgcolor="#000000"> </td>
<td> </td>
</tr>
<tr bgcolor="#000000">
<td colspan="2" class="border"><b>Misc:</b> <font color="#CCCCCC">Optional</font></td>
</tr>
<tr bgcolor="#000000">
<td align="right"> </td>
<td> </td>
</tr>
<tr bgcolor="000000">
<td align="right">instant messager:</td>
<td> <select name="messager"><option class="maintxt" <?if($messager==""){echo"selected";}?>>N/A</option><option value="AIM" <?if($messager=="AIM"){echo"selected";}?>>AIM</option><option value="MSN" <?if($messager=="MSN"){echo"selected";}?>>MSN</option><option value="YaHoO" <?if($messager=="YaHoO"){echo"selected";}?>>YaHo O</option></select> <input type="text" name="messager_id" size="14" maxlength="50" value="<?=$messager_id?>"> <font color="#CCCCCC" size="1">so we may contact you if important.</font></td>
</tr>
<tr>
<td align="right"><strong>Referred By: ( If Referred )</strong></td><td> <? if($refer){ echo"<b>$refer</b><input type=hidden name=refer value=$refer>"; } ?></td>
</tr>
<tr bgcolor="000000">
<td colspan="2" align="center"><br>
<b>You ip address is being logged as: <font color="#FFCC00"><?=$REMOTE_ADDR?></font></b><br>
when signing up yahoo and aol emails dont work to well to get the verify email so id use something else <br></td>
</tr>
<?php
$sagain = fetch("SELECT ip FROM $tab[user] WHERE ip='$REMOTE_ADDR'");
?>
<?if($sagain){ ?>
<tr bgcolor="000000">
<td colspan="2" align="center"><strong><font color="ff0000">This "<?=$REMOTE_ADDR?>" ip has already been used, the admins will be alerted as soon as you sign up!</strong></font><br>
<br></td>
</tr>
<? } ?>
<tr bgcolor="000000">
<td colspan="2" align="center"><input type="submit" name="signup" value="signup"> <input type="reset" value="cancel"></td>
</tr>
</table>
<br>
<input type="hidden" name="hash" value="f7610358ffcc3db6558310ea4a166bcb">
</form>
<?}elseif($step==2){?>
<form method="post" action="signup.php">
<?if($warn==yes){?><b><?}?>In order to proceed, you must agree with the following Game Rules:</b>
<table width="100%">
<tr>
<td colspan="2">
<div class="maintxt" style="border:thin inset;background: #000000; padding:6px; height:175px; overflow:auto"><?=$html[0]?></div>
</td>
</tr>
<tr>
<td><input type="checkbox" name="agree" value="yes" style="background: #111111;"> <input type="hidden" name="step2" value="1"> <strong class="maintxt">I have read, and agree to abide by the Game Rules.</strong></td>
<td align="right"><input type="submit" value="next »»"></td>
</tr>
</table>
</form>
<?}else{?>
<form method="post" action="signup.php">
<?if($warn==yes){?><b><?}?>In order to proceed, you must agree with the following Terms of Service:</b>
<table width="100%">
<tr>
<td colspan="2">
<div class="maintxt" style="border:thin inset;background: #000000; padding:6px; height:175px; overflow:auto"><?=$html[1]?></div> </td>
</tr>
<tr>
<td><input type="checkbox" name="agree" value="yes" style="background: #111111;"> <input type="hidden" name="step1" value="1">
<span class="maintxt"><strong><nobr>I have read, and agree to abide by the Terms of Service.</nobr></strong></span></td>
<td align="right"><input type="submit" value="next »»"></td>
</tr>
</table>
</form>
<?}?>
</td>
</tr>
</table>
<?}
sitefooter();
?>
|