📄 login.asp
字号:
<!--#include file="config.asp" -->
<%
if Request.QueryString("login")="yes" then
set my_conn= Server.CreateObject("ADODB.Connection")
set rs = server.CreateObject("ADODB.RecordSet")
Cookies_Time=request("Cookies_Time")
IsUser=False
my_Conn.Open ConnString
strSql ="SELECT M_Name, M_Password from Members where M_Name = '" & Request.Form("UserName") & "' and M_Password = '" & Request.Form("Password") &"'"
set rs = my_conn.Execute (StrSql)
if rs.BOF or rs.EOF then
IsUser=False
Else
if not cstr(Cookies_Time)="0" then
Response.Cookies("User")("Name")= Request.Form("UserName")
Response.Cookies("User")("Pword")= Request.Form("Password")
Cookies_Time=dateadd("d",Cookies_Time,date())
Response.Cookies("User").expires=Cookies_Time
' Response.Cookies(forum_cookies_name).path=forum_cookies_url
strsql ="update members set M_LastTime = #" & now() &"# where M_Name = '" & Request.Form("UserName") & "' and M_Password = '" & Request.Form("Password") &"'"
end if
IsUser=True
End If
%>
<html>
<head>
<title><%=SFTitle%></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<!--#include file="styles.css" -->
</head><body><br><br><br>
<table align="center" bgcolor=<%=TableColor%> border="0" width=360 cellspacing="1" cellpadding="3" class="sft">
<tr><td bgcolor=<%=CellColor1%> align="center">
<%
if IsUser then
%>您的用户名称及密码将保存到<%=Cookies_Time%><br><br><a href="index.asp">登录成功!返回论坛首页</a>
<script language=javascript>
setTimeout("location.replace('index.asp')",500)
</script><%
else
%>用户名或密码错误,请单击<a href="login.asp">这里</a>重新输入!<br><br>如果您不是本论坛的注册用户,请<a href="register.asp">注册</a>,谢谢!
<%end if
my_conn.Close
set my_conn = nothing
set rs = nothing
%></td></tr></table></body></html>
<%Response.End
end if%>
<html>
<head>
<title><%=SFTitle%></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<!--#include file="styles.css" -->
</head><br><br><br>
<body bgColor="<% =PageColor %>" <%=bgstr%> class="sft">
<form name="Login" method="post" action="login.asp?login=yes">
<table bgcolor=<%=TableColor%> border="0" width=420 cellspacing="1" cellpadding="3" align="center" class="sft">
<tr>
<td align="center" colspan=2 bgcolor=<%=HeadColor%> class="sfh">论坛登录</td></tr><tr>
<td align=right width=32% bgcolor=<%=CellColor1%>>用户名:</td>
<td width=68% bgcolor=<%=CellColor1%>>
<input maxLength="10" name="UserName" size="20" Value="<%=Request.Cookies("User")("Name")%>" class="box"> </td></tr>
<tr>
<td align=right bgcolor=<%=CellColor1%>>密码:</td>
<td bgcolor=<%=CellColor1%>>
<input maxLength="16" name="Password" size="20" type="password" value="<%=Request.Cookies("User")("Pword")%>" class="box"> <a href="register.asp">尚未注册?</a> <a href="password.asp">遗忘密码?</a>
</td></tr><tr><td align=right bgcolor=<%=CellColor1%>>登录信息保存时间:</td>
<td bgcolor=<%=CellColor1%>>
<input type="radio" name="Cookies_Time" value=1>
保存一天<br>
<input type="radio" name="Cookies_Time" value=7 checked>
保存一周<br>
<input type="radio" name="Cookies_Time" value=365>
保存一年<br>
<input type="radio" name="Cookies_Time" value=0>
不要保存<br><br>(用Cookie保存登录信息可以方便发贴)</td></tr><tr><td colspan=2 align="center" bgcolor=<%=CellColor1%>><input name="Submit" type="submit" value="登 录" class="btn">
<input name="Reset" type="reset" value="清 除" class="btn"></td></tr>
</table></form>
<!--#include file="copyright.asp" -->
</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -