<!--#include file=conn.asp-->
<!--#include file="../config.asp"-->
<!--#include file="../adminfunction.asp"-->
<!--#include file="../md5.asp"-->
<%if request("submit")="登录" then
jiance=request("adminname")
if InStr(jiance,"or")<>0 or InStr(jiance,"'")<>0 or InStr(jiance,"`")<>0 or InStr(jiance,"=")<>0 or InStr(jiance,"-")<>0 or InStr(jiance,",")<>0 or InStr(jiance,"and")<>0 then 
Response.Write "<script language=JavaScript>{alert('用户名非法！');history.back();}</script>"
Response.End 
end if
		if not IsNumeric(request("verifycode")) then
		Response.Write ("<script>alert('友情提示!\n\n验证编码必须是数字!');history.back();</script>")
		Response.end
	end if
	if (int(session("SafeCode"))<>int(request("verifycode"))) then
		Response.Write ("<script>alert('友情提示!\n\n验证编码输入错误!');history.back();</script>")
		Response.end
	end if

if request("adminname")="" then
response.write"<div align=center>帐号不能为空!<a href=javascript:history.back()>返回</a></div>"
response.End()
elseif request("adminpwd")="" then
response.write"<div align=center>密码不能为空!<a href=javascript:history.back()>返回</a></div>"
response.End()
else
adminname=request("adminname")
adminpwd=request("adminpwd")
rs.open"select * from admin where adminname='"&adminname&"' and adminpwd='"&md5(adminpwd)&"'",conn,1,1
if rs.eof then
rs.close
response.write"<div align=center>帐号或密码错误!<a href=javascript:history.back()>返回</a></div>"
response.End()
else
adminl=rs("adminl")
rs.close
session("admin")=adminname
session("adminl")=adminl
response.write"<div align=center>管理员登录成功!<meta http-equiv=refresh content='1;url=adminmain.asp'></div>"
response.End()
end if
end if
end if
%>

<html>
<head>
<title><%=webname%>_后台登录</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../iknow.css" rel="stylesheet" type="text/css">
</head>
<body class="bgbdy" topmargin="0">
<center>
<script>
function check_loginform(f){
if(f.name.value==""||f.name.value.length<=0){f.name.focus();alert("请输入用户名");return false;}
if(f.pwd.value==""||f.pwd.value.length<=0){f.pwd.focus();alert("请输入密码");return false;}
}
</script>
<table width="770" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td height="25"><a href="<%=weburl%>"><%=webname%></a> &gt; <span id="n1">后台登录</span></td>         
  </tr>
</table>
<table width="770" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td class="bgtle"><span id="n2">登录</span></td>
  </tr>
  <tr> 
    <td class="bgcntLn" align="center">
<table width=60% border=0 align=center cellpadding=0 cellspacing=0><form action='adminlogin.asp' method='post'><tr> <td height=70></td></tr><tr> <td class=bgcnt><span class=f14> </span> <table width=200 border=0 align=center cellpadding=0 cellspacing=0><tr> <td width=31% height=25 nowrap>用户名:</td><td width=69% nowrap><input class=input2 type=text size=15 name=adminname id=adminname></td></tr><tr> <td height=17 nowrap>密　码:</td><td nowrap><input class=input2 type=password size=15 name=adminpwd id=adminpwd></td></tr>
        <tr>
 <td height=10 nowrap>验证码:</td><td nowrap><input type="text" size=3 maxlength=4 name=verifycode> <%Call GetSafeCode%><br><FONT color=#666666>(请输入图中数字)</FONT></td>
        </tr>
        <tr><td height=30 nowrap>&nbsp;</td><td nowrap><input type=submit name=submit id=submit value=登录 class=bnsrh></td></tr></form></table></td></tr></table>
<span class="f14" id="n3" style="display:">
      <p align="center"> 
        <br>
        <br>
      </p></span></td>
  </tr>
</table>
<br>
<table width="770" border="0" align="center" cellpadding="0" cellspacing="0" style="clear:both;">  <tr>    <td height="30" align=center><!--#include file=../end.asp--></td>  
  </tr>
</table>
</center>
</body>
</html>