⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 login.asp

📁 党的知识考试
💻 ASP
字号:
<!--#include file="conn.asp"-->
<script language=javascript>
function check()
{if (document.form1.student.value=="")
{alert("请输入用户名");
document.form1.student.focus();
return false;}
if (document.form1.pwd.value=="")
{alert("请输入用户密码");
document.form1.pwd.focus();
return false;}
document.form1.ctype.value="add";
document.form1.submit();
}
</script>
<%
session.timeout=125
if trim(request("ctype"))="add" then
session("student")=""
session("classes")=""
session("id")=""
session("number")=""
session("sex")=""


sql="select * from student where 姓名='"&trim(request("student"))&"' and 密码='"&trim(request("pwd"))&"'"
set rs=conn.execute(sql)
if rs.eof then
%>
<script language=javascript>
alert("无此学员!请先注册");

</script>

<%else
session("student")=rs("姓名")
session("classes")=rs("班号")
session("id")=rs("id")
session("number")=rs("学号")
session("sex")=rs("性别")
session("timen")=now

%>
<script language=javascript>
var now=new Date()
window.navigate("index.asp?time="+now.getTime());

</script>
<%end if 
end if %>
<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="0" leftmargin="0">
<!--#include file="top.htm"-->
<div align="center">
  <center>
<table border="1" cellpadding="4" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="760" height="100">
  <tr>
    <td align="center">
    <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="student" size="20"></td>
        </tr>
        <tr>
          <td align="right">密&nbsp; 码:</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> 
        <tr> 
          <td> </td> 
          <td><a href="register.asp">新学生注册!</a></td> 
        </tr> 
      </table></form> 
      </center> 
    </div> 
    </td> 
  </tr> 
</table> 
  </center> 
</div> 
<!--#include file="adv.htm"--> 
</body> 
 
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -