From 0dabaa505e4463498665a1eb6ab95979578beab3 Mon Sep 17 00:00:00 2001 From: Philip Häusler Date: Wed, 26 Dec 2012 14:02:27 +0100 Subject: #28 begin log --- includes/pages/admin_arrive.php | 100 ++++++++++++++++++++++------------------ 1 file changed, 54 insertions(+), 46 deletions(-) (limited to 'includes/pages/admin_arrive.php') diff --git a/includes/pages/admin_arrive.php b/includes/pages/admin_arrive.php index 2acad0b3..70a43394 100644 --- a/includes/pages/admin_arrive.php +++ b/includes/pages/admin_arrive.php @@ -1,52 +1,60 @@ 0) { - $match = false; - $index = join("", $usr); - foreach ($tokens as $t) - if (strstr($index, trim($t))) { - $match = true; - break; - } - if (!$match) - continue; - } - $table .= ''; - $table .= '' . $usr['Nick'] . ''; - if ($usr['Gekommen'] == 1) - $table .= 'yesreset'; - else - $table .= 'arrived'; - $table .= ''; - } - return template_render('../templates/admin_arrive.html', array ( - 'search' => $search, - 'table' => $table, - 'msg' => $msg, - 'link' => page_link_to('admin_arrive') - )); + $users = sql_select("SELECT * FROM `User` ORDER BY `Nick`"); + $table = ""; + if ($search == "") + $tokens = array (); + else + $tokens = explode(" ", $search); + foreach ($users as $usr) { + if (count($tokens) > 0) { + $match = false; + $index = join("", $usr); + foreach ($tokens as $t) + if (strstr($index, trim($t))) { + $match = true; + break; + } + if (!$match) + continue; + } + $table .= ''; + $table .= '' . $usr['Nick'] . ''; + if ($usr['Gekommen'] == 1) + $table .= 'yesreset'; + else + $table .= 'arrived'; + $table .= ''; + } + return template_render('../templates/admin_arrive.html', array ( + 'search' => $search, + 'table' => $table, + 'msg' => $msg, + 'link' => page_link_to('admin_arrive') + )); } ?> \ No newline at end of file -- cgit v1.2.3-54-g00ecf