www.gusucode.com > 凡人网络购物系统 2008源码程序 > Admin/ad_login.asp
<!--#include file="conn.asp"--> <!-- #include file="../IncAsp/venshop_md5.asp" --> <!--#include file="../IncAsp/venshop_sqlcheck.asp"--> <%if Request.Cookies("venshop")("admin_name")<>"" and Request.Cookies("venshop")("admin_pass")<>"" and Request.Cookies("venshop")("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 venshop_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=ad_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=ad_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=ad_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=ad_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 venshop_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=ad_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("venshop")("admin_name")=trim(rs("admin_name")) Response.Cookies("venshop")("admin_pass")=trim(rs("admin_pass")) Response.Cookies("venshop")("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:VenShop.Com</title> <body> <div align="center"> <table border="0" cellpadding="0" cellspacing="0" width="100%" id="table2" height="80%"> <tr> <td align="center"><table border="0" width="615" cellspacing="0" cellpadding="0"><form method="POST" name="form1" action="ad_login.asp?action=login" onsubmit="javascript: return check_null();"> <tr><td align="center" colspan="2"><img border="0" src="img/logina1.gif" width="615" height="29"></td></tr> <tr><td align="right" height="100" colspan="2" bgcolor="#F9F9F9"> <table border="0" cellpadding="0" cellspacing="0" width="100%" id="table1"> <tr><td align="center" rowspan="3"> <img border="0" src="img/logina3.gif" width="143" height="80"></td> <td align="right">管理员:</td> <td> <input type="text" name="admin_name" size="20" class=input tabindex="1"></td> <td rowspan="3"> <input type="image" border="0" src="img/logina4.gif" name="I1" tabindex="4"></td> </tr> <tr><td align="right">密 码:</td> <td> <input type="password" name="admin_pass" size="21" class=input tabindex="2"></td> </tr> <tr><td align="right">验证码:</td> <td> <input type="text" name="admin_yz" size="20" class=input tabindex="3"> <img border="0" src="code.asp" width="40" height="10"></td> </tr> </table> </td> </tr> <tr><td align="right" colspan="2"> <img border="0" src="img/logina2.gif" width="615" height="29"></td> </tr></form></table> <table border="0" cellpadding="0" cellspacing="0" id="table3"> <tr> <td> </td> </tr> <tr> <td height="30"> <img border="0" src="img/ad_help.gif" width="18" height="14" alt="查看后台管理相应的帮助信息">:鼠标移上去可以看到注释; ↑=回到顶部 ↓=回到底部 ←=后退 →=前进</td> </tr> <tr> <td height="30" align="center"> <a target="_blank" href="http://www.venshop.com/">Power by:VenShop 2008</a></td> </tr> </table> </td> </tr> </table> </div> <%end if%>