www.gusucode.com > 艺帆全站DIV+CSS体育用品公司网站源码 1.7.5源码程序 > i5808/adminloginpass.asp

    <!--#include file="../conn.asp"-->
<!--#include file="../td_sql.asp"--> 
<!--#include file="md5.Asp"-->
<% 
admin=Replace(request.Form("admin"), "'", "''") 
password=md5(Request("password"))
VerifyCode=request.form("VerifyCode") 
if admin=""  then 
response.Write("<script language=javascript>alert('用户名不能为空!');history.go(-1)</script>") 
response.end
end if 
if  password="" then 
response.Write("<script language=javascript>alert('密码不能为空!');history.go(-1)</script>") 
response.end
end if 
if  VerifyCode="" then 
response.Write("<script language=javascript>alert('验证码不能为空!');history.go(-1)</script>") 
response.end
end if 
if cstr(Session("firstecode"))<>cstr(Request.Form("VerifyCode")) then
response.Write("<script language=javascript>alert('验证码错误!');history.go(-1)</script>")
response.End
end if
sql="select * from i5808 where admin='"&admin&"' and password='"&password&"'" 
set rs=conn.execute(sql) 
if rs.eof or rs.bof then 
response.Write("<script language=javascript>alert('帐号密码错误!');history.go(-1)</script>")
else 
session("admin")=rs("id") 
session("qx")=int(rs("qx"))
sql="update i5808 set dlcs=dlcs+1 where id=" & session("admin") '登陆次数
conn.execute(sql) 
%>
<%
dim ip
ip=request.servervariables("remote_addr")
set rr=server.createobject("adodb.recordset") 
rr.open "select * from admincount",conn,1,3 
rr.addnew 
rr("ip")=ip
rr("name")=rs("admin")
rr.update 
rr.close 
set rr=nothing 
%>
<%response.redirect "index.asp" 
end if 
%>