提交 59302ec2 authored 作者: chengye's avatar chengye

aaa

上级 586f7228
...@@ -205,7 +205,8 @@ final class rockClass ...@@ -205,7 +205,8 @@ final class rockClass
public function setsession($kv,$vv) public function setsession($kv,$vv)
{ {
$_SESSION[QOM.$kv]=$vv; $_SESSION[QOM.$kv]=$vv;
} '''
.'}
public function session($name,$dev='') public function session($name,$dev='')
{ {
......
<?php
class loginClassAction extends ActionNot{
public function defaultAction()
{
$this->tpltype = 'html';
$this->smartydata['ca_adminuser'] = $this->getcookie('ca_adminuser');
$this->smartydata['ca_rempass'] = $this->getcookie('ca_rempass');
$this->smartydata['ca_adminpass'] = $this->getcookie('ca_adminpass');
$this->smartydata['loginyzm'] = (int)getconfig('loginyzm','0'); //登录类型
}
public function checkAjax()
{
$user = $this->jm->base64decode($this->post('adminuser'));
$user = str_replace(' ','',$user);
$pass = $this->jm->base64decode($this->post('adminpass'));
$rempass= $this->post('rempass');
$jmpass = $this->post('jmpass');
$cfrom = $this->post('cfrom','pc');
if($jmpass == 'true')$pass=$this->jm->uncrypt($pass);
$userp = $user;
$arr = m('login')->start($user, $pass, $cfrom);
$barr = array();
if(is_array($arr)){
if(isset($arr['mobile'])){
$barr = $arr;
$barr['success'] = false;
return $barr;
}
$uid = $arr['uid'];
$name = $arr['name'];
$user = $arr['user'];
$token = $arr['token'];
$face = $arr['face'];
m('login')->setsession($uid, $name, $token, $user);
$this->rock->savecookie('ca_adminuser', $userp);
$this->rock->savecookie('ca_rempass', $rempass);
$ca_adminpass = $this->jm->encrypt($pass);
if($rempass=='0')$ca_adminpass='';
$this->rock->savecookie('ca_adminpass', $ca_adminpass);
$barr['success'] = true;
$barr['face'] = $face;
}else{
$barr['success'] = false;
$barr['msg'] = $arr;
}
return $barr;
}
public function exitAction()
{
m('dept')->online(0);//离线
m('login')->exitlogin('pc',$this->admintoken);
$this->rock->location('?m=login');
}
}
\ No newline at end of file
...@@ -308,14 +308,11 @@ class loginClassModel extends Model ...@@ -308,14 +308,11 @@ class loginClassModel extends Model
$redis->close(); $redis->close();
$this->rock->clearcookie('mo_adminid,PHPSESSID,ukey'); $this->rock->clearcookie('mo_adminid,PHPSESSID,ukey');
$this->rock->clearsession('adminid,adminname,adminuser,user,ukey'); $this->rock->clearsession('adminid,adminname,adminuser,user,ukey');
$this->rock->clearcookie('user','/',ini_get('session.cookie_domain')); $this->rock->clearcookie('user','/',ini_get('session.cookie_domain'));
$this->rock->clearallcookie(); $this->rock->clearallcookie();
$this->rock->clearallsession(); $this->rock->clearallsession();
$this->update("`online`=0", "`token`='$token'"); $this->update("`online`=0", "`token`='$token'");
} }
......
...@@ -14,7 +14,7 @@ class Action extends mainAction ...@@ -14,7 +14,7 @@ class Action extends mainAction
public $loadci = 0; public $loadci = 0;
public $flow; public $flow;
protected $ajaxbool = 'false'; protected $ajaxbool = 'false';
public function getlogin($lx=0) public function getlogin($lx=0)
{ {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论