diff --git a/chat.php b/chat.php index 9881505..c3c671a 100644 --- a/chat.php +++ b/chat.php @@ -34,7 +34,6 @@ send_headers(); // initialize and load variables/configuration -$A=array();// All registered members [display name, style, status, nickname] $C=array();// Configuration $F=array();// Fonts $H=array();// HTML-stuff @@ -859,7 +858,7 @@ function send_alogin(){ } function send_admin($arg=''){ - global $A, $H, $I, $P, $U, $db; + global $H, $I, $P, $U, $db; $ga=(int) get_setting('guestaccess'); print_start('admin'); $chlist=""; - read_members(); - sort_names($A); - foreach($A as $member){ + $members=[]; + $result=$db->query('SELECT * FROM ' . PREFIX . 'members ORDER BY LOWER(nickname);'); + while($temp=$result->fetch(PDO::FETCH_ASSOC)){ + $members[$temp['nickname']]=[$temp['nickname'], $temp['style'], $temp['status']]; + } + foreach($members as $member){ echo "