fix things spoken about with ralf :)

This commit is contained in:
Lars Kneschke 2004-04-04 18:59:12 +00:00
parent 517913682c
commit 78443fcb63

View File

@ -54,10 +54,45 @@
$GLOBALS['phpgw']->redirect($GLOBALS['phpgw']->link('/admin/index.php'));
}
$query = (isset($_POST['query'])?$_POST['query']:'');
$GLOBALS['cd'] = ($_GET['cd']?$_GET['cd']:0);
if(isset($_POST['query']))
{
// limit query to limit characters
if(eregi('^[a-z_0-9]+$',$_POST['query']))
$query = $_POST['query'];
}
if(isset($_POST['start']))
{
$start = (int)$_POST['start'];
}
else
{
$start = 0;
}
switch($_GET['order'])
{
case 'account_lid':
$order = $_GET['order'];
break;
default:
$order = 'account_lid';
break;
}
switch($_GET['sort'])
{
case 'ASC':
case 'DESC':
$sort = $_GET['sort'];
break;
default:
$sort = 'ASC';
break;
}
unset($GLOBALS['phpgw_info']['flags']['noheader']);
unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
if(!@is_object($GLOBALS['phpgw']->js))
@ -188,6 +223,8 @@
if(isset($_POST['query']))
{
// limit query to limit characters
if(eregi('^[a-z_0-9]+$',$_POST['query']))
$GLOBALS['query'] = $_POST['query'];
}
@ -200,22 +237,27 @@
$start = 0;
}
if(isset($_GET['order']))
switch($_GET['order'])
{
case 'account_lastname':
case 'account_firstname':
case 'account_lid':
$order = $_GET['order'];
}
else
{
break;
default:
$order = 'account_lid';
break;
}
if(isset($_GET['sort']))
switch($_GET['sort'])
{
case 'ASC':
case 'DESC':
$sort = $_GET['sort'];
}
else
{
break;
default:
$sort = 'ASC';
break;
}
unset($GLOBALS['phpgw_info']['flags']['noheader']);