<!-- #include file="setup.asp" -->
<%
top
if Request.Cookies("username")=empty then
response.redirect "login.asp"
end if

if instr(Request.Cookies("username")," ")>0 then:error("<li>非法操作"):end if

sql="select * from [user] where username='"&Request.Cookies("username")&"'"
rs.Open sql,Conn,1,3

if Request.Cookies("userpass")<>rs("userpass") then
error2("密码错误！")
end if
rs.close
username=Request.Cookies("username")
bwname=Request("bwname")

%>


<head>
<title>社区擂台</title>


</head>

<table border=0 width=97% align=center cellspacing=1 cellpadding=4 class=a2>
<tr class=a3>
<td height=25>&nbsp;<img src=images/Forum_nav.gif>&nbsp; <%ClubTree%> → 
<a href="leitai.asp">社区擂台</a></td>
</tr>
</table><br>

<table border="0" cellpadding="0" align="center" cellspacing="0" style="border-collapse: collapse; border-width: 0" width="97%" id="AutoNumber1">
  <tr>
    <td width="3%"><img src="images/announce.gif" align="middle"></td>
    <td width="67%">社区公告：<marquee onmouseover="this.stop()" onmouseout="this.start()" width="90%" scrollamount="3"><a target=_blank href="affiche.asp"><%=affichetitle%></a></marquee></td>
      </tr>
</table>
<%
if bwname=empty then:error("<li>请选择对手"):end if
if username=bwname then:error("<li>不能挑战自己"):end if
If conn.Execute("Select id From [leitai] where bwname='"&username&"'" ).eof Then
error("<li><font color=#00FF00>"&username&"</font>并没有报名参赛！")
end if
If conn.Execute("Select id From [leitai] where bwname='"&bwname&"'" ).eof Then
error("<li><font color=#00FF00>"&bwname&"</font>并没有报名参赛！")
end if
rs.Open "select * from [user] where username='"&username&"'",Conn,1,3
userface=rs("userface")
money=rs("money")
magicpower=rs("magicpower")
rs.close

rs.Open "select * from [user] where username='"&bwname&"'",Conn,1,3
bwface=rs("userface")
bwmoney=rs("money")
bwmeili=rs("magicpower")
rs.close

Set rs1 = Server.CreateObject("ADODB.Recordset")
rs.Open "select * from [mytools] where username='"&username&"' and use = 2",Conn,1,3
     if rs.eof then
     mywuqi="赤手空拳"
     else
     mywuqi=rs("toolname")
     end if
rs1.Open "select * from [tools] where toolname='"&mywuqi&"' and exp <> 0",Conn,1,3
     if rs.eof then
     wqimage="images/plus/arms.gif"
     gongji=0
     else
     mywuqi=rs("toolname")
     gongji=rs1("exp")
     wqimage=rs1("toolimg")
     end if
rs1.close
rs.close

rs.Open "select * from [mytools] where username='"&username&"' and use = 3",Conn,1,3
     if rs.eof then
     myanqi="赤手空拳"
     else
     myanqi=rs("toolname")
     end if
rs1.Open "select * from [tools] where toolname='"&myanqi&"' and exp <> 0",Conn,1,3
     if rs.eof then
     aqimage="images/plus/arms.gif"
     gongjis=0
     else
     gongjis=rs1("exp")
     myaqqi=rs("toolname")
     aqimage=rs1("toolimg")
     end if
rs1.close
rs.close

rs.Open "select * from [mytools] where username='"&username&"' and use = 4",Conn,1,3
     if rs.eof then
     myfangju="赤手空拳"
     else
     myfangju=rs("toolname")
     end if
rs1.Open "select * from [tools] where toolname='"&myfangju&"' and magicpower <> 0",Conn,1,3
     if rs.eof then
     fjimage="images/plus/arms.gif"
     myfangyu=0
     else
     myfangju=rs("toolname")
     myfangyu=rs1("magicpower")
     fjimage=rs1("toolimg")
     end if
rs1.close
rs.close


rs.Open "select * from [mytools] where username='"&bwname&"' and use = 2",Conn,1,3
     if rs.eof then
     bwwuqi="赤手空拳"
     else
     bwwuqi=rs("toolname")
     end if
rs1.Open "select * from [tools] where toolname='"&bwwuqi&"' and exp <> 0",Conn,1,3
     if rs.eof then
     bwwqimage="images/plus/arms.gif"
     bwgongji=0
     else
     bwwuqi=rs("toolname")
     bwgongji=rs1("exp")
     bwwqimage=rs1("toolimg")
     end if
rs1.close
rs.close

rs.Open "select * from [mytools] where username='"&bwname&"' and use = 3",Conn,1,3
     if rs.eof then
     bwanqi="赤手空拳"
     else
     bwanqi=rs("toolname")
     end if
rs1.Open "select * from [tools] where toolname='"&bwanqi&"' and exp <> 0",Conn,1,3
     if rs.eof then
     bwaqimage="images/plus/arms.gif"
     bwgongjis=0
     else
     bwgongjis=rs1("exp")
     bwanqi=rs("toolname")
     bwaqimage=rs1("toolimg")
     end if
rs1.close
rs.close

rs.Open "select * from [mytools] where username='"&bwname&"' and use = 4",Conn,1,3
     if rs.eof then
     bwfangju="赤手空拳"
     else
     bwfangju=rs("toolname")
     end if
rs1.Open "select * from [tools] where toolname='"&bwfangju&"' and magicpower <> 0",Conn,1,3
     if rs.eof then
     bwfjimage="images/plus/arms.gif"
     bwfangyu=0
     else
     bwfangju=rs("toolname")
     bwfangyu=rs1("magicpower")
     bwfjimage=rs1("toolimg")
     end if
rs1.close
rs.close


%>

<SCRIPT>valigntop()</SCRIPT>
<table cellspacing="1" cellpadding="1" width="97%" align="center" border="0" class="a2"><tr><td height="25" class="a1" colspan="2">　■<b>  社区擂台</b></td></tr><tr>
		<td class="a3"><table cellspacing="0" cellpadding="3" width="100%" border="0" style="border-left: 0px none; border-top: 0px none; border-bottom: 1px none"><tr><td><table border="0" cellpadding="0" cellspacing="0" width="100%"> 
 
   <tr valign="top" align="center"> 
    <td colspan="2">
    <table border="0" cellspacing="1" cellpadding="0" width="80%" align="center" class="a2">
	<tr align="center" class="a3">
		<td width="46%">挑战者姓名：<%=username%><br><img src="<%=userface%>"></td>
		<td width="8%"><font color=#FF0000><b>VS</b></font></td>
		<td width="46%">应战者姓名：<%=bwname%><br><img src="<%=bwface%>"></td>
	</tr>
	<tr class="a4">
		<td height="20">社区金币：<%=money%></td>
		<td rowspan="6">　</td>
		<td height="20">社区金币：<%=bwmoney%></td>
	</tr>
	<tr class="a3">
		<td height="20">魅 力 值：<%=magicpower%></td>
		<td height="20">魅 力 值：<%=bwmeili%></td>
	</tr>
	<tr class="a4">
		<td height="20">使用武器：<%=mywuqi%>　使用暗器：<%=myanqi%>　攻击：<font color=#FF0000><%=gongji+gongjis%></font></td>
		<td height="20">使用武器：<%=bwwuqi%>　使用暗器：<%=bwanqi%>　攻击：<font color=#FF0000><%=bwgongji+bwgongjis%></font></td>
	</tr>
	<tr align="center" class="a3">
		<td><img src="<%=wqimage%>">　　<img src="<%=aqimage%>"></td>
		<td><img src="<%=bwwqimage%>">　　<img src="<%=bwaqimage%>"></td>
	</tr>
	<tr class="a4">
		<td height="20">使用防具：<%=myfangju%>　防御：<font color=#FF0000><%=myfangyu%></font></td>
		<td height="20">使用防具：<%=bwfangju%>　防御：<font color=#FF0000><%=bwfangyu%></font></td>
	</tr>
	<tr align="center" class="a3">
		<td><img src="<%=fjimage%>"></td>
		<td><img src="<%=bwfjimage%>"></td>
	</tr>
	<tr align="center" class="a4"><form method="post" action="bwing.asp?bwname=<%=bwname%>">
		<td align="right"><input type="submit" name="jieguo" value=" 确 定 "></td></form>
		<td>　</td>
		<td align="left"><input onclick="history.back(-1)" type="submit" value=" 取 消 " name="Submit"></a></td>
	</tr>
</table>
 </table></td></tr></table></td></tr></table>
<SCRIPT>valignbottom()</SCRIPT>
<br>
<SCRIPT>valigntop()</SCRIPT>
<table cellspacing="1" cellpadding="1" width="97%" align="center" border="0" class="a2"><tr><td height="25" class="a1" colspan="2">　■<b> 您的个人状态</b></td></tr><tr>
		<td align="middle" width="5%" bgcolor=FFFFFF><img src="images/mystate.gif"></td><td class="a4"><table cellspacing="0" cellpadding="3" width="100%" border="0" style="border-left: 0px none; border-top: 0px none; border-bottom: 1px none"><tr><td><table border="0" cellpadding="0" cellspacing="0" width="100%"> 
<%sql="select * from [user] where username='"&Request.Cookies("username")&"'"
rs.Open sql,Conn,1,3
%>  <tr><td width="25%">        社区昵称：<%=rs("username")%></td><td width="20%">
				社区等级：<Script>document.write(level(<%=rs("experience")%>,<%=rs("membercode")%>,'','')+levelname);</Script>  </td><td width="20%">
				社区金币：<%=rs("money")%>  </td><td width="17%">
				发表文章：<%=rs("posttopic")+rs("postrevert")%>  </td><td width="18%">
				精华文章：<%=rs("goodtopic")%>   </td></tr><tr><td>
				社区住宅：<%if ""&rs("building")&""="" then
					response.write "无"
					else
					response.write rs("building")
					end if%> </td><td>
				社区经验：<%=rs("experience")%>  </td><td>
				社区存款：<%=rs("savemoney")%>  </td><td>
                                魅 力 值：<%=rs("magicpower")%> </td><td>
				体 力 值：<%=rs("userlife")%> </td></tr> <tr><td>
				社区伴侣：<%if ""&rs("consort")&""=empty then
					response.write "无"
					else
					response.write "<a href=Profile.asp?username="&rs("consort")&">"&rs("consort")&"</a>"
					end if%> </td><td>
				社区门派：<%if ""&rs("faction")&""="" then
					response.write "无"
					else
					response.write rs("faction")
					end if%></td><td colspan="2">
				注册日期： <%=rs("regtime")%> </td></tr>
		</table></td></tr>
	</table></td></tr>
  </table>
  <SCRIPT>valignbottom()</SCRIPT><br><%
rs.close

htmlend

%>
