Noticias:

No tienes permiso para ver los enlaces. Para poder verlos Registrate o Conectate.

Menú Principal

Richest Players

Iniciado por Swarlog, Jun 13, 2025, 11:50 PM

Tema anterior - Siguiente tema

Swarlog

<?php

define("SQL_USERNAME","HERE"); # MySQL USERNAME
define("SQL_PASSWORD","HERE"); # MySQL PASSWORD
define("SQL_IP","HERE"); # Server/MySQL IP
define("SQL_DATABASE","HERE");   # MySQL DATABASE

if (!($cnn = @mysql_connect( (SQL_IP), (SQL_USERNAME), (SQL_PASSWORD) ))){ exit( "Error with the connection " );}
if (!($db = @mysql_select_db( (SQL_DATABASE), $cnn))){ exit( "Couldn't connect to the database" );}
?>

<div>
<?php include_once("config.php");?>
<?php
$FORM = '<table width="630" border="0">
<tr class="rowt" align="left" height="30">
<th>Rank</th>
<th>Character</th>
<th>Clan</th>
<th>Ally</th>
<th>Amount</th>
</tr>';
$i=1;
$r=255;

$mq = mysql_query('SELECT `characters`.`obj_Id`,`characters`.`char_name`,`characters`.`clanid`,`characters`.`accesslevel`,`clan_data`.`clan_id`,`clan_data`.`clan_name`,`clan_data`.`ally_name`,`owner_id`,`item_id`,SUM(`count`) "nbItem" FROM `characters`,`clan_data`,`items` WHERE `items`.`owner_id` = `characters`.`obj_Id` AND `characters`.`accesslevel` = 0 AND `clan_data`.`clan_id` = `characters`.`clanid` AND `loc` <> "CLANWH" AND `item_id` = 9991 GROUP BY `owner_id` ORDER BY SUM(`count`) DESC LIMIT 0,30;') or die (mysql_error());
while ($mfo = mysql_fetch_object($mq))
{
$mfo->clan_name = empty($mfo->clanid) ? 'No Clan' : $mfo->clan_name ;
$mfo->ally_name = empty($mfo->ally_name) ? 'No Ally' : $mfo->ally_name ;
$FORM .= '<tr align="left" height="23" style="color:#fff; font-size:14px;">
<td>'.$i.'</span></td>
<td>'.$mfo->char_name.'</td>
<td>'.$mfo->clan_name.'</td>
<td>'.$mfo->ally_name.'</td>
<td>'.number_format($mfo->nbItem).'</td>
</tr>';
$i++;
$r -= 0;
}
$FORM .= '</table>';
echo $FORM;
?>