Fix for bug #411158 - Improper link() calls - clears up missing account_total(). Also removes admin/inc/account_* calls from this file.

This commit is contained in:
skeeter 2001-03-25 18:10:30 +00:00
parent a2e4b791c9
commit 53f0e72fe7

View File

@ -16,6 +16,22 @@
include('../header.inc.php');
// include(PHPGW_APP_INC . '/accounts_' . $phpgw_info['server']['account_repository'] . '.inc.php');
function account_total($query)
{
global $phpgw;
if ($query) {
$querymethod = " where account_firstname like '%$query%' OR account_lastname like "
. "'%$query%' OR account_lid like '%$query%' ";
}
$phpgw->db->query('select count(*) from phpgw_accounts'.$querymethod,__LINE__,__FILE__);
$phpgw->db->next_record();
return $phpgw->db->f(0);
}
$p = CreateObject('phpgwapi.Template',$phpgw->common->get_tpl_dir('admin'));
$p->set_file(array(
@ -24,7 +40,7 @@
'empty_row' => 'accounts_row_empty.tpl'
));
$total = account_total();
$total = account_total($query);
$p->set_var('bg_color',$phpgw_info['theme']['bg_color']);
$p->set_var('th_bg',$phpgw_info['theme']['th_bg']);