时间:2021-05-18
复制代码 代码如下:<!--#includefile="conn.asp"-->
<!--#includefile="cls_main.asp"-->
<!--#includefile="cls_md5.asp"-->
<%dimobj
setobj=Newadmin_login
callobj.Main()
setobj=nothing
classadmin_login
PrivateFounderr,errmsg,Mesky
PrivateSubClass_Initialize()
Founderr=False
SetMesky=NewCls_Main
EndSub
PrivateSubClass_Terminate()
SetMesky=Nothing
EndSub
PublicSubMain()
Response.Write"<!DOCTYPEHTMLPUBLIC""-//W3C//DTDHTML4.01Transitional//EN""
""http://www.w3.org/TR/html4/loose.dtd"">"&vbCrLf
Response.Write"<html>"&vbCrLf
Response.Write"<head>"&vbCrLf
Response.Write"<metahttp-equiv=""Content-Type""content=""text/html;charset=gb2312"">"&vbCrLf
Response.Write"<title>管理员登录 PoweredBy:Www.Mesky.Net </title>"&vbCrLf
Response.Write"</head>"&vbCrLf
Response.Write"<styletype=text/css>"&vbCrLf
Response.Write"body{"&vbCrLf
Response.Write"background:#EFEFEF;"&vbCrLf
Response.Write"font-size:12px;"&vbCrLf
Response.Write"margin-top:0px;"&vbCrLf
Response.Write"}"&vbCrLf
Response.WritevbCrLf
Response.Write"INPUT{"&vbCrLf
Response.WritevbCrLf
Response.Write"FONT-SIZE:12px;"&vbCrLf
Response.Write"font-family:""宋体"";"&vbCrLf
Response.Write"}"&vbCrLf
Response.Write"SPAN{"&vbCrLf
Response.Write"FONT-SIZE:12px;POSITION:static"&vbCrLf
Response.Write"}"&vbCrLf
Response.Write"a:link,a:visited{"&vbCrLf
Response.Write"color:#0033FF;"&vbCrLf
Response.Write"text-decoration:none;"&vbCrLf
Response.Write"}"&vbCrLf
Response.Write"</style>"&vbCrLf
Response.Write"<p> </p>"&vbCrLf
Response.Write"<p> </p>"&vbCrLf
Response.Write"<tablealign=centerwidth=380style=""border:outset3px;""cellpadding=0cellspacing=0
ID=""Table1"">"&vbCrLf
Response.Write"<tr>"&vbCrLf
Response.Write"<tdstyle=""padding:3px;background-color:blue;color:white;"">LoginMeskyDMSV3
PoweredBy:Www.Mesky.Cn</td>"&vbCrLf
Response.Write"</tr>"&vbCrLf
Response.Write"<trvalign=top>"&vbCrLf
Response.Write"<td><imgsrc=""images/admin_title.gif""width=""100%""></td>"&vbCrLf
Response.Write"</tr>"&vbCrLf
Response.Write"<tr>"&vbCrLf
Response.Write"<tdstyle=""padding:15px;"">"&vbCrLf
Dimusername
Dimpassword
Dimip
DimBrowserType
SelectCaseRequest("action")
Case"chklogin"
Callchklogin
IfFounderrThen
Response.Write(errmsg)
Response.Write("<br><br><<=<ahref=""admin_login.asp"">返回管理员登录页</a>")
EndIf
Case"logout"
Calllogout
CaseElse
Calllogin
EndSelect
Response.Write"</td>"&vbCrLf
Response.Write"</tr>"&vbCrLf
Response.Write"<tr><tdstyle=""padding:10px;"">"&vbCrLf
SetBrowserType=NewCls_Browser
Response.Write("客户端操作系统:"&BrowserType.platform&"<br>客户端浏览器:"&BrowserType.Browser
&BrowserType.Version)&vbCrLf
SetBrowserType=Nothing
Response.Write"</td></tr>"&vbCrLf
Response.Write"</table><br><br>"&vbCrLf
Response.Write"</body>"&vbCrLf
Response.Write"</html>"&vbCrLf
EndSub
Sublogout()'用户退出
Session("adminName")=""
Session("adminPass")=""
Calllogin
EndSub
Sublogin()'用户登录
OnErrorResumeNext
DimAdos,GetCode
'Ados=Server.CreateObject("Adodb.Stream")
IfErrThen
GetCode=9999
EndIf
Response.Write"<scriptlanguage=""Javascript""><!--"&vbCrLf
Response.Write"functionVF_loginform(){//v2.0"&vbCrLf
Response.Write"<!--start_of_saved_settings-->"&vbCrLf
Response.Write"<!--type,text,name,verifycode,required,true,isNum,errMsg,请填写右边的确认密码。-->"&vbCrLf
Response.Write"<!--type,password,name,password,required,true,errMsg,请填写登录密码!-->"&vbCrLf
Response.Write"<!--type,text,name,username,required,true,errMsg,请填写登录用户名!-->"&vbCrLf
Response.Write"<!--end_of_saved_settings-->"&vbCrLf
Response.Write"vartheForm=document.loginform;"&vbCrLf
Response.Write"varnumRE=/^\d+$/;"&vbCrLf
Response.Write"varerrMsg="""";"&vbCrLf
Response.Write"varsetfocus="""";"&vbCrLf
Response.WritevbCrLf
Response.Write"if(!numRE.test(theForm['verifycode'].value)){"&vbCrLf
Response.Write"errMsg=""请填写右边的确认密码。"";"&vbCrLf
Response.Write"setfocus=""['verifycode']"";"&vbCrLf
Response.Write"}"&vbCrLf
Response.Write"if(theForm['password'].value==""""){"&vbCrLf
Response.Write"errMsg=""请填写登录密码!"";"&vbCrLf
Response.Write"setfocus=""['password']"";"&vbCrLf
Response.Write"}"&vbCrLf
Response.Write"if(theForm['username'].value==""""){"&vbCrLf
Response.Write"errMsg=""请填写登录用户名!"";"&vbCrLf
Response.Write"setfocus=""['username']"";"&vbCrLf
Response.Write"}"&vbCrLf
Response.Write"if(errMsg!=""""){"&vbCrLf
Response.Write"alert(errMsg);"&vbCrLf
Response.Write"eval(""theForm""+setfocus+"".focus()"");"&vbCrLf
Response.Write"}"&vbCrLf
Response.Write"elsetheForm.submit();"&vbCrLf
Response.Write"}//-->"&vbCrLf
Response.Write"</script>"&vbCrLf
Response.Write"<tableborder=""0"">"&vbCrLf
Response.Write"<formaction=""?action=chklogin""method=""post""name=""loginform""
onsubmit=""VF_loginform();returnfalse;"">"&vbCrLf
Response.Write"<tr>"&vbCrLf
Response.Write"<td><spanstyle=""width:80px;"">用户名:</span></td>"&vbCrLf
Response.Write"<td><inputmaxlength=20type=""text""name=""username""style=""width:200px;""
tabindex=""1""></td>"&vbCrLf
Response.Write"</tr>"&vbCrLf
Response.Write"<tr>"&vbCrLf
Response.Write"<td><spanstyle=""width:80px;"">密 码:</span></td>"&vbCrLf
Response.Write"<td><inputmaxlength=20type=""password""name=""password""
style=""width:200px;""></td>"&vbCrLf
Response.Write"</tr>"&vbCrLf
Response.Write"<tr>"&vbCrLf
Response.Write"<td><spanstyle=""width:80px;"">验证码:</span></td>"&vbCrLf
Response.Write"<td><inputname=""verifycode""type=""text""style=""width:60px;""value="""
IfGetCode=9999ThenResponse.Write"9999"
Response.Write"""maxlength=4>"&vbCrLf
Response.Write"请在验证码框输入:<imgsrc=""GetCode.asp""></td>"&vbCrLf
Response.Write"</tr>"&vbCrLf
Response.Write"<tr>"&vbCrLf
Response.Write"<td> </td>"&vbCrLf
Response.Write"<tdalign=""right""> </td>"&vbCrLf
Response.Write"</tr>"&vbCrLf
Response.Write"<tr>"&vbCrLf
Response.Write"<td> </td>"&vbCrLf
Response.Write"<tdalign=""right""><inputtype=""submit""value=""登录...""name=""btnSubmit""
style=""width:80px;font:menu;""ID=""Submit1""></td>"&vbCrLf
Response.Write"</tr>"&vbCrLf
Response.Write"</form>"&vbCrLf
Response.Write"</table>"&vbCrLf
EndSub
'检验用户登录
Subchklogin()
DimUserName,Password,IP
username=Trim(Replace(Request("username"),"'",""))
password=MD5(Trim(Replace(Request("password"),"'","")),16)
IfRequest("verifycode")=""Then
errmsg=errmsg+"<br>"+"<li>请返回输入确认码。"
Founderr=True
ElseIfSession("getcode")="9999"Then
Session("getcode")=""
ElseIfSession("getcode")=""Then
errmsg=errmsg+"<br>"+"<li>请不要重复提交,如需重新登陆请返回登陆页面。"
Founderr=True
ElseIfCStr(Session("getcode"))<>CStr(Trim(Request("verifycode")))Then
errmsg=errmsg+"<br>"+"<li>您输入的确认码和系统产生的不一致,请重新输入。"
Founderr=True
EndIf
Session("getcode")=""
Ifusername=""Orpassword=""Then
Founderr=True
errmsg=errmsg+"<br>"+"<li>请输入您的用户名或密码。<li>"
EndIf
IfFounderrThenExitSub
ip=Replace(Request.ServerVariables("REMOTE_ADDR"),"'","")
DimRs
SetRs=Mesky.Execute("select*fromMesky_SiteManagerwhereusername='"&username&"'")
IfRs.EOFAndRs.BOFThen
SetRs=Nothing
Founderr=True
errmsg=errmsg+"<br>"+"<li>您输入的用户名和密码不正确或者您不是系统管理员。<br><li>请<a
href=admin_login.asp>重新输入</a>您的密码。"
ExitSub
Else
IfTrim(Rs("password"))<>passwordThen
Founderr=True
errmsg=errmsg+"<br>"+"<li>您输入的用户名和密码不正确或者您不是系统管理员。<br><li>请<a
href=admin_login.asp>重新输入</a>您的密码。"
SetRs=Nothing
ExitSub
Else
Session("adminName")=Rs("UserName")
Session("adminPass")=Rs("Password")
Session.Timeout=45
Mesky.Execute("updateMesky_SiteManagersetLastLogin="&SqlNowString&",LastLoginIP='"&ip&
"',LastActive="&SqlNowString&",Logins=Logins+1whereusername='"&username&"'")
SetRs=Nothing
CallMesky.LoadSetting()
Response.Write"<script>location.href='"&Mesky.Setting(11)&"admin_index.asp'</script>"
EndIf
EndIf
EndSub
EndClass%>
声明:本页内容来源网络,仅供用户参考;我单位不保证亦不表示资料全面及准确无误,也不保证亦不表示这些资料为最新信息,如因任何原因,本网内容或者用户因倚赖本网内容造成任何损失或损害,我单位将不会负任何法律责任。如涉及版权问题,请提交至online#300.cn邮箱联系删除。
本文实现管理员登录效果,当用户名和密码正确时,弹出登录成功提示,否则弹出用户名或密码错误提示。今天有以下三大学习任务:学习任务一了解命名空间的定义定义names
“新版迅捷路由器忘记管理员登录密码怎么办?在登录新版迅捷路由器时,发现忘记了登录密码是多少,那么此时应该怎么办呢?或者说应该怎么才能进入到管理界
1、discuz管理员登录密码的修改方法从前台登录后>进入管理中心(输入密码)>用户>搜索你要修改的用户然后定位到详情,打开就可以了然后定位到密码2、修改创始人
“修改wifi密码的管理员密码是什么?想要修改wifi密码,登录路由器时提示输入管理员登录密码,这里的管理员登录密码是什么?”最近看
win10如何启用管理员账户?最近有用户反馈,安装好win10正式版后,想用管理员账户登录,却发现在登录界面没有找到管理员账户。其实这是因为我们没有启用管理员账