📄 login.asp
字号:
<!--#include file=conn.asp-->
<!--#include file="function.asp"-->
<!--#include file="config.asp"-->
<!--#include file="md5.asp"-->
<%
if request("login")="登录" then
jiance=request("name")
if InStr(jiance,"or")<>0 or InStr(jiance,"'")<>0 or InStr(jiance,"`")<>0 or InStr(jiance,"=")<>0 or InStr(jiance,"-")<>0 or InStr(jiance,",")<>0 or InStr(jiance,"and")<>0 then
Response.Write "<script language=JavaScript>{alert('用户名非法!');history.back();}</script>"
Response.End
end if
if request("url")="" then
url1="index.asp"
else
url1=request("url")
end if
if not IsNumeric(request("verifycode")) then
Response.Write ("<script>alert('友情提示!\n\n验证编码必须是数字!');history.back();</script>")
Response.end
end if
if (int(session("SafeCode"))<>int(request("verifycode"))) then
Response.Write ("<script>alert('友情提示!\n\n验证编码输入错误!');history.back();</script>")
Response.end
end if
if request("name")="" then
response.write"<script>alert('用户名不能为空!');history.back();</script>"
elseif request("pwd")="" then
response.write"<script>alert('密码不能为空!');history.back();</script>"
else
name=request("name")
pwd=request("pwd")
rs.open"select * from person where name='"&name&"' and pwd='"&md5(pwd)&"'",conn,1,1
if rs.eof then
response.write"<script>alert('用户名或密码错误!');history.back();</script>"
else
rs.close
rs3.open"select * from person where name='"&name&"'",conn,1,3
rs3("logintime")=now
rs3.update
rs3.close
session("person")=name
response.redirect(url1)
end if
end if
else
%>
<html>
<head>
<title><%=webname%>_信息提示</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="iknow.css" rel="stylesheet" type="text/css">
</head>
<body class="bgbdy" topmargin="0">
<center>
<script>
function check_loginform(f){
if(f.name.value==""||f.name.value.length<=0){f.name.focus();alert("请输入用户名");return false;}
if(f.pwd.value==""||f.pwd.value.length<=0){f.pwd.focus();alert("请输入密码");return false;}
}
</script>
<!--#include file=top.asp-->
<table width="770" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="25"><a href="<%=weburl%>"><%=webname%></a> > <span id="n1">信息提示</span></td>
</tr>
</table>
<table width="770" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td class="bgtle"><span id="n2">提示</span></td>
</tr>
<tr>
<td class="bgcntLn" align="center">
<table width=60% border=0 align=center cellpadding=0 cellspacing=0><form action='login.asp' method='post' onSubmit='return check_loginform(this);'><tr> <td height=70><div align=center><span class=f14>请您先登录再进行操作。如果您还没有注册,请点此<a href="reg.asp" target="_blank">注册</a>;<br><img src=img/tips.gif width=16 height=16><font color="#FFFFFF">如果您是贴吧的用户,您可以直接用贴吧的帐号进行登陆</font> </span></div></td></tr><tr> <td class=bgcnt><span class=f14> </span> <table width=200 border=0 align=center cellpadding=0 cellspacing=0><tr> <td width=31% height=25 nowrap>用户名:</td><td width=69% nowrap><input class=input2 type=text size=15 name=name id=name></td></tr><tr> <td height=17 nowrap>密 码:</td><td nowrap><input class=input2 type=password size=15 name=pwd id=pwd></td></tr>
<tr>
<td height=10 nowrap>验证码:</td><td nowrap><input type="text" size=3 maxlength=4 name=verifycode> <%Call GetSafeCode%><br><FONT color=#666666>(请输入图中数字)</FONT></td>
</tr>
<tr><td height=30 nowrap> </td><td nowrap><input type='hidden' name=url value='<%=request.ServerVariables("HTTP_REFERER")%>'><input type=submit name=login id=login value=登录 class=bnsrh></td></tr></form></table></td></tr></table>
<span class="f14" id="n3" style="display:">
<p align="center">
<br>
<br>
</p></span></td>
</tr>
</table>
<br>
<table width="770" border="0" align="center" cellpadding="0" cellspacing="0" style="clear:both;"> <tr> <td height="30" align=center><!--#include file=end.asp--></td>
</tr>
</table>
</center>
</body>
</html>
<%end if%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -