From c3a9e66c323035d989aca0e4ded08df7f86bbd32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philip=20H=C3=A4usler?= Date: Tue, 19 Jul 2011 21:18:14 +0200 Subject: [PATCH] #2 search function for arrived angels --- includes/pages/admin_arrive.php | 27 +++++++++++++++++++++++---- templates/admin_arrive.html | 5 ++--- 2 files changed, 25 insertions(+), 7 deletions(-) diff --git a/includes/pages/admin_arrive.php b/includes/pages/admin_arrive.php index 2a6791e8..e55a2e6f 100644 --- a/includes/pages/admin_arrive.php +++ b/includes/pages/admin_arrive.php @@ -1,6 +1,9 @@ 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'; + $table .= 'yesreset'; else - $table .= 'arrived'; + $table .= 'arrived'; $table .= ''; } return template_render('../templates/admin_arrive.html', array ( - 'search' => "", + 'search' => $search, 'table' => $table, - 'msg' => $msg + 'msg' => $msg, + 'link' => page_link_to('admin_arrive') )); } ?> \ No newline at end of file diff --git a/templates/admin_arrive.html b/templates/admin_arrive.html index 2711371d..5bc8c32b 100644 --- a/templates/admin_arrive.html +++ b/templates/admin_arrive.html @@ -1,9 +1,8 @@ -
+

-
-%msg% +%msg%