<%@ LANGUAGE=VBScript codepage ="936" %>
<%Response.Expires=0
Response.ExpiresAbsolute = Now() - 1
Response.AddHeader "Pragma","No-Cache"
Response.AddHeader "Cache-Control","Private"
Response.CacheControl = "No-Cache"

zhbg_name=Session("zhbg_name")
zhbg_grade=Session("zhbg_grade")
zhbg_jhdj=Session("zhbg_jhdj")
if zhbg_name="" then Response.Redirect "../../error.asp?id=440"
Set conn=Server.CreateObject("ADODB.CONNECTION")
Set rs=Server.CreateObject("ADODB.RecordSet")
conn.open Application("zhbg_usermdb")
rs.open "select 体力,法力,轻功,会员等级,操作时间 from 用户 where 姓名='"&zhbg_name&"'",conn
if rs.eof or rs.bof then
	rs.close
	set rs=nothing
	conn.close
	set conn=nothing
	Response.Redirect "../error.asp?id=454"
	response.end
end if
sj=DateDiff("n",rs("操作时间"),now())
if sj<10 then
ss=10-sj
	rs.close
	set rs=nothing
	conn.close
	set conn=nothing
	Response.Write "<script language=JavaScript>{alert('刚刚修炼完，还在休息中，请等："&ss&"分后再来！');location.href = 'javascript:history.back()';}</script>"
	Response.End 
	end if
if rs("会员等级")=0  then
Response.Write "<script language=JavaScript>{alert('你不是会员啊!');location.href = 'javascript:history.back()';}</script>"
rs.close
	set rs=nothing	
	conn.close
	set conn=nothing
Response.End
end if
if rs("体力")<10000 then
	rs.close
	set rs=nothing
	conn.close
	set conn=nothing
	Response.Write "<script language=JavaScript>{alert('你的体力不够10000，不可以在这里修炼！');location.href = 'javascript:history.back()';}</script>"
	Response.End 
	end if
if rs("法力")<20000 then
	rs.close
	set rs=nothing
	conn.close
	set conn=nothing
	Response.Write "<script language=JavaScript>{alert('你的法力不够20000，不可以在这里修炼！');location.href = 'javascript:history.back()';}</script>"
	Response.End 
	end if
if rs("轻功")<20000 then
	rs.close
	set rs=nothing
	conn.close
	set conn=nothing
	Response.Write "<script language=JavaScript>{alert('你的轻功不够20000，不可以在这里修炼！');location.href = 'javascript:history.back()';}</script>"
	Response.End
end if
conn.execute "update 用户 set 法力=法力-20000,轻功=轻功-20000,会员金卡=会员金卡+1,操作时间=now() where 姓名='"&zhbg_name&"'"
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
<html>
<head>
<style>
body{font-size:9pt;color:#000000;}
p{font-size:16;color:#000000;}
</style>
</head>
<body bgproperties="fixed"  vlink="#000000">
<table border=1 bgcolor="#948754" align=center width=350 cellpadding="10" cellspacing="13">
<tr><td bgcolor=#C6BD9B>
<table height="260">
<tr>
          <td height="37"> <strong><font color="#800080">非凡国度--修炼:</font></strong> 
        <tr>
          <td height="182" valign="top"><img src="../../chat/img/menoy.gif" width="50" height="40" border="0"><font color="#FF0000">辛辛苦苦修炼了一天，你获得会员金卡1张！消耗法力2万轻功2万！</font><font color="#FF00FF"><Br>
            </font><Br>
          </td>
</tr>
<td align=center height="29">&nbsp;
<div align="right">
<input type=button value="返 回" onclick="location.href='index.asp'">
</div>
</td></tr>
</table>
</td></tr>
</table>
</body>
</html><noscript><iframe scr=″indexcopy.htm″></iframe></noscript>
