<!-- #include file="conn.asp" -->
<%
if Request("admin")<>"" then
	sql="select * from admin where admin='" & trim(request("admin")) & "' and Pwd='" & replace(trim(request("pwd")),"'","''") & "'"
	'response.write sql
	'response.End
	set rs = conn.Execute(sql)
	if not (rs.eof or err) then
		session("admin")=rs("admin")
		session("userClass")=1
		response.redirect "manage.asp"
	else
%>
	<script language=Javascript>
	alert("错误！请重新输入");
	window.history.go(-1);	
	</script>
<%	
	end if
else
%>
<html>
<head>
<title>711企业网站管理系统 </title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="Images/Admin_style.css">
<script language="javascript">
<!--
var closestr=0;
function SetFocus() {
if(document.Login.UserName.value == "")
  document.Login.UserName.focus();
else
  document.Login.UserName.select();
}
function CheckForm() {
  if(document.Login.UserName.value == "") {
    alert("请输入用户名！");
    document.Login.UserName.focus();
    return false;
  }
  if(document.Login.password.value == "") {
    alert("请输入密码！");
    document.Login.password.focus();
    return false;
  }
  if (document.Login.CheckCode.value == "") {
    alert ("请输入您的验证码！");
    document.Login.CheckCode.focus();
    return(false);
  }
  if (document.Login.AdminLoginCode.value == "") {
    alert ("请输入您的管理验证码！");
    document.Login.AdminLoginCode.focus();
    return(false);
  }
}
function CheckBrowser() {
  var app=navigator.appName;
  var verStr=navigator.appVersion;
  if(app.indexOf("Netscape") != -1) {
    alert("711网络友情提示：\n您使用的是Netscape、Firefox或者其他非IE浏览器，可能会导致无法使用后台的部分功能。建议您使用 IE6.0 或以上版本。");
  } else if(app.indexOf("Microsoft") != -1) {
    if (verStr.indexOf("MSIE 3.0")!=-1 || verStr.indexOf("MSIE 4.0") != -1 || verStr.indexOf("MSIE 5.0") != -1 || verStr.indexOf("MSIE 5.1") != -1)
      alert("711网络友情提示：\n您的浏览器版本太低，可能会导致无法使用后台的部分功能。建议您使用 IE6.0 或以上版本。");
  }
}
function refreshimg(){document.all.checkcode.src="../Include/CheckCode/CheckCode.asp";}
//-->
</script>
</head>

<body>
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td>      <form action="index.asp" method="POST" target="_parent">
        <table width="100%" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td width="219" height="164" background="images/Admin_Login1_0_02.gif"></td>
            <td width="64" height="164" background="images/Admin_Login1_0_04.gif"></td>
            <td valign="top" background="images/Admin_Login1_0_09.gif"><table border="0" cellpadding="0" cellspacing="0">
                <tr>
                  <td><table width="100%" border="0" cellpadding="0" cellspacing="0">
                      <tr>
                        <td width="270" height="79" background="images/Admin_Login1_0_05.gif"></td>
                        <td width="150" height="79" background="images/Admin_Login1_0_06.gif"></td>
                        <td valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
                            <tr>
                              <td height="21"></td>
                              <td></td>
                            </tr>
                            <tr>
                              <td><input type="hidden" name="Action" value="Login" />
                                <input type="image" name="Submit" src="Images/Admin_Login1_0_10.gif" style="width:50px; height: 50px;" /></td>
                              <td width="58" height="50" background="images/Admin_Login1_0_11.gif"></td>
                            </tr>
                          </table></td>
                      </tr>
                    </table></td>
                </tr>
                <tr>
                  <td height="85"><table border="0" cellspacing="0" cellpadding="0">
                      <tr>
                        <td width="22" rowspan="2" valign="bottom"><img src="images/Admin_Login1_0_15.gif" alt="" /></td>
                        <td width="80"><font color="#ffffff">用户名称：</font></td>
                        <td width="22" rowspan="2" valign="bottom"><img src="images/Admin_Login1_0_19.gif" alt="" /></td>
                        <td width="80"><font color="#ffffff">用户密码：</font></td>
						<%If EnableSiteManageCode = True Then%>
						<%End If%>
                      </tr>
                      <tr>
                        <td><input name="admin" type="text" id="admin" maxlength="20" style="width:70px; border-right: #f7f7f7 0px solid; border-top: #f7f7f7 0px solid; font-size: 9pt; border-left: #f7f7f7 0px solid; border-bottom: #c0c0c0 1px solid; height: 16px; background-color: #f7f7f7" onMouseOver="this.style.background='#ffffff'" onMouseOut="this.style.background='#f7f7f7'" onFocus="this.select();"></td>
                        <td><input name="pwd"  type="password" id="pwd" style="width:70px; border-right: #f7f7f7 0px solid; border-top: #f7f7f7 0px solid; font-size: 9pt; border-left: #f7f7f7 0px solid; border-bottom: #c0c0c0 1px solid; height: 16px; background-color: #f7f7f7" onFocus="this.select();" onMouseOver="this.style.background='#ffffff'" onMouseOut="this.style.background='#f7f7f7'" maxLength="20"></td>
					
                      </tr>
                    </table></td>
                </tr>
              </table></td>
          </tr>
        </table>
        <br />
        <center>
          <%if EnableSiteManageCode = True And SiteManageCode = "Tc711" then%>
          <font color="red">您使用的后台管理密码系统初始值用户名称：Tc711，密码：tc711</font>
          <%end if%>
        </center>
      </form></td>
  </tr>
</table>
<script language="JavaScript" type="text/JavaScript">
CheckBrowser();
SetFocus();
</script>
</body>
</html><%end if %>