<% @LANGUAGE="VBSCRIPT" CODEPAGE="65001" %>
<!--#include file="../inc.asp"-->
<!--#include file="../ydzq.asp"-->
<!--#INCLUDE file="conn1.asp"-->
<%call head()
call cardz10("使用宝石","index.asp?sid="&request("sid")&"&amp;saytk="&request("saytk")&"")
wpid=request("wpid")
ids=session("id")

%>
<%
if wpid="bs" then
tstl="2"
yname="宝石"
end if

Server.ScriptTimeout=999
set rs=Server.CreateObject("ADODB.Recordset")
strsQL="select "&wpid&" from wupin where cstr(ids)='"&myid& "'"
rs.open strsQL,liao,1,1
if rs(""&wpid&"")<1 then
msg="您没有宝石！是不是忘记带眼镜啦~~"
else
set rs8=Server.CreateObject("ADODB.Recordset")
strsQL="select fs from sx where cstr(ids)='"&myid& "'"
rs8.open strsQL,liao,1,1
 rs8.Close
	Set rs8=Nothing
if fs=100000 then
msg="您的身体已经够棒了，不能再用任何药品！"
else
sql="update sx set fs=fs+"&tstl&" where cstr(ids)="&myid
  liao.Execute(sql)
sql="update wupin set "&wpid&"="&wpid&"-1 where cstr(ids)="&myid
  liao.Execute(sql)
msg="您使用了"&yname&"后,防御力提升"&tstl&""
END IF
end if
Response.Write ""&msg&"正在返回......<br/>=========<br/>"
 rs.Close
	Set rs=Nothing
     liao.Close
      Set liao=Nothing
%>
<a href="index.asp?sid=<%=sid%>&amp;saytk=<%=saytk%>">[江湖首页]</a><br/>
<a href="/bbs/index.asp?sid=<%=sid%>&amp;saytk=<%=saytk%>">[社区首页]</a><br/>
<%call head1()%>