iRose registration script (HERE)

Status
Not open for further replies.
Newbie Spellweaver
Joined
Apr 24, 2007
Messages
21
Reaction score
0
<h3>Account Registration</h3>
<?php
if (!class_exists('XWSite')) { $XWSite = new X-World(); }
if (isset($_POST['goregister']))
{
$scaptcha = $XWSite->XWStrip($_POST['captcha']);
$captcha = $_SESSION['captcha'];
unset($_SESSION['captcha']);

if (($scaptcha != $captcha) || ($scaptcha == $captcha))
{
$ReturnValue = $ASSite->ASRegister($_POST['Auser'],$_POST['Aemail'],$_POST['Amother'],$_POST['Pass1'],$_POST['Pass2'],$_SERVER['REMOTE_ADDR'],$_POST['ASmod']);

if ($ReturnValue == 0) { echo '<div class="alertgood">Account successfully created</div>'; }
elseif ($ReturnValue == 1) { echo '<div class="alertbad">You didn`t fill every fields</div>'; }
elseif ($ReturnValue == 2) { echo '<div class="alertbad">You didn`t type your two passes correctly</div>'; }
elseif ($ReturnValue == 3) { echo '<div class="alertbad">This account name is already taken</div>'; }
elseif ($ReturnValue == 4) { echo '<div class="alertbad">This email is already in use</div>'; }
elseif ($ReturnValue == 5) { echo '<div class="alertbad">This email has an incorrect format</div>'; }
} else { echo '<div class="alertbad">Your confirmation code is wrong</div>'; }
} else {
echo '<fieldset><legend>Warning</legend>Please, be aware that if your information are incorrect here, you won\'t be able to get any support in game. Information you will provide will not be given to third side. They will be used only for statistics and your support on this server.<br /><br /><span style="color:red"> ONLY NUMBERS AND LETTERS, OR YOUR ACCOUNT WON`T BE CREATED CORRECTLY.</span></fieldset><br />';
}
$rdm1 = rand(100000,600000);
$rdm = sha1($rdm1);
$rdm = md5($rdm);
$rdm = substr($rdm,2,6);
$_SESSION['captcha'] = $rdm;
?>
<?php
$arrayip = array();
if (in_array($_SERVER['REMOTE_ADDR'], $arrayip)) { exit(); }
?>
<div align="center">
<form method="post">
<table>
<tr><td style="text-align:left">Account Name : </td><td><input type="text" name="Auser" /></td></tr>
<tr><td style="text-align:left">Email : </td><td><input type="text" name="Aemail" /></td></tr>
<tr><td style="text-align:left">Mother's name :</td><td><input type="text" name="Amother" /></td></tr>
<tr><td style="text-align:left">Password :</td><td><input type="password" name="Pass1" /></td></tr>
<tr><td style="text-align:left">Confirm Password :</td><td><input type="password" name="Pass2" /></td></tr>
<tr><td style="text-align:left">Confirmation code :</td><td><?php echo '<img src="captcha.php?nbr='.$rdm1.'" alt="" />'; ?></td></tr>
<tr><td style="text-align:left">Recopy this code :</td><td><input type="text" name="captcha" /></td></tr>
<tr><td></td><td><input class="inputbut" type="submit" name="goregister" value="Register" /></td></tr>
<tr><td><input type="hidden" name="XWmod" value="" /></td><td></td></tr>
</table></form></div>
 
Oooo. Ok thanks I'll give this a try. Any chance you can send a captcha? If not, I'll just use Matt's 5-number-generator.

Also is there any kind of function.inc.php or anything that it will need?
 
Status
Not open for further replies.
Back