修改模板
This commit is contained in:
1 parent
50d36bbc63
commit
69774e06b2
13 files changed
+117
-50
No files matched your search
@@ -22,20 +22,22 @@ class UserLogin
|
||||
// 尝试从cookie中获取用户名和密码
|
||||
if( strlen($username)<1 )
|
||||
{
|
||||
// $username = cookie('?username') ? $username = cookie('username') : $username = '';
|
||||
// $password = cookie('?password') ? $password = cookie('password') : $password = '';
|
||||
$username = cookie('?username') ? $username = cookie('username') : $username = '';
|
||||
$password = cookie('?password') ? $password = cookie('password') : $password = '';
|
||||
}
|
||||
|
||||
// 如果没有获取到用户名和密码,则跳转到登录页面
|
||||
if( strlen($username)<1 )
|
||||
{
|
||||
echo "<script>top.location.href='/login';</script>";
|
||||
|
||||
echo "<script language='javascript' type='text/javascript'>top.location.href='http://".request()->host()."/login'</script>";
|
||||
}
|
||||
|
||||
// 检验用户名或密码是否正确
|
||||
$yz = new \app\login\controller\Index;
|
||||
$yz = $yz->check($username,$password);
|
||||
if($yz['status'] == 0){
|
||||
echo "<script>top.location.href='login';</script>";
|
||||
echo "<script language='javascript' type='text/javascript'>top.location.href='http://".request()->host()."/login'</script>";
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user