📄 activate.php
字号:
<?php
require_once('includes/config.inc.php');
$page_title='Activate Your Account';
include('includes/header.html');
$x=$y=false;
if(isset($_GET['x'])&&preg_match('/^[\w.-]+@[\w.-]+\.[A-z]{2,6}$/',$_GET['x'])){
$x=$_GET['x'];
}
if(isset($_GET['y'])&&strlen($_GET['y'])==32){
$y=$_GET['y'];
}
if($x&&$y){
require_once(MYSQL);
$q="UPDATE users set active=NULL WHERE (email='".mysqli_real_escape_string($dbc,$x)."' AND active='".mysqli_real_escape_string($dbc,$y)."')LIMIT 1";
$r=mysqli_query($dbc,$q) or trigger("Query: $q\n <br/>Mysql Error: ".mysqli_error($dbc));
if(mysqli_affected_rows($dbc)==1){
echo"<h3>Your account is now active. You may now log in.</h3>";
}else{
echo'<p class="error">Your account could not be activated. Pleaase recheck the link or contact the system administrator.</font></p>';
}
mysqli_close($dbc);
}else{
$url=BASE_URL.'index.php';
ob_end_clean();
header("Location: $url");
exit();
}
include('includes/footer.html');
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -