http://www.xmfoodcn.com/system/login.php
输入完账号密码 点击登录 就没反应了。 US:admin pw:admin888 后台密码。
有能力的大神帮个忙给看看呗 ,网上淘的码
/* ======= >>> KingCMS
* @License http://www.KingCMS.com/license/ *
* @Link http://www.KingCMS.com/ *
* @E-Mail KingCMS(a)Gmail.com *
* Copyright (c) KingCMS.com All Rights Reserved. *
* ================================================== */
//显示登录
//king_ajax_login
function king_ajax_login(){
/**
登录页面增加一个$act变量,做登录判断用。
*/
global $king;
$adminname=kc_post('adminname');
$adminpass=kc_post('adminpass');
$s='
';
$s.=kc_check(array(array('adminname',0,$king->lang->get('system/check/e0'),2,12),array('adminname',1,$king->lang->get('system/check/e1'))));
$s.='
$s.='
';
$s.=kc_check(array(array('adminpass',0,$king->lang->get('system/check/e0'),6,30)));
if($GLOBALS['ischeck']){
$s.=kc_check(array(array('adminpass',12,$king->lang->get('system/login/check'),!king_ajax_login_check($adminname,$adminpass))));
}
$s.='
//增加验证码
$verify=new KC_Verify_class;
$s.=$verify->Show();
//expire
$array_select=array(
0=>$king->lang->get('system/time/cookie'),
86400=>$king->lang->get('system/time/oneday'),
2592000=>$king->lang->get('system/time/jan'),
15768000=>$king->lang->get('system/time/halfyear'),
315360000=>$king->lang->get('system/time/forever'),
);
$s.='
'.kc_htm_select('expire',$array_select,86400).'
$but=kc_htm_a($king->lang->get('system/common/login'),"{CMD:'login',IS:1}");
$but.='lang->get('system/common/close').'" class="k_close">'.$king->lang->get('system/common/close').'';
// $s.='';
if($GLOBALS['ischeck']){
$_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,'/');
//写管理员登陆信息
$_array=array(
'admindate' =>time(),
'[admincount]'=>'admincount+1',
);
$king->db->update('%a_admin',$_array,"adminname='".$king->db->escape($_name)."'");
$king->log(1,$_name);
return True;
}else{
//写登陆错误log
$king->log(2,$_name);
return False;
}
}else{
return False;
}
} //!king_ajax_login_check
//显示登录
//king_ajax_about
function king_ajax_about(){
global $king;
$s='
$s.='
KingCMS for PHP '.$king->devname.'
';$s.='
Version: '.$king->version.'
';///'.$king->lang->get('system/login/about').'$s.='
Copyright © KingCMS.com
';$s.='
2004 - 2011
';$s.='
kc_ajax($king->lang->get('system/common/about').'..',$s,0,'',240,290);
} //!king_ajax_about
//退出登录
//king_ajax_logout
function king_ajax_logout(){
global $king;
$king->access(0);
$king->cache->del('system/admin/'.$king->admin['adminname']);
//写注销log
list($_name,$_pass)=isset($_COOKIE['KingCMS_Admin']) ? kc_explode("\t",$_COOKIE['KingCMS_Admin'],2):array(NULL,NULL);
$king->log(3,$_name);
header('P3P: CP="NOI ADM DEV PSAi COM NAV OUR OTR STP IND DEM"');
setcookie('KingCMS_Admin',$_name,-864000,'/');
kc_ajax('','',0,'parent.location=\'../system/login.php\'');
}
/* ------>>> KingCMS for PHP
function king_def(){
global $king;
$king->skin->setPath('system.login.htm');//设置为home模板
$tip=is_file('../INSTALL.php')?"
".$king->lang->get('system/error/install')." |
$king->skin->output($king->lang->get('system/login/title'),null,null,'<script>$.kc_ajax(\'{CMD:\\\'login\\\',METHOD:\\\'GET\\\'}\')</script>'.$tip);
}
?>
回复讨论(解决方案)
账号密码不正确!
账号密码不正确! 把关键的代码贴出来就可以了
自己慢慢调是吧
楼主代码貌似用的是Cookie保存, 建议楼主仔细修改代码 。
貌似也不是自己源程序。

APHPDependencyInjectionContainerisatoolthatmanagesclassdependencies,enhancingcodemodularity,testability,andmaintainability.Itactsasacentralhubforcreatingandinjectingdependencies,thusreducingtightcouplingandeasingunittesting.

Select DependencyInjection (DI) for large applications, ServiceLocator is suitable for small projects or prototypes. 1) DI improves the testability and modularity of the code through constructor injection. 2) ServiceLocator obtains services through center registration, which is convenient but may lead to an increase in code coupling.

PHPapplicationscanbeoptimizedforspeedandefficiencyby:1)enablingopcacheinphp.ini,2)usingpreparedstatementswithPDOfordatabasequeries,3)replacingloopswitharray_filterandarray_mapfordataprocessing,4)configuringNginxasareverseproxy,5)implementingcachingwi

PHPemailvalidationinvolvesthreesteps:1)Formatvalidationusingregularexpressionstochecktheemailformat;2)DNSvalidationtoensurethedomainhasavalidMXrecord;3)SMTPvalidation,themostthoroughmethod,whichchecksifthemailboxexistsbyconnectingtotheSMTPserver.Impl

TomakePHPapplicationsfaster,followthesesteps:1)UseOpcodeCachinglikeOPcachetostoreprecompiledscriptbytecode.2)MinimizeDatabaseQueriesbyusingquerycachingandefficientindexing.3)LeveragePHP7 Featuresforbettercodeefficiency.4)ImplementCachingStrategiessuc

ToimprovePHPapplicationspeed,followthesesteps:1)EnableopcodecachingwithAPCutoreducescriptexecutiontime.2)ImplementdatabasequerycachingusingPDOtominimizedatabasehits.3)UseHTTP/2tomultiplexrequestsandreduceconnectionoverhead.4)Limitsessionusagebyclosin

Dependency injection (DI) significantly improves the testability of PHP code by explicitly transitive dependencies. 1) DI decoupling classes and specific implementations make testing and maintenance more flexible. 2) Among the three types, the constructor injects explicit expression dependencies to keep the state consistent. 3) Use DI containers to manage complex dependencies to improve code quality and development efficiency.

DatabasequeryoptimizationinPHPinvolvesseveralstrategiestoenhanceperformance.1)Selectonlynecessarycolumnstoreducedatatransfer.2)Useindexingtospeedupdataretrieval.3)Implementquerycachingtostoreresultsoffrequentqueries.4)Utilizepreparedstatementsforeffi


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

SublimeText3 Chinese version
Chinese version, very easy to use

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

Dreamweaver Mac version
Visual web development tools
