📄 userlogin.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>图书馆管理系统</title>
<link href="css.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.style1 {font-size: 16px}
-->
</style>
<script Language="JavaScript" Type="text/javascript"><!--
function FrontPage_Form1_Validator(theForm)
{
if (theForm.user.value == "")
{
alert("请在 用户名 域中输入值。");
theForm.user.focus();
return (false);
}
if (theForm.user.value.length < 1)
{
alert("在 用户名 域中,请至少输入 1 个字符。");
theForm.user.focus();
return (false);
}
if (theForm.user.value.length > 20)
{
alert("在 用户名 域中,请最多输入 20 个字符。");
theForm.user.focus();
return (false);
}
if (theForm.pass.value == "")
{
alert("请在 密码 域中输入值。");
theForm.pass.focus();
return (false);
}
if (theForm.pass.value.length > 20)
{
alert("在 密码 域中,请最多输入 20 个字符。");
theForm.pass.focus();
return (false);
}
if (theForm.yzm.value == "")
{
alert("请在 验证码 域中输入值。");
theForm.yzm.focus();
return (false);
}
if (theForm.yzm.value.length < 5)
{
alert("在 验证码 域中,请至少输入 5 个字符。");
theForm.yzm.focus();
return (false);
}
if (theForm.yzm.value.length > 5)
{
alert("在 验证码 域中,请最多输入 5 个字符。");
theForm.yzm.focus();
return (false);
}
var checkOK = "0123456789-";
var checkStr = theForm.yzm.value;
var allValid = true;
var validGroups = true;
var decPoints = 0;
var allNum = "";
for (i = 0; i < checkStr.length; i++)
{
ch = checkStr.charAt(i);
for (j = 0; j < checkOK.length; j++)
if (ch == checkOK.charAt(j))
break;
if (j == checkOK.length)
{
allValid = false;
break;
}
allNum += ch;
}
if (!allValid)
{
alert("在 验证码 域中,只能输入 数字 字符。");
theForm.yzm.focus();
return (false);
}
return (true);
}
//--></script>
</head>
<body>
<form name="form1" method="post" action="ChkLogin.asp" onSubmit="return FrontPage_Form1_Validator(this);" >
<center>
<table width="800" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="150"><!--#include file="top.asp"--></td>
</tr>
<tr>
<td align="center" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" class="tb">
<tr>
<td height="260" align="center" valign="middle"><table width="500" border="0" cellspacing="0" cellpadding="3">
<tr align="center" valign="middle" >
<td height="30" colspan="2"><%
if request("id")="0" then response.write "请填写完整!"
if request("id")="1" then response.write "用户名或密码错误!"
if request("id")="3" then response.write "验证码错误"
if request("id")="8" then response.write "网络超时,或未登录。请重新登录!"
if request("id")="9" then response.write "正常退出后台管理系统"
if request("id")="4" then response.write "该账号正在审核中..."
if request("id")="5" then response.write "该账号已被锁定!"
if request("id")="6" then response.write "该账号处于挂失状态..."
%></td>
</tr>
<tr align="center" valign="middle" >
<td height="30" align="right"><img src="img/aa.gif" width="64" height="64"></td>
<td height="30" align="left"><span class="style1"> 用户登陆</span></td>
</tr>
<tr>
<td width="177" height="25" align="right">用户名:</td>
<td width="311" height="25" align="left"><input name="user" type="text" id="user" size="20"></td>
</tr>
<tr>
<td height="25" align="right">密码:</td>
<td height="25" align="left"><input name="pass" type="text" id="pass" size="20"></td>
</tr>
<tr>
<td height="25" align="right">验证码:</td>
<td height="25" align="left"><input name="yzm" type="text" id="yzm" size="5" maxlength="5">
<%
Randomize
an=""
an= int((99999-11111+1) * RND +11111)
session("yzm")=an
Response.Write an
%></td>
</tr>
<tr align="center" valign="middle">
<td height="40" colspan="2"><input type="submit" name="Submit" value=" 登 陆 ">
<input type="reset" name="Submit2" value=" 重 置 "></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td height="60"><!--#include file="bottom.asp"--></td>
</tr>
</table>
</center>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -