📄 userlogin.asp
字号:
<!--#include file="inc/CONN.asp"-->
<!--#include file="inc/Const.asp"-->
<!--#include file="inc/md5.asp"-->
<%
Dim UserName,UserPass
UserName=trim(Request("UserName"))
If request("action")="logout" Then
response.cookies("satellite")("user")=false
response.write "<script language=javascript>alert( ""退出登录成功"");"&Chr(13)&"location.href=""index.asp?username="&Server.urlencode(request.cookies("satellite")("username"))&""";</script>"
response.end
end if
if username="" then
response.write "<script language=javascript>alert( ""请先注册或请到您的留言本登录"");"&Chr(13)&"location.href=""javascript:history.back()"";</script>"
response.end
end if
UserPass=MD5(Request.form("UserPass"))
If Request("Action")="chklogin" then
set rs=conn.execute("select userpass from [user] where username='"&username&"'")
if rs.bof or userpass<>rs(0) then
response.write "<script language=javascript>alert( ""用户名或密码错误!"");"&Chr(13)&"location.href=""javascript:history.back()"";</script>"
response.end
else
response.cookies("satellite")("user")=true
response.cookies("satellite")("username")=username
response.write "<script language=javascript>window.opener.location.reload();"&chr(13)&"alert( ""登录成功"");"&Chr(13)&"location.href=""javascript:window.close()"";</script>"
end if
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>用户管理登录</title>
<!--#include file="inc/style.css"-->
<script language=javascript src="inc/js.inc"></script>
<script language="JavaScript1.2">
function check(theForm) {if(theForm.UserName.value == "" || theForm.UserPass.value == "" ) {alert("你还没完全留言下所需信息,管理名和密码都是必须要的。"); return false;}}</script>
</head>
<body <%=skin(13)%>>
<table border=0 align=center><tr height=40><Td></td></tr></table>
<table align=center border=1 bordercolor=<%=skin(12)%> cellpadding=3 cellspacing=0 width=280>
<form name=theform action="Userlogin.asp?action=chklogin" method=post onsubmit="submitonce(this)">
<tr class=titlestyle>
<Td align=center colspan=2><b>留 言 本 用 户 登 陆</B></td>
</tr>
<tr bgcolor=<%=skin(4)%>>
<Td width=90 align=right>用户名:</td>
<td> <input name=UserName maxlength=16 type=hidden size=16 value=<%=username%>><%=username%> <a href="getpwd.asp" title=点击这里找回密码><u>忘记密码</u></a></td>
<tr bgcolor=<%=skin(4)%>>
<Td width=90 align=right>密 码:</td>
<td> <input name=UserPass maxlength=15 type=password size=16 oncut="return false" onpaste="return false"></td>
</tr>
<tr bgcolor=<%=skin(4)%>>
<td align=center height=32 colspan=2><input name=submit type=submit value="登 录" onclick="return check(theform)"> <input name=reset type=reset value="关 闭" title=关闭窗口 onclick="javascript:window.close()"></td>
</tr>
</table>
<!--#include file="inc/foot.asp"-->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -