Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if (!defined('FLUX_ROOT')) exit;
- $title = 'WoE Ranking';
- $classes = Flux::config('JobClasses')->toArray();
- $jobClass = $params->get('jobclass');
- $bind = array((int)Flux::config('RankingHideLevel'));
- if (trim($jobClass) === '') {
- $jobClass = null;
- }
- if (!is_null($jobClass) && !array_key_exists($jobClass, $classes)) {
- $this->deny();
- }
- $sql = "SELECT
- `char`.name AS char_name,
- char.class AS char_class,
- `char`.char_id,
- damage_done,damage_received,kill_count,death_count,score,emperium_kill,hp_heal_potions,sp_heal_potions,emperium_damage FROM `char_wstats` LEFT JOIN `char` ON `char`.`char_id` = `char_wstats`.`char_id` WHERE `char_wstats`.`kill_count` > 0 ";
- if (!is_null($jobClass)) {
- $sql .= "AND char.class = ? ";
- $bind[] = $jobClass;
- }
- $sql .= "ORDER BY `char_wstats`.`kill_count` DESC";
- $sth = $server->connection->getStatement($sql);
- $sth->execute($bind);
- $chars = $sth->fetchAll();
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement