示例#1
0
$dateformat = 'd.m.';
$tpl->assign('timeformat', $timeformat);
$tpl->assign('dateformat', $dateformat);
$tpl->display('panel.tpl');
$tpl->assign('timeformat', preg_replace('/([A-Za-z])/', '%$1', $timeformat));
$tpl->assign('dateformat', preg_replace('/([A-Za-z])/', '%$1', $dateformat));
// Get the total amount of time shown in the table.
if (isset($kga['customer'])) {
    $total = formatDuration(get_zef_time($in, $out, null, array($kga['customer']['knd_ID']), null));
} else {
    $total = formatDuration(get_zef_time($in, $out, array($kga['usr']['usr_ID']), null, null));
}
if (isset($kga['customer'])) {
    $arr_zef = xp_get_arr($in, $out, null, array($kga['customer']['knd_ID']));
} else {
    $arr_zef = xp_get_arr($in, $out, array($kga['usr']['usr_ID']));
}
if (count($arr_zef) > 0) {
    $tpl->assign('arr_data', $arr_zef);
} else {
    $tpl->assign('arr_data', 0);
}
$tpl->assign('total', $total);
// Get the annotations for the user sub list.
if (isset($kga['customer'])) {
    $ann = xp_get_arr_usr($in, $out, null, array($kga['customer']['knd_ID']));
} else {
    $ann = xp_get_arr_usr($in, $out, array($kga['usr']['usr_ID']));
}
formatAnnotations($ann);
$tpl->assign('usr_ann', $ann);
示例#2
0
             }
             // add row
             $knd_arr_data[$knd_id][] = $row;
         }
     }
     require 'export_pdf.php';
     break;
     /**
      * Export as a PDF document in a list format.
      */
 /**
  * Export as a PDF document in a list format.
  */
 case 'export_pdf2':
     usr_set_preferences(array('print_comments' => isset($_REQUEST['print_comments']) ? 1 : 0, 'print_summary' => isset($_REQUEST['print_summary']) ? 1 : 0, 'create_bookmarks' => isset($_REQUEST['create_bookmarks']) ? 1 : 0, 'download_pdf' => isset($_REQUEST['download_pdf']) ? 1 : 0, 'customer_new_page' => isset($_REQUEST['customer_new_page']) ? 1 : 0, 'reverse_order' => isset($_REQUEST['reverse_order']) ? 1 : 0, 'pdf_format' => 'export_pdf2'), 'ki_export.pdf.');
     $arr_data = xp_get_arr($in, $out, $filterUsr, $filterKnd, $filterPct, $filterEvt, false, $reverse_order, $default_location, $filter_cleared, $filter_type, false, $filter_refundable);
     // sort data into new array, where first dimension is customer and second dimension is project
     $pdf_arr_data = array();
     foreach ($arr_data as $row) {
         $knd_id = $row['pct_kndID'];
         $pct_id = $row['pct_ID'];
         // create key for customer, if not present
         if (!array_key_exists($knd_id, $pdf_arr_data)) {
             $pdf_arr_data[$knd_id] = array();
         }
         // create key for project, if not present
         if (!array_key_exists($pct_id, $pdf_arr_data[$knd_id])) {
             $pdf_arr_data[$knd_id][$pct_id] = array();
         }
         // add row
         $pdf_arr_data[$knd_id][$pct_id][] = $row;