<html lang="pt">
<head>
<meta name="description" content="Lucas Thompson" />
<title>Mu Site - WEB</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<? 
include 'cnn.php';
?>
<script>
function AbreMenu(nome_div)
{
var div = "";
var menus = 3;
	for (var i=1; i < menus; i++)
	{
	div = "div"+i;
	document.getElementById(div).style.display = "none"; 
		if (div == nome_div)
		{
		document.getElementById(nome_div).style.display = "block"; 
		}
	}
}
</script>
<h1>Ranking Medalhas</h1>
<p class='post-footer'>
<a href="javascript:AbreMenu('div1')">Ranking de Personagens</a>&nbsp;|
<a href="javascript:AbreMenu('div2')">Ranking de Guilds</a></p>
<p class=''><form action='index.php?go=csearch' method='post'>
Char:
<input type="text" id="char" size="14" name="char" value="nome do char" maxlength="20" onFocus="clearText(this)">
<input type="submit"  name="submit" value="pesquisar">
</form>  &nbsp;</p>
<div class='post-footer' id='div1' style='display:none'>
<a href='?go=ranres&top=10'>Resets</a>&nbsp;|
<a href='?go=ranlev&top=10'>Level</a>&nbsp;|
<a href='?go=ranpk&top=10'>PK (Mortes)</a>&nbsp;|
<a href='?go=ranmr&top=10'>Master Reset</a>&nbsp;|
<a href='?go=rankmed'>Medalhas</a></div>
<div class='post-footer' id='div2' style='display:none'>
<a href='?go=rangui&top=10'>Pontos (Wars Ganhos)</a>
</div>
<div class="quadros">
<table width="100%" border="0">
  <tr>
    <td width="7%" height="19" bgcolor="#cccccc"><div align="center"><strong>#</strong></div></td>
    <td width="14%" bgcolor="#cccccc"><div align="center"><strong>Char</strong></div></td>
    <td width="16%" bgcolor="#cccccc"><div align="center"><strong><img src="images/ouro.gif"></strong></div></td>
    <td width="16%" bgcolor="#cccccc"><div align="center"><strong><img src="images/prata.gif"></strong></div></td>
    <td width="16%" bgcolor="#cccccc"><div align="center"><strong><img src="images/bronze.gif"></strong></div></td>
    <td width="30%" bgcolor="#cccccc"><div align="center"><strong><img src="images/todas.gif"></strong></div></td>
    </tr>
  <?
  $Query = mssql_query("select top 100 name, ourotop,pratatop,bronzetop,ouroduelo,prataduelo,bronzeduelo,ouroevento,prataevento,bronzeevento from character where ctlcode=0 or ctlcode=null order by ourotop desc,ouroduelo desc,ouroevento desc,pratatop desc,prataduelo desc,prataevento desc,bronzetop desc,bronzeduelo desc,bronzeevento desc");
  for($i=0;$i<mssql_num_rows($Query);$i++) {
  $rank = $i+1;
  $Array = mssql_fetch_row($Query);
  
if ($check_condi[0] == 0) { $condi = "<strong>Free</strong>"; }
if ($check_condi[0] == 1) { $condi = "<strong>Vip Silver</strong>"; }
if ($check_condi[0] == 2) { $condi = "<strong>Vip Gold</strong>"; }

  ?>
  <tr>
    <td width="7%" height="20" bgcolor="#E5E5E5"><div align="center">
      <?=$rank?>
    </div></td>
    <td width="14%"><div align="center"><strong> <a href="?go=cbusca&char=<?=$Array[0]?>" >
      <?=$Array[0]?>
    </a> </strong></div></td>
    <td width="16%"><div align="center">
      <?=$Array[1]+$Array[4]+$Array[7]?>
    </div></td>
    <td width="16%"><div align="center">
      <?=$Array[2]+$Array[5]+$Array[8]?>
    </div></td>
    <td width="16%"><div align="center">
      <?=$Array[3]+$Array[6]+$Array[9]?>
    </div></td>
    <td width="30%" bgcolor="#E5E5E5"><div align="center">
      <?=$Array[1]+$Array[2]+$Array[3]+$Array[4]+$Array[5]+$Array[6]+$Array[7]+$Array[8]+$Array[9]?>
    </div></td>
    </tr>
  <? } ?>
</table>
</div>
</body>
</html>
