diff --git a/ranks.php b/ranks.php index be754a3..8b541bf 100644 --- a/ranks.php +++ b/ranks.php @@ -2,10 +2,11 @@ require 'lib/function.php'; require 'lib/layout.php'; - $set = (($_GET['set']) ? (int)$_GET['set'] : -1); - $showall = (($_GET['showall']) ? 1 : 0); + $set = intval($_GET['set'] ?? -1); + $showall = $_GET['showall'] ?? 0; $rsets = $sql->query('SELECT * FROM ranksets WHERE id>0 ORDER BY id'); + $ranksetlist = ""; while($rset = $sql->fetch($rsets)) { // First rankset if($set < 0) $set = $rset['id']; @@ -17,21 +18,23 @@ print " $header -
+ +
$tblstart $tccellh colspan=2>  $tccell1>Rank set - $tccell2l> + $tccell2l> $tccell1>Users to show $tccell2l> - $radio=showall value=0 $ch[0]> Selected rank set only +     - $radio=showall value=1 $ch[1]> All users + + $tccellh colspan=2>  $tccell1>  $tccell2l> -
+ $tblend
$tblstart @@ -55,10 +58,13 @@ $user = $sql->fetch($users); $total = mysql_num_rows($users); } - + for($i=0; $i<$totalranks; ++$i) { $rankn=$sql->fetch($ranks); - if(!$rankn['num']) $rankn['num']=8388607; + + if (!$rankn) { + $rankn = ['num' => 8388607]; + } $userarray = array(); $inactive = 0; @@ -98,4 +104,4 @@ print $tblend.$footer; printtimedif($startingtime); -?> \ No newline at end of file +?>