2 Star 2 Fork 0

鉛華 / Statistics Ver1.0

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
usermanage.php 1.59 KB
一键复制 编辑 原始数据 按行查看 历史
鉛華 提交于 2018-08-01 21:22 . Upload usermanage.php index.php
<?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:/');
}
PHP
1
https://gitee.com/yloveo/Statistics-Ver1.0.git
git@gitee.com:yloveo/Statistics-Ver1.0.git
yloveo
Statistics-Ver1.0
Statistics Ver1.0
master

搜索帮助