www.gusucode.com > ASP+ACCESS在线考试系统设计(源代码+论文) > ASP+ACCESS在线考试系统设计(源代码+论文)\郭晓璇论文第二稿\input\login5.asp

    <%@ Language=VBScript %>
<%
dwname=trim(request("dwname"))
dwpasswd=trim(request("dwpasswd"))
if dwname<>"" and dwpasswd<>"" then
	Set conn = Server.CreateObject("ADODB.Connection")
	conn.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" & Server.MapPath("../试题库.mdb")
	set rs= server.createobject("adodb.recordset") 
	sql= "select * from 单位记录 where 用户名='"& dwname &"' and 密码='"& dwpasswd &"'"
	Set rs= conn.Execute(sql) 
	if not rs.eof then
		session("pass")=1
		session("dwname")=dwname
		session("dwmima")=dwpasswd
		conn.close
		response.redirect "input.asp"
	else 
		Response.Write "非法用户!"
	end if 
else 
end if
%>
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>网络考场</title>
<meta name="GENERATOR" content="Microsoft FrontPage 3.0">
<meta NAME="GENERATOR" Content="Microsoft FrontPage 4.0">
</head>

<body background="../images/1024.jpg" bgproperties="fixed">

<form action="login5.asp" id="FORM1" method="post" name="FORM1">
  <p title> </p>
  <table border="0" width="100%">
    <tr>
      <th width="100%"><table border="0" width="100%">
        <tr>
          <th width="100%"><img src="../Images/back.gif" alt="../背景.gif (87350 bytes)"></th>
        </tr>
      </table>
      </th>
    </tr>
  </table>
  <div align="center"><center>
  <h2 title>用户:<input id="text1" name="dwname" style="HEIGHT: 22px; WIDTH: 103px" size="20"></h2>
  </center></div>
  
  <div align="center"><center>
  <h2 title>口令:<input id="password1" name="dwpasswd" style="HEIGHT: 23px; WIDTH: 101px" type="password" size="20"></h2>
  </center></div>
  
  <table border="0" width="100%">
    <tr>
      <td width="100%" checked="false"></td>
    </tr>
  </table>
  <div align="center"><center><p title><input id="submit1" name="submit1" type="submit"
  style="font-size: large; font-style: normal; font-variant: normal; font-weight: bold; background-image: url('../Images/enter3.bmp'); background-repeat: no-repeat; background-attachment: scroll; background-position: center 50%"
  title value="     "></p>
  </center></div>
</form>
</body>
</html>