<td> </td> </tr> <tr> <td> <span class="label">Clocked On:</span> <? echo $data["formattedStartTime"]; ?> <span class="label">Clocked Off:</span> <? echo $data["formattedEndTime"]; ?> </td> </tr> <tr> <td> <span class="label">Duration:</span> <? echo formatSeconds($data["time"]); ?> </td> </tr> <tr> <td valign="top" align="left"> <span class="label">Log Message:</span> <? echo $data["log_message"]; ?> </td> <tr> </table> </td> </tr> <?php } ?>
?> </td> </tr> <tr> <td><?php echo $data["description"]; ?><br></td> <td valign="top" align="right"><span class="label">Client:</span> <?php echo $data["organisation"]; ?></td> </tr> <tr> <td colspan="2" width="100%"> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="70%"> <table border="0" cellpadding="0" cellspacing="0"> <tr> <td> <span class="label">Total time:</span> <?php echo (isset($bill_data["total_time"]) ? formatSeconds($bill_data["total_time"]): "0h 0m"); ?> <? if ($authenticationManager->hasClearance(CLEARANCE_ADMINISTRATOR)) { ?> <br><span class="label">Total bill:</span> <b>$<?php echo (isset($bill_data["billed"]) ? $bill_data["billed"]: "0.00"); ?></b> <? } ?> </td> </tr> <tr><td> </td></tr> <?php //display project leader print "<tr><td><span class=\"label\">Project Leader:</span> $data[proj_leader] </td></tr>"; //display assigned users list($qh2, $num_workers) = dbQuery("select distinct username from $ASSIGNMENTS_TABLE where proj_id = $data[proj_id]");
</h4> <?php if (is_array($users)) { ?> <ol class='sidebar-list'> <?php foreach ($users as $id => $user) { $id = is_object($user) ? $user->id : $id; $user = is_object($user) ? get_object_vars($user) : $user; ?> <?php if (formatSeconds($user['bestlap']) != '--:--:--') { ?> <li><a href='<?php echo $this->url->create('users/id/' . $id); ?> '><?php echo $user['acronym']; ?> </a>: <i class="fa fa-flag fa-1x"></i> <?php echo formatSeconds($user['bestlap']); ?> </i></li> <?php } } } ?> </ol>
<br></td> <td valign="top" align="right"><span class="label">Client:</span> <?php echo $data["organisation"]; ?> </td> </tr> <tr> <td colspan="3" width="100%"> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="70%"> <table border="0" cellpadding="0" cellspacing="0"> <tr> <td> <span class="label">Total time:</span> <?php echo isset($bill_data["total_time"]) ? formatSeconds($bill_data["total_time"]) : "0h 0m"; ?> <br> <span class="label">Total bill:</span> <b>$<?php echo isset($bill_data["billed"]) ? $bill_data["billed"] : "0.00"; ?> </b> </td> </tr> <tr><td> </td></tr> <?php //display project leader print "<tr><td><span class=\"label\">Project Leader:</span> {$data['proj_leader']} </td></tr>"; //display assigned users
function print_totals($seconds, $type = "", $year, $month, $day) { //minus a week from the date given so we link to the start of that week $passedDate = mktime(0, 0, 0, $month, $day, $year); $passedDate -= A_DAY * 7; $year = date("Y", $passedDate); $month = date("n", $passedDate); $day = date("j", $passedDate); // Called from calendar.php to print out a line summing the hours worked in the past // week. index.phtml must set all global variables. global $BREAK_RATIO, $client_id, $proj_id, $task_id; print "</tr><tr>\n"; if ($BREAK_RATIO > 0) { print "<td align=\"left\" colspan=\"3\">"; $break_sec = floor($BREAK_RATIO * $seconds); $seconds -= $break_sec; print "<font size=\"-1\">Break time: <font color=\"red\">" . formatSeconds($break_sec); print "</font></font></td><td align=\"right\" colspan=\"4\">"; } else { print "<td align=\"right\" colspan=\"7\" class=\"calendar_totals_line_{$type}\">"; } if ($type == "monthly") { print "Monthly total: "; } else { print "<a href=\"weekly.php?client_id={$client_id}&proj_id={$proj_id}&task_id={$task_id}&year={$year}&month={$month}&day={$day}\">Weekly Total: </a>"; } print "<span class=\"calendar_total_value_{$type}\">" . formatSeconds($seconds) . "</span></td>\n"; }
print "<td class=\"calendar_cell_disabled_middle\" align=\"right\">Total Hours:</td>\n"; print "<td class=\"calendar_cell_disabled_middle\" width=\"2\"> </td>\n"; //iterate through day totals for all tasks $grandTotal = 0; $col = 0; foreach ($allTasksDayTotals as $currentAllTasksDayTotal) { $col++; $grandTotal += $currentAllTasksDayTotal; $formattedTotal = formatSeconds($currentAllTasksDayTotal); print "<td class=\"calendar_totals_line_weekly_right\" align=\"right\">\n"; print "<span class=\"calendar_total_value_weekly\" id=\"subtotal_col" . $col . "\">$formattedTotal</span></td>"; } //print grand total $formattedGrandTotal = formatSeconds($grandTotal); print "<td class=\"calendar_cell_disabled_middle\" width=\"2\"> </td>\n"; print "<td class=\"calendar_totals_line_monthly\" align=\"right\">\n"; print "<span class=\"calendar_total_value_monthly\" id=\"grand_total\">$formattedGrandTotal</span></td>"; print "</tr>"; ?> </table> </td> </tr> </table> <!-- include the timesheet face up until the end --> <? include("timesheet_face_part_3.inc"); ?>
<h4 class='xp'><i class="fa fa-trophy fa-2x gold"></i> <?php echo $user->xp; ?> </h4> <?php $bestlap = $user->bestlap ? formatSeconds($user->bestlap) : '--:--:--'; $numlaps = $user->numlaps ? $user->numlaps : '0'; ?> <h4 id='show-best-lap' title='The fastest lap in Volvo S90 test Drive game'><i class="fa fa-flag fa-1x"></i> <?php echo $bestlap; ?> </h4> <h4 id='show-num-laps' title='Number of laps completed in Volvo S90 test Drive game'><i class="fa fa-road fa-1x"></i> <?php echo $numlaps; ?> </h4>
} else { print "<td class=\"calendar_cell_middle\" align=\"right\">$data[start]</td>\n"; print "<td class=\"calendar_cell_middle\" align=\"right\"> </td>\n"; print "<td class=\"calendar_cell_middle\" align=\"right\"> </td>\n"; print "<td class=\"calendar_cell_disabled_right\" align=\"right\">\n"; print " <a href=\"javascript:delete_entry($data[trans_num]);\" class=\"action_link\">Delete</a>\n"; print "</td>"; } print "</tr>"; } print "<tr>\n"; print " <td class=\"calendar_totals_line_weekly_right\" colspan=\"5\" align=\"right\">"; print " Daily Total: <span class=\"calendar_total_value_weekly\">" . formatSeconds($today_total_sec) . "</span></td>\n"; print " <td class=\"calendar_cell_disabled_right\" align=\"right\"> </td>\n"; print "</tr>\n"; print "</table>"; } ?> </td> </tr> </table> <!-- include the timesheet face up until the end --> <? include("timesheet_face_part_3.inc"); ?> </td>