return $result;
}
- // The getInactiveClients returns an array of inactive clients for a group.
- static function getInactiveClients($group_id, $all_fields = false)
- {
- $result = array();
- $mdb2 = getConnection();
-
- if ($all_fields)
- $sql = "select * from tt_clients where group_id = $group_id and status = 0 order by upper(name)";
- else
- $sql = "select id, name from tt_clients where group_id = $group_id and status = 0 order by upper(name)";
-
- $res = $mdb2->query($sql);
- $result = array();
- if (!is_a($res, 'PEAR_Error')) {
- while ($val = $res->fetchRow()) {
- $result[] = $val;
- }
- }
- return $result;
- }
-
// The getAllClients obtains all clients in a group.
static function getAllClients($group_id, $all_fields = false) {
$mdb2 = getConnection();
<br>
<table cellspacing="0" cellpadding="4" width="100%" border="0">
<tr>
- <td align="center"> Anuko Time Tracker 1.18.29.4559 | Copyright © <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+ <td align="center"> Anuko Time Tracker 1.18.29.4560 | Copyright © <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
<a href="https://www.anuko.com/lp/tt_4.htm" target="_blank">{$i18n.footer.credits}</a> |
<a href="https://www.anuko.com/lp/tt_5.htm" target="_blank">{$i18n.footer.license}</a> |
<a href="https://www.anuko.com/lp/tt_7.htm" target="_blank">{$i18n.footer.improve}</a>
require_once('initialize.php');
import('form.Form');
import('ttTeamHelper');
+import('ttGroupHelper');
import('DateAndTime');
import('ttExpenseHelper');
// Dropdown for clients in MODE_TIME. Use all active clients.
if (MODE_TIME == $user->tracking_mode && $user->isPluginEnabled('cl')) {
- $active_clients = ttTeamHelper::getActiveClients($user->group_id, true);
+ $active_clients = ttGroupHelper::getActiveClients(true);
$form->addInput(array('type'=>'combobox',
'onchange'=>'fillProjectDropdown(this.value);',
'name'=>'client',
// Dropdown for clients if the clients plugin is enabled.
if ($user->isPluginEnabled('cl')) {
- $active_clients = ttTeamHelper::getActiveClients($user->group_id, true);
+ $active_clients = ttGroupHelper::getActiveClients(true);
// We need an array of assigned project ids to do some trimming.
foreach($project_list as $project)
$projects_assigned_to_user[] = $project['id'];
import('form.Form');
import('ttUserHelper');
import('ttTeamHelper');
+import('ttGroupHelper');
import('DateAndTime');
import('ttExpenseHelper');
// Dropdown for clients in MODE_TIME. Use all active clients.
if (MODE_TIME == $user->tracking_mode && $user->isPluginEnabled('cl')) {
- $active_clients = ttTeamHelper::getActiveClients($user->group_id, true);
+ $active_clients = ttGroupHelper::getActiveClients(true);
$form->addInput(array('type'=>'combobox',
'onchange'=>'fillProjectDropdown(this.value);',
'name'=>'client',
// Dropdown for clients if the clients plugin is enabled.
if ($user->isPluginEnabled('cl')) {
- $active_clients = ttTeamHelper::getActiveClients($user->group_id, true);
+ $active_clients = ttGroupHelper::getActiveClients(true);
// We need an array of assigned project ids to do some trimming.
foreach($project_list as $project)
$projects_assigned_to_user[] = $project['id'];
require_once('initialize.php');
import('form.Form');
import('ttTeamHelper');
+import('ttGroupHelper');
import('ttInvoiceHelper');
// Access checks.
// Dropdown for clients if the clients plugin is enabled.
if ($user->isPluginEnabled('cl')) {
- $clients = ttTeamHelper::getActiveClients($user->group_id);
+ $clients = ttGroupHelper::getActiveClients();
$form->addInput(array('type'=>'combobox','name'=>'client','style'=>'width: 250px;','data'=>$clients,'datakeys'=>array('id','name'),'value'=>$cl_client,'empty'=>array(''=>$i18n->get('dropdown.select'))));
}
// Dropdown for projects.
require_once('../initialize.php');
import('form.Form');
-import('ttTeamHelper');
+import('ttGroupHelper');
// Access checks.
if (!(ttAccessAllowed('view_own_clients') || ttAccessAllowed('manage_clients'))) {
// End of access checks.
if($user->can('manage_clients')) {
- $active_clients = ttTeamHelper::getActiveClients($user->group_id, true);
- $inactive_clients = ttTeamHelper::getInactiveClients($user->group_id, true);
+ $active_clients = ttGroupHelper::getActiveClients(true);
+ $inactive_clients = ttGroupHelper::getInactiveClients(true);
} else
$active_clients = $user->getAssignedClients();