本文整理汇总了PHP中TimeFormat函数的典型用法代码示例。如果您正苦于以下问题:PHP TimeFormat函数的具体用法?PHP TimeFormat怎么用?PHP TimeFormat使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了TimeFormat函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: TimeFormatDetailed
$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;
$complete_fee_total = 0;
示例2: mysql_query
$sql_issued = "SELECT * FROM intranet_drawings_issued_set, intranet_drawings, intranet_drawings_issued LEFT JOIN intranet_drawings_revision ON revision_id = issue_revision WHERE drawing_id = {$drawing_id} AND set_id = issue_set AND drawing_id = issue_drawing GROUP BY set_id ORDER BY set_date DESC, issue_revision DESC, set_id DESC";
$result_issued = mysql_query($sql_issued, $conn) or die(mysql_error());
echo "<h2>Drawing Issues</h2>";
if (mysql_num_rows($result_issued) > 0) {
echo "<table>";
echo "<tr><th>Issue Date</th><th>Issue Set</th><th>Revision</th><th colspan=\"2\">Issue Status</th></tr>";
while ($array_issued = mysql_fetch_array($result_issued)) {
$set_date = $array_issued['set_date'];
$revision_letter = strtoupper($array_issued['revision_letter']);
$issue_set = $array_issued['issue_set'];
$set_reason = $array_issued['set_reason'];
$set_id = $array_issued['set_id'];
if ($revision_letter == NULL) {
$revision_letter = "-";
}
echo "<tr><td><a href=\"index2.php?page=datebook_view_day&time={$set_date}\">" . TimeFormat($set_date) . "</a></td><td><a href=\"index2.php?page=drawings_issue_list&set_id={$issue_set}&proj_id={$proj_id}\">{$set_id}</a></td><td>{$revision_letter}</td><td><a href=\"index2.php?page=drawings_issue_list&set_id={$issue_set}&proj_id={$proj_id}\">{$set_reason}</a></td><td style=\"width: 20px;\"> <a href=\"pdf_drawing_issue.php?issue_set={$issue_set}&proj_id={$proj_id}\"><img src=\"images/button_pdf.png\" alt=\"PDF drawing issue sheet\" /></a></td></tr>";
}
echo "</table>";
} else {
echo "<p>This drawing has not been issued.</p>";
}
// Drawing issue history
/* $sql_history = "SELECT * FROM intranet_drawings_issued_set, intranet_user_details, intranet_drawings_issued LEFT JOIN intranet_drawings_revision ON revision_id = issue_revision WHERE issue_set = set_id AND user_id = set_user AND issue_drawing = $_GET[drawing_id] ORDER BY set_date DESC";
$result_history = mysql_query($sql_history, $conn) or die(mysql_error());
echo "<h2>Issue History</h2>";
if (mysql_num_rows($result_history) > 0) {
示例3: mysql_query
echo $contact_postcode;
}
echo "</textarea>";
echo "</fieldset>";
// List any drawing issues to this contact
$sql_drawing = "SELECT * FROM intranet_drawings_issued_set, intranet_projects, intranet_drawings_issued LEFT JOIN contacts_companylist ON company_id = issue_company WHERE proj_id = set_project AND issue_contact = {$contact_id} AND issue_set = set_id ORDER BY set_date DESC";
$current_set = 0;
$result_drawing = mysql_query($sql_drawing, $conn);
if (mysql_num_rows($result_drawing) > 0) {
echo "<fieldset><legend>Drawing Issue</legend>";
echo "<table>";
echo "<tr><th>Date</th><th>Project</th><th>Company</th><th>Reason for Issue</th></tr>";
while ($array_drawing = mysql_fetch_array($result_drawing)) {
$set_id = $array_drawing['set_id'];
$set_date = $array_drawing['set_date'];
$set_reason = $array_drawing['set_reason'];
$proj_id = $array_drawing['proj_id'];
$proj_num = $array_drawing['proj_num'];
$proj_name = $array_drawing['proj_name'];
$company_id = $array_drawing['company_id'];
$company_name = $array_drawing['company_name'];
if ($set_id != $current_set) {
echo "<tr><td><a href=\"index2.php?page=datebook_view_day&time={$set_date}\">" . TimeFormat($set_date) . "</a></td><td><a href=\"" . $pref_location . "/index2.php?page=project_view&proj_id={$proj_id}\">{$proj_num} {$proj_name}</a></td><td><a href=\"index2.php?page=contacts_company_view&company_id={$company_id}\">{$company_name}</a></td><td><a href=\"index2.php?page=drawings_issue_list&set_id={$set_id}&proj_id={$proj_id}\">{$set_reason}</a></td></tr>";
}
$current_set = $set_id;
}
echo "</table></fieldset>";
}
} else {
header("Location:index2.php");
}
示例4: TimeDiff
function TimeDiff($fstTime, $sndTime)
{
$fstHour = (int) substr(TimeFormat($fstTime, "24"), 0, 2);
$sndHour = (int) substr(TimeFormat($sndTime, "24"), 0, 2);
$fstMinit = (int) substr(TimeFormat($fstTime, "24"), 3, 2);
$sndMinit = (int) substr(TimeFormat($sndTime, "24"), 3, 2);
$tmDiff = $sndHour * 60 + $sndMinit - ($fstHour * 60 + $fstMinit);
if ($tmDiff < 0) {
$tmDiff = 24 * 60 + $tmDiff;
}
$HourDiff = ($tmDiff - $tmDiff % 60) / 60;
$MinDiff = $tmDiff % 60;
if (strlen($MinDiff) == 1) {
$MinDiff = "0" . $MinDiff;
}
$tmDiff = $HourDiff . ":" . $MinDiff;
return $tmDiff;
}
示例5: time
<?php
if ($user_usertype_current < 3) {
print "<h1 class=\"heading_alert\">Permission Denied</h1><p>You do not have permission to view this page.</p>";
} else {
print "<h1>Verify Expenses</h1>";
$date_verified = time();
$counter = 0;
$total = 0;
$array_id = $_POST['ts_expense_verified'];
print "<p>The following expenses have been verified for " . TimeFormat($date_verified) . "</p>";
print "<p><a href=\"index2.php?page=timesheet_expense_list\">Click here</a> to return to the expenses list.</p>";
print "<table summary=\"List of expenses to verify\">";
while ($counter < count($array_id)) {
$sql = "SELECT * FROM intranet_timesheet_expense, intranet_projects WHERE ts_expense_id = " . $array_id[$counter] . " AND proj_id = ts_expense_project LIMIT 1";
$sql2 = "UPDATE intranet_timesheet_expense SET ts_expense_verified = '{$date_verified}' WHERE ts_expense_id = " . $array_id[$counter] . " LIMIT 1";
$result = mysql_query($sql, $conn) or die(mysql_error());
$result2 = mysql_query($sql2, $conn) or die(mysql_error());
$array_sql = mysql_fetch_array($result);
$ts_expense_id = $array_sql['ts_expense_id'];
$ts_expense_desc = $array_sql['ts_expense_desc'];
$ts_expense_date = $array_sql['ts_expense_date'];
$ts_expense_vat = $array_sql['ts_expense_vat'];
$project_id = $array_sql['proj_id'];
$project_num = $array_sql['proj_num'];
$project_name = $array_sql['proj_name'];
$total = $total + $ts_expense_vat;
print "<tr><td>{$project_num}</td><td>" . $ts_expense_desc . "</td><td style=\"text-align: right;\">" . MoneyFormat($ts_expense_vat) . "</td></tr>";
$counter++;
}
print "<tr><td colspan=\"2\"><strong>Total</strong></td><td style=\"text-align: right;\"><strong>" . MoneyFormat($total) . "</strong></td></tr>";
示例6: DescribeAlert
/**
* Describe Alert
* @param array $alert Alert-Result from DB
* @return array
*/
function DescribeAlert($alert)
{
$obj = array();
$i = 0;
$device = dbFetchRow('SELECT hostname FROM devices WHERE device_id = ?', array($alert['device_id']));
$obj['hostname'] = $device['hostname'];
$obj['device_id'] = $alert['device_id'];
$extra = $alert['details'];
if ($alert['state'] >= 1) {
$obj['title'] = 'Alert for device ' . $device['hostname'] . ' - ' . ($alert['name'] ? $alert['name'] : $alert['rule']);
if ($alert['state'] == 2) {
$obj['title'] .= ' got acknowledged';
} else {
if ($alert['state'] == 3) {
$obj['title'] .= ' got worse';
} else {
if ($alert['state'] == 4) {
$obj['title'] .= ' got better';
}
}
}
foreach ($extra['rule'] as $incident) {
$i++;
$obj['faults'][$i] = $incident;
foreach ($incident as $k => $v) {
if (!empty($v) && $k != 'device_id' && (stristr($k, 'id') || stristr($k, 'desc') || stristr($k, 'msg')) && substr_count($k, '_') <= 1) {
$obj['faults'][$i]['string'] .= $k . ' => ' . $v . '; ';
}
}
}
} else {
if ($alert['state'] == 0) {
$id = dbFetchRow('SELECT alert_log.id,alert_log.time_logged,alert_log.details FROM alert_log WHERE alert_log.state != 2 && alert_log.state != 0 && alert_log.rule_id = ? && alert_log.device_id = ? && alert_log.id < ? ORDER BY id DESC LIMIT 1', array($alert['rule_id'], $alert['device_id'], $alert['id']));
if (empty($id['id'])) {
return false;
}
$extra = json_decode(gzuncompress($id['details']), true);
$obj['title'] = 'Device ' . $device['hostname'] . ' recovered from ' . ($alert['name'] ? $alert['name'] : $alert['rule']);
$obj['elapsed'] = TimeFormat(strtotime($alert['time_logged']) - strtotime($id['time_logged']));
$obj['id'] = $id['id'];
$obj['faults'] = false;
} else {
return 'Unknown State';
}
}
//end if
$obj['uid'] = $alert['id'];
$obj['severity'] = $alert['severity'];
$obj['rule'] = $alert['rule'];
$obj['name'] = $alert['name'];
$obj['timestamp'] = $alert['time_logged'];
$obj['contacts'] = $extra['contacts'];
$obj['state'] = $alert['state'];
return $obj;
}
示例7: mysql_query
$sql3 = "SELECT invoice_id, invoice_ref, proj_name FROM intranet_timesheet_invoice, intranet_projects WHERE `invoice_date` BETWEEN '{$day_begin}' AND '{$day_end}' AND `proj_rep_black` = '{$_COOKIE['user']}' AND `proj_id` = `invoice_project` ORDER BY `invoice_ref` ";
$result3 = mysql_query($sql3, $conn) or die(mysql_error());
if (mysql_num_rows($result3) > 0) {
$invoicemessage = "<table>";
while ($array3 = mysql_fetch_array($result3)) {
$invoicemessage = $invoicemessage . "<tr><td><a href=\"index2.php?page=timesheet_invoice_view&invoice_id=" . $array3['invoice_id'] . "\">" . $array3['invoice_ref'] . "</a></td><td>" . $array3['proj_name'] . "</td></tr>";
}
$invoicemessage = $invoicemessage . "</table>";
}
// Check for any invoices overdue
$sql4 = "SELECT invoice_id, invoice_ref, proj_name, invoice_due FROM intranet_timesheet_invoice, intranet_projects WHERE `invoice_due` < " . time() . " AND `proj_rep_black` = '{$_COOKIE['user']}' AND `proj_id` = `invoice_project` AND `invoice_paid` = 0 AND `invoice_baddebt` != 'yes' ORDER BY `invoice_due` ";
$result4 = mysql_query($sql4, $conn) or die(mysql_error());
if (mysql_num_rows($result4) > 0) {
$invoiceduemessage = "<table>";
while ($array4 = mysql_fetch_array($result4)) {
$invoiceduemessage = $invoiceduemessage . "<tr><td><a href=\"index2.php?page=timesheet_invoice_view&invoice_id=" . $array4['invoice_id'] . "\">" . $array4['invoice_ref'] . "</a></td><td>" . $array4['proj_name'] . "</td><td>Due: <a href=\"index2.php?page=datebook_view_day&time=" . $array4['invoice_due'] . "\"> " . TimeFormat($array4['invoice_due']) . "</a></td></tr>";
}
$invoiceduemessage = $invoiceduemessage . "</table>";
}
// Check for any checklist deadlines today
$today_date = date("Y-m-d", time());
$sql5 = "SELECT * FROM intranet_projects, intranet_project_checklist LEFT JOIN intranet_project_checklist_items ON checklist_item = item_id WHERE proj_id = checklist_project AND checklist_deadline = '{$today_date}' ORDER BY item_group, item_order, checklist_date, item_name";
$result5 = mysql_query($sql5, $conn) or die(mysql_error());
if (mysql_num_rows($result5) > 0) {
$checklist_today = "<table>";
while ($array5 = mysql_fetch_array($result5)) {
$checklist_today = $checklist_today . "<tr><td style=\"width: 30%;\"><a href=\"index2.php?page=project_checklist&proj_id=" . $array5['proj_id'] . "#" . $array5['item_id'] . "\">" . $array5['item_name'] . "</a></td><td>" . $array5['proj_num'] . " " . $array5['proj_name'] . "</td></tr>";
}
$checklist_today = $checklist_today . "</table>";
} else {
unset($checklist_today);
示例8: elseif
$type++;
} elseif ($blog_type == "filenote") {
$blog_type_view = "File Note";
$type++;
} elseif ($blog_type == "meeting") {
$blog_type_view = "Meeting Note";
$type++;
} elseif ($blog_type == "email") {
$blog_type_view = "Email Message";
$type++;
} else {
$blog_type_view = NULL;
$type = 0;
}
$blog_type_list = array("phone", "filenote", "meeting", "email");
if ($counter >= $limit and $counter < $page_next) {
$counter_title++;
print "<tr>";
print "<td>{$type}.</td><td><a href=\"index2.php?page=project_blog_view&blog_id={$blog_id}&proj_id={$proj_id}\">" . $blog_title . "</a> <a href=\"pdf_journal.php?blog_id={$blog_id}\"><img src=\"images/button_pdf.png\" /></a></td>";
print "<td style=\"width: 20%;\"><a href=\"index2.php?page=datebook_view_day&time={$blog_date}\">" . TimeFormat($blog_date) . "</a></td>";
print "<td><a href=\"index2.php?page=user_view&user_id={$user_id}\">" . $blog_user_name_first . " " . $blog_user_name_second . "</a></td>";
print "<td style=\"width: 20%;\"><span class=\"minitext\">{$blog_type_view}</span></td>";
print "</tr>";
}
$title = $blog_type;
$counter++;
}
print "</table>";
} else {
print "<p>There are no journal entries on the system for this project.</p>";
}
示例9: unset
echo "<tr><th style=\"width:25%\">Number</th><th style=\"width:20%\">Rev.</th><th>Rev. Date</th><th colspan=\"2\">Title</th></tr>";
unset($current_drawing);
unset($issue_id_prev);
while ($array_drawings = mysql_fetch_array($result_drawings)) {
$drawing_id = $array_drawings['drawing_id'];
$drawing_title = $array_drawings['drawing_title'];
$drawing_number = $array_drawings['drawing_number'];
$drawing_description = str_replace("\n", ", ", $array_drawings['drawing_description']);
$revision_letter = $array_drawings['revision_letter'];
$issue_id = $array_drawings['issue_id'];
$issue_drawing = $array_drawings['issue_drawing'];
if ($revision_letter == NULL) {
$revision_letter = "-";
}
if ($revision_date > 0) {
$revision_date = TimeFormat($array_drawings['revision_date']);
} else {
$revision_date = "-";
}
//if (time() - ) {
//$delete_button = "<a href=\"index2.php?page=drawings_issue_list&set_id=$set_id&proj_id=$proj_id&issue_drawing=$issue_drawing&action=drawing_issue_item_delete#$issue_id_prev\"><img src=\"images\button_delete.png\" alt=\"Delete this entry\" /></a>";
//}
if ($current_drawing != $drawing_id) {
echo "<tr id=\"{$issue_id}\"><td><a href=\"index2.php?page=drawings_detailed&drawing_id={$drawing_id}&proj_id={$proj_id}\">{$drawing_number}</a><td>" . strtoupper($revision_letter) . "</td><td>{$revision_date}</td><td>{$drawing_title}</td><td>" . $delete_button . "</td></tr>";
}
$current_drawing = $drawing_id;
$issue_id_prev = $issue_id;
}
echo "</table></fieldset>";
// Recipients of drawings
$sql_contacts = "SELECT * FROM contacts_contactlist, intranet_contacts_project, intranet_drawings_issued\nLEFT JOIN contacts_companylist\nON company_id = issue_company\nWHERE issue_set = {$set_id}\nAND issue_contact = contact_id\nAND contact_proj_contact = contacts_contactlist.contact_id\nAND contact_proj_project = {$proj_id}\nORDER BY company_name, contact_namesecond\n";
示例10: MoneyFormat
$ts_expense_id = $array['ts_expense_id'];
$ts_expense_invoiced = $array['ts_expense_invoiced'];
$ts_expense_reimburse = $array['ts_expense_reimburse'];
$ts_expense_notes = $array['ts_expense_notes'];
$ts_expense_p11d = $array['ts_expense_p11d'];
$proj_id = $array['proj_id'];
$proj_num = $array['proj_num'];
$proj_name = $array['proj_name'];
$proj_fee_track = $array['proj_fee_track'];
if ($ts_expense_p11d > 0) {
$bg = "style=\"background-color: #8EC799;\"";
} else {
$bg = NULL;
}
$ts_expense_vat_print = MoneyFormat($ts_expense_vat);
print "<tr><td {$bg}>{$counter}</td><td {$bg}>" . TimeFormat($ts_expense_date) . "</td><td {$bg}><a href=\"index2.php?page=timesheet_expense_view&ts_expense_id={$ts_expense_id}\">" . $ts_expense_desc . " [{$ts_expense_id}]</a>";
if ($user_usertype_current > 3 and $ts_expense_invoiced < 1) {
print " <a href=\"index2.php?page=timesheet_expense_edit&status=edit&ts_expense_id={$ts_expense_id}\"><img src=\"images/button_edit.png\" alt=\"Edit this entry\" /></a>";
}
echo "</td><td {$bg}>{$ts_expense_vat_print}</td>";
$expense_total = $expense_total + $ts_expense_vat;
if ($ts_expense_p11d == 1) {
$checked1 = "checked=\"checked\"";
$checked2 = NULL;
$expense_total_verified = $expense_total_verified + $ts_expense_vat;
} else {
$checked1 = NULL;
$checked2 = "checked=\"checked\"";
}
print "<td {$bg} {$rowspan}><input type=\"radio\" value=\"1\" name=\"ts_expense_p11d[{$counter}]\" {$checked1} /></td><td {$bg}><input type=\"radio\" value=\"0\" name=\"ts_expense_p11d[{$counter}]\" {$checked2} />";
print "<input type=\"hidden\" name=\"ts_expense_id[{$counter}]\" value=\"{$ts_expense_id}\" /></td></tr>";
示例11: TimeFormat
print " selected";
}
print ">{$blog_title_link} (" . TimeFormat($blog_date_link) . ")</option>";
}
print "</select></p>";
}
// Link this entry with a task
$sql4 = "SELECT tasklist_id, tasklist_notes, tasklist_added FROM intranet_tasklist WHERE tasklist_project = '{$proj_id}' AND tasklist_person = '{$_COOKIE['user']}' order by tasklist_due DESC";
$result4 = mysql_query($sql4, $conn);
if (mysql_num_rows($result4) > 0) {
print "<h3>Link with task</h3><p><select name=\"blog_task\">";
print "<option value=\"\">-- None --</option>";
while ($array4 = mysql_fetch_array($result4)) {
$task_id = $array4['tasklist_id'];
$task_added = $array4['tasklist_added'];
$task_notes = "[Added " . TimeFormat($task_added) . "] - " . substr($array4['tasklist_notes'], 0, 60) . "...";
print "<option value=\"{$task_id}\"";
if ($task_id == $blog_task) {
print " selected";
}
print ">{$task_notes}</option>";
}
print "</select></p>";
}
// Hidden values
$nowtime = time();
$hour = 7;
$day = 1;
$month = 1;
$month_array = array("", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");
$year = 1;
示例12: TimeFormat
if ($tasklist_completed > 0) {
$tasklist_completed_text = "(Completed " . TimeFormat($tasklist_completed) . ")";
$strike = "<span style=\"text-decoration: line-through;\">";
$strike2 = "</span>";
} else {
$tasklist_completed_text = NULL;
$strike = NULL;
$strike2 = NULL;
}
print "<tr><td style=\"width: 50px; {$highlight}\">{$strike}<a href=\"index2.php?page=project_view&proj_id={$proj_id}\">{$proj_num}</a>{$strike2}</td><td style=\"{$highlight}\">{$strike}<a href=\"index2.php?page=tasklist_detail&tasklist_id={$tasklist_id}&time={$tasklist_due}\">{$tasklist_notes}</a>{$strike2} {$tasklist_completed_text}</td><td style=\"{$highlight}\">{$strike}<a href=\"index2.php?page=user_view&user_id={$user_id}\">{$user_name_first} {$user_name_second}</a>{$strike2}</td></tr>";
}
print "</table>";
}
// Journal entries
print "<h2>Journal Entries & Telephone Messages</h2>";
print "<table summary=\"Datebook for " . TimeFormat($time) . "\">";
while ($count < $hour_begin + $hour_end) {
$startday_next = $startday + 3599;
print "<tr><td colspan=\"3\"><strong>";
print date("g.00a", $startday);
print "</strong></td></tr>";
$type_find = array("phone", "filenote", "meeting", "email");
$type_replace = array("Telephone Call", "File Note", "Meeting Note", "Email Message");
$sql_blog = "SELECT blog_id, blog_title, blog_date, blog_type, proj_num, proj_id FROM intranet_projects_blog, intranet_projects WHERE proj_id = blog_proj AND blog_date BETWEEN '{$startday}' AND '{$startday_next}' ORDER BY '{$blog_date}'";
$result_blog = mysql_query($sql_blog, $conn) or die(mysql_error());
while ($array_blog = mysql_fetch_array($result_blog)) {
$blog_id = $array_blog['blog_id'];
$blog_title = $array_blog['blog_title'];
$blog_date = $array_blog['blog_date'];
$blog_type = $array_blog['blog_type'];
$proj_id = $array_blog['proj_id'];
示例13: while
print "<a href=\"index2.php?page=tender_list\" class=\"submenu_bar\">Hide Details</a>";
}
print "</p>";
print "<h2>Tender List</h2>";
if (mysql_num_rows($result) > 0) {
$time_line = NULL;
print "<table summary=\"Lists of tenders\">";
while ($array = mysql_fetch_array($result)) {
$tender_id = $array['tender_id'];
$tender_name = $array['tender_name'] . " (" . $array['tender_type'] . ")";
$tender_date = $array['tender_date'];
$tender_client = $array['tender_client'];
$tender_description = nl2br($array['tender_description']);
$tender_keywords = $array['tender_keywords'];
if ($nowtime > $tender_date && $nowtime < $time_line) {
echo "<tr><td colspan=\"2\" style=\"background: red; color: white; text-align: right;\">Today is " . TimeFormat($nowtime) . "</td></tr>";
}
if ($tender_date - $nowtime < 86400 && $tender_date - $nowtime > 0) {
$style = "style=\"background: orange;\"";
} else {
unset($style);
}
echo "<tr><th colspan=\"2\" {$style} ><a href=\"index2.php?page=tender_view&tender_id={$tender_id}\">{$tender_name}</a></th></tr>";
echo "<tr><td {$style} >" . date("d M Y", $tender_date) . "</td><td {$style}>{$tender_client}</td></tr>";
if ($detail == "yes") {
echo "<tr><td colspan=\"2\" {$style} >{$tender_description}</td></tr>";
}
if ($detail == "yes") {
echo "<tr><td colspan=\"2\" {$style} ><span class=\"minitext\">Keywords: ";
KeyWords($tender_keywords);
echo "</span></td></tr>";
示例14: unset
$highlight2 = "; background-color: #{$settings_alertcolor}";
} else {
unset($highlight);
unset($highlight2);
$invoice_total_due = $invoice_total_due + $invoice_value;
}
if ($counter >= $limit and $counter < $page_next) {
print "<tr>";
print "<td {$highlight}><a href=\"index2.php?page=timesheet_invoice_view&invoice_id={$invoice_id}\">" . $invoice_ref . "</a>";
if ($user_usertype_current > 3) {
print " <a href=\"index2.php?page=timesheet_invoice_edit&status=edit&invoice_id={$invoice_id}&page_refer=timesheet_invoice_view_paid\"><img src=\"images/button_edit.png\" alt=\"Edit Invoice\" /></a> <a href=\"pdf_invoice.php?invoice_id={$invoice_id}\"><img src=\"images/button_pdf.png\" alt=\"Print Invoice\" /></a>";
}
print "</td>";
print "<td {$highlight}><a href=\"index2.php?page=project_view&proj_id={$proj_id}\">{$proj_num}</a></td>";
print "<td {$highlight}><a href=\"index2.php?page=datebook_view_day&time={$invoice_date}\">" . TimeFormat($invoice_date) . "</a></td>";
print "<td {$highlight}><a href=\"index2.php?page=datebook_view_day&time={$invoice_due}\">" . TimeFormat($invoice_due) . "</a></td>";
print "<td style=\"text-align: center{$highlight2}\">{$invoice_account}</td>";
print "<td style=\"text-align: right{$highlight2}\">" . MoneyFormat($invoice_value) . "</td></tr>";
$invoice_total_thispage = $invoice_total_thispage + $invoice_value;
}
$counter++;
$invoice_total = $invoice_total + $invoice_value;
}
$invoice_total_overdue = $invoice_total - $invoice_total_due;
print "<tr><td colspan=\"5\"><strong>Total This Page</strong><td style=\"text-align: right\"><strong>" . MoneyFormat($invoice_total_thispage) . "</strong></td></tr>";
print "<tr><td colspan=\"5\"><strong>Total {$page_title}</strong><td style=\"text-align: right\"><strong>" . MoneyFormat($invoice_total) . "</strong></td></tr>";
$sql_acc = "SELECT * FROM intranet_account order by account_id";
$result_acc = mysql_query($sql_acc, $conn) or die(mysql_error());
if (mysql_num_rows($result_acc) > 0) {
print "<tr><td colspan=\"6\"><p>Account Details:</p><p>";
while ($array_acc = mysql_fetch_array($result_acc)) {
示例15: MoneyFormat
}
echo "</td><td>" . MoneyFormat($ts_expense_vat) . " [ID: {$ts_expense_id}]";
print "<td>{$user_initials}</td></tr>";
}
echo "</table>";
}
// Tender submissions
$sql = "SELECT answer_id, answer_response, answer_tender_id, answer_ref, tender_name, tender_date FROM intranet_tender_answers, intranet_tender WHERE " . SearchTerms($keywords_array, "answer_response") . " AND tender_id = answer_tender_id ORDER BY tender_date DESC";
$result = mysql_query($sql, $conn) or die(mysql_error());
echo "<table>";
if (mysql_num_rows($result) == 0) {
print "<tr><td>No results found for Tenders</td></tr>";
} else {
print "<tr><td><strong>Tender Submissions</strong></td></tr>";
while ($array = mysql_fetch_array($result)) {
$answer_id = $array['answer_id'];
$answer_response = strip_tags($array['answer_response']);
$answer_tender_id = $array['answer_tender_id'];
$answer_tender_id = $array['answer_tender_id'];
$answer_ref = $array['answer_ref'];
$tender_name = $array['tender_name'];
$tender_date = $array['tender_date'];
echo "<tr><td>";
echo "<a href=\"index2.php?page=tender_view&tender_id={$answer_tender_id}&answer_id={$answer_id}\">" . substr($answer_response, 0, 200) . "...</a><br /><span class=\"minitext\">From {$tender_name}, " . TimeFormat($tender_date) . ", question {$answer_ref}</span>";
print "</td></tr>";
}
}
echo "</table>";
} else {
print "<p>Invalid Search Term</p>";
}