<%' 这部分代码你可以删掉 开始 %>

King Content Management System! 5

新一代 KingCMS 为您提供了:
更好的界面、更多的开发余地、更强大的扩展能力!

<%' 结束 %>

<%' 这部分代码你可以删掉 开始 %>

使用前,请先阅读 KingCMS 5.0 许可协议

官方网站:KingCMS.com

电子邮件:KingCMS@Gmail.com

官方论坛:bbs.KingCMS.com

<%' 结束 %>
<% dim adminname,adminpass,adminsalt,rs,doc,ip,logcount,sql adminname=left(form("adminname"),12) if len(adminname)>0 and len(form("adminpass"))>0 then adminpass=md5(form("adminpass"),1) on error resume next set conn=server.createobject("adodb.connection") conn.open objconn if err.number<>0 then set doc=Server.CreateObject(king_xmldom) doc.async=false doc.load(server.mappath(king_system&"system/language/"&king_language&".xml")) response.clear response.write doc.documentElement.SelectSingleNode("//kingcms/error/db").text response.end() end if err.clear ip=request.servervariables("http_x_forwarded_for") if ip="" then ip=request.servervariables("remote_addr") if king_dbtype=1 then sql="select count(logid) from kinglog where ip='"&safe(ip)&"' and lognum=2 and getdate()-logdate<0.25;" else sql="select count(logid) from kinglog where ip='"&safe(ip)&"' and lognum=2 and now()-logdate<0.25;" end if logcount=conn.execute(sql)(0) if logcount>=king_loginnum then response.write "

您尝试登录次数过多,已被系统锁定

" else set rs=conn.execute("select adminid from kingadmin where adminname='"&safe(adminname)&"' and adminpass='"&safe(adminpass)&"';") if not rs.eof and not rs.bof then conn.execute "update kingadmin set admindate='"&tnow&"',admincount=admincount+1 where adminname='"&safe(adminname)&"';" conn.execute "insert into kinglog (adminname,lognum,ip,logdate) values ('"&safe(adminname)&"',1,'"&safe(ip)&"','"&tnow&"')" response.cookies(md5(king_salt_admin,1))("name")=adminname response.cookies(md5(king_salt_admin,1))("pass")=adminpass'newpass response.cookies(md5(king_salt_admin,1)).path = "/" response.redirect "manage.asp" else conn.execute "insert into kinglog (adminname,lognum,ip,logdate) values ('"&safe(adminname)&"',2,'"&safe(ip)&"','"&tnow&"')" if king_loginnum-logcount=1 then response.write "

您尝试登录次数过多,已被系统锁定

" else response.write "

您的帐号或密码有误 !还有"&(king_loginnum-logcount-1)&"次登录的机会。

" end if end if rs.close set rs=nothing end if end if %>

Copyright © KingCMS.com All Rights Reserved.