3) { $value .= '.'.substr($value2, -3, 3); $value2 = substr($value2, 0, strlen($value2)-3); } @$value = $value2.$value; if($valuein > 0) return '+'.$value.''; elseif($valuein < 0) return ''.$value.''; else return $value; } if(empty($type)) $znotePlayers = mysql_select_multi('SELECT `a`.`id`, `b`.`player_id`, `a`.`name`, `a`.`vocation`, `a`.`level`, `a`.`group_id`, `a`.`experience`, `b`.`exphist_lastexp`, `b`.`exphist1`, `b`.`exphist2`, `b`.`exphist3`, `b`.`exphist4`, `b`.`exphist5`, `b`.`exphist6`, `b`.`exphist7`, (`a`.`experience` - `b`.`exphist_lastexp`) AS `expdiff` FROM `players` `a` JOIN `znote_players` `b` ON `a`.`id` = `b`.`player_id` WHERE `a`.`group_id` < 2 ORDER BY `expdiff` DESC LIMIT '.$limit); elseif($type >= 1 && $type <= 3) $znotePlayers = mysql_select_multi('SELECT * FROM `znote_players` JOIN `players` ON `znote_players`.`id` = `players`.`id` WHERE `group_id` < 2 ORDER BY `exphist' . (int) $type . '` DESC LIMIT '.$limit); echo '

Ranking of powergamers


'; echo ''; for($i = 3; $i >= 2; $i--) echo ($type == $i) ? '' : ''; echo ($type == 1) ? '' : ''; echo (empty($type)) ? '' : ''; echo ''; $number_of_rows = 1; if($znotePlayers) foreach($znotePlayers as $player) { echo ''; echo ''; echo ''; $number_of_rows++; } echo '
#
Name
Total
'.$i.' Days Ago
'.$i.' Days Ago
1 Day Ago1 Day AgoTodayToday
'. $number_of_rows . '.
' .$player['name']. ''; echo '
' .$player['level']. ' '.htmlspecialchars(vocation_id_to_name($player['vocation'])).' '; echo '
'.coloured_value($player['exphist1'] + $player['exphist2'] + $player['exphist3']).'
'.coloured_value($player['exphist3']).'
'.coloured_value($player['exphist2']).'
'.coloured_value($player['exphist1']).'
'.coloured_value($player['experience']-$player['exphist_lastexp']).'

'; ?>