<!--#include file="conn.asp"-->
<!-- #include file="IncAsp/WrzcNethtml_md5.asp" -->
<!--#include file="IncAsp/WrzcNethtml_sqlcheck.asp"-->
<%if Request.Cookies("WrzcNethtml")("admin_name")<>"" and Request.Cookies("WrzcNethtml")("admin_pass")<>"" and Request.Cookies("WrzcNethtml")("admin_class")<>"" then response.redirect "ad_manage.asp"%>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href=inc/css.css rel=STYLESHEET type=text/css>
<script language="JavaScript" src="inc/checkadmin.js"></script>
<%

if request("action")="login" then
lastip = Request.ServerVariables("HTTP_X_FORWARDED_FOR") 
If lastip = "" Then lastip = Request.ServerVariables("REMOTE_ADDR")
set rs2=server.createobject("adodb.recordset")
sql="select * from WrzcNethtml_adminlog"
rs2.open sql,conn,1,3
rs2.addnew
rs2("log_name")=request("admin_name")
rs2("log_date")=now()
rs2("log_ip")=lastip

 admin_name=DelStr(request("admin_name"))
 admin_pass=md5(DelStr(request("admin_pass")))
 admin_yz=DelStr(request("admin_yz"))
 if InStr(admin_name,"'") > 0 or InStr(admin_pass,"'") >0 then
 response.write "请不要使用非法字符，<a href=WrzcNethtml_login.asp><font color=#ff0000>返回</font></a>!"
 Session("GetCode")=""
rs2("log_result")="失败:输入非法字符"
rs2.update
rs2.close
set rs2=nothing
 response.end
 end if
 if request("admin_name")="" or request("admin_pass")="" then
 response.write "请输入用户和密码，<a href=WrzcNethtml_login.asp><font color=#ff0000>返回</font></a>!"
 Session("GetCode")=""
rs2("log_result")="失败:没有输入用户或者密码"
rs2.update
rs2.close
set rs2=nothing
 response.end
 end if
 if request("admin_yz")="" then
 response.write "请输入验证码，<a href=WrzcNethtml_login.asp><font color=#ff0000>返回</font></a>!"
 Session("GetCode")=""
rs2("log_result")="失败:没有输入验证码"
rs2.update
rs2.close
set rs2=nothing
 response.end
 end if
 if int(admin_yz)<>Session("GetCode") then
 response.write "错误的验证码，<a href=WrzcNethtml_login.asp><font color=#ff0000>返回</font></a>!"
 Session("GetCode")=""
rs2("log_result")="失败:验证码错误"
rs2.update
rs2.close
set rs2=nothing
 response.end
 end if
 
  set rs=server.createobject("adodb.recordset")
  sql="select * from WrzcNethtml_admin where admin_name='"&admin_name&"' and admin_pass='"&admin_pass&"'"
  rs.open sql,conn,1,3
  if rs.eof then
  response.write "操作有误，请检查用户密码，<a href=WrzcNethtml_login.asp><font color=#ff0000>返回</font></a>!"
  Session("GetCode")=""
rs2("log_result")="失败:用户名密码有误"
rs2.update
rs2.close
set rs2=nothing
  response.end
  elseif not rs.eof then

  rs("lastip")=lastip
  rs("lasttime")=now()
  rs("landtimes")=rs("landtimes")+1
  rs.update
rs2("log_result")="成功"
rs2.update
rs2.close
set rs2=nothing
  Session("GetCode")=""
  Response.Cookies("WrzcNethtml")("admin_name")=trim(rs("admin_name"))
  Response.Cookies("WrzcNethtml")("admin_pass")=trim(rs("admin_pass"))
  Response.Cookies("WrzcNethtml")("admin_class")=trim(rs("admin_class"))
  response.redirect "ad_manage.asp"
  end if
 rs.close
 set rs=nothing
 conn.close
 set conn=nothing
else
%>
<title>Login Powered By:wrzc.net</title>
<style type="text/css">
<!--
body {
	background-image: url(Image/admin_login.jpg);
}
.STYLE1 {color: #FF0000}
-->
</style><body>
<div align="center">

<table border="0" cellpadding="0" cellspacing="0" width="100%" id="table2" height="80%">
	<tr>
		<td align="center"><table border=1 borderColor=#6699CC cellPadding=4 cellSpacing=1 width=472 style="border-collapse: collapse" align=center >
	<tr valign="baseline"> 
		<td width="458" align="right" background=image/b1.gif>
        <div align="center"><font color="#000000" style="font-size: 10.5pt;"> 
          <strong>网软志成 网上购物网站管理系统英文版</strong></font></div>
      </td>
	</tr>
	<tr valign="baseline"> 
		<td bgcolor=#EFF1F3 align=center valign=middle height=60> 
			<table width="100%" border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td width=20> </td>
					
            <td width=150>
              <div align="center"><img src="Image/admin_p.gif" width="90" height="100" border="0" usemap="#Map"> 
              </div>
            </td>
					<td width=280>
<form method="POST" name="form1" action="WrzcNethtml_login.asp?action=login" onSubmit="javascript: return check_null();">
	<table width="100%" border="0" cellspacing="8" cellpadding="0" align="center">
		<tr align="center"> 
			<td height="38" colspan="2"><font color="#000000" size="3"><strong>管理员登录</strong></font> 
			</td>
		</tr>
		<tr> 
			<td align="right"><font color="#000000">用户名称：</font></td>
			<td><input name="admin_name" type="text" class=input tabindex="1" value="admin" size="20"></td>
		</tr>
		<tr> 
			<td align="right"><font color="#000000">用户密码：</font></td>
			<td><input name="admin_pass" type="password" class=input tabindex="2" value="admin" size="21"></td>
		</tr>
		<tr> 
			<td align="right"><font color="#00000">验 证 码：</font></td>
			<td><input type="text" name="admin_yz" size="6" class=input tabindex="3">
				<font color="#FF0000">请在左边输入</font>            <img border="0" src="code.asp" width="40" height="10"></td>
		</tr>
		<tr> 
			<td colspan="2"> <div align="center"> &nbsp;&nbsp;&nbsp;&nbsp;
				<input   type="submit" name="Submit" value=" 确&nbsp;认 " style="font-size: 9pt; height: 19; width: 60; color: #000000; background-color: #FFCCFF; border: 1 solid #336600" onMouseOver ="this.style.backgroundColor='#ffffff'" onMouseOut ="this.style.backgroundColor='#FFCCFF'">
				&nbsp; 
				<input name="reset" type="reset"  id="reset" value=" 清&nbsp;除 " style="font-size: 9pt; height: 19; width: 60; color: #000000; background-color: #FFCCFF; border: 1 solid #336600" onMouseOver ="this.style.backgroundColor='#ffffff'" onMouseOut ="this.style.backgroundColor='#FFCCFF'"><br>
				</div></td>
		</tr>
	</table>
</form>
					</td>
				</tr>
			</table>
		</td>
	</tr>
</table>
		<table border="0" cellpadding="0" cellspacing="0" id="table3">
			<tr>
				<td>　</td>
			</tr>
			
			<tr>
				<td height="30" align="center">
				  <a href="http://www.wrzc.net/"><font color="#990000"><b>广州网软志成信息科技有限公司</b></font></a> 
<font color="#990000"><b>Tel:020-34506590 QQ:38306293 </b></font> </td>
			</tr><tr>
				<td height="30">
				<img border="0" src="img/ad_help.gif" width="18" height="14" alt="查看后台管理相应的帮助信息">:<span class="STYLE1">鼠标移上去可以看到注释;&nbsp;&nbsp;&nbsp; 
				↑=回到顶部&nbsp;&nbsp;&nbsp; ↓=回到底部&nbsp;&nbsp;&nbsp; ←=后退&nbsp;&nbsp;&nbsp; 
				→=前进</span></td>
			</tr>
		</table>
</td>
	</tr>
</table>
</div>
<%end if%>