13-09-2015, 12:07 PM
|
#34
|
|
|
• الانـتـسـاب » Aug 2012
|
|
• رقـم العـضـويـة » 103935
|
|
• المشـــاركـات » 1,662
|
|
• الـدولـة » Mansoura
|
|
• الـهـوايـة » Love the Destruction
|
|
• اسـم الـسـيـرفـر » Private Server
|
|
• الـجـنـس » Male
|
|
• نقـاط التقييم » 75
|
|
|
|
رد: [Release] مــوقــع جــديـد بــشــكـل ممــتـاز , بـممـيزات رائـعة
Reg page has a error with some DB's
here is the fix replace it with register
كود:
<?php
if(realpath(__FILE__) == realpath($_SERVER['SCRIPT_FILENAME'])) {
header('HTTP/1.0 404 Not Found');
exit;
}
?>
<aside id="right">
<article>
<h1 class="top">REGISTER .</h1>
<section class="body">
<center>
<?php if(session_is_registered(username) && session_is_registered(password)) {?>
Logout First!
<?php } else { ?>
<br />
<table align="center">
<tr>
<td colspan="2" class="panelsurround">
<form action="" method="post">
<table align="center" style="margin: auto;" width="100%">
<tr>
<td><input class="input" name="username" type="text" placeholder="# USERNAME ." style="margin-top: 6px;" /></td>
</tr>
<tr>
<td><input class="input" name="password" type="password" placeholder="# PASSWORD ." style="margin-top: 6px;" /></td>
</tr>
<tr>
<td><input class="input" name="password2" type="password" placeholder="# CONFIRM PASSWORD ." style="margin-top: 5px;" /></td>
</tr>
<tr>
<td><input class="input" name="email" type="text" placeholder="# E-MAIL ." style="margin-top: 6px;" /></td>
</tr>
</table>
<table align="center" width="90%">
<tr>
<td><input class="submit2" name="submit" type="submit" value="CREATE ACCOUNT" style="width: 93%"></td>
</tr>
</table>
<br />
<table align="center">
<tr>
<td class="down2">
<?php
if( isset($_POST['submit'])) {
$username=$_POST['username'];
$password=$_POST['password'];
$password2=$_POST['password2'];
$email=$_POST['email'];
$IP = $_SERVER['REMOTE_ADDR'];
################################################
################################################
if($fnc->checkUser($username) >= 1)
{ $errors .= "Username Already Exists . \n"; }
################################################
################################################
if($fnc->checkEmail($email) >= 1)
{ $errors .= "Email Already Exists . \n"; }
################################################
if(empty($username) || empty($password) || empty($email))
{ $errors .= "All Of Fields Are Required . \n"; }
################################################
if ($password !== $password2)
{ $errors .= "Passwords Didn't Match . \n"; }
################################################
if(strlen($username) > 12 || strlen($username) < 4)
{ $errors .= "Username Must Be At Least 4 Characters Long . \n"; }
################################################
if(strlen($password) > 12 || strlen($password) < 6)
{ $errors .= "Password Must Be At Least 4 Characters Long . \n"; }
################################################
if(!filter_var($email, FILTER_VALIDATE_EMAIL))
{ $errors .= "E-mail Is Not Valid . \n"; }
################################################
################################################
if(!empty($errors))
{ echo "<div align='center'>".nl2br($errors)."</div>"; }
else {
$passwordfinal = md5($password);
$success= $fnc->exec("insert into $accdb..TB_User(StrUseriD,password,email,reg_ip,sec_content,sec_primary) Values('$username','$passwordfinal','$email','$IP','3','3')") or die(mssql_get_last_message());
}
################################################
if($success) {
echo"Account Created Successfully !<br />";
echo"# Username : <font color='red'>".$username."</font><br />";
echo"# E-Mail : <font color='red'>".$email."</font><br />";
}
}
else echo "Fill Up This Form And Press Create Account .";
}
?>
</td>
</tr>
</table>
</form>
</td>
</tr>
</table>
<br /><br />
</center>
</section>
</article>
</aside>
|
|
|
|