function login() { $this->_fix_failedlogins(); if(MEMBER_ID < 1) { $this->Messager("请先在前台进行<a href='index.php?mod=account&code=login'><b>登录</b></a>",null); } $loginperm = $this->_logincheck(); if(!$loginperm) { $this->Messager("累计 5 次错误尝试,15 分钟内您将不能登录。",null); } $this->Title="用户登录"; if ($this->CookieHandler->GetVar('referer')=='') { $this->CookieHandler->Setvar('referer',referer()); } $action="admin.php?mod=login&code=dologin"; $question_select=FormHandler::Select('question',ConfigHandler::get('member','question_list'),0); $role_type_select=FormHandler::Radio('role_type',ConfigHandler::get('member','role_type_list'),'normal'); ob_clean(); include(handler('template')->file("@admin/login")); }
function YesNoRadio($name,$checked='',$extra='',$op_extra='') { $options=array( array("name"=>__("是"),"value"=>"1",'extra'=>$op_extra), array("name"=>__("否"),"value"=>"0",'extra'=>$op_extra)); Return FormHandler::Radio($name,$options,$checked,$extra); }
function Login() { if ( (MEMBER_ID != 0 and false == $this->IsAdmin) || MEMBER_ID > 0) { $this->Messager("您已经使用用户名 " . MEMBER_NAME . " 登录系统,无需再次登录!", null); } $loginperm = $this->_logincheck(); if ( ! $loginperm ) { $this->Messager("累计 5 次错误尝试,15 分钟内您将不能登录。", null); } $this->Title = "用户登录"; $action = "?mod=account&code=login&op=done"; $question_select = FormHandler::Select("question", ConfigHandler::get("member", "question_list"), 0); $role_type_select = FormHandler::Radio("role_type", ConfigHandler::get("member", "role_type_list"), "normal"); account()->loginReferer($_SERVER['HTTP_REFERER']); include ($this->TemplateHandler->Template("account_login")); }