📄 login.asp
字号:
<!--#include file="top.asp"-->
<center>
<table border="0" width="760" cellspacing="0" cellpadding="0" height="312">
<tr>
<td width="190" height="312" valign="top" align="left">
<table border="0" width="190" cellspacing="0" cellpadding="0">
<tr>
<td width="190" valign="top" align="left"><!--#include file="left.asp"--></td>
</tr>
</table>
</td>
</center>
<td width="380" valign="top" align="left">
<table border="0" width="380" cellspacing="0" cellpadding="0" height="5">
<%
if session("user_name")="" then
user_name=trim(request("user_name"))
user_pass=trim(request("user_pass"))
if user_name="" or user_pass="" then
errmsg=errmsg+"<br>"+"<li>用户名和用户密码不能为空!"
founderr=true
end if
sql="select * from user where user_name='"&user_name&"'"
rs.open sql,conn,3,3
if rs.eof then
errmsg=errmsg+"<br>"+"<li>你输入的用户不存在!"
founderr=true
elseif user_pass=rs("user_pass") then
session("user_name")=rs("user_name")
rs("user_lasttime")=now()
rs("user_lastip")=request.servervariables("remote_addr")
rs.update
else
errmsg=errmsg+"<br>"+"<li>你输入的密码错误!"
founderr=true
end if
rs.close
if founderr=true then
%>
<tr>
<td width="380" bgcolor="#FF9A31" height="18">
<p align="center">出错信息
</td>
</tr>
<tr>
<td width="100%" bgcolor="#63CFFF"></td>
</tr>
<center>
<tr>
<td width="100%"><%=errmsg%></td>
</tr>
<%else%>
<tr>
<td width="380" bgcolor="#FF9A31" height="18">
<p align="center">登录成功
</td>
</tr>
<tr>
<td width="100%" bgcolor="#63CFFF"></td>
</tr>
<center>
<tr>
<td width="100%"><font color=red><center>恭喜!</font><%=session("user_name")%>登录成功<br><a href="index.asp">进入首页</a><center></td>
</tr>
<%end if
else
response.redirect "index.asp"
end if%>
</table>
</center>
</td>
<td width="190" valign="top" align="left">
<table border="0" width="190" cellspacing="0" cellpadding="0">
<tr>
<td width="190"><!--#include file="right.asp"--></td>
</tr>
</table>
</td>
</tr>
</table>
<!--#include file="copy.asp"-->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -