<?php include_once 'config.inc.php'; ?>
<br>
<div class="main-l">
  <table cellspacing="0" >
    <tr class="table_bar">
      <td><b>TOP30 User</b></td>
    </tr>
    	  <?
			$sql="SELECT tj_name, count(*) AS count FROM hacked_pages where pending=1 GROUP BY tj_name ORDER BY count DESC LIMIT 30";
			$query=mysql_query($sql);
			$rank=0;
			while($row=mysql_fetch_array($query))
			{
				$rank++;
		  ?>
    <tr>
      <td><font color="#ff0000">No<?=$rank?>：</font>
        <a href="search.php?var=<?=$row['tj_name']?>"><?=$row['tj_name']?></a> 
        <font color=#ff0000>&nbsp;[<?=$row['count']?>]</font>
        </td>
    </tr>
    <? }?>
  </table>
  <table cellspacing="0">
    <tr class="table_bar">
      <td><b>TOP10 Team</b></td>
    </tr>
          <?
			$sql="SELECT tj_team, count(*) AS count FROM hacked_pages where pending='1' and tj_team!='' GROUP BY tj_team ORDER BY count DESC LIMIT 10";
			$query=mysql_query($sql);
			$rank=0;
			while($row=mysql_fetch_array($query))
			{
				$rank++;
		  ?>
    <tr>
      <td><font color="#ff0000">NO<?=$rank?>：</font>
        <a href="search.php?type=team&var=<?=$row['tj_team']?>"><?=$row['tj_team']?></a> 
        <font color=#ff0000>&nbsp;[<?=$row['count']?>]</font>
        </td>
    </tr>
    <? }?>
  </table>
<table cellspacing="0">
    <tr class="table_bar">
      <td><b>Friend Site</b></td>
    </tr>
     </table>
<div id="demo" style="overflow:auto;height:200px;width:188px; border:0; line-height:20px; padding:8px 0 8px 10px;">
<?
$sql="select link_name,link_url from friend_links order by rank";
$query=mysql_query($sql);
while(@$row=mysql_fetch_array($query))
{
	$link_name = htmlspecialchars($row['link_name']);
	$link_url = htmlspecialchars($row['link_url']);
?>
    <a href="<?=$link_url?>" target="_blank"><?=$link_name?></a><br />
<? }?>
</div>

</div>
<!--/main-l-->