Alguem sabe Colocar posição em Top Kill?
se souber me de um help rapidinho...
Atenciosamente Laron
se souber me de um help rapidinho...
Atenciosamente Laron
Código:
<link rel="shortcut icon" href="img/favicon.ico" />
<h2> Top Kill</h2>
<META charset="UTF-8" />
<?php
function topkills2()
{
global $db_host, $db_user, $db_pass, $db_char;
mysql_connect($db_host, $db_user, $db_pass);
mysql_select_db($db_char);
$teste= mysql_query("SELECT * FROM characters ORDER online");
$resultado = mysql_query("SELECT * FROM characters ORDER BY totalKills DESC LIMIT 50");
$info = "<table width=\"100%\" border=\"0\" cellspacing=\"Offline\">";
$info .= "<tr><td >Pos.</td><td><center>Nome</center></td><td><center>Raça</center></td><td><center>Classe</center></td><td><center>Sexo</center</td><td><center>Matou ontem</center></td><td><center>Matou hoje</center></td><td><center>Total<center</td><td><center>Status</center></td></tr>";
while($linha = mysql_fetch_array($resultado))
{
if( $linha['gender'] == '1')
$sexo = '<center>Feminino';
else
$sexo = '<center>Masculino';
switch ($linha['race'])
{
case '1':
$raca= "<center><img src=\"./_images/racas/human.png\" width='18' height='18' \">";
break;
case '2':
$raca= "<center><img src=\"./_images/racas/orc.png\"\" width='18' height='18' \">";
break;
case '3':
$raca= "<center><img src=\"./_images/racas/dwarf.png\" width='18' height='18' \">";
break;
case '4':
$raca= "<center><img src=\"./_images/racas/ne.png\" width='18' height='18' \">";
break;
case '5':
$raca= "<center><img src=\"./_images/racas/undead.png\" width='18' height='18' \">";
break;
case '6':
$raca= "<center><img src=\"./_images/racas/tauren.png\" width='18' height='18' \">";
break;
case '7':
$raca= "<center><img src=\"./_images/racas/gnome.png\" width='18' height='18' \">";
break;
case '8':
$raca= "<center><img src=\"./_images/racas/troll.png\" width='18' height='18' \">";
break;
case '10':
$raca= "<center><img src=\"./_images/racas/be.png\" width='18' height='18' \">";
break;
case '11':
$raca= "<center><img src=\"./_images/racas/human.png\" width='18' height='18' \">";
break;
}
switch ($linha['class'])
{
case '1':
$classe= "<center><img src=\"./_images/classes/warrior.png\" width='18' height='18' \">";
break;
case '2':
$classe= "<center><img src=\"./_images/classes/paladin.png\" width='18' height='18' \">";
break;
case '3':
$classe= "<center><img src=\"./_images/classes/hunter.png\" width='18' height='18' \">";
break;
case '4':
$classe= "<center><img src=\"./_images/classes/rogue.png\" width='18' height='18' \">";
break;
case '5':
$classe= "<center><img src=\"./_images/classes/priest.png\" width='18' height='18' \">";
break;
case '6':
$classe= "<center><img src=\"./_images/classes/dk.png\" width='18' height='18' \">";
break;
case '7':
$classe= "<center><img src=\"./_images/classes/sham.png\" width='18' height='18' \">";
break;
case '8':
$classe= "<center><img src=\"./_images/classes/mage.png\" width='18' height='18' \">";
break;
case '9':
$classe= "<center><img src=\"./_images/classes/warlock.png\" width='18' height='18' \">";
break;
case '11':
$classe= "<center><img src=\"./_images/classes/druid.png\" width='18' height='18' \">";
break;
}
{
if( $linha['online'] == '1')
$status = '<center><font color="green">Online</font>';
else
$status = '<center><font color="red">Offline</font>';
}
$info .= "<tr><td>{$count}</td><td><center>{$linha['name']}</td><td>{$raca}</td><td>{$classe}</td><td>{$sexo}</td><td><center>{$linha['yesterdayKills']}</td><td><center>{$linha['todayKills']}</td><td><center>{$linha['totalKills']}</td><td>{$status}
</td></tr>";
}
$info .= "</table>";
return $info;
}
?>
<?php echo topkills2(); ?>
Código:
<link rel="shortcut icon" href="img/favicon.ico" />
<h2> Top Kill</h2>
<META charset="UTF-8" />
<?php
function topkills2()
{
global $db_host, $db_user, $db_pass, $db_char;
mysql_connect($db_host, $db_user, $db_pass);
mysql_select_db($db_char);
$teste= mysql_query("SELECT * FROM characters ORDER online");
$resultado = mysql_query("SELECT * FROM characters ORDER BY totalKills DESC LIMIT 50");
$info = "<table width=\"100%\" border=\"0\" cellspacing=\"Offline\">";
$info .= "<tr><td >Pos.</td><td><center>Nome</center></td><td><center>Raça</center></td><td><center>Classe</center></td><td><center>Sexo</center</td><td><center>Matou ontem</center></td><td><center>Matou hoje</center></td><td><center>Total<center</td><td><center>Status</center></td></tr>";
$posicao = 1;
while($linha = mysql_fetch_array($resultado))
{
if( $linha['gender'] == '1')
$sexo = '<center>Feminino';
else
$sexo = '<center>Masculino';
switch ($linha['race'])
{
case '1':
$raca= "<center><img src=\"./_images/racas/human.png\" width='18' height='18' \">";
break;
case '2':
$raca= "<center><img src=\"./_images/racas/orc.png\"\" width='18' height='18' \">";
break;
case '3':
$raca= "<center><img src=\"./_images/racas/dwarf.png\" width='18' height='18' \">";
break;
case '4':
$raca= "<center><img src=\"./_images/racas/ne.png\" width='18' height='18' \">";
break;
case '5':
$raca= "<center><img src=\"./_images/racas/undead.png\" width='18' height='18' \">";
break;
case '6':
$raca= "<center><img src=\"./_images/racas/tauren.png\" width='18' height='18' \">";
break;
case '7':
$raca= "<center><img src=\"./_images/racas/gnome.png\" width='18' height='18' \">";
break;
case '8':
$raca= "<center><img src=\"./_images/racas/troll.png\" width='18' height='18' \">";
break;
case '10':
$raca= "<center><img src=\"./_images/racas/be.png\" width='18' height='18' \">";
break;
case '11':
$raca= "<center><img src=\"./_images/racas/human.png\" width='18' height='18' \">";
break;
}
switch ($linha['class'])
{
case '1':
$classe= "<center><img src=\"./_images/classes/warrior.png\" width='18' height='18' \">";
break;
case '2':
$classe= "<center><img src=\"./_images/classes/paladin.png\" width='18' height='18' \">";
break;
case '3':
$classe= "<center><img src=\"./_images/classes/hunter.png\" width='18' height='18' \">";
break;
case '4':
$classe= "<center><img src=\"./_images/classes/rogue.png\" width='18' height='18' \">";
break;
case '5':
$classe= "<center><img src=\"./_images/classes/priest.png\" width='18' height='18' \">";
break;
case '6':
$classe= "<center><img src=\"./_images/classes/dk.png\" width='18' height='18' \">";
break;
case '7':
$classe= "<center><img src=\"./_images/classes/sham.png\" width='18' height='18' \">";
break;
case '8':
$classe= "<center><img src=\"./_images/classes/mage.png\" width='18' height='18' \">";
break;
case '9':
$classe= "<center><img src=\"./_images/classes/warlock.png\" width='18' height='18' \">";
break;
case '11':
$classe= "<center><img src=\"./_images/classes/druid.png\" width='18' height='18' \">";
break;
}
{
if( $linha['online'] == '1')
$status = '<center><font color="green">Online</font>';
else
$status = '<center><font color="red">Offline</font>';
}
$info .= "<tr><td>{$posicao}</td><td><center>{$linha['name']}</td><td>{$raca}</td><td>{$classe}</td><td>{$sexo}</td><td><center>{$linha['yesterdayKills']}</td><td><center>{$linha['todayKills']}</td><td><center>{$linha['totalKills']}</td><td>{$status}</td></tr>";
$posicao = $posicao + 1;
}
$info .= "</table>";
return $info;
}
?>
<?php echo topkills2(); ?>