⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 chkuser.asp

📁 一个非常优秀的自动建站程序
💻 ASP
字号:
<!--#include file="encrypt.asp"-->
<!--#include file="conn.asp"-->
<!--#include file="checkpost.asp"-->
<%
action = request("action")
if Trim(Request.Form("UserId"))="" or Trim(Request.Form("PassWd"))="" then response.redirect "index.asp"
if (action="login") then
Set rs = Server.CreateObject("ADODB.Recordset")
sql="select ID,PassWd,ExpDate from [Agent_User] where UserId='" & Trim(Request.Form("UserId")) & "'"
rs.open sql,conn,1,3
if rs.bof and rs.eof then
response.redirect "index.asp"
response.end
else
if EncryptPass=1 then
Set Autohost = Server.CreateObject("autohost.Createhost")
passwd=autohost.md5(Trim(Request.Form("PassWd")))
Set Autohost=nothing
else
passwd=Trim(Request.Form("PassWd"))
end if
if passwd=rs("PassWd") then
session("ID")=rs("ID")
rs("ExpDate")=date()
rs.update
response.redirect "index.asp"
response.end
else
response.redirect "index.asp"
response.end
end if
end if
rs.close
Set rs = Nothing
end if
if (action="relogin") then
Set rs = Server.CreateObject("ADODB.Recordset")
sql="select ID,PassWd,ExpDate from [Agent_User] where UserId='" & Trim(Request.Form("UserId")) & "'"
rs.open sql,conn,1,3
if rs.bof and rs.eof then
response.redirect "index.asp"
response.end
else
if EncryptPass=1 then
Set Autohost = Server.CreateObject("autohost.Createhost")
passwd=autohost.md5(Trim(Request.Form("PassWd")))
Set Autohost=nothing
else
passwd=Trim(Request.Form("PassWd"))
end if
if passwd=rs("PassWd") then
session("ID")=rs("ID")
rs("ExpDate")=Date()
rs.update
response.redirect "welcome.asp"
response.end
else
response.redirect "index.asp"
response.end
end if
end if
rs.close
Set rs = Nothing
end if
if (action="out") then
session.abandon()
response.redirect "index.asp"
response.end
end if
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -