<html lang="pt">
<head><LINK REL="StyleSheet" HREF="barra.css" TYPE="text/css">
<meta name="description" content="Lucas Thompson" />
<meta http-equiv=Page-Exit content=blendTrans(Duration=1.0)>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<? 
include 'cnn.php';
include 'configs/conf_extras.php';
?>
<style type="text/css">
<!--
body,td,th {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 10px;
	color: #333333;
}
.right-menu2 {	font-family: "Myriad Pro", "Trebuchet MS", Arial;
	font-size: 16px;
	font-style: normal;
	color: #666666;
	font-weight: bolder;
}
a {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 10px;
	color: #333333;
}
a:link {
	text-decoration: none;
}
a:visited {
	text-decoration: none;
	color: #333333;
}
a:hover {
	text-decoration: none;
	color: #FF0000;
}
a:active {
	text-decoration: none;
	color: #FF0000;
}
.style2 {color: #FFFFFF}
.style4 {color: #C10000}
-->
</style>
</head>

<body>
<p align="center" class='post-footer'> <a href="resets.php">Rankings de Personagens</a>&nbsp;| <span class="style4">Rankings de Guilds</span>&nbsp;| <a href="pks.php">Rankings 
  PK</a><br>

        
  </div>
</p>
<table width="100%" border="0" cellspacing="1" cellpadding="1">
  <tr>
    <td width="10%" height="19" bgcolor="#333333"><div align="left" class="style2">Rank</div></td>
    <td width="16%" bgcolor="#333333"><div align="left" class="style2"><strong>Guild</strong></div></td>
    <td width="16%" bgcolor="#C10000"><div align="left" class="style2">Score</div></td>
    <td width="16%" bgcolor="#333333"><span class="style2">Membros</span></td>
    <td width="22%" bgcolor="#333333"><span class="style2">Dono</span></td>
    <td width="20%" bgcolor="#333333"><span class="style2">Noticia</span></td>
  </tr>
  <?
  $Query = mssql_query("select top 30 g_name,g_score,g_master,g_notice from guild order by g_score desc");
  for($i=0;$i<mssql_num_rows($Query);$i++) {
  $rank = $i+1;
  $Array = mssql_fetch_row($Query);
  $Membros = mssql_fetch_row(mssql_query("select count(*) from guildmember where g_name='".$Array[0]."'"));
  ?>
  <tr>
    <td width="10%" height="19"><div align="left"><?=$rank?></div></td>
    <td width="16%"><div align="left">
      <strong>
      <?=$Array[0]?></strong></div></td>
    <td width="16%"><div align="left">
      <?=$Array[1]?>
</div></td>
    <td width="16%"><?=$Membros[0]?></td>
    <td width="22%"><?=$Array[2]?></td>
    <td width="20%"><a href="javascript:void();" onClick="javascript:alert('<?=$Array[3]?>');">[ver]</a></td>
  </tr>
  <? } ?>
</table>
</body>
</html>