mirror of
https://github.com/smogon/pokemon-showdown-client.git
synced 2026-03-21 17:50:29 -05:00
https://www.smogon.com/forums/threads/suspect-tests-stop-having-game-limits-also-im-removing-coil.3627581/
50 lines
1.4 KiB
PHP
50 lines
1.4 KiB
PHP
<?php
|
|
|
|
include 'lib/ntbb-ladder.lib.php';
|
|
|
|
$formatid = 'OU';
|
|
|
|
if (@$_REQUEST['format']) $formatid = $_REQUEST['format'];
|
|
|
|
if (!ctype_alnum($formatid)) {
|
|
die('denied');
|
|
}
|
|
|
|
if (isset($_REQUEST['testclient'])) {
|
|
header('Content-Type: text/plain; charset=utf-8');
|
|
}
|
|
|
|
$ladder = new NTBBLadder($formatid);
|
|
?>
|
|
<table>
|
|
<tr>
|
|
<th></th><th>Name</th><th><abbr title="Elo rating">Elo</abbr></th><th><abbr title="user's percentage chance of winning a random battle (aka GLIXARE)">GXE</abbr></th><th><abbr title="Glicko-1 rating system: rating±deviation (provisional if deviation>100)">Glicko-1</abbr></th>
|
|
</tr>
|
|
<?php
|
|
|
|
$toplist = $ladder->getTop();
|
|
|
|
$i=0;
|
|
|
|
if (!count($toplist))
|
|
{
|
|
?>
|
|
<tr>
|
|
<td colspan="8"><em>No one has played any ranked games yet.</em></td>
|
|
</tr>
|
|
<?php
|
|
}
|
|
foreach ($toplist as $row)
|
|
{
|
|
$i++;
|
|
$N=$row['w']+$row['l']+$row['t'];
|
|
?>
|
|
<tr<?php /* if (floatval($row['rprd']) > 100) echo ' style="color:#999"'; */ ?>>
|
|
<td><?php echo $i; ?></td><td><?php echo htmlspecialchars($row['username']); ?></td><td><strong><?php echo round($row['elo']); ?></strong></td><td><?php echo ($row['rprd'] < 100 ? number_format($row['gxe'],1) . '<small>%</small>' : '–'); ?></td>
|
|
<td><?php echo '<em>'.round($row['rpr']).'<small> ± '.round($row['rprd']).'</small></em>'; /* if (floatval($row['rprd']) > 100) echo ' <small>(provisional)</small>'; */ ?></td>
|
|
</tr>
|
|
<?php
|
|
}
|
|
?>
|
|
</table>
|