Beispiel #1
0
         //echo "<td id='duration{$task->id}'><em><div id='duration{$task->id}'>".format_seconds($duration)."</div></em></td>";
         echo "<td id='duration{$task->id}'>" . format_seconds($duration) . "</td>";
     } else {
         $duration = $enddate - $startdate;
         $a = $duration % $billing[-1]['customerperiod'];
         $duration += $billing[-1]['customerperiod'] - $a;
         echo "<td>" . format_date_friendly($enddate) . "</td>";
         echo "<td>" . format_seconds($duration) . "</td>";
         $closedduration += $duration;
         $temparray['owner'] = $task->owner;
         $temparray['starttime'] = $startdate;
         $temparray['duration'] = $duration;
         $billing[$task->owner][] = $temparray;
     }
     $totalduration += $duration;
     echo "<td>" . format_date_friendly($lastupdated) . "</td>";
 }
 if ($show == 'completed') {
     echo "<td>";
     if ($enddate > 0) {
         echo ldate($CONFIG['dateformat_date'], $enddate);
     }
     echo "</td>";
 }
 if ($mode == 'incident' or $show == 'incidents') {
     echo "<td>" . user_realname($task->owner) . "</td>";
     if ($task->owner == $sit[2] and $enddate == '0') {
         $engineerhasrunnintask = TRUE;
     }
 }
 if ($mode == 'incident' and $enddate == '0') {
         $v = substr($notice->text, 1);
         echo $GLOBALS[$v];
     } else {
         echo $notice->text;
     }
     if (!empty($notice->link)) {
         echo " - <a href='{$notice->link}'>";
         if (substr($notice->linktext, 0, 3) == 'str') {
             echo $GLOBALS[$notice->linktext];
         } else {
             echo $notice->linktext;
         }
         echo "</a>";
     }
     echo "<small>";
     echo "<em> (" . format_date_friendly(strtotime($notice->timestamp)) . ")</em>";
     echo "</small></p></div>\n";
 }
 if (mysql_num_rows($noticeresult) > 1) {
     //fix the GET keys to stop breaking urls
     $keys = array_keys($_GET);
     $file = $_SERVER[PHP_SELF];
     $end = "noticeaction=dismiss_notice&amp;noticeid=all";
     foreach ($keys as $key) {
         if ($key != 'sit' and $key != 'SiTsessionID') {
             //$url[]= "{$key}=".$_REQUEST[$key];
             $link .= $key . "=" . strip_tags($_REQUEST[$key]) . "&amp;";
         }
     }
     $alink = $file . "?" . $link . $end;
     //echo "<p id='dismissall'><a href='{$alink}'>{$strDismissAll}</a></p>";
 if (mysql_num_rows($iresult) > 0) {
     $csv .= "<tr><td colspan='{$colspan}'>";
     $csv .= "<table width='100%'><th>{$strID}</th><th>{$strTitle}</th><th>{$strContact}</th><th>{$strSkill}</th><th>{$strStatus}</th>";
     $csv .= "<th>{$strEngineer}</th><th>{$strOpened}</th><th>{$strClosed}</th><th>{$strDuration}</th><th>{$strSLA}</th></tr>";
     $shade1 = 'shade1';
     while ($obj = mysql_fetch_object($iresult)) {
         $csv .= "<tr class='{$shade1}'>";
         $csv .= "<td>{$obj->id}</td><td>{$obj->title}</td>";
         $csv .= "<td>{$obj->forenames} {$obj->surname}</td>";
         $csv .= "<td>" . software_name($obj->softwareid) . "</td>";
         $csv .= "<td>" . incidentstatus_name($obj->status) . "</td>";
         $csv .= "<td>" . user_realname($obj->owner) . "</td>";
         $csv .= "<td>" . format_date_friendly($obj->opened) . "</td>";
         $csv .= "<td>";
         if ($obj->closed > 0) {
             $csv .= format_date_friendly($obj->closed);
         } else {
             $csv .= $strCurrentlyOpen;
         }
         $csv .= "</td>";
         $csv .= "<td>";
         if ($obj->closed > 0) {
             $csv .= format_workday_minutes($obj->closed - $obj->opened);
         }
         $csv .= "</td>";
         $csv .= "<td>{$obj->servicelevel}</td>";
         $csv .= "</tr>";
         if ($shade1 == 'shade1') {
             $shade1 = 'shade2';
         } else {
             $shade1 = 'shade1';