Exemplo n.º 1
0
							print "	<td class=\"inner_table_column_heading\" align=\"center\">$currentDayStr</td>\n";
						}
						?>
					</tr>
					<tr>
<?php 
//define the variable dayRow
$dayRow = 0;
// Print last months' days spots.
for ($i = 0; $i < $leadInDays; $i++) {
    //while (($dayRow < $dowForFirstOfMonth) && ($dowForFirstOfMonth != 0)) {
    print "<td width=\"14%\" HEIGHT=\"25%\" class=\"calendar_cell_disabled_middle\">&nbsp;</td>\n ";
    $dayRow++;
}
// Get the Monthly data.
list($num, $qh) = get_time_date($month, $year, $contextUser, $proj_id, $client_id);
$i = 0;
$day = 1;
$tot_sec = 0;
$week_tot_sec = 0;
$day_tot_sec = 0;
while (checkdate($month, $day, $year)) {
    // Reset daily variables;
    $day_tot_sec = 0;
    $last_task_id = -1;
    $last_proj_id = -1;
    $last_client_id = -1;
    // New Week.
    if ($dayRow % 7 == 0 && $dowForFirstOfMonth != 0) {
        print_totals($week_tot_sec, "weekly", $year, $month, $day);
        $week_tot_sec = 0;
Exemplo n.º 2
0
list($proj_title, $proj_client, $proj_description, $proj_deadline, $proj_link) = get_project_info($proj_id);

?>
<HTML>
<BODY BGCOLOR="#FFFFFF">
<B><? echo "$first $last </b><br>$ssn<br><br>$proj_title: $proj_client<br>$proj_description" ?>
<TABLE ALIGN=CENTER BORDER=1 WIDTH="100%">
<TR>
<?

for ($i=$start_date; $i <= $end_date; $i++) {
   $date = jdtogregorian($i);
   $tot_sec = 0; $tot_min = 0; $tot_hor = 0;
   list($day,$month,$year) = explode("/",$date);
   
   list($num, $qh) = get_time_date($i, $id, $proj_id);
   if ($num > 0) {
      print "<TD WIDTH=\"14%\" VALIGN=TOP><tt>$day/$month</tt><br>";
      while (list($start_time,$end_time,$diff,$num_end) = mysql_fetch_row($qh)) {
      	list(,$data_s_time) = explode(' ',$start_time);
      	list(,$data_e_time) = explode(' ',$end_time);
      	list($s_hour,$s_min,$s_sec) = explode(':',$data_s_time);
      	$s_hour = (int) $s_hour;
      	if ($s_hour > 12)
      	   $s_hour -= 12;
      	list($e_hour,$e_min,$e_sec) = explode(':',$data_e_time);
      	$e_hour = (int) $e_hour;
      	if ($e_hour > 12)
      	   $e_hour -= 12;
      	if ($num_end > 0) {
      	   list($diffh, $diffm, $diffs) = explode(':',$diff);