$_sql="select adminlogin from %a_admin where adminname='".$king->db->escape($adminname)."';"; if($_res=$king->db->getRows_one($_sql)){ $_location=$_res['adminlogin']; } kc_ajax('','',0,"parent.location='{$_location}'"); }else{ kc_ajax($king->lang->get('system/login/title'),$s,$but,'',450,280); kc_error($but); } } //!king_ajax_login //验证管理员帐号 //king_ajax_login_check function king_ajax_login_check($_name,$_pass){ global $king;
if(strlen($_pass)>0){
$_md5pass=md5($_pass); $_sql="select adminname,adminlanguage,adminmode,adminskins from %a_admin where adminname='".$king->db->escape($_name)."' and adminpass='".$_md5pass."' and isdelete=0;";
if($_res=$king->db->getRows_one($_sql)){
header('P3P: CP="NOI ADM DEV PSAi COM NAV OUR OTR STP IND DEM"'); setcookie('KingCMS_Admin',$_res['adminname']."\t".md5($_res['adminname'].$_md5pass),(kc_post('expire') ? time() + (int) kc_post('expire') : 0),'/'); setcookie("language",$_res['adminlanguage'],time()+86400000,'/');
'; kc_ajax($king->lang->get('system/common/about').'..',$s,0,'',240,290); } //!king_ajax_about //退出登录 //king_ajax_logout function king_ajax_logout(){ global $king;
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn