9) $type = 7; // Fetch highscore page $page = getValue(@$_GET['page']); if (!$page || $page == 0) $page = 1; else $page = (int)$page; $highscore = $config['highscore']; $rows = $highscore['rows']; $rowsPerPage = $highscore['rowsPerPage']; function skillName($type) { $types = array( 1 => "Club", 2 => "Sword", 3 => "Axe", 4 => "Distance", 5 => "Shield", 6 => "Fish", 7 => "Experience", // Hardcoded 8 => "Magic Level", // Hardcoded 9 => "Fist", // Since 0 returns false I will make 9 = 0. :) ); return $types[(int)$type]; } function pageCheck($index, $page, $rowPerPage) { return ($index < ($page * $rowPerPage) && $index >= ($page * $rowPerPage) - $rowPerPage) ? true : false; } $cache = new Cache('engine/cache/highscores'); if ($cache->hasExpired()) { $scores = fetchAllScores($rows, $config['TFSVersion'], $highscore['ignoreGroupId']); $cache->setContent($scores); $cache->save(); } else { $scores = $cache->load(); } if ($scores) { ?>
Rank | Name | Vocation | Level | Points"; ?>
". $scores[$type][$i]['experience'] .""; ?> |