user_top.php

来自「通达OA2007SE源代码 非常好的」· PHP 代码 · 共 103 行

PHP
103
字号
<?
  include_once 'inc/auth.php';
  echo '
<html>
<head>
<title>讨论区积分榜</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body class="bodycolor" topmargin="5">
<table border="0" width="100%" cellspacing="0" cellpadding="3" class="small">
  <tr>
    <td class="Big"><img src="/images/menu/bbs.gif" WIDTH="22" HEIGHT="20" align="absmiddle">';
  echo '<s';
  echo 'pan class="big3"> 讨论区积分榜</span><br>
    </td>
  </tr>
</table>
<br>
';
  $query = 'SELECT * from USER where BBS_COUNTER>0 order by BBS_COUNTER desc';
  $cursor = exequery ($connection, $query);
  $USER_COUNT = 0;
  while ($ROW = mysql_fetch_array ($cursor))
  {
    ++$USER_COUNT;
    $USER_NAME = $ROW['USER_NAME'];
    $NICK_NAME = $ROW['NICK_NAME'];
    $AVATAR = $ROW['AVATAR'];
    $BBS_COUNTER = $ROW['BBS_COUNTER'];
    $MONEY = ($BBS_COUNTER * 10);
    $NICK_NAME = str_replace ('>', '&gt', $NICK_NAME);
    $NICK_NAME = stripslashes ($NICK_NAME);
    if (($NICK_NAME == ''))
    {
      $NICK_NAME = '未设置昵称';
    }
    if (($USER_COUNT == 1))
    {
      echo '
<table border="0" cellspacing="1" width="450" class="small" bgcolor="#000000" cellpadding="3" align="center">
  <tr class="TableHeader">
      <td nowrap align="center">排行</td>
      <td nowrap align="center">昵称</td>
';
      if (($LOGIN_USER_PRIV == 1))
      {
        echo '      <td nowrap align="center">实名</td>
';
      }
      echo '      <td nowrap align="center">发表文章数</td>
      <td nowrap align="center">积分</td>
  </tr>
';
    }
    if ((($USER_COUNT % 2) == 1))
    {
      $TableLine = 'TableLine1';
    }
    else
    {
      $TableLine = 'TableLine2';
    }
    echo '    <tr class="';
    echo $TableLine;
    echo '">
      <td align="center" width="30" nowrap>';
    echo $USER_COUNT;
    echo '</td>
      <td width="80" nowrap align="center">';
    echo $NICK_NAME;
    echo '</td>
';
    if (($LOGIN_USER_PRIV == 1))
    {
      echo '     <td align="center" width="50" nowrap>';
      echo $USER_NAME;
      echo '</td>
';
    }
    echo '      <td align="center" nowrap>';
    echo $BBS_COUNTER;
    echo '</td>
      <td align="center" nowrap>';
    echo $MONEY;
    echo '</td>
  </tr>
';
  }
  if ((0 < $USER_COUNT))
  {
    echo '  </table>
';
  }
  else
  {
    message ('', '<br>积分榜暂空');
  }
  button_back ();
  echo '
</body>
</html>';
?>

⌨️ 快捷键说明

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