?? 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 + -