📄 login.asp
字号:
<!--#include file="top.asp"-->
<!-- #include file="MD5.asp" -->
<%
if request("yz")="" then
yz=wrong
end if
if session("user_name")="" then
user_name=trim(request("user_name"))
user_pass=md5(trim(request("user_pass")))
if user_name="" or user_pass="" then
founderr=true
end if
set rs1=server.createobject("adodb.recordset")
sql1="select * from [user] where username='"&user_name&"'"
rs1.open sql1,conn,3,3
if rs1.eof then
founderr=true
else if user_pass=rs1("userpass") and (int(session("SafeCode"))=int(request("yz"))) then
session("user_name")=rs1("username")
session("user_type")=rs1("user_type")
Response.Cookies("username")=rs1("username")
Response.Cookies("userpass")=user_pass
rs1("landtime")=now()
rs1("user_lastip")=request.servervariables("remote_addr")
rs1.update
else
founderr=true
end if
rs1.close
if founderr=true then
%>
<%else%>
<%
response.redirect "index.asp"
%>
<%
end if
end if
else
response.redirect "index.asp"
end if%>
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="778" height="300">
<tr>
<td align="center"><p><strong>Wrong ID or PWS.</strong></p>
<p><a href="javascript:history.go(-1)">Please Login</a></p></td>
</tr>
</table>
</center>
</div>
<!--#include file="copy.asp"-->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -