<!--#include file="include/hf_conn.asp"-->
<!--#include file="chopchar.asp"-->
<HTML><HEAD><TITLE><%=sitename%>－管理后台</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<link rel="stylesheet" href="hf_shop.css" type="text/css">
<script language='javascript'>
if (top != self)top.location.href = "admin.asp"; 
</script>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="hf_shop.css" type="text/css">
<STYLE>BODY {
	BACKGROUND-COLOR: #ffffff
}
TR {
	BACKGROUND-COLOR: #ffffff
}
.tr_val {
	BACKGROUND-COLOR: #fdfdfd
}
.input_login {
	BORDER-RIGHT: #ffffff 0px solid; BORDER-TOP: #ffffff 0px solid; FONT-SIZE: 9pt; BORDER-LEFT: #ffffff 0px solid; BORDER-BOTTOM: #ffffff 0px solid; HEIGHT: 16px
}
.input_val {
	BORDER-RIGHT: #ffffff 0px solid; BORDER-TOP: #ffffff 0px solid; FONT-SIZE: 9pt; BORDER-LEFT: #ffffff 0px solid; BORDER-BOTTOM: #c0c0c0 1px solid; HEIGHT: 16px; BACKGROUND-COLOR: #fdfdfd
}
</STYLE>
<BODY leftMargin=0 topMargin=0>
<CENTER>
<%
if request("login")<>"check" then
%>
<TABLE height="96%" width="100%" border=0><TBODY>
  <TR>
    <TD align=middle width="100%" height="100%">
      <TABLE height="96%" width=350 border=0>
        <TBODY>
        <TR>
          <TD align=middle>
            <TABLE cellSpacing=0 cellPadding=0 width=526 border=0>
             <form method="post" action="admin.asp" name="adminlogin">
              <TBODY>
              <TR>
                <TD colSpan=2 width=526 height=100 background="images/admin/al_top.gif" align="center"><br><br><br><br>授权给：<a href="<%=siteurl%>"><b><font color=red><%=sitename%></font></a>&nbsp;&nbsp;</b></TD></TR>
              <TR>
                <TD colSpan=2>
                  <TABLE cellSpacing=0 cellPadding=0 width=526 border=0>
                    <TBODY>
                    <TR>
                      <TD width=155><IMG src="images/admin/al_username.gif" border=0></TD>
                      <TD width=105 background="images/admin/al_body_bg.gif"><INPUT class=input_login maxLength=16 size=16 type=text name=username style="BORDER-TOP" title="请填写用户名"></TD>
                      <TD width=93><IMG src="images/admin/al_password.gif" border=0></TD>
                      <TD width=105 background="images/admin/al_body_bg.gif"><INPUT class=input_login maxLength=16 size=16 type=password name=password style="BORDER-TOP" title="请填写密码"></TD>
                      <TD width=68><IMG src="images/admin/al_body_right.gif" border=0></TD>
                    </TR>
                    </TBODY>
                  </TABLE>
                </TD>
              </TR>
              <TR>
                <TD colSpan=2>
                  <TABLE cellSpacing=0 cellPadding=0 width=526 border=0>
                    <TBODY>
                    <TR>
                      <TD width=77><IMG src="images/admin/al_end_left.gif" border=0></TD>
                      <TD width=339>
                        <TABLE cellSpacing=0 cellPadding=0 width=339 border=0>
                          <TBODY>
                          <TR>
                            <TD align=middle background="images/admin/al_end_bg.gif" height=49>
                              <TABLE border=0>
                                <TBODY>
                                <TR class=tr_val>
                                <TD>后台目录：</TD>
                                <TD><INPUT class=input_val maxLength=50 size=16 type=text name=path style="BORDER-TOP" title="请填写后台目录"></TD></TR>
                                </TBODY>
                              </TABLE>
                             </TD>
                           </TR>
                          <TR>
                            <TD width=339 height=39 background="images/admin/al_end_end.gif"  align="center"><br>
							Copyright(c) <a target="_blank" href="http://www.hfvip.com/">韩枫网络</a> 2006-2008 All Rights Reserved</TD>
                          </TR>
                          </TBODY>
                         </TABLE>
                       </TD>
                      <TD width=110><input type="image" src="images/admin/al_end_right.gif" title="登录后台"><input type="hidden" name=login value="check"></TD>
                    </TR>
                    </TBODY>
                  </TABLE>
                </TD>
               </TR>
             </FORM>
             </TBODY>
           </TABLE>
          </TD>
        </TR>
        </TBODY>
      </TABLE>
     </TD>
  </TR>
</TBODY>
</TABLE>
</CENTER>
<%
else

if session("hfvipok_admin_login")>=5 then

Set rs=Server.CreateObject("ADODB.RecordSet") 
sql="select * from hfvipsetup"
rs.open sql,conn,1,3
userip=Request.serverVariables("REMOTE_ADDR")
if instr(rs("ip"),userip)<0 then rs("ip")=rs("ip")&"@"&userip
rs.update
rs.close
set rs=nothing

response.write "<script language='javascript'>"
response.write "alert('您涉嫌非法登陆网站后台，已被系统锁定。请与技术人员联系。\n\n 如需访问本站请20分钟后再试\n\n 韩枫网络 www.hfvip.com');"
response.write "location.href='index.asp';"
response.write "</script>"
response.end
end if

path=trim(request("path"))
username=trim(request("username"))
password=trim(request("password"))

	if checktext(request("username"))<>request("username") or checktext(request("password"))<>request("password") then
	response.write "<script language='javascript'>"
	response.write "alert('您填写的内容中含有非法字符，请检查后重新输入！');"
	response.write "location.href='javascript:history.go(-1)';"
	response.write "</script>"
	response.end
	end if

	if path = "" or username="" or password="" then
		response.write "<script language='javascript'>"
		response.write "alert('填写不完整，请检查后重新提交！');"
		response.write "location.href='javascript:history.go(-1)';"
		response.write "</script>"
		response.end
	end if

	Set fso = Server.CreateObject("Scripting.FileSystemObject")
		if fso.FolderExists(server.MapPath("./"&path))=false then
		    session("hfvipok_admin_login")=session("hfvipok_admin_login")+1
		    response.write "<script language='javascript'>"
		    response.write "alert('您填写的目录不存在，请检查后重新提交。\n\n提示：出错"&session("hfvipok_admin_login")&"次! 出错五次将封锁IP!\n\n 韩枫网络 www.hfvip.com');"
		    response.write "location.href='javascript:history.go(-1)';"
		    response.write "</script>"
		    response.end
		end if
	set fso=nothing

	set rs=conn.execute("select * from hf_manage where password='"&md5(password)&"' and username='"&username&"'")
 	if not(rs.bof and rs.eof) then
		session("hfvipok_admin_login")=0
		Response.cookies("hfvipok")("admin")=username	'设置cookies
		Response.Redirect (path&"/index.asp")		'登入真实后台
	else	
		    response.write "<script language='javascript'>"
		    session("hfvipok_admin_login")=session("hfvipok_admin_login")+1
		    response.write "alert('您填写的用户名或者密码有误，请检查后重新输入。\n\n提示：出错"&session("hfvipok_admin_login")&"次!出错五次将封锁IP!\n\n 韩枫网络 www.hfvip.com');"
		    response.write "location.href='javascript:history.go(-1)';"
		    response.write "</script>"
		    response.end
	end if
	set rs=nothing
	conn.close
	set conn=nothing
end if
%>
</BODY>
</HTML>
<%
if request("action")="" then
response.cookies("hfvipok")("temp")="login"
response.write "<meta HTTP-EQUIV=REFRESH CONTENT='0;URL="&request.ServerVariables("script_name")&"?action=login'>"
else
  if request.cookies("hfvipok")("temp")<>"login" then
	response.write "<script language='javascript'>"
	response.write "alert('用户您好，您的电脑没有开启COOKIES，您将不能正常登陆后台，请启用COOKIES后再访问本页。');"
	response.write "</script>"
	response.end
  end if
end if
%>