<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="Conn.asp"-->
<!--#include file="Ex_Cls/Ex_FsoCls.asp"-->
<!--#include file="Ex_Cls/Ex_CommonCls.asp"-->
<%
'强制浏览器重新访问服务器下载页面，而不是从缓存读取页面
Response.Buffer = True
Response.Expires = -1
Response.ExpiresAbsolute = Now() - 1
Response.Expires = 0
Response.CacheControl = "no-cache"
%>
<html>
<head>
<title>管理员登录</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="Admin_Style.css">
<script language=javascript>
<!--
function CheckForm()
{
	if(document.Login.AdName.value=="")
	{
		alert("请输入用户名！");
		document.Login.AdName.focus();
		return false;
	}
	if(document.Login.AdPwd.value == "")
	{
		alert("请输入密码！");
		document.Login.AdPwd.focus();
		return false;
	}
	if (document.Login.CheckCode.value==""){
       alert ("请输入您的验证码！");
       document.Login.CheckCode.focus();
       return(false);
    }
}

//-->
</script>
<style type="text/css">
<!--
.style1 {color: #000000}
BODY
{
	FONT-FAMILY: "宋体";
	FONT-SIZE: 12px;
	text-decoration: none;
	line-height: 150%;
	background-color: #D6DFF7;	
    text-decoration: none;
    SCROLLBAR-FACE-COLOR: #799ae1;  MARGIN: 0px; FONT: 12px 宋体; SCROLLBAR-HIGHLIGHT-COLOR: #799ae1; SCROLLBAR-SHADOW-COLOR: #799ae1; SCROLLBAR-3DLIGHT-COLOR: #799ae1; SCROLLBAR-ARROW-COLOR: #ffffff; SCROLLBAR-TRACK-COLOR: #aabfec; SCROLLBAR-DARKSHADOW-COLOR: #799ae1

}
TD
{
	FONT-FAMILY: "宋体";
	FONT-SIZE: 9pt;
}
Input
{
	FONT-SIZE: 9pt;
	HEIGHT: 20px;
}
-->
</style>
</head>
<body class="bgcolor">
<%
Dim ExLogin
Set ExLogin=new AdLogin
ExLogin.Execute
Class AdLogin
Private ExCommCls
Private Sub class_initialize
	Set ExCommCls=new Ex_CommonCls
	ExCommCls.IsIpAllow
	ExCommCls.CheckInstall
	ExCommCls.GetConfigCache("*")
End Sub
Private Sub class_terminate
	Set ExCommCls=nothing
End Sub
public  Sub Execute
	Dim Action
	Action=Request("action")
	Select Case Action
		Case "CheckLogin"
		CheckLogin
		Case "LoginOut"
		LoginOut
		Case Else
		LoginF
	End Select
End Sub
Private Sub CheckLogin
	Dim Adname,AdPwd,CheckCode
	AdName=ExCommCls.G(Trim(request("Adname")))
	AdPwd=md5(Trim(request("AdPwd")))
	CheckCode=ExCommCls.G(request("checkCode"))
	If Trim(CheckCode)<>session("excheckcode") and Application(sn&"IsCheckCode")="是" Then
		ExCommCls.ShowMsg "验证码错误！",Application(sn&"blogurl")&"admin_login.asp"
		Exit Sub
	End If
	If  Trim(AdName)=CStr(Application(sn&"AdName")) And Trim(AdPwd)=CStr(Application(sn&"AdPwd")) Then
		Response.Cookies(Md5(SN))("AdName")=AdName
		Response.Cookies(Md5(SN))("AdPwd")=AdPwd
		session("AdLogin")=Md5(SN)
		ExCommCls.GetConfigCache("*")
		ExCommCls.GetClassCache()
		Response.Redirect(Application(sn&"blogurl")&"admin_index.asp")
	Else
		ExCommCls.ShowMsg "帐号或密码错误",Application(sn&"blogurl")&"admin_login.asp"
	End if
End Sub
Private Sub LoginOut
	Response.Cookies(Md5(SN))("AdName")=""
	Response.Cookies(Md5(SN))("AdPwd")=""
	session.Abandon()
	ExCommCls.ShowMsg "成功退出登陆",Application(sn&"blogurl")&"index.asp"
End Sub
Private Sub LoginF
%>
<p>&nbsp;</p>
<form name="Login" action="<%=Application(Sn&"blogurl")%>admin_login.asp?action=CheckLogin" method="post" target="_parent" onSubmit="return CheckForm();">
    
  <table width="585" border="0" align="center" cellpadding="0" cellspacing="0" >
    <tr> 
      <td width="280" rowspan="2"><div align="right"><img src="Images/admin/exblog.gif" width="180" height="83"> 
      </div></td>
      <td width="344" background="Images/entry2.gif"> <table width="100%" border="0" cellspacing="8" cellpadding="0" align="center">
          <tr align="center"> 
            <td height="38" colspan="2" class="style1"><font size="3"><strong>管理员登录</strong></font> 
            </td>
          </tr>
          <tr> 
            <td align="right"><span class="style1">用户名称：</span></td>
            <td><input name="AdName"  type="text"  id="AdName" maxlength="20" style="width:160px;border-style:solid;border-width:1;padding-left:4;padding-right:4;padding-top:1;padding-bottom:1" onMouseOver="this.style.background='#D6DFF7';" onMouseOut="this.style.background='#FFFFFF'" onFocus="this.select(); "></td>
          </tr>
          <tr> 
            <td align="right"><span class="style1">用户密码：</span></td>
            <td><input name="AdPwd"  type="password" maxlength="20" style="width:160px;border-style:solid;border-width:1;padding-left:4;padding-right:4;padding-top:1;padding-bottom:1" onMouseOver="this.style.background='#D6DFF7';" onMouseOut="this.style.background='#FFFFFF'" onFocus="this.select(); "></td>
          </tr>
		  <%
		  if Application(sn&"IsCheckCode")="是" then 
		  %>
          <tr> 
            <td align="right"><span class="style1">验 证 码：</span></td>
            <td><input name="CheckCode" id="CheckCode" style="border-style:solid;border-width:1;padding-left:4;padding-right:4;padding-top:1;padding-bottom:1" onFocus="this.select(); " onMouseOver="this.style.background='#D6DFF7';" onMouseOut="this.style.background='#FFFFFF'" size="6" maxlength="4">
               <img src="inc/checkcode.asp" style="cursor:hand" onClick="this.src='inc/checkcode.asp';" alt="看不清?点一下" /> </td>
          </tr>
		  <%
		  end if 
		  %>
          <tr> 
            <td colspan="2"> <div align="center"> 
                <input name="Submit"   type="submit"   value=" 确&nbsp;认 ">
                &nbsp; 
                <input name="reset" type="reset"  id="reset" value=" 清&nbsp;除 " >
                <br>
              </div></td>
          </tr>
        </table></td>
    </tr>
    <tr><td height="3"></td></tr>
  </table>
  <p align="center">后台管理页面需要屏幕分辨率为 <font color="#FF0000"><strong>1024*768</strong></font> 
    或以上才能达到最佳浏览效果！<br>
    需要浏览器为<strong><font color="#FF0000"> </font></strong><font color="#FF0000"><strong>IE5.5</strong></font> 
    或以上版本才能正常运行！！！</p>
</form>
</script>
<%
End Sub
End Class
%>
</body>
</html>
