尝试使用我的register.php
脚本时出现以下错误。
Forbidden
You don't have permission to access /register.php on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
这是脚本:
<?php //error_reporting(E_ALL ^ E_NOTICE); ini_set('display_errors', true);
include('header.php');
if(isset($_POST['register'])){
foreach($_POST as $key => $value) {
$sec[$key] = filter($value);
}
$verificare1 = mysql_query("SELECT * FROM `users` WHERE `login`='{$sec['user']}' OR `email`='{$sec['email']}'");
$verificare = mysql_num_rows($verificare1);
if ($verificare > 0) {
$mesaj = "<div class=\"error\">ERROR: Username or email already registered!</div>";
}else if (!isUserID($sec['user'])) {
$mesaj = "<div class=\"error\">ERROR: Username is incorrect!</div>";
}else if(!isEmail($sec['email'])) {
$mesaj = "<div class=\"error\">ERROR: Enter a valid email address!</div>";
}else if (!checkPwd($sec['password'],$sec['password2'])) {
$mesaj = "<div class=\"error\">ERROR: Passwords do not match!</div>";
}else{
if(isset($_COOKIE['PlusREF'])){
$ref = $_COOKIE['PlusREF'];
$user1 = mysql_query("SELECT * FROM `users` WHERE `id`='{$ref}'");
$user = mysql_fetch_object($user1);
mysql_query("INSERT INTO `referals`(user,referal,date) values('{$user->login}','{$sec['user']}',NOW())");
}
$activare = rand(000000000, 999999909);
mail($sec['email'],"Welcome to ExchangeBoost.com","
Hello,
Thank you for signing up at ExchangeBoost.com.
Click on the link below in order to activate your account:
{$site->site_url}/activate.php?cod={$activare}
If you would like after you activate your account you can buy coins in the UserCP at a very low rate.
Thank you!","From: ExchangeBoost.com <{$site->site_email}>");
$final = VisitorIP();
$passa = $sec['password'];
$passc = MD5($passa);
mysql_query("INSERT INTO `users`(email,login,coins,IP,pass,passdecoded,ref,signup,activate) values('{$sec['email']}','{$sec['user']}','100','$final','$passc','$passa','{$ref}',NOW(),'{$activare}')")or die(mysql_error());
$mesaj = "<div class=\"success\">Registered! You need to confirm your email address now!</div>";
}}
?>
<div class="main">
<div class="content-ex">
<div class="msg"><?echo $mesaj;?></div>
<form action="" method="post">
<p>
<label>Username</label><br/>
<input class="text big" type="text" value="" name="user"/>
</p>
<p>
<label>Email</label><br/>
<input class="text big" type="email" value="" name="email"/>
</p>
<p>
<label>Password</label> <br/>
<input class="text big" type="password" value="" name="password"/>
</p>
<p>
<label>Repeat Password</label> <br/>
<input class="text big" type="password" value="" name="password2"/>
</p>
<p>
<input type="submit" class="bbut" value="Register" name="register" />
</p>
</form>
</div>
<div class="signin">
<h2>Sign In</h2>
<form method="post">
<input class="text big" type="text" value="Username:" name="login">
<input class="text big" type="password" value="Password:" name="pass">
<div class="buttons">
<input type="submit" class="gbut" name="logare" value="Login" /><a class="bbut" href="register.php" name="logare" value="Register">Register</a>
<br><br>
<a href="recover.php">Dude, I forgot my password!</a>
</div>
</form>
</div>
</div>
<?include('footer.php');?>