}
return $user_list;
}
+
+ // getActiveTasks - returns an array of active tasks for a group.
+ static function getActiveTasks()
+ {
+ global $user;
+ $mdb2 = getConnection();
+
+ $group_id = $user->getGroup();
+ $org_id = $user->org_id;
+
+ $sql = "select id, name, description from tt_tasks".
+ " where group_id = $group_id and org_id = $org_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;
+ }
}
return false;
}
- // getActiveTasks - returns an array of active tasks for a group.
- static function getActiveTasks($group_id)
- {
- $result = array();
- $mdb2 = getConnection();
-
- $sql = "select id, name, description from tt_tasks 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;
- }
-
// getInactiveTasks - returns an array of inactive tasks for a group.
static function getInactiveTasks($group_id)
{
<br>
<table cellspacing="0" cellpadding="4" width="100%" border="0">
<tr>
- <td align="center"> Anuko Time Tracker 1.18.29.4620 | Copyright © <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+ <td align="center"> Anuko Time Tracker 1.18.29.4621 | 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('ttProjectHelper');
-import('ttTeamHelper');
import('ttGroupHelper');
// Access checks.
foreach ($users as $user_item)
$all_users[$user_item['id']] = $user_item['name'];
-$tasks = ttTeamHelper::getActiveTasks($user->group_id);
+$tasks = ttGroupHelper::getActiveTasks();
foreach ($tasks as $task_item)
$all_tasks[$task_item['id']] = $task_item['name'];
require_once('../initialize.php');
import('form.Form');
import('ttProjectHelper');
-import('ttTeamHelper');
import('ttGroupHelper');
// Access checks.
foreach ($users as $user_item)
$all_users[$user_item['id']] = $user_item['name'];
-$tasks = ttTeamHelper::getActiveTasks($user->group_id);
+$tasks = ttGroupHelper::getActiveTasks();
foreach ($tasks as $task_item)
$all_tasks[$task_item['id']] = $task_item['name'];
require_once('../initialize.php');
import('form.Form');
import('ttTeamHelper');
+import('ttGroupHelper');
// Access checks.
if (!(ttAccessAllowed('view_own_tasks') || ttAccessAllowed('manage_tasks'))) {
// End of access checks.
if($user->can('manage_tasks')) {
- $active_tasks = ttTeamHelper::getActiveTasks($user->getGroup());
+ $active_tasks = ttGroupHelper::getActiveTasks();
$inactive_tasks = ttTeamHelper::getInactiveTasks($user->getGroup());
} else
$active_tasks = $user->getAssignedTasks();
require_once('../initialize.php');
import('form.Form');
import('ttUserHelper');
-import('ttTeamHelper');
import('ttGroupHelper');
import('ttClientHelper');
import('ttTimeHelper');
}
if (MODE_PROJECTS_AND_TASKS == $user->tracking_mode) {
- $task_list = ttTeamHelper::getActiveTasks($user->group_id);
+ $task_list = ttGroupHelper::getActiveTasks();
$form->addInput(array('type'=>'combobox',
'name'=>'task',
'style'=>'width: 250px;',
require_once('../initialize.php');
import('form.Form');
import('ttUserHelper');
-import('ttTeamHelper');
import('ttGroupHelper');
import('ttClientHelper');
import('ttTimeHelper');
}
if (MODE_PROJECTS_AND_TASKS == $user->tracking_mode) {
- $task_list = ttTeamHelper::getActiveTasks($user->group_id);
+ $task_list = ttGroupHelper::getActiveTasks();
$form->addInput(array('type'=>'combobox',
'name'=>'task',
'style'=>'width: 250px;',
require_once('../initialize.php');
import('form.Form');
import('ttUserHelper');
-import('ttTeamHelper');
import('ttGroupHelper');
import('ttClientHelper');
import('ttTimeHelper');
}
if (MODE_PROJECTS_AND_TASKS == $user->tracking_mode) {
- $task_list = ttTeamHelper::getActiveTasks($user->group_id);
+ $task_list = ttGroupHelper::getActiveTasks();
$form->addInput(array('type'=>'combobox',
'name'=>'task',
'style'=>'width: 250px;',
require_once('initialize.php');
import('form.Form');
import('ttProjectHelper');
-import('ttTeamHelper');
import('ttGroupHelper');
// Access checks.
foreach ($users as $user_item)
$all_users[$user_item['id']] = $user_item['name'];
-$tasks = ttTeamHelper::getActiveTasks($user->getGroup());
+$tasks = ttGroupHelper::getActiveTasks();
foreach ($tasks as $task_item)
$all_tasks[$task_item['id']] = $task_item['name'];
require_once('initialize.php');
import('form.Form');
import('ttProjectHelper');
-import('ttTeamHelper');
import('ttGroupHelper');
// Access checks.
foreach ($users as $user_item)
$all_users[$user_item['id']] = $user_item['name'];
-$tasks = ttTeamHelper::getActiveTasks($user->getGroup());
+$tasks = ttGroupHelper::getActiveTasks();
foreach ($tasks as $task_item)
$all_tasks[$task_item['id']] = $task_item['name'];
import('form.ActionForm');
import('DateAndTime');
import('ttTeamHelper');
+import('ttGroupHelper');
import('Period');
import('ttProjectHelper');
import('ttFavReportHelper');
'datakeys'=>array('id','name'),
'empty'=>array(''=>$i18n->get('dropdown.all'))));
if (MODE_PROJECTS_AND_TASKS == $user->tracking_mode) {
- $task_list = ttTeamHelper::getActiveTasks($user->group_id);
+ $task_list = ttGroupHelper::getActiveTasks();
$form->addInput(array('type'=>'combobox',
'name'=>'task',
'style'=>'width: 250px;',
require_once('initialize.php');
import('form.Form');
import('ttTeamHelper');
+import('ttGroupHelper');
// Access checks.
if (!(ttAccessAllowed('view_own_tasks') || ttAccessAllowed('manage_tasks'))) {
}
if($user->can('manage_tasks')) {
- $active_tasks = ttTeamHelper::getActiveTasks($group_id);
+ $active_tasks = ttGroupHelper::getActiveTasks();
$inactive_tasks = ttTeamHelper::getInactiveTasks($group_id);
} else
$active_tasks = $user->getAssignedTasks();
import('form.Form');
import('ttUserHelper');
import('ttGroupHelper');
-import('ttTeamHelper');
import('ttClientHelper');
import('ttTimeHelper');
import('DateAndTime');
}
if (MODE_PROJECTS_AND_TASKS == $user->getTrackingMode()) {
- $task_list = ttTeamHelper::getActiveTasks($group_id);
+ $task_list = ttGroupHelper::getActiveTasks();
$form->addInput(array('type'=>'combobox',
'name'=>'task',
'style'=>'width: 250px;',
require_once('initialize.php');
import('form.Form');
import('ttUserHelper');
-import('ttTeamHelper');
import('ttGroupHelper');
import('ttClientHelper');
import('ttTimeHelper');
}
if (MODE_PROJECTS_AND_TASKS == $user->tracking_mode) {
- $task_list = ttTeamHelper::getActiveTasks($user->group_id);
+ $task_list = ttGroupHelper::getActiveTasks();
$form->addInput(array('type'=>'combobox',
'name'=>'task',
'style'=>'width: 250px;',
import('form.Table');
import('form.TextField');
import('ttUserHelper');
-import('ttTeamHelper');
import('ttGroupHelper');
import('ttWeekViewHelper');
import('ttClientHelper');
}
if (MODE_PROJECTS_AND_TASKS == $user->tracking_mode) {
- $task_list = ttTeamHelper::getActiveTasks($user->group_id);
+ $task_list = ttGroupHelper::getActiveTasks();
$form->addInput(array('type'=>'combobox',
'name'=>'task',
'style'=>'width: 250px;',