Naxtie
mapper, designer
Hello there, I got this "Top Players" & "Top Guilds" list on my website and the code doesnt work on the new version of Gesior AAC (1.0.1).
I would appreciate some help with the code. (I bet there's not much to do).
Here's an picture of how it looks..
And here's both of the codes..
I would appreciate some help with the code. (I bet there's not much to do).
Here's an picture of how it looks..
And here's both of the codes..
PHP:
<div id="sidebar-right">
<div class="topplayers"></div>
<div id="vt_menu">
<ul>
<?php
$players = $SQL->query('SELECT `name`, `level`, `experience`, `online` FROM `players` WHERE `group_id` < '.$config['site']['players_group_id_block'].' AND `name` != "Account Manager" ORDER BY `level` DESC, `experience` DESC LIMIT 5;');
$i = 0;
foreach($players as $player)
{
$i++;
echo '<li class="light">'.$i.'. <a href="index.php?subtopic=characters&name='.urlencode($player['name']).'" >'.$player['name'].'</a> - Level: '.$player['level'].'</li>';
}
?>
</ul>
</div>
<div class="topguilds"></div>
<div id="vt_menu">
<ul>
<?PHP
$guilds = $SQL->query('SELECT `g`.`id` AS `id`, `g`.`name` AS `name`,
`g`.`logo_gfx_name` AS `logo`, COUNT(`g`.`name`) as `frags`
FROM `killers` k
LEFT JOIN `player_killers` pk ON `k`.`id` = `pk`.`kill_id`
LEFT JOIN `players` p ON `pk`.`player_id` = `p`.`id`
LEFT JOIN `guild_ranks` gr ON `p`.`rank_id` = `gr`.`id`
LEFT JOIN `guilds` g ON `gr`.`guild_id` = `g`.`id`
WHERE `k`.`unjustified` = 1 AND `k`.`final_hit` = 1
GROUP BY `name`
ORDER BY `frags` DESC, `name` ASC
LIMIT 0, 5;');
$i = 0;
foreach($guilds as $guild)
{
$i++;
echo '<li class="light">'.$i.'. <a href="?subtopic=guilds&action=show&guild=' . $guild['name'] . '">' . $guild['name'] . '</a> - ' . $guild['frags'] . ' kills</li>';
}
?>