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