<!--#include file="conn/conn.asp"-->
<!--#include file="conn/nosql.asp"-->
<!--#include file="conn/config.asp"-->
<!--#include file="conn/md5.asp"-->
<%
if Not ChkPosturl then response.redirect ("login.asp")
if session("id")="" then
response.write "<script language='javascript'>"
response.write "alert('错误:您尚未登录或连接超时,请重新登录！');"
response.write"javascript:history.go(-1)</SCRIPT>"
response.end
else
sql="select * from snsn_user where id= "&session("id")
Set rs= Server.CreateObject("ADODB.Recordset") 
rs.open sql,conn,1,3
if rs.eof then
response.write "<script language='javascript'>"
response.write "alert('错误:没找到该用户,请核对！');"
response.write"javascript:history.go(-1)</SCRIPT>"
response.end
else 
if rs("cz")="1" then
if rs("jifen")<10 then
response.write "<script language='javascript'>"
response.write "alert('错误:对不起,你的银两不够支付！');"
response.write"javascript:history.go(-1)</SCRIPT>"
response.end
else
rs("jifen")=rs("jifen")-10
end if
rs("cz")=0
session("ys")=0
else
rs("cz")=1
session("ys")=1
end if
rs.update
end if
rs.close
set rs=nothing
url=Request.ServerVariables("HTTP_REFERER")
response.write "<script language='javascript'>"
if session("ys")=0 then
response.write "alert('您已经转入稳身状态,使用隐身将消耗十点银两！');"
else
response.write "alert('您已经转入上线状态！');"
end if
response.write"this.location.href='"&url&"';</SCRIPT>"
response.end
end if
%>                 