* not any other (new) page.
*
* Copyright 1999-2001 (c) VA Linux Systems
+ * Copyright 2013, French Ministry of National Education
+ * Copyright 2013, Franck Villaume - TrivialDev
* http://fusionforge.org
*
* This file is part of FusionForge. FusionForge is free software;
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-
require_once '../env.inc.php';
require_once $gfcommon.'include/pre.php';
require_once $gfwww.'admin/admin_utils.php';
$search = trim(getStringFromRequest('search'));
$usersearch = trim(getStringFromRequest('usersearch'));
-if (!$search) {
- exit_error(_('Refusing to display whole DB. Please use a CLI query if you wish to do this.'),'admin');
-}
-
site_admin_header(array('title'=>_('Admin Search Results')));
function format_name($name, $status) {
if ($status == 'D') {
- return "<strong><strike>$name</strike></strong>";
+ return "<strong><span class=\"strike\">$name</span></strong>";
} elseif ($status == 'S') {
return "<strong><span style=\"text-decoration:underline\">$name</span></strong>";
} elseif ($status == 'H') {
print '<p><strong>' .sprintf(ngettext('User search with criteria <em>%1$s</em>: %2$s match', 'User search with criteria <em>%1$s</em>: %2$s matches', db_numrows($result)), $search, db_numrows($result)).'</strong></p>';
- if (db_numrows($result) < 1) {
-
- exit_error(db_error(),'admin');
-
- } else {
-
+ if (db_numrows($result) >= 1) {
$title=array();
$title[]=_('ID');
$title[]=_('User name');
}
echo $GLOBALS['HTML']->listTableBottom();
-
+ } else {
+ echo '<p class="information">'._('No user found.').'</p>';
}
} // end if ($usersearch)
if (getStringFromRequest('groupsearch')) {
$status = getStringFromRequest('status');
$is_public = getIntFromRequest('is_public', -1);
- $crit_desc = '' ;
+ $crit_desc = '';
$qpa = db_construct_qpa () ;
if(is_numeric($search)) {
$qpa = db_construct_qpa ($qpa, 'SELECT DISTINCT * FROM groups
-WHERE (group_id=$1 OR lower (unix_group_name) LIKE $2 OR lower (group_name) LIKE $2)',
+ WHERE (group_id=$1 OR lower (unix_group_name) LIKE $2 OR lower (group_name) LIKE $2)',
array ($search,
strtolower ("%$search%"))) ;
} else {
}
$result = db_query_qpa ($qpa) ;
- if (db_numrows($result) < 1) {
- echo db_error();
- } else {
-
+ if (db_numrows($result) >= 1) {
$rows = array();
$ra = RoleAnonymous::getInstance() ;
while ($row = db_fetch_array($result)) {
}
echo $GLOBALS['HTML']->listTableBottom();
-
+ } else {
+ echo '<p class="information">'._('No project found.').'</p>';
}
-
-
} //end if($groupsearch)
site_admin_footer(array());