时间:2021-07-01 10:21:17 帮助过:29人阅读
if (isset($_GET['active']) && $_GET['action'] === 'ok') {
$_active = _mysql_string($_GET['active']);
if (mysql_fetch_array(_query("SELECT tg_active FROM tg_user WHERE tg_active='$_active' LIMIT 1"),MYSQL_ASSOC)) {
//将tg_active设置为actived
_query("UPDATE tg_user SET tg_active='actived' WHERE tg_active='$_active' LIMIT 1");
if (mysql_affected_rows() == 1) {
mysql_close();
_location('账户激活成功','login.php');
} else {
mysql_close();
_location('账户激活失败','register.php');
}
} else {
_alert_back('非法操作');
}
}
if (mysql_fetch_array(_query("SELECT tg_active FROM tg_user WHERE tg_active='$_active' LIMIT 1"),MYSQL_ASSOC)) {
//将tg_active设置为actived
_query("UPDATE tg_user SET tg_active='actived' WHERE tg_active='$_active' LIMIT 1");
if (mysql_affected_rows() == 1) {
mysql_close();
_location('账户激活成功','login.php');
} else {
mysql_close();
_location('账户激活失败','register.php');
}
} else {
_alert_back('非法操作');
}