This commit is contained in:
2022-06-13 23:37:17 +08:00
parent d21608a860
commit 0230cb42a2
153 changed files with 62907 additions and 0 deletions

19
app/user/loginsubmit.php Normal file
View File

@@ -0,0 +1,19 @@
<?php
if(empty($_POST))sysmsg('POST来的数据不能为空');
if(empty($_POST['username']))sysmsg('用户名不能为空');
if(empty($_POST['password']))sysmsg('密码不能为空');
$aes=new lib\Aes();
$username=$_POST['username'];
$password=$aes->encrypt($_POST['password']);
$login=new user\account();
$userinfo=$login->login($username,$password);
if($userinfo['uid']<0){//登录失败
alert($userinfo['msg']);
}else{
if ($userinfo['adminer']==1)$cookie::set('admin',$userinfo['uid']."@admin.com",null,'/');
$cookie::set('uid',$userinfo['uid'],null,'/');
alert('登录成功');
}
go('-1');