<!--#include file="conn.asp"-->
<!--#include file="webconfig.asp"-->
<!--#include file="fuction.asp"-->
<%
if session("username")="" then
response.write "<SCRIPT LANGUAGE=""javascript"">alert(""You are signed out."");parent.location.href="""& weburl &"index.asp"";</SCRIPT>"
Response.End 
else
username=nosql(session("username"))
end if
Set rs= Server.CreateObject("ADODB.Recordset") 
sql="select * from [shop_user] where [Username]='"&username&"'"
rs.open sql,conn,1,3
if rs.eof then
response.write "<SCRIPT LANGUAGE=""javascript"">alert(""You are signed out."");parent.location.href="""& weburl &"index.asp"";</SCRIPT>"
Response.End 
else
if userjf=1 then
stay_min=datediff("n",rs("lastlogin"),now())
newtime=stay_min*jfbl

rs("jifen")=rs("jifen")+newtime
rs.Update
rs.Close
end if
end if
session.abandon
conn.execute("delete from [online] where name='"&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")

response.Cookies("shangcheng").Expires =  NOW() -1
'session("username")=""
'session("shjianame")=""
'session("jifen")=0
'session("yucun")=0
'session("reglx")=0
'session("jiaoyijine")=0
'session("username")=""
'session("userpassword")=""
'session("pic")=""
'session("Cookies")=""
session.Abandon()

if userjf=0 then
response.Write "<script language=javascript>alert('You are signed out. ');window.location.href='index.asp';</script>"
else
	response.write "<SCRIPT LANGUAGE=""javascript"">alert(""Your stay"&stay_min&"minutes，you can receive"&newtime&"scores！"");parent.location.href="""& weburl &"index.asp"";</SCRIPT>"
end if
%>