📄 index.asp
字号:
<!--#include file="conn.asp"-->
<script language=javascript>
function check()
{if (document.form1.id.value=="")
{alert ("请输入账号!");
document.form1.id.focus();
return false;}
if (document.form1.pwd.value=="")
{alert ("请输入密码!");
document.form1.pwd.focus();
return false;}
document.form1.ctype.value="types";
document.form1.submit();
}
</script>
<%sql="select * from admin "
set rs=conn.execute (sql)
if rs.eof then
sqlin="insert into admin (账号,密码) values ('hrbit','hrbit')"
set rs=conn.execute (sqlin)
end if
if request("ctype")="types" then
sqlfind="select * from admin where 账号='"&trim(request("id"))&"' and 密码='"&trim(request("pwd"))&"'"
set rs=conn.execute (sqlfind)
if rs.eof then
%>
<script language=javascript>
alert("错误:无此管理员,或管理员密码错误!");
history.back();
</script>
<%else
session("adminid")=rs("id")
%>
<script language=javascript>
window.navigate("admin.asp");
</script>
<%end if
else
%>
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>学生党校网上测试系统</title>
<link rel="stylesheet" type="text/css" href="../css.css">
</head>
<body topmargin="100" leftmargin="0">
<p align="center"><b><font class=test1>后台管理员登陆</font></b></p>
<div align="center">
<center>
<form name=form1 action="">
<input type=hidden name=ctype >
<table border="0" cellpadding="5" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="300">
<tr>
<td width="100" align="right">用户名:</td>
<td width="200"> <input type="text" name="id" size="20"></td>
</tr>
<tr>
<td align="right">密 码:</td>
<td> <input type="password" name="pwd" size="20"></td>
</tr>
<tr>
<td> </td>
<td>
<input type="button" value="提交" name="B1" onclick="check()"> <input type="reset" value="重置" name="B2"></td>
</tr>
</table>
</form>
</center>
</div>
</body>
</html>
<%end if %>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -