$playerlist[] = array("plrname" => stripslashes("$plrnamequote"), "plrhtml" => stripslashes("$plrhtmlquote"), "plrrank" => "$plrrank", "plrtotalkills" => "$plrtotalkills", "plrtotaldeaths"=> "$plrtotaldeaths", "plrkdr" => "$plrkdr", "plrkpm" => "$plrkpm", "plrskill" => "$plrskill", "plrwonids" => "$plrwonids", "plraliases" => stripslashes("$plraliasesquote")); if ($playerlist) reset($playerlist); if ($search != '') { // Change the $playerlist array to match the search string if (get_magic_quotes_gpc() == 1) $search = stripslashes($search); $match = preg_quote($search,'/'); foreach ($playerlist as $plr) { if (preg_match("/$match/i", $plr['plraliases']) || preg_match('/' . $match . '/i', $plr['plrwonids']) ) $newlist[] = $plr; } $playerlist = $newlist; } // Build URL parameters... $searchurl = ($search) ? "&search=$search" : ''; $players = array(); if ($playerlist) { usort($playerlist, "dosort"); reset($playerlist); $players = array_slice($playerlist, $start, $pagelimit); } function dosort($a,$b) { global $sort; $key = 'plr'.$sort; if ($a[$key] == $b[$key]) return 0; if ($sort == 'name') { return ($a[$key] < $b[$key]) ? -1 : 1; } else { return ($a[$key] > $b[$key]) ? -1 : 1; } } function pages() { global $pagelimit; global $start; global $playerlist; global $sort; global $PHP_SELF; global $searchurl; $total = count($playerlist); $next = $start + $pagelimit; $prev = $start - $pagelimit; if ($total > $pagelimit) { echo ""; echo "
"; if ($prev >= 0) { echo "Prev | "; } else { echo "Prev | "; } echo ""; $page = 1; $x = $pagelimit; for ($x = 0; $x < $total; $x++) { $pagestr = str_pad($page, 2, '0', STR_PAD_LEFT); if (0 == ($x % $pagelimit)) { if ($x == $start) { echo "" . $pagestr . " "; } else { echo "" . $pagestr . " "; } if (!($page % 10)) echo "
"; $page++; } } echo "
"; if ($next < $total) { echo " | Next"; } else { echo " | Next"; } echo "
"; } } ?> $includefile_indexheader_html
Player Ranks
In $actualdays days $totalrankedplayers players ranked out of $totalplayers total
Search Player: (wonids too!) $pagelimit) pages() ?>
>
">Player Name
>
">Kills
>
">Deaths
> > >
No players found
Minimum values needed to rank are shown below:
<= $maxplayers
 
$minkills
$mindeaths
$minkdr
 
$minskill
$pagelimit) pages() ?>

$includefile_indexfooter_html