2001-09-02 01:32:40 +02:00
|
|
|
<?php
|
|
|
|
/**************************************************************************\
|
|
|
|
* phpGroupWare - account administration *
|
|
|
|
* http://www.phpgroupware.org *
|
|
|
|
* -------------------------------------------- *
|
|
|
|
* This program is free software; you can redistribute it and/or modify it *
|
|
|
|
* under the terms of the GNU General Public License as published by the *
|
|
|
|
* Free Software Foundation; either version 2 of the License, or (at your *
|
|
|
|
* option) any later version. *
|
|
|
|
\**************************************************************************/
|
|
|
|
|
|
|
|
class soaccounts
|
|
|
|
{
|
|
|
|
|
|
|
|
function soaccounts()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2001-09-02 09:30:25 +02:00
|
|
|
function account_total($account_type,$query='')
|
2001-09-02 01:32:40 +02:00
|
|
|
{
|
|
|
|
if ($query)
|
|
|
|
{
|
|
|
|
$querymethod = " AND (account_firstname LIKE '%$query%' OR account_lastname LIKE "
|
|
|
|
. "'%$query%' OR account_lid LIKE '%$query%') ";
|
|
|
|
}
|
|
|
|
|
2001-09-02 09:30:25 +02:00
|
|
|
$GLOBALS['phpgw']->db->query("SELECT COUNT(*) FROM phpgw_accounts WHERE account_type='".$account_type."'".$querymethod,__LINE__,__FILE__);
|
2001-09-02 01:32:40 +02:00
|
|
|
$GLOBALS['phpgw']->db->next_record();
|
|
|
|
|
|
|
|
return $GLOBALS['phpgw']->db->f(0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
?>
|