include "dropdowns/inc_data_contacts_name.php"; print "</td></tr>"; } elseif ($message_from_name != "") { print "<tr><td><strong>From</strong></td><td>" . $message_from_name; if ($message_from_company != "") { print "<br />" . $message_from_company; } print "</td></tr>"; } if ($message_from_number > 0) { print "<tr><td><strong>Telephone</strong></td><td>{$message_from_number}</td></tr>"; } print "<tr><td><strong>Message Details</strong></td><td>" . $message_text . "</td></tr>"; print "<tr><td><strong>Message Viewed</strong></td><td>"; if ($message_viewed > 0) { print TimeFormatDetailed($message_viewed); } else { print "No"; } print "</td></tr>"; print "<tr><td><strong>Message For</strong></td><td>"; $data_user_id = $message_for_user; include "dropdowns/inc_data_user_name.php"; print "</td></tr>"; print "<tr><td><strong>Message Taken By</strong></td><td>"; $data_user_id = $message_taken; include "dropdowns/inc_data_user_name.php"; print "</td></tr>"; print "</table>"; } else { print "<p>The telephone message you have requested does not exist.</p>";
$answer_weighting = "not specified"; } if ($answer_time_edited > 0) { $time_edited = ", last updated: " . TimeFormatDetailed($answer_time_edited); } else { unset($time_edited); } if ($answer_id_edited > 0) { $person_edited = ", by " . $user_name_first . " " . $user_name_second; } else { unset($person_edited); } echo "<h3>Word count: {$answer_wordcount}, allowed: {$answer_words}, weighting: " . $answer_weighting . $time_edited . $person_edited . "</h3>"; echo "<hr />"; $counter++; } if ($word_count_total > 0) { echo "<h2>Total Word Count: " . number_format($word_count_total) . "</h2>"; } if (mysql_num_rows($result) == 0) { $sql = "SELECT * FROM intranet_tender WHERE tender_id = '{$_GET['tender_id']}' LIMIT 1"; $result = mysql_query($sql, $conn) or die(mysql_error()); $array = mysql_fetch_array($result); $tender_id = $array['tender_id']; $tender_name = $array['tender_name']; $tender_date = $array['tender_date']; echo "<h1>{$tender_name}</h1>"; echo "<h2>" . TimeFormatDetailed($tender_date) . "</h2>"; echo "<p>There are currently no responses on the system.</p>"; } echo "</body>";
echo "<tr><td><a href=\"index2.php?page=timesheet_expense_view&ts_expense_id={$ts_expense_id}\">" . $ts_expense_desc . " [" . $ts_expense_id . "]</a><td>" . MoneyFormat($ts_expense_vat) . "</td></td><td>{$user_initials}</td></tr>"; } print "</table>"; } // Expenses verified today $sql_expense = "SELECT ts_expense_verified FROM intranet_timesheet_expense WHERE ts_expense_verified BETWEEN '{$startday}' AND '{$endday}' ORDER BY ts_expense_verified"; $result_expense = mysql_query($sql_expense, $conn) or die(mysql_error()); if (mysql_num_rows($result_expense) > 0 and $user_usertype_current > 3) { print "<h2>Expenses Verified Today</h2>"; print "<table summary=\"Expenses verified on " . TimeFormat($time) . "\">"; $list1 = 0; $count = 1; while ($array_expense = mysql_fetch_array($result_expense)) { $ts_expense_verified = $array_expense['ts_expense_verified']; if ($ts_expense_verified != $list1) { print "<tr><td><a href=\"index2.php?page=timesheet_expense_list_verified&time={$ts_expense_verified}\">Group {$count}: " . TimeFormatDetailed($ts_expense_verified) . "</a> <a href=\"pdf_expense_verified_list.php?time={$ts_expense_verified}\"><img src=\"images/button_pdf.png\" alt=\"PDF Output\" /></a></td></tr>"; $list1 = $ts_expense_verified; $count++; } } print "</table>"; } // Drawings issued today $sql_drawings = "SELECT set_id, set_project, set_date, set_reason, proj_id, proj_num, proj_name FROM intranet_drawings_issued_set, intranet_projects WHERE set_date BETWEEN '{$startday}' AND '{$endday}' AND set_project = proj_id ORDER BY set_date DESC, proj_num"; $result_drawings = mysql_query($sql_drawings, $conn) or die(mysql_error()); if (mysql_num_rows($result_drawings) > 0) { print "<h2>Drawings Issued</h2>"; print "<table summary=\"Drawings issued on " . TimeFormat($time) . "\">"; while ($array_drawings = mysql_fetch_array($result_drawings)) { $proj_id = $array_drawings['proj_id']; $proj_num = $array_drawings['proj_num'];
$tplidx = $pdf->ImportPage(1); $pdf->addPage(); $pdf->useTemplate($tplidx); $pdf->SetAutoPageBreak(0, 1.5); $pdf->AddFont($format_font, '', $format_font_2); // Page headers $project_counter = 1; $page_count = 1; $pdf->SetY(35); $pdf->SetFont('Helvetica', 'b', 24); $pdf->SetTextColor($format_bg_r, $format_bg_g, $format_bg_b); $pdf->Cell(0, 10, "Timesheet Analysis"); $pdf->SetTextColor(0, 0, 0); $pdf->SetY(50); $pdf->SetFont('Helvetica', 'b', 18); $print_title = "Generated " . TimeFormatDetailed(time()); $print_envelope = "Timesheet Datum: " . TimeFormat($settings_timesheetstart); $pdf->SetFillColor(220, 220, 220); $pdf->MultiCell(0, 8, $print_title, 0, L, 0); $pdf->SetFont('Helvetica', 'b', 12); $pdf->MultiCell(0, 5, $print_envelope, 0, L, 0); $pdf->MultiCell(0, 5, $print_profit_text, 0, L, 0); $pdf->Cell(0, 5, '', 0, 2); $pdf->SetFont($format_font, '', 10); $pdf->SetTextColor(0, 0, 0); // Array through the projects and fee stages $bar_width_standard = 130; $effectively_zero = 0.1; // Sets the minimum bar size if the quantity is zero $page_number = 0; $complete_profit_total = 0;
$sql = "SELECT DISTINCT ts_expense_verified FROM intranet_timesheet_expense WHERE ts_expense_verified > 0 ORDER BY ts_expense_verified"; $result = mysql_query($sql, $conn) or die(mysql_error()); if (mysql_num_rows($result) > 0) { $counter = 1; $proj_id_current == NULL; $expense_total = 0; print "<table summary=\"List of expenses for all projects\">"; $cola = 1; $colb = 1; while ($array = mysql_fetch_array($result)) { if ($cola == 1) { echo "<tr>"; $cola = 2; } else { $cola = 1; } $ts_expense_verified = $array['ts_expense_verified']; echo "<td><a href=\"index2.php?page=timesheet_expense_list_verified&time={$ts_expense_verified}\">" . TimeFormatDetailed($ts_expense_verified) . "</a> <a href=\"" . $pref_location . "/pdf_expense_verified_list.php?time={$ts_expense_verified}\"><img src=\"images/button_pdf.png\" alt=\"Export as PDF\" /></a></td>"; if ($colb == 2) { echo "</tr>"; $colb = 1; } else { $colb = 2; } } } else { print "<p>There are no expenses that fit this criteria.</p>"; } print "</table>"; print "</form>"; }
$result6 = mysql_query($sql6, $conn) or die(mysql_error()); $tenders_soon = mysql_num_rows($result6); if ($tenders_soon > 1) { $tenders_soon = $tenders_soon . " tenders "; } else { $tenders_soon = $tenders_soon . " tender "; } if (mysql_num_rows($result6) > 0) { $outstanding_tender = "<p>{$tenders_soon} due within the next {$weeks} weeks:</p><p>"; while ($array6 = mysql_fetch_array($result6)) { $tender_id = $array6['tender_id']; $tender_name = $array6['tender_name']; $tender_date = $array6['tender_date']; $days_to_go = ($tender_date - $nowtime) / 86400; $days_to_go = round($days_to_go); $outstanding_tender = $outstanding_tender . "<p><a href=\"index2.php?page=tender_view&tender_id={$tender_id}\">{$tender_name}</a><i> " . TimeFormatDetailed($tender_date) . " (" . $days_to_go . " days to go)</i></p>"; } $outstanding_tender = $outstanding_tender . "</p>"; $outstanding = 1; } } if ($outstanding != NULL) { if ($outstanding_tasks) { $timesheetaction = $timesheetaction . "<div class=\"warning\"><p><strong>Outstanding Tasks</strong></p>" . $outstanding_tasks . "</div>"; } if ($outstanding_expenses) { $timesheetaction = $timesheetaction . "<div class=\"warning\"><p><strong>Outstanding Expenses</strong></p>" . $outstanding_expenses . "</div>"; } if ($outstanding_tender) { $timesheetaction = $timesheetaction . "<div class=\"warning\"><p><strong>Outstanding Tenders</strong></p>" . $outstanding_tender . "</div>"; }
$message_date = $array['message_date']; $message_text = $array['message_text']; if ($message_viewed > 0) { $highlight = NULL; } else { $highlight = "background-color: " . $settings_alertcolor . "; font-weight: bold;"; } if ($message_from_number != "") { $rowspan = "rowspan=\"2\" "; } else { $rowspan = ""; } print "<tr>"; print "<td style=\"width: 25%;{$highlight}\" {$rowspan}><a href=\"index2.php?page=datebook_view_day&time={$message_date}\">" . TimeFormatDetailed($message_date) . "</a>"; if ($message_viewed > 0) { echo "<br /><span class=\"minitext\">Viewed: " . TimeFormatDetailed($message_date) . "</span>"; } echo "</td><td style=\"{$highlight}\">"; if ($message_from_name != NULL) { print $message_from_name . "<br />" . $message_from_company; } else { $data_contact = $message_from_id; include "dropdowns/inc_data_contacts_name.php"; } print "</td><td style=\"width: 40%;{$highlight}\" {$rowspan}><a href=\"index2.php?page=phonemessage_view_detailed&message_id={$message_id}\">" . $message_text . "</a></td>"; if ($message_from_number != "") { print "</tr><tr><td style=\"{$highlight}\">" . $message_from_number . "</td></tr>"; } } print "</table>"; } else {