Location: PHPKode > projects > l2jweb > list_top_users.php
<?
$sql = "SELECT `char_name`,`level` FROM `characters` ORDER BY `level` DESC LIMIT 0 , 10";
$char_top_level = $db->fetch_all_array($sql);
for ($i = 0; $i < 10; $i++)
{
    if (@$char_top_level[$i] == null)
        break;
    $players[$char_top_level[$i][0]] = $char_top_level[$i][1];
}
$smarty->assign('player', $players);
$top_users_list = $smarty->fetch('top_charactes.tpl');
$smarty->assign('TOP_USERS', $top_users_list);

?>
Return current item: l2jweb