修复一些错误

This commit is contained in:
LyLme 2022-03-19 21:43:52 +08:00
parent 3828d9b8b3
commit ee303f0fb2
2 changed files with 3 additions and 3 deletions

View File

@ -1,6 +1,6 @@
<?php
include_once("../include/common.php");
if($islogin==1){}else exit("<script language='javascript'>window.location.href='./login.php';</script>");
if(isset($islogin)==1){}else exit("<script language='javascript'>window.location.href='./login.php';</script>");
$update = update(); //检查更新
?>
<!DOCTYPE html>

View File

@ -4,7 +4,7 @@ if(isset($_POST['user']) && isset($_POST['pass'])){
$user=daddslashes($_POST['user']);
$pass=daddslashes($_POST['pass']);
if($user==$conf['admin_user'] && $pass==$conf['admin_pwd']) {
$session=md5($user.$pass.$password_hash);
$session=md5($user.$pass);
$token=authcode("{$user}\t{$session}", 'ENCODE', SYS_KEY);
setcookie("admin_token", $token, time() + 604800);
@header('Content-Type: text/html; charset=UTF-8');
@ -17,7 +17,7 @@ if(isset($_POST['user']) && isset($_POST['pass'])){
setcookie("admin_token", "", time() - 604800);
@header('Content-Type: text/html; charset=UTF-8');
exit("<script language='javascript'>alert('您已成功注销本次登陆!');window.location.href='./login.php';</script>");
}elseif($islogin==1){
}elseif(isset($islogin)==1){
exit("<script language='javascript'>alert('您已登陆!');window.location.href='./';</script>");
}
?>