代码拉取完成,页面将自动刷新
<?php
include 'system/config.php';
include 'system/mysql.php';
if(!empty($_COOKIE[md5($siteKey)]) && Mysql::getAllRows('select * from user where user_cookie=\''.$_COOKIE[md5($siteKey)].'\'')){
if(!empty($_GET['locate']) && $_GET['locate']=='change'){
//修改密码
include 'include/manage.php';
if(!empty($_POST['newpassa']) && !empty($_POST['newpassb']) && !empty($_POST['oldpass'])){
$oldpass=md5($_POST['oldpass']);
$newpassa=md5($_POST['newpassa']);
$newpassb=md5($_POST['newpassb']);
$cookie=$_COOKIE[md5($siteKey)];
$pass=Mysql::getAllRows('select user_pass from user where user_cookie=\''.$cookie.'\'');
if($oldpass==$pass[0]['user_pass'] && $newpassa==$newpassb){
Mysql::query('update user set user_pass=\''.$newpassa.'\' where user_cookie=\''.$cookie.'\'');
echo $change_head;
echo $change_alert3;
echo $foot;
header('refresh:3;url=/');
}else{
echo $change_head;
echo $change_alert1;
echo $change_form;
echo $foot;
}
}else if(!empty($_POST['oldpass']) || !empty($_POST['oldpass']) || !empty($_POST['oldpass'])){
echo $change_head;
echo $change_alert2;
echo $change_form;
echo $foot;
}else{
echo $change_head;
echo $change_form;
echo $foot;
}
}else if(!empty($_GET['locate']) && $_GET['locate']=='outlogin'){
//退出登录
include 'include/manage.php';
if(!empty($_GET['outlogin']) && $_GET['outlogin']=='yes'){
echo $outlogin_head;
echo $outlogin_alert;
echo $foot;
setcookie(md5($siteKey),'',time()+86400);
header('refresh:3;url=/');
}else{
echo $outlogin_head;
echo $outlogin_form;
echo $foot;
}
}else{
header('location:/');
}
}else{
header('location:/');
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。