⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 leitai.asp

📁 BBSXP插件!社区比赛用的
💻 ASP
字号:
<!-- #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
username=Request.Cookies("username")
rs.close


select case Request("menu")
case "bwedit"
succtitle="更改成功"
bwedit
case "bwbaoming"
succtitle="报名成功"
bwbaoming

end select
%>

<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="400" scrollAmount="3"><a href="#" onclick="javascript:open('affiche.asp','','width=400,height=180,resizable,scrollbars')"><%=affichetitle%></a> [<%=affichetime%>]</marquee></td>
      </tr>
</table>
<div align="center">
<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="0" cellpadding="0" width="100%" class="a2">
<tr>
<td>
<table border="0" cellspacing="1" cellpadding="0" width="100%" class="a2">
<tr>
<td width="60%" align="center" height="21" class="a1">● <b>社区擂台比赛说明</b> ●</td>
<td width="40%" align="center" rowspan="3" class="a3"><img src="images/plus/leitai.gif"></td>
</tr>
<tr>
<td width="100%" height="21" align="center" class="a4">嗨!<%=username%> 目前你的状态是 <font color=#FF0000>
<%
rs.Open "select * from [leitai] where bwname='"&username&"'",Conn,1,3
if rs.eof then
Response.Write "没有报名参战"
else

if day(rs("bwnow"))<>day(date) and rs("bwbeizhan")=2 then
rs("bwbeizhan")=1
rs("bwtime")=0
rs.update
end if
bwbeizhan=rs("bwbeizhan")
bwtime=rs("bwtime")
if bwbeizhan=0 or bwbeizhan=empty then
bwbeizhan="没有报名参战"
elseif bwbeizhan=1 then
bwbeizhan="备战状态"
elseif bwbeizhan=2 then
bwbeizhan="战斗完毕"
end if
Response.Write ""&bwbeizhan&""
end if
rs.close
%></font>&nbsp&nbsp你今天战斗了<font color=#FF0000><%=bwtime%></font>次.
<tr>
<td width="100%" class="a3"><br>  1.一次只能挑战一人,即一对一。<br>
  2.加入备战即代表同意接受别人挑战,否则不可参与擂台赛。<br>
  3.货币1000以上;魅力值20以上,方可参加。<br>
  4.每天只能参加 10 次擂台赛。<br>
  5.战斗能力依照武器种类评定,可至社区商店购买。<br>
  6.战胜者可得到战败者的货币500、魅力值10。<br>
  7.战败者会失去自己的货币500、魅力值10。<br>
  8.请量力而为切勿白白送了银两。<br><br></td></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="100%" colspan="2" align="center">
<table border="0" width="100%" class="a4">
<tr><td width="3%" align="center"></td>
<td width="15%" align="center" valign="top">
<a href=# onclick=javascript:open('leitainame.asp','','width=550,height=450')><input type="submit" value="备战名单列表"></a></td>
<td width="13%" align="center">
<form method="post" action="leitai.asp?menu=bwedit">
<input type="submit" name="bwbeizhan" value="退出备战"></form></td>
<td width="13%" align="center">
<form method="post" action="leitai.asp?menu=bwbaoming">
<input type="submit" name="bwbaoming" value="报名参战"></form></td>
<td width="13%" align="center">
<form method="post" action="MYTOOLS.ASP?menu=bwbaoming">
<input type="submit" name="bwbaoming" value="我的装备"></form></td>
<td width="56%" align="center">
<form method="post" action="leitaibw.asp">
我要挑战 <input type="text" name="bwname" size="10">
<input type="submit" name="bwbeizhan" value=" 确 定 "></form></tr></td>
</table>
</td>
</tr></td>
</tr>

<table border="0" cellspacing="1" cellpadding="0" width="100%" class="a2">
<tr class="a1"><td colspan="2" width="100%" height="23"> ■<b>  社区擂台战报</b></td></tr>
<tr><td width="5%" align="center" class="a3"><img src="images/shareforum.gif"></td>
<td width="95%" height="80" class="a3">
<%
dim page_count,totalrec,currentPage
rs.Open "select * from [leitai] where bwnow<=now()",Conn,1,3
if rs.eof then
%>
            当前没有比武结果
            <%else%>
             <marquee scrollamount=1 direction=up height=80 onmouseover=this.stop(); onmouseout=this.start();>
            <%currentPage=1
if currentpage=""  then
currentpage=1
else
currentpage=clng(currentpage)
if err then
currentpage=1
err.clear
end if
end if

rs.PageSize = 10
rs.AbsolutePage=currentpage
page_count=0
      totalrec=rs.recordcount
while (not rs.eof) and (not page_count = rs.PageSize)

%><%=rs("bwjieguo")%>    <%=rs("bwnow")%><br><%
page_count = page_count + 1
rs.movenext
wend
%>
</marquee><%
end if
rs.close
%></td>
</tr>
</table>
</table></td></tr></table></td></tr></table>
<SCRIPT>valignbottom()</SCRIPT>

<%
sub bwedit
rs.Open "select * from [leitai] where bwname='"&username&"' and bwbeizhan>0",Conn,1,3
if not rs.eof then
rs("bwbeizhan")=0
rs.update
end if
rs.close
end sub

sub bwbaoming
rs.Open "select * from [user] where username='"&username&"'",Conn,1,3
if rs("magicpower")<19 or rs("money")<999 then 
error2("你的金币或是魅力值不够,不能打擂!")
end if
rs.close
rs.Open "select * from [leitai] where bwname='"&username&"'",Conn,1,3
if rs.eof then
rs.addnew
rs("bwname")=username
if rs("bwbeizhan")=1 then error2("你已经报名!")
else
if rs("bwbeizhan")=1 then error2("你已经报名!")
rs("bwbeizhan")=1
end if
rs.update
rs.close
end sub

%><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>
社区经验:<%=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
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -