2 // +----------------------------------------------------------------------+
 
   3 // | Anuko Time Tracker
 
   4 // +----------------------------------------------------------------------+
 
   5 // | Copyright (c) Anuko International Ltd. (https://www.anuko.com)
 
   6 // +----------------------------------------------------------------------+
 
   7 // | LIBERAL FREEWARE LICENSE: This source code document may be used
 
   8 // | by anyone for any purpose, and freely redistributed alone or in
 
   9 // | combination with other software, provided that the license is obeyed.
 
  11 // | There are only two ways to violate the license:
 
  13 // | 1. To redistribute this code in source form, with the copyright
 
  14 // |    notice or license removed or altered. (Distributing in compiled
 
  15 // |    forms without embedded copyright notices is permitted).
 
  17 // | 2. To redistribute modified versions of this code in *any* form
 
  18 // |    that bears insufficient indications that the modifications are
 
  19 // |    not the work of the original author(s).
 
  21 // | This license applies to this document only, not any other software
 
  22 // | that it may be combined with.
 
  24 // +----------------------------------------------------------------------+
 
  26 // | https://www.anuko.com/time_tracker/credits.htm
 
  27 // +----------------------------------------------------------------------+
 
  29 require_once('initialize.php');
 
  30 import('ttGroupHelper');
 
  33 if (!(ttAccessAllowed('update_work') || ttAccessAllowed('bid_on_work')  || ttAccessAllowed('manage_work'))) {
 
  34   header('Location: access_denied.php');
 
  37 if (!$user->isPluginEnabled('wk')) {
 
  38   header('Location: feature_disabled.php');
 
  41 // End of access checks.
 
  43 if($user->can('manage_work')) {
 
  44   // $active_work = ttWorkHelper::getActiveWork(); // Active work items this group is outsourcing.
 
  45   // $inactive_work = ttWorkHelper::getInactiveWork(); // Inactive work items this group was outsourcing.
 
  47 if($user->can('bid_on_work')) {
 
  48   // $available_work = ttWorkHelper::getAvailableWork(); // Currently available work items from other groups.
 
  50 if($user->can('update_work')) {
 
  51   // $in_progress_work = ttWorkHelper::getInProgressWork(); // Work items in progress for other groups.
 
  52   // $completed_work = ttWorkHelper::getCompletedWork(); // Completed work items for other groups.
 
  55 $smarty->assign('active_work', $active_work);
 
  56 $smarty->assign('inactive_work', $inactive_work);
 
  57 $smarty->assign('available_work', $available_work);
 
  58 $smarty->assign('in_progress_work', $in_progress_work);
 
  59 $smarty->assign('completed_work', $completed_work);
 
  60 $smarty->assign('title', $i18n->get('title.work'));
 
  61 $smarty->assign('content_page_name', 'work.tpl');
 
  62 $smarty->display('index.tpl');