<!--#include file="conn.asp"-->
<!--#include file="md5.asp"-->
<!--#include file="fuction.asp"-->
<%dim username,userpassword,comeurl
username=checkFFSQLStr(trim(request("username")))
userpassword=md5(trim(request("userpassword")))
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 [shop_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("snsn")("username")=trim(request("username"))
response.Cookies("snsn")("reglx")=rs("reglx")
response.Cookies("snsn")("jifen")=rs("jifen")
response.Cookies("snsn")("jiaoyijine")=rs("jiaoyijine")
rs("lastlogin")=now()
rs("logins")=rs("logins")+1
rs("userlastip")=Request.ServerVariables("REMOTE_ADDR")
rs.Update
rs.Close
set rs=nothing
username=trim(request("username"))
conn.execute("delete from shop_action where username='"&username&"' and zhuangtai=7")
conn.execute("delete from shop_action_jp where username='"&username&"' and zhuangtai=7")
if request("linkaddress")="" then
response.redirect request.servervariables("http_referer")
else
response.redirect request("linkaddress")
'response.redirect "index.asp"
end if
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
%>
