'alle Typen' ); foreach ($angel_types_source as $angel_type) $angel_types[$angel_type['id']] = $angel_type['name']; $users = sql_select("SELECT `User`.* FROM `User` ${angeltypesearch} LEFT JOIN `ShiftEntry` ON `User`.`UID` = `ShiftEntry`.`UID` LEFT JOIN `Shifts` ON (`ShiftEntry`.`SID` = `Shifts`.`SID` AND `Shifts`.`start` < " . sql_escape(time()) . " AND `Shifts`.`end` > " . sql_escape(time()) . ") WHERE `User`.`Gekommen` = 1 AND `Shifts`.`SID` IS NULL GROUP BY `User`.`UID` 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 (stristr($index, trim($t))) { $match = true; break; } if (! $match) continue; } $table .= '