

<head>
<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 {FONT-SIZE: 9pt}
TH {FONT-SIZE: 9pt}
TD {FONT-SIZE: 9pt}
</STYLE>

<!--#include file="conn.asp"-->
<%
if request.form("User")<>"" 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("userid")=rs("userid")
	session("username")=rs("username")

	response.redirect("home.asp")
end if
end if
else
%>
</head>

<body bgcolor="#396BA5">

<div align="center">
  <center>
  <table border="0" width="240" height="119" cellspacing="0" cellpadding="3" style="border-collapse: collapse" bordercolor="#111111">
  <tr>
    <td width="100%" height="20" bgcolor="#9CCEFF" style="border: 1px ridge #C0C0C0; padding-left: 4; padding-right: 4; padding-top: 1; padding-bottom: 1">
      <p align="center">进入我的百宝箱</p>
    </td>
  </tr>
  <tr>
    <td width="100%" height="87" bgcolor="#F5F5F5"><br>
<form name="login" method="POST" action="login.asp">
<p align="center">
用户名:<input type="text" name="user" size="20" style="border: 1 solid #9CCEFF"><br>
密&nbsp; 码:<input type=password name="pass" size="20" style="border: 1 solid #9CCEFF"><br>      
<br>   
<input type="submit" value="登 入" name="B1">&nbsp;&nbsp;&nbsp; <input type="reset" value="重 填" name="B2">  
  
</p>       
</form>       
          
<script>login.user.focus();</script>
          
    </td>      
  </tr>      
</table>      
  </center>      
</div>      
<%end if%>