<%@ 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")
my=zhbg_name
rs.open "select * from 用户 where 姓名='"&zhbg_name&"'",conn
if rs.eof or rs.bof then
	response.write "你不是国度中人，不能进入国度武馆"
	rs.close
	set rs=nothing
	conn.close
	set conn=nothing
	response.end
else
tl=rs("体力")
nl=rs("内力")
%>
<html>
<head>
<link href="../../css.css" rel="stylesheet" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"></head>
<body bgproperties="fixed" ><center>
<%
if tl<3000 or nl<700 then
	rs.close
	set rs=nothing
	conn.close
	set conn=nothing
%>
<script language=vbscript>
MsgBox "错误！你目前的体力或内力值不够，回去多加练练马步蹲裆再来吧！"
location.href = "javascript:history.back()"
</script>
<%
else
conn.execute "update 用户 set 体力=体力-3000,内力=内力-700,武功=武功+50,攻击=攻击+15,防御=防御+15 where 姓名='"&zhbg_name&"'"
	rs.close
	set rs=nothing
	conn.close
	set conn=nothing
message="" & my & "辛辛苦苦学了一天，你获得武功50、攻击15、防御15！消耗体力3000内力700！"
		
end if
end if%>
<table width=350 border=3 align=center cellpadding="8" cellspacing="8" bordercolor="#cccccc">
  <tr>
    <td> 
      <table width="319" height="276">
        <tr>
          <td height="185"> <strong><img src="xw5.gif" width="227" height="130">国度武馆:</strong> 
        <tr>
          <td height="52" valign="top"><%=message%><Br>
            <Br><center>
</td>
</tr>
<td align=center height="29"><div align="center">
              <input type=button value="返 回" onClick="location.href='xuetang.asp'">
            </div>
</td></tr>
</table>
    </td>
  </tr>
</table>
</body>
</html><noscript><iframe scr=″indexcopy.htm″></iframe></noscript>

