Browse Source

add 403 error

pull/11/head
xiaoz 4 years ago
parent
commit
a15decead2
  1. 4
      controller/admin.php

4
controller/admin.php

@ -104,7 +104,9 @@ function check_auth($user,$password){
$cookie = $_COOKIE['key']; $cookie = $_COOKIE['key'];
//如果cookie的值和计算的key不一致,则没有权限 //如果cookie的值和计算的key不一致,则没有权限
if( $cookie != $key ){ if( $cookie != $key ){
exit("<h3>认证失败,请<a href = 'index.php?c=login'>重新登录</a></h3>"); $msg = "<h3>认证失败,请<a href = 'index.php?c=login'>重新登录</a></h3>";
require('templates/admin/403.php');
exit;
} }
} }

Loading…
Cancel
Save