<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>物品箱登入</title>
<STYLE type=text/css>
A:link {COLOR: #000000; FONT-FAMILY: 宋体; TEXT-DECORATION: none}
A:visited {	COLOR: #000000; FONT-FAMILY: 宋体; TEXT-DECORATION: none}
A:active { COLOR: #ff0000; FONT-FAMILY: 宋体; TEXT-DECORATION: none}
A:hover {COLOR: #ff0000; TEXT-DECORATION: none}
body{color:black;font-family:宋体;font-size:9pt;background-color:buttonface}
TH {FONT-SIZE: 9pt}
TD {FONT-SIZE: 9pt}
</STYLE>

</head>

<body>
<!--#include file="conn.asp"-->
<%
if request.form("bz")<>"" then
User=replace(trim(request.form("User")),"'","")
User=replace(user,"""","")
Pass=trim(request.form("Pass"))
Pass=replace(Pass,"""","")
Pass=replace(Pass,"'","")
set rs = Server.CreateObject("ADODB.Recordset")
rs.Open "Select * From userinfo where username='"&user&"'",conn,1,3
if rs.eof then 
	rs.close
	%>
    <script language=vbscript>  
  		MsgBox "错误：该用户不存在或密码错误！"  
  		location.href = "javascript:history.back()"  
	</script>  
<%else
	if pass<>rs("userpassword") then%>
    <script language=vbscript>  
  		MsgBox "错误：该用户不存在或密码错误！"  
  		location.href = "javascript:history.back()"  
	</script>  
	<%else
	session("id")=rs("userid")
	response.redirect("userbox.asp")
end if
end if
else
%>

<div align="center">
  <center><table border="0" width="240" height="110" cellspacing="0" cellpadding="3">
  <tr>
    <td width="100%" height="16">
      <p align="center">物品箱登入</p>
    </td>
  </tr>
  <tr>
    <td width="100%" height="82">
<form method="POST" action="mybox.asp">
<p align="center">
用户名:<input type="text" name="user" size="20"><br>
密&nbsp; 码:<input type=password name="pass" size="20"><br>         
<input type=hidden name=bz value="12345">         
<input type="submit" value="进  入" name="B1">           
</p>           
    </td>          
  </tr>          
</form>           
</table>          
  </center>          
</div>          
<%end if%>     
</body>       
</html>       
