= 3) $ret = "SUPREME ARCHMASTER"; else if ($r2 >= 2) $ret = "KING ARCHMASTER"; else if ($r2 >= 1) $ret = "KNIGHT ARCHMASTER"; else $ret = "ARCHMASTER"; } } return $ret; } function swapColor (&$i) { if ($i==0) { $i=1; return ("#111111"); } else { $i=0; return ("#222222"); } } if (isset($_POST['maxdisplay'])) $maxdisplay=$_POST['maxdisplay']; if (isset($_POST['sorting'])) $sorting=$_POST['sorting']; if (isset($_POST['order'])) $order=$_POST['order']; if (isset($_POST['playerlist'])) $playerlist=$_POST['playerlist']; if (isset($_POST['crecord'])) $crecord=$_POST['crecord']; if ($sorting=="") $sorting="rank"; if ($playerlist=="") $playerlist="players"; $tplayers = "Player"; $tconnected = "Con."; $tgames = "Games"; $twin = "Win"; $tlost = "Lost"; $tquit = "Quit"; $trank = "Rank"; if ($sorting=="connected") { if ($order=="") $order="asc"; $tconnected = "$tconnected"; } if ($sorting=="player") { if ($order=="") $order="asc"; $tplayers = "$tplayers"; } if ($sorting=="games") { if ($order=="") $order="desc"; $tgames = "$tgames"; } if ($sorting=="wins") { if ($order=="") $order="desc"; $twin = "$twin"; } if ($sorting=="losts") { if ($order=="") $order="desc"; $tlost = "$tlost"; } if ($sorting=="quits") { if ($order=="") $order="desc"; $tquit = "$tquit"; } if ($sorting=="rank") { if ($order=="") $order="desc"; $trank = "$trank"; } ?> Players from <?echo SERVER_NAME?> server writeQuery($query); $query = "update `$tablename` set ladderdisplay=0 where lastconnected < $ave_player_date and ((connect <= $ave_player_con and connect > $new_player_con) or (games <= $ave_player_game and games > $new_player_game)) and player NOT IN ($reservedplayer) and ladderdisplay=1 and connected <= 0"; $cQuery->writeQuery($query); $query = "update `$tablename` set ladderdisplay=0 where lastconnected < $old_player_date and ((connect <= $old_player_con and connect > $ave_player_con) or (games <= $old_player_game and games > $ave_player_game)) and player NOT IN ($reservedplayer) and ladderdisplay=1 and connected <= 0"; $cQuery->writeQuery($query); $query = "update `$tablename` set ladderdisplay=0 where lastconnected < $std_player_date and ((connect > $old_player_con) or (games > $old_player_game and games < $high_player_game)) and player NOT IN ($reservedplayer) and ladderdisplay=1 and connected <= 0"; $cQuery->writeQuery($query); // -------------------------------------------------------------------------------------------- $query = "select count(*) from `$tablename` where showstat > 0 and games > $mingameplayed and ladderdisplay=1 and player<>'ADMIN'"; $data = $cQuery->readQuery($query); $totalpages = $data[0][0]; if ($playerlist=="connected") { $query = "select count(*) from `$tablename` where ((showstat > 0 and games > $mingameplayed and ladderdisplay=1) or connected > 0) and player<>'ADMIN'"; $data = $cQuery->readQuery($query); $totalpages = $data[0][0]; } $query = "select count(*) from `$tablename`"; $data = $cQuery->readQuery($query); $playersindb = $data[0][0]; $query = "select max(rank) from `$tablename` where showstat > 0 and ladderdisplay=1 limit 1"; $data = $cQuery->readQuery($query); $toprank = $data[0][0]; $query = "select min(rank) from `$tablename` where showstat > 0 and ladderdisplay=1 limit 1"; $data = $cQuery->readQuery($query); $lowrank = $data[0][0]; if ($totalpages <= 250) { $maxdisplay = $playersindb + 1; $linkpage = " "; $sp_page = " "; $sn_page = " "; } else { $linkpage = $maxdisplay > $origmaxdisplay ? 'Pages' : 'All'; $linkpage = "$linkpage"; $p_page = $crecord - $maxdisplay; $n_page = $crecord + $maxdisplay; $sp_page = "<<"; $sn_page = ">>"; if ($p_page < 0) $sp_page = " "; if ($n_page > $totalpages) $sn_page = " "; } ?>
0 and games > $mingameplayed and ladderdisplay=1) or connected > 0) and player<>'ADMIN' order by showstat asc, connected desc, $sorting $order limit $crecord, $maxdisplay"; } else { $query = "select player, games, rank, rank2, wins, losts, quits, showstat, connected from `$tablename` where showstat > 0 and games > $mingameplayed and ladderdisplay=1 and player<>'ADMIN' order by $sorting $order limit $crecord, $maxdisplay"; } $data = $cQuery->readQuery($query); if ($data == null) { ?> 0) { $connected = ""; } if ($showstat == '1') { $ratioquitter = 100; if ($games > 0) { // always true from query if ($quits > 0) { $ratioquitter = (($games-$quits) / $games)*100; if ($ratioquitter >= 95) { $ratioquitter = 150; } else if ($ratioquitter >= 85) { $ratioquitter = 100; } } else { $ratioquitter = 200; } } if ($ratioquitter == 200) { $multiplier = "\"200%"; $multiplier2 = " "; } else if ($ratioquitter == 150) { $multiplier = "\"150%"; $multiplier2 = " "; } else if ($ratioquitter < 100) { $divider = round ($ratioquitter); if ($divider <= 1) { $multiplier = "\"".$divider."%"; } else { $multiplier = "\"".$divider."%"; } $multiplier2 = "$divider%"; } else { $multiplier = " "; $multiplier2 = " "; } if ($toprank > 0 && $toprank==$rankpoint) { if ($player==SERVER_OWNER_PLAYER) { $player = "\"Leader\" ".getTitle($rankpoint, $rank2)." $player"; } else { $player = "\"Leader\" ".getTitle($rankpoint, $rank2)." $player"; } } else if ($rankpoint > 0) { if ($player==SERVER_OWNER_PLAYER) { $player = "".getTitle($rankpoint, $rank2)." $player"; } else { $player = "".getTitle($rankpoint, $rank2)." $player"; } } else { if ($player==SERVER_OWNER_PLAYER) { $player = "".getTitle($rankpoint, $rank2)." $player"; } else { $player = "".getTitle($rankpoint, $rank2)." $player"; } } if ($p==0 && $sorting!="player") { //$player=" $player"; $games="$games"; $wins="$wins"; $losts="$losts"; $quits="$quits"; $rank="$rank"; } if ($toprank > 0 && $rankpoint > 0) { $propor = round (($rankpoint / $toprank) * 100); $img=""; $img.=" \n"; } else if ($lowrank < 0 && $rankpoint < 0) { $propor = round (((-$rankpoint) / (-$lowrank)) * 100); $img=""; $img.=" \n"; } else { $img=""; $img.=" \n"; } } else { $multiplier = ' '; $multiplier2 = ' '; $games = ' '; $wins = ' '; $losts = ' '; $quits = ' '; $rank = ' '; $img = ''; } $col = swapColor ($i); $p++; ?>
 
  Ratio
No ranked players to display
\n"; $img.="
\n"; $img.="
".$propor."%
\n"; $img.="
\n"; $img.=" \n"; $img.=" \n"; $img.=" \n"; $img.=" \n"; $img.=" \n"; $img.="
\n"; $img.=" \n"; $img.="
\n"; $img.="
\n"; $img.="
\n"; $img.="
-".$propor."%
\n"; $img.="
\n"; $img.=" \n"; $img.=" \n"; $img.=" \n"; $img.=" \n"; $img.=" \n"; $img.="
\n"; $img.=" \n"; $img.="
\n"; $img.="
\n"; $img.="
\n"; $img.="
 
\n"; $img.="
\n"; $img.=" \n"; $img.=" \n"; $img.=" \n"; $img.=" \n"; $img.=" \n"; $img.="
\n"; $img.="  \n"; $img.="
\n"; $img.="
 
     
 
players who have played ladder in the past few days
Players who haven't played lastly will not have their rank displayed on this page
[ players recorded into database]
 
Players currently connected to the server
200% rank points gained Players who have never quit gain 200% of rank points on victory
150% rank points gained Players who have quit less than 5% gain 150% of rank points on victory
?% rank points gained (always 1 rank at least) Players who have quit more than 15% gain (100 - quit ratio)% of rank points on victory
  Players who have quit less than 15% and more than 5% gain standard rank points on victory