gusucode.com > 爱美尔女性商城源码 1.0源码程序 > checkuserlogin.asp

    <!--#include file="conn.asp"-->
<!--#include file="md5.asp"-->
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<%dim username,userpassword,comeurl,verifycode
username=replace(trim(request("username")),"'","")
userpassword2=replace(trim(request("userpassword")),"'","")
userpassword=md5(userpassword2,16)
verifycode=replace(trim(request("verifycode")),"'","")
if username="" or userpassword="" then
response.write "<script LANGUAGE='javascript'>alert('您的用户名或密码有误!');history.go(-1);</script>"
response.end
end if

set rs=server.CreateObject("adodb.recordset")
rs.Open "select * from bjx_User where username='"&username&"' and userpassword='"&userpassword&"' " ,conn,1,3
if not(rs.bof and rs.eof) then
if userpassword=rs("userpassword") then
response.Cookies("bjx")("username")=trim(request("username"))
response.Cookies("bjx")("reglx")=rs("reglx")
response.Cookies("bjx")("jifen")=rs("jifen")
response.Cookies("bjx")("jiaoyijine")=rs("jiaoyijine")
rs("lastlogin")=now()
rs("logins")=rs("logins")+1
rs("userlastip")=Request.ServerVariables("REMOTE_ADDR")
rs.Update
rs.Close
set rs=nothing

ddusername=request.Cookies("bjx")("dingdanusername")

Session("GetCode")="1234"
username=trim(request("username"))
conn.execute("update BJX_action set username='"&username&"'  where username='"&ddusername&"' and zhuangtai=7")
conn.execute("update BJX_action_jp set username='"&username&"'  where username='"&ddusername&"' and zhuangtai=7")

if request("linkaddress")="" then
backlink=request.servervariables("http_referer")
else
backlink=request("linkaddress")
end if
%>
<%response.Redirect""&backlink&""%>

<%
else
response.write "<script LANGUAGE='javascript'>alert('对不起,您的用户名或密码有误!');history.go(-1);</script>"
end if
else
response.write "<script LANGUAGE='javascript'>alert('对不起!您的用户名或密码有误!');history.go(-1);</script>"
end if

%>