mirror of
https://github.com/LyLme/lylme_spage.git
synced 2024-11-17 22:38:03 +08:00
修复一些错误
This commit is contained in:
parent
3828d9b8b3
commit
ee303f0fb2
@ -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>
|
||||
|
@ -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>");
|
||||
}
|
||||
?>
|
||||
|
Loading…
Reference in New Issue
Block a user