?? login.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("number")=""
session("sex")=""
sql="select * from student where studentnumber='"&trim(request("student"))&"' and studentpassword='"&trim(request("pwd"))&"'"
set rs=conn.execute(sql)
if rs.eof then
%>
<script language=javascript>
alert("無此學員!請先注冊");
</script>
<%else
session("student")=rs("studentname")
session("classes")=rs("class")
session("number")=rs("studentnumber")
session("sex")=rs("sex")
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 6.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="0" cellpadding="4" style="border-collapse: collapse" bordercolor="#111111" width="778" height="326">
<tr>
<td align="center">
<table border="0" width="100%" id="table1">
<tr>
<td> </td>
<td>
<form name=form1 action=""><input type="hidden" name="ctype" >
<table border="0" cellpadding="5" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="300" id="table2">
<tr>
<td width="100" align="right">用戶名:</td>
<td width="200">
<input type="text" name="student" size="20" class="line" style="border-style:solid; border-width:1px; padding:1px; height:22"></td>
</tr>
<tr>
<td align="right">密 碼:</td>
<td>
<input type="password" name="pwd" size="20" class="line" style="height: 22; border-style: solid; border-width: 1px; width:149"></td>
</tr>
<tr>
<td> </td>
<td>
<input type="button" value="提交" name="B1" onclick="check()" class="line" style="width: 60; height: 22; border-style: solid; border-width: 1px; background-color: #FFFFFF">
<input type="reset" value="重置" name="B2" class="line" style="width: 60; height: 22; border-style: solid; border-width: 1px; background-color: #FFFFFF"></td>
</tr>
<tr>
<td> </td>
<td><a href="register.asp">新學生注冊</a></td>
</tr>
<tr>
<td> </td>
<td><a href="admin/index.asp">后臺管理程序入口</a></td>
</tr>
</table></td>
<td><img border="0" src="images/login.jpg" width="470" height="289"></td>
</tr>
</table>
</td>
</tr>
</table>
</center>
</div>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -