?? admin_login_inc.asp
字號(hào):
<%
Sub adminlogin()
if a_UserId="" then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>用戶名不能為空!</li>"
end if
if a_PassWord="" then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>密碼不能為空!</li>"
end if
if CheckCode="" then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>驗(yàn)證碼不能為空!</li>"
end if
if session("CheckCode")="" then
FoundErr=True
ErrMsg=ErrMsg & "<br><li><a href='login.asp'>你的登錄等待時(shí)間過長(zhǎng),請(qǐng)返回登錄頁(yè)面重新登錄</a></li>"
end if
if CheckCode<>CStr(session("CheckCode")) then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>您輸入的確認(rèn)碼和系統(tǒng)產(chǎn)生的不一致,請(qǐng)重新輸入</li>"
end if
if FoundErr<>True then
a_PassWord=md5(md5(a_PassWord))
set rs=conn.execute("select ID,a_UserName,a_Power from Admin_User where a_PassWord='"&a_PassWord&"' and a_UserId='"&a_UserId&"'")
if rs.bof and rs.eof then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>用戶名或密碼錯(cuò)誤!!!</li>"
else
set rs1=conn.execute("update Admin_User set a_lastdate='"&now()&"',a_loads=a_loads+1 where a_PassWord='"&a_PassWord&"' and a_UserId='"&a_UserId&"'")
cookiesinfo=request("cooks")
admin25175s=rs(0)&"||"&a_UserId&"||"&rs(1)&"||"&rs(2)&"||"&Now()
If cookiesinfo=1 Then
session("admin25175")=admin25175s
session("admin25175_Effective")="20分鐘"
Else
response.cookies("admin25175")("xx")=admin25175s
response.cookies("admin25175")("info")=md5(admin25175s&"||"&siteinfo(5,0))
If cookiesinfo="0" Then
Response.Cookies("admin25175").Expires = DateAdd("m",12,now())
response.cookies("admin25175")("Effective")="12個(gè)月"
ElseIf cookiesinfo="2" Then
Response.Cookies("admin25175").Expires = DateAdd("h", 1, Now())
response.cookies("admin25175")("Effective")="1小時(shí)"
ElseIf cookiesinfo="3" Then
Response.Cookies("admin25175").Expires = DateAdd("h", 12, Now())
response.cookies("admin25175")("Effective")="12小時(shí)"
ElseIf cookiesinfo="4" Then
Response.Cookies("admin25175").Expires = DateAdd("m",1,now())
response.cookies("admin25175")("Effective")="30天"
End If
End If
Response.Redirect "admin_index.asp"
end if
set rs=nothing
end If
End Sub
%>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -