<!--#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 admin 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("pass") then%>
    <script language=vbscript>  
  		MsgBox "错误：该用户不存在或密码错误！"  
  		location.href = "javascript:history.back()"  
	</script>  
	<%else
	session("admin")="administrator"
	response.redirect("shop.asp")
end if
end if
else
%>
<body bgcolor="#396BA5">

<div align="center">
  <center>
  <table border="0" width="240" height="133" cellspacing="1" cellpadding="3" style="border-collapse: collapse" bordercolor="#111111">
  <tr>
    <td width="100%" height="16" bgcolor="#C0C0C0">
      <p align="center">iChat虚拟超市管理员登入</p>
    </td>
  </tr>
  <tr>
    <td width="100%" height="105" bgcolor="#F3F3F3">
<form method="POST" action="adminlogin.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>    
</form>    
       
       
       
    </td>   
  </tr>   
</table>   
  </center>   
</div>   
<%end if%>