?? login.asp
字號:
<!--#include file="conn.asp" -->
<!--#include file="log_lib.asp" -->
<%
if request.form("IsLogin")<>"" then
Username=request("UserName")
Password=request("Password")
Username=replace(Username,"'","")
Password=md5(replace(Password,"'",""))
Cookies_Time=request("Cookies_Time")
'kLogin=request("kLogin")
sql = "SELECT isad,Username,password FROM User_mdb where Username='" & Username & "' and password='" & password & "'"
set rs=conn.Execute(sql)
if not (rs.BOF or rs.eof) then
if Username=rs("Username") and password=rs("password") then
ulogin="true"
Session("username"&dlog_session) = Username
Session("password"&dlog_session) = Password
session("isad"&dlog_session)=rs("isad")
if not cstr(Cookies_Time)="0" then
Response.Cookies(dlog_cookies_name)("Username")=username
Response.Cookies(dlog_cookies_name)("Password")=password
Cookies_Time=dateadd("d",Cookies_Time,date())
Response.Cookies(dlog_cookies_name).expires=Cookies_Time
end if
end if
end if
rs.Close()
end if
%>
<html>
<head>
<title>破廢墟 Bloging...</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<link rel="stylesheet" type="text/css" href="css/pagedefine.css" />
</head>
<body leftmargin="0" topmargin="0">
<table width="728" cellspacing="0" cellpadding="2">
<tr>
<td>
<p> </p>
<%
'checkuser()
if ulogin="true" then
if request("kLogin")="True" then
url=request.serverVariables("HTTP_REFERER")
else
url="index.asp"
end if
%>
<table border="0" cellspacing="0" cellpadding="0" width="<%=table_width%>" align="center">
<tr>
<td align="center" valign="middle" height="201"> <table width="650" border="0" cellspacing="1" cellpadding="0" bgcolor="#e2e2e2">
<tr>
<td align="center" height="76" bgcolor="#f8f8f8">您的用戶及及密碼將在您的瀏覽器中保存到公元 <b><%=Cookies_Time%></b><br>
<font color="#FF0000"><a href="index.asp">登錄成功!!返回到: <%=url%></a></font>
</td>
</tr>
</table>
<script language=javascript>
setTimeout("location.replace('<%=url%>')",1000)
</script> </td>
</tr>
</table>
<%
end if%>
<%
if request("IsLogin")<>"" and uLogin <> "true" then
%>
<table border="0" cellspacing="0" cellpadding="0" align="center" width="<%=table_width%>">
<tr>
<td align="center" valign="middle" height="201"> <form name="Login" method="post" action="login.asp">
<table width="100%" border="0" cellspacing="1" cellpadding="4" bgcolor="#e2e2e2">
<tr bgcolor="#eeeeee">
<td colspan="2"><font color="#FF0000"><b>用戶名或密碼錯!</b></font>
| <a href="adduser.asp"> 注冊</a></td>
</tr>
<tr bgcolor="#F8f8f8">
<td width="154" align="right">用戶名:</td>
<td width="490"> <input type="text" name="username" value="<%=username%>">
</td>
</tr>
<tr bgcolor="#F8f8f8">
<td width="154" align="right">密 碼:</td>
<td> <input type="password" name="password"> </td>
</tr>
<tr bgcolor="#F8f8f8">
<td width="154" valign="top" align="right">Cookie:<br>
</td>
<td> 請選擇你的Cookie保存時間,下次訪問可以方便輸入。<br> <br> <input type="radio" name="Cookies_Time" value=1>
保存一天<br> <input type="radio" name="Cookies_Time" value=30>
保存一月<br> <input type="radio" name="Cookies_Time" value=365>
保存一年<br> <input type="radio" name="Cookies_Time" value=0 checked>
不要保存</td>
</tr>
<tr bgcolor="#F8f8f8">
<td height="40" colspan="2" align="center"> <input type="hidden" name="IsLogin" value="True">
<input type="submit" name="Submit3" value=" 確 定 "> <input type="reset" name="Submit22" value=" 清 除 ">
</td>
</tr>
</table>
</form></td>
</tr>
</table>
<%
end if
%>
<%
if not cstr(request.form("IsLogin"))<>"" then
%>
<table border="0" cellspacing="0" cellpadding="0" align="center" width="<%=table_width%>">
<tr>
<td align="center" valign="middle" height="201"> <form name="Login" method="post" action="login.asp">
<table width="100%" border="0" cellspacing="1" cellpadding="4" bgcolor="#e2e2e2">
<tr>
<td colspan="2" bgcolor="#eeeeee"><b><font color="#000000">用戶登錄</font></b>
| <a href="adduser.asp">注冊</a></td>
</tr>
<tr bgcolor="#F8f8f8">
<td width="152" align="right">用戶名:</td>
<td width="492"> <input type="text" name="username"> </td>
</tr>
<tr bgcolor="#F8f8f8">
<td width="152" align="right">密 碼:</td>
<td> <input type="password" name="password"> </td>
</tr>
<tr bgcolor="#F8f8f8">
<td width="152" valign="top" align="right">Cookie:<br>
</td>
<td> 請選擇你的Cookie保存時間,下次訪問可以方便輸入。<br> <br> <input type="radio" name="Cookies_Time" value=1>
保存一天<br> <input type="radio" name="Cookies_Time" value=30>
保存一月<br> <input type="radio" name="Cookies_Time" value=365>
保存一年<br> <input type="radio" name="Cookies_Time" value=0 checked>
不要保存 </td>
</tr>
<tr bgcolor="#F8f8f8">
<td height="40" colspan="2" align="center"> <input type="hidden" name="IsLogin" value="True">
<input type="submit" name="Submit" value=" 確 定 "> <input type="reset" name="Submit2" value=" 清 除 ">
</td>
</tr>
</table>
</form></td>
</tr>
</table>
<%
end if
conn.close
set conn=nothing
%>
</td>
</tr>
</table>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -