江湖装企营销系统ZQV1.2.20141122去掉登录后台验证码的方法
打开网站目录下的 \system\admin\controllers\index.ctl.php 文件,查找如下代码:
public function login()
{
if($_POST['admin_name']){
if(!$name = $this->GP('admin_name')){
$this->err->add('登录名不能为空',401);
}else if(!$passwd = $this->GP('admin_pwd')){
$this->err->add('登录密码不能为空',402);
}else if(!$code = $this->GP('verify_code')){
$this->err->add('验证码不能为空',403);
}else if(!K::M('magic/verify')->check($code)){
$this->err->add('验证码不正确',403);
}else if($this->system->admin->login($name,$passwd)){
header("Location:?index.html");
exit();
}
}else{
$this->tmpl = 'admin:page/login.html';
$this->output();
}
$this->err->show("?index/login.html");
}
替换为:
public function login()
{
if($_POST['admin_name']){
if(!$name = $this->GP('admin_name')){
$this->err->add('登录名不能为空',401);
}else if(!$passwd = $this->GP('admin_pwd')){
$this->err->add('登录密码不能为空',402);
}else if(!$code = $this->GP('verify_code')){
$this->err->add('验证码不能为空',403);
}else if($this->system->admin->login($name,$passwd)){
header("Location:?index.html");
exit();
}
}else{
$this->tmpl = 'admin:page/login.html';
$this->output();
}
$this->err->show("?index/login.html");
}
|
|