省实附中吧吧务应征系统3.0 源代码开放·邮箱激活处理

<?php
require(“header.php”);
if(!$_GET[‘username’]||!$_GET[‘signup_token’])
{
echo (“<script type=’text/javascript’> location.href=’erro.php?content=非法访问!’;</script>”);
exit;
}
$r=true;
require(‘config.php’);
require(‘stat.php’);
$db=mysql_connect($ucenterhostname,$ucentersqlname,$ucentersqlpass);
mysql_select_db($ucenterdbname,$db);
mysql_query(“set names ‘utf8′”);
$username = $_GET[‘username’];
$signup_token = $_GET[‘signup_token’];
$sql=”select * from $ucenterdbtable where username=’$username’ and reg_token=’$signup_token'”;
$result=mysql_fetch_array(mysql_query($sql));
if(!$result){
echo (“<script type=’text/javascript’> location.href=’erro.php?content=验证信息无效!请重试!’;</script>”);
mysql_close();
exit;
}else{
mysql_query(“set names ‘utf8′”);
$sql=”update $ucenterdbtable set pass=’yes’ where username=’$username'”;
mysql_query($sql);
echo (“<script type=’text/javascript’> location.href=’erro.php?content=激活成功!’;</script>”);}
?>

</body>
</html>

未经允许不得转载:Lyndon's Studio » 省实附中吧吧务应征系统3.0 源代码开放·邮箱激活处理