📄 login.asp
字号:
<!--#include file="conn.asp"-->
<!--#include file="include/setup.asp"-->
<%
UserID1=Trim(Request.Form("UserID"))
Psw=Trim(Request.Form("Psw"))
toURL=Trim(Request.QueryString("tourl"))
dim IfLogin,Psw1,Have
if UserID1<>"" then
set rs=conn.execute("select count(*) as have from myuser where UserID='"&UserID1&"'")
Have=rs("have")
rs.close
IfLogin="3"
if Have>0 then
set rs=server.createobject("ADODB.recordset")
rs.Open "select * from myuser where UserID='"&UserID1&"'",conn,3,3
UserID1=rs("UserID")
Psw1=rs("Psw")
rs("LogonTime")=now
rs("Logonip")=Request.ServerVariables("REMOTE_ADDR")
rs.update
if Psw=Psw1 then
IfLogin="1"
Response.Cookies("1zhaiID")=UserID1
Response.Cookies("1zhaiID").Expires=Date+30
session("user")=UserID1
UserID=UserID1
else
IfLogin="2"
end if
rs.close
end if
end if
%>
<%
if IfLogin="1" then
if toURL="myzhai" then
Response.redirect("myzhai.asp")
elseif toURL="mysetup" then
Response.redirect("mysetup.asp")
elseif toURL="icollect" then
Response.redirect("bookmark.asp")
else
Response.redirect("index.html")
end if
else
%>
<link href="css/css.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
body {
background-color: #FFFFFF;
}
-->
</style>
<title>用户登陆</title><form name="form1" method="post" action="login.asp?tourl=<%=toURL%>">
<br />
<br />
<br />
<table width="50%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
<tr>
<td width="331" height="260" bgcolor="#FAFAFA" style="padding:8px; line-height:25px;">
<font class="big14px"><strong>为什么要成为<%=SiteName%>的用户?</strong></font><br />
<li>成为<font color="#0F6893"><%=SiteName%></font>的用户,享受<font color="#0F6893"><%=SiteName%></font>全面服务 </li>
<li>使用任意一台电脑上网查找您收藏的网页 </li><br /><br />
<font class="big14px"><strong>还没有帐户?</strong></font>
<li><a href="reg.asp" target="_blank">立即注册</a>(只需要5秒即可完成)</li>
<li><font color="#0F6893"><%=SiteName%></font>用户请直接登录</li>
</td>
<td width="251" colspan="2" align="center" bgcolor="#FAFAFA">
<table width="100%" border="0" cellspacing="4" cellpadding="0">
<tr>
<td height="50"><font class="big14px"><strong>欢迎登录<%=SiteName%></strong></font></td>
</tr>
<tr>
<td align="center"><%
if IfLogin="2" then
%>
<font class="redfont">密码错误...</font>
<%
elseif IfLogin="3" then
%>
<font class="redfont">无此用户...</font>
<%
end if
%></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="4" cellpadding="0">
<tr>
<td width="35%" height="30" align="center">用户名:</td>
<td width="65%" height="30"><input name="UserID" type="text" id="UserID" value="<%=UserID1%>" size="15" maxlength="30" /></td>
</tr>
<tr>
<td height="30" align="center">密 码:</td>
<td height="30"><input name="Psw" type="password" id="Psw" size="15" /></td>
</tr>
<tr>
<td height="30" colspan="2" align="center"><input type="submit" name="Submit" value="登录到<%=SiteName%>" />
<input type="button" name="Submit2" value="注 册" onclick="location.href='Reg.asp'" /></td>
</tr>
</table>
</td>
</tr>
</table>
</form>
<%
end if
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -