Esempio n. 1
0
/**
 * Get annotations for the task sub list. Currently it's just the time, like
 * in the timesheet extension.
 * 
 * @param int $start Time from which to take entries into account.
 * @param int $end Time until which to take entries into account.
 * @param array $users Array of user IDs to filter by.
 * @param array $customers Array of customer IDs to filter by.
 * @param array $projects Array of project IDs to filter by.
 * @param array $events Array of event IDs to filter by.
 * @return array Array which assigns every taks (via his ID) the data to show.
 */
function xp_get_arr_evt($start, $end, $users = null, $customers = null, $projects = null, $events = null)
{
    $arr = get_arr_time_evt($start, $end, $users, $customers, $projects, $events);
    return $arr;
}
Esempio n. 2
0
function get_arr_evt_with_time($group, $user, $in, $out)
{
    global $kga, $conn;
    $arr_evts = get_arr_evt($group);
    $arr_time = get_arr_time_evt($user, $in, $out);
    $arr = array();
    $i = 0;
    foreach ($arr_evts as $evt) {
        $arr[$i]['evt_ID'] = $evt['evt_ID'];
        $arr[$i]['evt_name'] = $evt['evt_name'];
        $arr[$i]['evt_visible'] = $evt['evt_visible'];
        if (isset($arr_time[$evt['evt_ID']])) {
            $arr[$i]['zeit'] = formatDuration($arr_time[$evt['evt_ID']]);
        } else {
            $arr[$i]['zeit'] = formatDuration(0);
        }
        $i++;
    }
    return $arr;
}
Esempio n. 3
0
}
formatAnnotations($ann);
$tpl->assign('knd_ann', $ann);
// Get the annotations for the project sub list.
if (isset($kga['customer'])) {
    $ann = get_arr_time_pct($in, $out, null, array($kga['customer']['knd_ID']));
} else {
    $ann = get_arr_time_pct($in, $out, array($kga['usr']['usr_ID']));
}
formatAnnotations($ann);
$tpl->assign('pct_ann', $ann);
// Get the annotations for the task sub list.
if (isset($kga['customer'])) {
    $ann = get_arr_time_evt($in, $out, null, array($kga['customer']['knd_ID']));
} else {
    $ann = get_arr_time_evt($in, $out, array($kga['usr']['usr_ID']));
}
formatAnnotations($ann);
$tpl->assign('evt_ann', $ann);
$tpl->assign('zef_display', $tpl->fetch("zef.tpl"));
$tpl->assign('buzzerAction', "startRecord()");
$tpl->assign('browser', get_agent());
// select for projects
if (isset($kga['customer'])) {
    $tpl->assign('sel_pct_names', array());
    $tpl->assign('sel_pct_IDs', array());
} else {
    $sel = makeSelectBox("pct", $kga['usr']['usr_grp']);
    $tpl->assign('sel_pct_names', $sel[0]);
    $tpl->assign('sel_pct_IDs', $sel[1]);
}
Esempio n. 4
0
     if (count($arr_zef) > 0) {
         $tpl->assign('arr_zef', $arr_zef);
     } else {
         $tpl->assign('arr_zef', 0);
     }
     $tpl->assign('total', formatDuration(get_zef_time($in, $out, $filterUsr, $filterKnd, $filterPct, $filterEvt)));
     $ann = get_arr_time_usr($in, $out, $filterUsr, $filterKnd, $filterPct, $filterEvt);
     formatAnnotations($ann);
     $tpl->assign('usr_ann', $ann);
     $ann = get_arr_time_knd($in, $out, $filterUsr, $filterKnd, $filterPct, $filterEvt);
     formatAnnotations($ann);
     $tpl->assign('knd_ann', $ann);
     $ann = get_arr_time_pct($in, $out, $filterUsr, $filterKnd, $filterPct, $filterEvt);
     formatAnnotations($ann);
     $tpl->assign('pct_ann', $ann);
     $ann = get_arr_time_evt($in, $out, $filterUsr, $filterKnd, $filterPct, $filterEvt);
     formatAnnotations($ann);
     $tpl->assign('evt_ann', $ann);
     $tpl->display("zef.tpl");
     break;
     // =========================
     // = add / edit zef record =
     // =========================
 // =========================
 // = add / edit zef record =
 // =========================
 case 'add_edit_record':
     if (isset($kga['customer'])) {
         die;
     }
     $data['pct_ID'] = $_REQUEST['pct_ID'];