<!--#include file="include/config.asp"-->
<!--#include file="md5.asp"-->
<HTML><HEAD>
<META http-equiv=Content-Language content=zh-cn>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content="MSHTML 6.00.2800.1106" name=GENERATOR>
<TITLE>管理员登陆</TITLE>
<script language='javascript'>
if (top != self)top.location.href = "admin.asp"; 
</script>
<LINK href="images/css1.css" type=text/css rel=stylesheet>
<LINK href="list/newhead.css" type=text/css rel=stylesheet>
</HEAD>
<BODY bgColor=#eef8e0 leftMargin=0 topMargin=0 MARGINHEIGHT="0" MARGINWIDTH="0">
  <%
if request("login")<>"check" then
%>
			  <form method="post" action="admin.asp" name="adminlogin">


<TABLE cellSpacing=0 cellPadding=0 width=1004 border=0>
  <TR>
    <TD colSpan=6><IMG height=92 alt="" src="images/admin/crm_1.gif" 
    width=345></TD>
    <TD colSpan=4><IMG height=92 alt="" src="images/admin/crm_2.gif" 
    width=452></TD>
    <TD><IMG height=92 alt="" src="images/admin/crm_3.gif" width=207></TD></TR>
  <TR>
    <TD colSpan=6><IMG height=98 alt="" src="images/admin/crm_4.gif" 
    width=345></TD>
    <TD colSpan=4><IMG height=98 alt="" src="images/admin/crm_5.gif" 
    width=452></TD>
    <TD><IMG height=98 alt="" src="images/admin/crm_6.gif" width=207></TD></TR>
  <TR>
    <TD rowSpan=5><IMG height=370 alt="" src="images/admin/crm_7.gif" 
    width=59></TD>
    <TD colSpan=5><IMG height=80 alt="" src="images/admin/crm_8.gif" 
    width=286></TD>
    <TD colSpan=4><IMG height=80 alt="" src="images/admin/crm_9.gif" 
    width=452></TD>
    <TD><IMG height=80 alt="" src="images/admin/crm_10.gif" width=207></TD></TR>
  <TR>
    <TD><IMG height=110 alt="" src="images/admin/crm_11.gif" width=127></TD>
    <TD background=images/admin/crm_12.gif colSpan=6>
      <TABLE id=table1 cellSpacing=0 cellPadding=0 width="98%" 
      border=0>
        <TR>
          <TD>
			

            <TABLE id=table2 cellSpacing=1 cellPadding=0 width="100%" 
            border=0>
              <TBODY>
              <TR>
                <TD align=middle width=81><FONT color=#ffffff>用户名：</FONT></TD>
                <TD><INPUT maxLength=16 size=16 type=text name=username class=regtxt title="请填写用户名"></TD></TR>
              <TR>
                <TD align=middle width=81><FONT 
                  color=#ffffff>密&nbsp; 码：</FONT></TD>
                <TD><INPUT maxLength=16 size=16 type=password name=password class=regtxt title="请填写密码"></TD></TR>
				<TR>
                <TD align=middle width=81><FONT color=#ffffff>路&nbsp; 径：</FONT></TD>
                <TD><INPUT maxLength=50 size=16 type=text name=path class=regtxt title="请填写后台目录">
                      <input type="hidden" name=login value="check"></TD></TR>
				</TBODY></TABLE>
				</TD></TR></TABLE></TD>
    <TD colSpan=2 rowSpan=2><IMG height=158 alt="" src="images/admin/crm_13.gif" 
      width=295></TD>
    <TD rowSpan=2><IMG height=158 alt="" src="images/admin/crm_14.gif" 
    width=207></TD></TR>

  <TR>
    <TD rowSpan=3><IMG height=180 alt="" src="images/admin/crm_15.gif" 
    width=127></TD>
    <TD rowSpan=3><IMG height=180 alt="" src="images/admin/crm_16.gif" 
    width=24></TD>
    <TD><INPUT type=image height=48 alt="" width=86 
      src="images/admin/crm_17.gif" title="登录后台" name="image"></TD>
    <TD><IMG height=48 alt="" src="images/admin/crm_18.gif" width=21></TD>
    <TD colSpan=2><a href="index.asp"><img border=0 height=48 alt="" 
      width=84 src="images/admin/crm_19.gif" title="返回首页"></a></TD>
    <TD><IMG height=48 alt="" src="images/admin/crm_20.gif" 
  width=101></TD></TR>
  <TR>
    <TD colSpan=5 rowSpan=2><IMG height=132 alt="" src="images/admin/crm_21.gif" 
      width=292></TD>
    <TD rowSpan=2><IMG height=132 alt="" src="images/admin/crm_22.gif" 
    width=170></TD>
    <TD colSpan=2><IMG height=75 alt="" src="images/admin/crm_23.gif" 
    width=332></TD></TR>
  <TR>
    <TD colSpan=2><IMG height=57 alt="" src="images/admin/crm_24.gif" 
    width=332></TD></TR>
  <TR>
    <TD><IMG height=1 alt="" src="images/admin/spacer.gif" width=59></TD>
    <TD><IMG height=1 alt="" src="images/admin/spacer.gif" width=127></TD>
    <TD><IMG height=1 alt="" src="images/admin/spacer.gif" width=24></TD>
    <TD><IMG height=1 alt="" src="images/admin/spacer.gif" width=86></TD>
    <TD><IMG height=1 alt="" src="images/admin/spacer.gif" width=21></TD>
    <TD><IMG height=1 alt="" src="images/admin/spacer.gif" width=28></TD>
    <TD><IMG height=1 alt="" src="images/admin/spacer.gif" width=56></TD>
    <TD><IMG height=1 alt="" src="images/admin/spacer.gif" width=101></TD>
    <TD><IMG height=1 alt="" src="images/admin/spacer.gif" width=170></TD>
    <TD><IMG height=1 alt="" src="images/admin/spacer.gif" width=125></TD>
    <TD><IMG height=1 alt="" src="images/admin/spacer.gif" 
  width=207></TD>
</TR></TABLE>
				</FORM>

</BODY></HTML>
  <%
else

if session("buyok_admin_login")>=5 then

Set rs=Server.CreateObject("ADODB.RecordSet") 
sql="select * from bconfig"
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('您涉嫌非法登陆网站后台，已被系统锁定。请与技术人员联系。');"
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 buyoktxtcheck(request("username"))<>request("username") or buyoktxtcheck(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("buyok_admin_login")=session("buyok_admin_login")+1
		    response.write "<script language='javascript'>"
		    response.write "alert('您填写的目录不存在，请检查后重新提交。\n\n提示：出错"&session("buyok_admin_login")&"次');"
		    response.write "location.href='javascript:history.go(-1)';"
		    response.write "</script>"
		    response.end
		end if
	set fso=nothing

	set rs=conn.execute("select * from manage where password='"&md5(password)&"' and username='"&username&"'")
 	if not(rs.bof and rs.eof) then
		session("buyok_admin_login")=0
		Response.cookies("buyok")("admin")=username	'设置cookies
		Response.Redirect (path&"/index.asp")		'登入真实后台
	else	
		    response.write "<script language='javascript'>"
		    session("buyok_admin_login")=session("buyok_admin_login")+1
		    response.write "alert('您填写的用户名或者密码有误，请检查后重新输入。\n\n提示：出错"&session("buyok_admin_login")&"次');"
		    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
%>
