📄 login.asp
字号:
<!--#include file="Connections.asp" -->
<!--#include file="bbs.css" -->
<title><%=hometitle%>统计</title>
<body <%=background%>>
<%
if request("view")<>"" then
view=request("view")
url1="?view="&view&"&"
else
url1="?"
end if%>
<script language="JavaScript">
function CheckForm()
{
if (document.form1.textfield.value.length == 0)
{
alert("请输入用户名.");
document.form1.textfield.focus();
return false;
}
if (document.form1.textfield.value.indexOf("<")!=-1 || document.form1.textfield.value.indexOf(">")!=-1)
{
alert("用户名中包含非法字符 (<,>) ");
document.form1.textfield.focus();
return false;
}
if (document.form1.textfield.value.indexOf("'")!=-1)
{
alert("用户名中包含非法字符 (') ");
document.form1.textfield.focus();
return false;
}
if (document.form1.textfield2.value.length == 0)
{
alert("请输入密码.");
document.form1.textfield2.focus();
return false;
}
return true;
}
</script>
<%if request.querystring("action")="add" then
username=request.Form("textfield")
password=request.Form("textfield2")
username=replace(username,"'","’")
password=replace(password,"'","’")
sql="select vuser from vcount where vuser='"&username&"' and vpass='"&password&"'"
set rs=conn.execute(sql)
if not rs.eof then
session(feiyue)=username
response.Redirect("edit.asp"&url)
else
response.Redirect(url1&"act=a")
end if
set rs=nothing%>
<%elseif request.querystring("action")="" then%>
<div align="center">
<center>
<table border=1 borderColor=<%=tdc2%> cellPadding=4 cellSpacing=1 width=<%=tdc3%> style="border-collapse: collapse" align=center>
<form name="form1" method="post" action="login.asp<%=url1%>action=add" onSubmit="return CheckForm();">
<tr>
<td colspan="2" bgcolor=<%=tColor%> height=23 <%=hColor1%>>
<div align="center" class=tdc1>管理登陆</div>
</td>
</tr>
<% if request.QueryString("act")="a" then%>
<tr>
<td colspan="2" bgcolor=<%=tColor%> class=tdc1 height=23 <%=hColor2%>>
<div align="center" class=tdc1>你输入的用户名或者密码错误</div>
</td>
</tr>
<%end if%>
<tr>
<td width="30%" bgcolor=<%=tColor2%> class=tdc>
<div align="right">用户名:</div>
</td>
<td bgcolor=<%=tColor2%> class=tdc>
<input type="text" name="textfield" class=tdc size="20">
</td>
</tr>
<tr>
<td width="30%" bgcolor=<%=tColor2%> class=tdc>
<div align="right">密码:</div>
</td>
<td bgcolor=<%=tColor2%> class=tdc>
<input type="password" name="textfield2" class=tdc size="20">
</td>
</tr>
<tr>
<td bgcolor=<%=tColor2%> class=tdc> </td>
<td bgcolor=<%=tColor2%> class=tdc>
<input type="submit" name="Submit" value="提交" class=bdtj>
<input type="reset" name="Submit2" value="重设" class=bdtj>
</td>
</tr>
</form>
</table>
</center>
</div>
<%end if%><!--#include file="bq.asp" -->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -