Location: PHPKode > projects > Work Tracker > work-tracker-0.1/modules/reports/tech.reports.php
<?php
/* $Id: tech.reports.php,v 1.2 2006/01/27 22:52:53 rschilling Exp $ */

if (eregi(basename(__FILE__),$_SERVER['PHP_SELF'])) {
  print "Direct module access forbidden.";
  exit;
}

if (!is_manager()) {
  redirect();
}

$fields = array(
  "assigned_to" => "Technician Assigned",
  "opened_by"   => "Work Item Owner (Opened By)",
  "opened"      => "Time Opened",
  "closed"      => "Time Closed",
  "modified"    => "Last Modified",
  "status"      => "Work Item Status",
  "category"    => "Work Item Category",
  "product"     => "Work Item Product",
  "severity"    => "Work Item Severity",
  "problem"     => "Work Item Problem"
);

$options = array(
  "avgclose"    => "Average Resolution Time",
  "maxclose"    => "Maximum Resolution Time",
  "avgfirst"    => "Average Time for First Response",
  "maxfirst"    => "Maximum Time for First Response",
  "percat"      => "Work Items Per Category",
  "perstat"     => "Work Items Per Status",
  "perprod"     => "Work Items Per Product",
  "persev"      => "Work Items Per Severity",
  "opened"      => "Number of Work Items Opened",
  "resolved"    => "Number of Work Items Resolved",
  "numevents"   => "Number of Events Entered",
  "numhours"    => "Number of Hours Logged"
);
  
$sql  = "SELECT userid,username ";
$sql .= "FROM users ";
$sql .= "ORDER BY username";
$users = $dbi->fetch_all($sql,"array");
$smarty->assign('users',$users);
$smarty->assign('fields',$fields);
$smarty->assign('options',$options);
$smarty->display("reports/tech.tpl");
?>
Return current item: Work Tracker