From 2ef908a892039631bbd11b151a2c69b57986f662 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8C=81=E5=A3=AE=E6=88=90=E9=95=BF?= <2291200076@qq.com> Date: Sat, 16 Jan 2021 03:58:37 +0800 Subject: [PATCH] =?UTF-8?q?=E9=92=88=E5=AF=B9=E8=BF=99=E4=B8=AA=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E6=97=A0=E6=B3=95=E5=9C=A8=E7=BD=91=E7=AB=99=E9=9D=9E?= =?UTF-8?q?=E6=A0=B9=E7=9B=AE=E5=BD=95=E4=B8=8B=E8=BF=90=E8=A1=8C=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98=EF=BC=8C=E6=88=91=E5=A4=A7=E8=87=B4=E4=B8=8A?= =?UTF-8?q?=E9=98=85=E8=AF=BB=E4=BA=86=E4=B8=80=E9=81=8D=E4=BD=A0=E7=9A=84?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E4=BB=A3=E7=A0=81=EF=BC=8C=E7=84=B6=E5=90=8E?= =?UTF-8?q?=E5=81=9A=E5=87=BA=E4=BA=86=E7=9B=B8=E5=BA=94=E6=94=B9=E5=8A=A8?= =?UTF-8?q?=EF=BC=8C=E6=88=91=E5=9C=A8=E6=9C=AC=E5=9C=B0=E4=BB=A5=E5=8F=8A?= =?UTF-8?q?=E9=83=A8=E7=BD=B2=E5=88=B0=E6=9C=8D=E5=8A=A1=E5=99=A8=E4=B8=8A?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E8=BF=87=EF=BC=8C=E5=9D=87=E5=8F=AF=E4=BB=A5?= =?UTF-8?q?=E6=AD=A3=E5=B8=B8=E8=BF=90=E8=A1=8C=EF=BC=88=E4=B8=8D=E8=BF=87?= =?UTF-8?q?=E5=AF=B9=E4=BA=8E=E9=83=A8=E7=BD=B2=E5=9C=A8=E5=AD=90=E7=9B=AE?= =?UTF-8?q?=E5=BD=95=E7=9A=84=E7=94=A8=E6=88=B7=EF=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A7=E7=BB=AD=E5=8A=A0=E6=B2=B9=EF=BC=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- controller/admin.php | 4 ++-- controller/login.php | 4 +++- templates/admin/header.php | 14 +++++++------- templates/admin/left.php | 8 ++++---- templates/admin/static/embed.js | 32 +++++++++++++++---------------- templates/default/index.php | 2 +- templates/default/static/embed.js | 8 ++++---- 7 files changed, 37 insertions(+), 35 deletions(-) diff --git a/controller/admin.php b/controller/admin.php index df1bde4..a02de16 100644 --- a/controller/admin.php +++ b/controller/admin.php @@ -64,7 +64,7 @@ if ($page == 'logout') { //清除cookie setcookie("key", $key, -(time()+7 * 24 * 60 * 60),"/"); //跳转到首页 - header('location:/'); + header('location:'.dirname($_SERVER['PHP_SELF'])); exit; } @@ -104,7 +104,7 @@ function check_auth($user,$password){ $cookie = $_COOKIE['key']; //如果cookie的值和计算的key不一致,则没有权限 if( $cookie != $key ){ - exit("