# # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . define('TITLE', __('Search results')); global $db; if (isset($_GET['page'])) $page = $_GET['page']; else $page = 1; $page = (int) $page; $start = getStart($page); if ($_POST) { $info = stripslashes($_POST['info']); echo '

'.__('Results').' '.__('for').' '.utf8_htmlentities($info).'

'; $email = filter_var($info, FILTER_VALIDATE_EMAIL); if ($email) $result = $db->getUser($info, $start, NOTES_PER_PAGE, true); else $result = $db->getUser($info, $start, NOTES_PER_PAGE); $count = count($result); if($count) { foreach ($result as $user) showUser($user['ID']); } else { echo showStatus(__('Nothing found'), 'warning'); } }