return $result;
}
- // The getActiveClients returns an array of active clients for a group.
- static function getActiveClients($group_id, $all_fields = false)
- {
- $result = array();
- $mdb2 = getConnection();
-
- if ($all_fields)
- $sql = "select * from tt_clients where group_id = $group_id and status = 1 order by upper(name)";
- else
- $sql = "select id, name from tt_clients where group_id = $group_id and status = 1 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.4560 | Copyright © <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+ <td align="center"> Anuko Time Tracker 1.18.29.4561 | 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'];
import('form.Form');
import('ttUserHelper');
import('ttTeamHelper');
+import('ttGroupHelper');
import('ttClientHelper');
import('ttTimeHelper');
import('DateAndTime');
// 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('ttClientHelper');
import('ttTimeHelper');
import('DateAndTime');
// 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('ttClientHelper');
import('ttTimeHelper');
import('DateAndTime');
// 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('ttUserHelper');
import('form.Table');
import('form.TableColumn');
@include('../plugins/limit/user_add.php');
if ($user->isPluginEnabled('cl'))
- $clients = ttTeamHelper::getActiveClients($user->group_id);
+ $clients = ttGroupHelper::getActiveClients();
$assigned_projects = array();
if ($request->isPost()) {
import('form.Form');
import('ttProjectHelper');
import('ttTeamHelper');
+import('ttGroupHelper');
import('ttUserHelper');
import('form.Table');
import('form.TableColumn');
// End of access checks.
if ($user->isPluginEnabled('cl'))
- $clients = ttTeamHelper::getActiveClients($user->group_id);
+ $clients = ttGroupHelper::getActiveClients();
$projects = ttTeamHelper::getActiveProjects($user->group_id);
$assigned_projects = array();
// Dropdown for clients in MODE_TIME. Use all active clients.
if (MODE_TIME == $user->getTrackingMode() && $user->isPluginEnabled('cl')) {
- $active_clients = ttTeamHelper::getActiveClients($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($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('ttClientHelper');
import('ttTimeHelper');
import('DateAndTime');
// 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('ttUserHelper');
import('form.Table');
import('form.TableColumn');
@include('plugins/limit/user_add.php');
if ($user->isPluginEnabled('cl'))
- $clients = ttTeamHelper::getActiveClients($user->getGroup());
+ $clients = ttGroupHelper::getActiveClients();
$assigned_projects = array();
if ($request->isPost()) {
import('form.Form');
import('ttProjectHelper');
import('ttTeamHelper');
+import('ttGroupHelper');
import('ttUserHelper');
import('form.Table');
import('form.TableColumn');
// End of access checks.
if ($user->isPluginEnabled('cl'))
- $clients = ttTeamHelper::getActiveClients($user->getGroup());
+ $clients = ttGroupHelper::getActiveClients();
$projects = ttTeamHelper::getActiveProjects($user->getGroup());
$assigned_projects = array();
import('form.TextField');
import('ttUserHelper');
import('ttTeamHelper');
+import('ttGroupHelper');
import('ttWeekViewHelper');
import('ttClientHelper');
import('ttTimeHelper');
// 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'];