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

📄 userscorelist.asp

📁 网络棋牌服务端简单的聊天程序界面
💻 ASP
字号:
<!--#include file="../inc/conn.asp"-->
<%
 if session("chat_admin")<>"yes" then
  response.redirect "login.asp"
  response.end
 end if
 allgamename=Array("围棋","象棋","五子棋","国际象棋","军棋","四国军旗","拖拉机","麻将","锄大D","跑得快","拱猪","斗地主","梭哈","暗棋","21点","俄罗斯方块")
 allgameid=Array("wq","xq","wzq","chess","jq","sgjq","tlj","mj","cdd","pdk","gz","ddz","sh","aq","21d","fk")
 wherestr=""
 ssel=""
 gameid=request("gameid")
 quname=request("uname")
 startnum=request("startnum")
 if isnull(gameid) or gameid="" then
   gameid="wq"
 end if
 wherestr=" where "&gameid&"_score.userid=[user].userid"
 gameindex=0
 m=0
 do while m< UBound(allgameid)
  if allgameid(m)=gameid then gameindex=m
  m=m+1
 loop
 if isnull(quname) or quname="" then
   quname=""
 else
   quname=trim(quname)
   wherestr=wherestr &" and username='" & quname & "'"
 end if
    
 if isnull(startnum) or startnum="" then startnum=0
 dispnum=startnum+30
 usernum=0
 Conn = DBCN()
 set rs = Server.CreateObject("ADODB.Recordset")
 sql="select count(*) from [user],"&gameid&"_score" & wherestr
 'response.write sql
 'response.end
 rs.open sql,conn,3
 usernum=rs(0)
 rs.close
 
 wherestr=wherestr & " order by "&gameid&"_score.score desc"
 prepag="#"
 nextpag="#"
 myurl="userscorelist.asp?startnum=" & startnum & "&gameid=" & gameid & "&uname=" & quname
 if startnum>=30 then
   tosnum=startnum-30
   prepag="userscorelist.asp?startnum=" & tosnum & "&gameid=" & gameid & "&uname=" & quname 
 end if
 if startnum+30<usernum then
   tosnum=startnum+30
   nextpag="userscorelist.asp?startnum=" & tosnum & "&gameid=" & gameid & "&uname=" & quname 
 end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>用户管理(用户游戏积分列表)</title>
<style type="text/css">
<!--
.p9 {font-size: 9pt; line-height: 14pt }
A:link {COLOR: #0000ff; TEXT-DECORATION: underline }
A:hover{COLOR: #EB551D; TEXT-DECORATION: none }
A:active{COLOR: #EB551D }
-->
</style>
</head>
<script language="javascript">
var curgamename="<%=allgamename(gameindex)%>";
  function click_del()
  {
    var selrow="";
    for(i=0; i<document.myform.elements.length; i++) 
   {
     if(document.myform.elements[i].type=="checkbox")
     {
       if(document.myform.elements[i].checked)
        selrow=selrow+"userid="+document.myform.elements[i].value+" or ";
     }
   }
   if(selrow=="")
    alert("请选择要删除的用户游戏积分!");
   else
   {
    if(confirm("你确定要删除所选的用户的["+curgamename+"]游戏积分吗?"))
    {
      selrow=selrow.substring(0,selrow.length-4);
      document.myform.action="userscore_del.asp";
      document.myform.userid.value=selrow;
      document.myform.submit();
    }
   }
  }
  function click_edit(uid,uname)
  {
      document.myform.action="userscore_edit.asp";
      document.myform.userid.value=uid;
      document.myform.username.value=uname;
      document.myform.submit();
  }
</script>
<body topmargin="3" leftmargin="3">
<table border="0" width="100%" bgcolor="#C8C9D2">
  <tr>
    <td width="52%"><strong>JChat注册用户管理面板</strong></td>
    <td width="48%">
      <p align="right" class="p9"><a href="index.asp">管理界面首页</a>&nbsp;&nbsp; <a href="logout.asp"><font color=red>退出系统</font></a>&nbsp;&nbsp; <a href="http://www.easyfad.com">技术支持</a>&nbsp;&nbsp; <a href="http://www.jchat.com.cn">关于JChat</a></td>
  </tr>
</table>
<table border="0" width="100%" height="90%" bgcolor="#E7E7EB">
  <tr>
    <td width="100%" class="p9" valign="top"><br>
<form method="POST" action="userscorelist.asp">
  <table border="0" width="100%" cellspacing="0" cellpadding="0">
    <tr>
      <td width="7%" bgcolor="#6397B6" class="p9">查询:</td>
      <td width="93%" bgcolor="#D6EBEB" class="p9">当前选择的游戏:<select name="gameid">
<%
 m=0
 do while m< UBound(allgameid)
  if allgameid(m)=gameid then
   response.write "<option value="""&allgameid(m)&""" selected>"&allgamename(m)&"</option>"
  else
   response.write "<option value="""&allgameid(m)&""">"&allgamename(m)&"</option>"
  end if
  m=m+1
 loop
%>      
  </select>&nbsp;&nbsp;用户名字等于<input type="text" name="uname" size="20" value="<%=quname%>"> <input
      type="submit" value=" GO "> </td>
    </tr>
  </table>
</form>

<form method="POST" name="myform" action="userscore_del.asp">
  <input name="userid" type="hidden" value="">
  <input name="username" type="hidden" value="">
  <input name="gameid" type="hidden" value="<%=gameid%>">
  <input name="myurl" type="hidden" value="<%=myurl%>">
  <table border="1" width="100%" bordercolor="#6584A7" cellspacing="0" cellpadding="0"
  height="77">
    <tr>
      <td width="100%" colspan="9" height="36" class="p9"><div align="center"><center><p>当前游戏:<font color=red><%=allgamename(gameindex)%></font>&nbsp; &nbsp; 共找到<font
      color="#FF0080"><%=usernum%></font>条记录(本页显示:<% response.write startnum & "--" & dispnum %>)&nbsp&nbsp; <a href="<%=nextpag%>">下一页</a>&nbsp; <a
      href="<%=prepag%>">上一页</a>&nbsp;&nbsp;&nbsp; <input type="button" value="删除用户游戏积分"
      onclick="click_del();"></td>
    </tr>
    <tr align="center" class="p9">
      <td width="3%" height="16"></td>
      <td width="27%" bgcolor="#B8C9DA" height="16">用户名</td>
      <td width="10%" bgcolor="#B8C9DA" height="16">等级分</td>
      <td width="10%" bgcolor="#B8C9DA" height="16">总局数</td>
      <td width="10%" bgcolor="#B8C9DA" height="16">赢</td>
      <td width="10%" bgcolor="#B8C9DA" height="16">输</td>
      <td width="10%" bgcolor="#B8C9DA" height="16">和</td>
      <td width="10%" bgcolor="#B8C9DA" height="16">掉线</td>
      <td width="10%" bgcolor="#B8C9DA" height="16">逃跑</td>
    </tr>
<%
 sql="select "&gameid & "_score.*,[user].username from [user],"&gameid&"_score " & wherestr 
 icount=0
 rs.open sql,conn,3
 do while (Not rs.eof)
   icount=icount+1
    if icount>startnum and icount<=startnum+30 then
      gamecount=cint(rs("ying"))+cint(rs("shu"))+cint(rs("he"))
      response.write "<tr align=center class=p9>"
      response.write "<td height=19><input type=checkbox name=""uid"" value="""& rs("userid") & """></td>"
      response.write "<td ><a href=""#"" onclick=""click_edit('"&rs("userid") & "','"&rs("username")&"');return false;"">"&rs("username") & "</a></td>"
      response.write "<td >"& rs("score") & "</td>"
      response.write "<td >"& gamecount & "</td>"
      response.write "<td>"&rs("ying")&"</td>"
      response.write "<td>"&rs("shu")&"</td>"
      response.write "<td>"&rs("he")&"</td>"
      response.write "<td>"&rs("diaoxian")&"</td>"
      response.write "<td>"&rs("taopao")&"</td>"    
      response.write "</tr>"
    end if
  rs.movenext
 loop
 rs.close
 set rs=nothing
%>
  </table>
 </td>
  </tr>
</table>
<table border="0" width="100%" bgcolor="#C8C9D2">
  <tr>
    <td width="100%" class="p9">
      <p align="right">版本:<font color="#FF0000">JGame V2.0.2</font>&nbsp;&nbsp;</p> 
    </td> 
  </tr> 
</table> 
</form>
</body>
</html>

⌨️ 快捷键说明

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