本文整理汇总了PHP中dateformat函数的典型用法代码示例。如果您正苦于以下问题:PHP dateformat函数的具体用法?PHP dateformat怎么用?PHP dateformat使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了dateformat函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: dateformat
"><?php
echo $row['project_task_title'];
?>
</a></td>
<td><?php
if ($row['start_date'] != '') {
echo dateformat($row['start_date']);
} else {
echo "";
}
?>
</td>
<td><?php
if ($row['due_date'] != '') {
echo dateformat($row['due_date']);
} else {
echo "";
}
?>
</td>
<td><?php
echo $row['task_priority_title'];
?>
</td>
<td><?php
echo $row['project_task_label'];
?>
</td>
<td>
<span class="btn btn-danger btn-xs" style="background-color:<?php
示例2: date
{
$datetime = $datetime == '0000-00-00 00:00:00' || $datetime == null ? null : date("Y-m-d\\TH:i:s\\Z", strtotime($datetime));
return $datetime;
}
$response = array();
foreach ($query->result() as $row) {
$request = new stdClass();
$request->service_request_id = $row->report_id;
$request->status = $row->status_name;
$request->status_notes = $row->status_notes;
$request->service_code = $row->category_id;
$request->description = stripslashes($row->description);
$request->agency_responsible = $row->agency_responsible;
$request->service_notice = $row->service_notice;
$request->requested_datetime = dateformat($row->requested_datetime);
$request->updated_datetime = dateformat($row->updated_datetime);
$request->expected_datetime = dateformat($row->expected_datetime);
$request->address = $row->address;
$request->address_id = $row->address_id;
$request->zipcode = $row->postal_code;
$request->lat = $row->lat;
$request->long = $row->long;
$response[] = $request;
}
header('Content-type: application/json');
print json_encode($response);
?>
示例3: xlt
?>
/library/js/jquery.js"></script>
</head>
<body class="body_top">
<form method=post action="">
<span class="title"><?php
echo xlt('Work/School Note');
?>
</span><br></br>
<?php
echo xlt('Printed');
?>
<?php
echo dateformat();
?>
<br><br>
<select name="note_type">
<option value="WORK NOTE" <?php
if ($obj['note_type'] == "WORK NOTE") {
echo " SELECTED";
}
?>
><?php
echo xlt('WORK NOTE');
?>
</option>
<option value="SCHOOL NOTE" <?php
if ($obj['note_type'] == "SCHOOL NOTE") {
echo " SELECTED";
示例4: dateformat
?>
</td>
<td ><a href="view-member-details.php?id=<?php
echo $row['userid'];
?>
" class="details" rel="colorbox2"><?php
echo $row['name'];
?>
</a></td>
<td><?php
echo $vote4aap[$row['vote']];
?>
</td>
<td><?php
echo dateformat($row['contactdate']);
?>
</td>
<td ><?php
echo $getconnected[$row['iscalled']];
?>
</span></td>
<td ><?php
echo $row['voterid'] == 1 ? "Yes" : "";
?>
</td>
<td><a href="view-ocontact-details.php?id=<?php
echo $row['id'];
?>
" class="details" rel="colorbox" ><i class="icon-eye-open"></i></a>
<a href="#" class="ocontdelete" id="<?php
示例5: xl
?>
' onclick='top.restoreSession()'>
<img id="nextday" src="<?php
echo $this->_tpl_vars['TPL_IMAGE_PATH'];
?>
/rightbtn.gif" border="0" title="<?php
echo xl("Next Day");
?>
" alt="<?php
echo xl("Next Day");
?>
" /></a>
<?php
$atmp = array_keys($A_EVENTS);
echo dateformat(strtotime($atmp[0]), true);
?>
</div>
<div id="viewPicker">
<?php
echo " <a href='#' type='button' id='printview' title='" . xl("Print View") . "' class='css_button'/><span>" . xl("Print") . "</span></a>\n";
echo " <a href='#' type='button' value='" . xl("Refresh") . "' onclick='javascript:refreshme()' class='css_button'/><span>" . xl("Refresh") . "</span></a>\n";
echo " <a href='#' type='button' id='dayview' title='" . htmlspecialchars(xl('Day View'), ENT_QUOTES) . "' class='css_button'/><span>" . htmlspecialchars(xl('Day'), ENT_QUOTES) . "</span></a>\n";
echo " <a href='#' type='button' id='weekview' title='" . htmlspecialchars(xl('Week View'), ENT_QUOTES) . "' class='css_button'/><span>" . htmlspecialchars(xl('Week'), ENT_QUOTES) . "</span></a>\n";
echo " <a href='#' type='button' id='monthview' title='" . htmlspecialchars(xl('Month View'), ENT_QUOTES) . "' class='css_button'/><span>" . htmlspecialchars(xl('Month'), ENT_QUOTES) . "</span></a>\n";
?>
</div>
</div> <!-- end topToolbarRight -->
<div id="bottom">
<div id="bottomLeft">
示例6: showtablefooter
showtablefooter();
showtableheader('', 'notop');
showsubmit('submit', 'submit', '', '<a href="' . $BASESCRIPT . '?action=jswizard">' . lang('jswizard_infoside_addcomment') . '</a>');
showtablefooter();
showformfooter();
}
} elseif ($operation == 'config') {
if (!submitcheck('settingsubmit')) {
showsubmenu('nav_javascript', array(array('config', 'jswizard&operation=config', 1), $infosidemenu, array('admin', 'jswizard', 0), array(array('menu' => 'jswizard_addmodule', 'submenu' => $addmenu), '', 0), array('jswizard_module', 'jswizard&type=module', 0), array('import', 'jswizard&operation=import', 0)));
$query = $db->query("SELECT * FROM {$tablepre}settings WHERE variable IN ('jsstatus', 'jsdateformat', 'jsrefdomains', 'infosidestatus', 'jscachelife')");
while ($setting = $db->fetch_array($query)) {
$settings[$setting['variable']] = $setting['value'];
}
showformheader('jswizard&operation=config', '', 'settings');
showhiddenfields(array('operation' => $operation));
$settings['jsdateformat'] = dateformat($settings['jsdateformat']);
showtableheader();
showsetting('jswizard_config_jsstatus', 'settingsnew[jsstatus]', $settings['jsstatus'], 'radio', '', 1);
showsetting('jswizard_config_jsdateformat', 'settingsnew[jsdateformat]', $settings['jsdateformat'], 'text');
showsetting('jswizard_config_jsrefdomains', 'settingsnew[jsrefdomains]', $settings['jsrefdomains'], 'textarea');
showtagfooter('tbody');
showsetting('jswizard_config_jscachelife', 'settingsnew[jscachelife]', $settings['jscachelife'], 'text');
showtablerow('', 'colspan="2"', '<input type="submit" class="btn" name="settingsubmit" value="' . lang('submit') . '" />');
showtablefooter();
showformfooter();
} else {
foreach ($settingsnew as $key => $val) {
$db->query("REPLACE INTO {$tablepre}settings (variable, value)\r\n\t\t\t\tVALUES ('{$key}', '{$val}')");
}
updatecache('settings');
cpmsg('jswizard_succeed', $BASESCRIPT . '?action=jswizard&operation=config', 'succeed');
示例7: if
?>
</td>
<td class="center"><?php
echo $row['participants'];
?>
</td>
<? if ($entitled) { ?>
<td>
<?
if ($row['activated']) {
?>
✓ <?php
echo _("last time activated");
?>
: <?php
echo dateformat($row['activated']);
?>
<?
form(URI::same(), 'class="button"');
?>
<input type="hidden" name="area" value="<?php
echo $row['id'];
?>
">
<input type="hidden" name="action" value="unsubscribe">
<input type="submit" value="<?php
echo _("unsubscribe");
?>
">
<?
form_end();
示例8: mysql_query
$s_pegawai = "SELECT * FROM m_idpegawai WHERE nip = '" . $nip . "' ORDER BY nama";
$q_pegawai = mysql_query($s_pegawai);
$Pegawai = mysql_fetch_array($q_pegawai);
?>
<table cellspacing="0">
<tr style="font: 12pt Arial, Helvetica, sans-serif">
<td align="center" colspan="8"><strong>LAPORAN PRESENSI</strong></td>
</tr>
<tr style="font: 8pt Arial, Helvetica, sans-serif">
<td align="center" colspan="8">
<strong><?php
echo dateformat($a_tgl, "d-M-Y");
?>
s/d <?php
echo dateformat($b_tgl, "d-M-Y");
?>
</strong>
</td>
</tr>
<tr><td> </td></tr>
</table>
<table style="font:8pt Arial, Helvetica, sans-serif;">
<tr>
<td colspan="2">NIP</td>
<td colspan="6">: <?php
echo $Pegawai['nip_baru'];
?>
</td>
</tr>
示例9: xml_add_child
$requests = xml_add_child($dom, 'service_requests');
function dateformat($datetime)
{
$datetime = $datetime == '0000-00-00 00:00:00' ? '' : date("Y-m-d\\TH:i:s\\Z", strtotime($datetime));
return $datetime;
}
foreach ($query->result() as $row) {
$request = xml_add_child($requests, 'request');
xml_add_child($request, 'service_request_id', $row->report_id);
xml_add_child($request, 'status', $row->status_name);
xml_add_child($request, 'status_notes', $row->status_notes);
//xml_add_child($request, 'service_name', $row->category_name);
xml_add_child($request, 'service_code', $row->category_id);
xml_add_child($request, 'description', stripslashes($row->description));
xml_add_child($request, 'agency_responsible', $row->agency_responsible);
xml_add_child($request, 'service_notice', $row->service_notice);
xml_add_child($request, 'requested_datetime', dateformat($row->requested_datetime));
xml_add_child($request, 'updated_datetime', dateformat($row->updated_datetime));
xml_add_child($request, 'expected_datetime', dateformat($row->expected_datetime));
xml_add_child($request, 'address', $row->address);
xml_add_child($request, 'address_id', $row->address_id);
xml_add_child($request, 'zipcode', $row->postal_code);
xml_add_child($request, 'lat', $row->lat);
xml_add_child($request, 'long', $row->long);
}
xml_print($dom);
?>
示例10: extract
extract($this->_tpl_vars);
$this->_extract = false;
}
?>
<?php
echo "<table width='100%' border='1' cellpadding='1' cellspacing='0' >\n";
$tdstylearr = array('bordyy', 'bordny', 'bordyn', 'bordnn');
// For each day...
foreach ($A_EVENTS as $date => $events) {
$need_headers = true;
$eventdate = substr($date, 0, 4) . substr($date, 5, 2) . substr($date, 8, 2);
// If multiple days then show a date header for each.
if ($MULTIDAY) {
echo " <tr>\n";
echo " <td colspan='" . count($providers) * 2 . "' align='center'>" . dateformat(strtotime($date), true) . "</td>";
echo " </tr>\n";
}
$arr_events = $S_EVENTS[$date];
list($slotkey, $slotevent) = each($arr_events);
// This is an array of provider status information for this day,
// used to properly assign table cell attributes.
$provstat = array();
$slotindex = 0;
$lastslotindex = count($times) - 1;
// For each time slot...
foreach ($times as $slottime) {
$startampm = $slottime['mer'] == "pm" ? 2 : 1;
$starttimeh = $slottime['hour'];
$starttimem = $slottime['minute'];
$slotendmins = $starttimeh * 60 + $starttimem + $interval;
示例11: wordwrap
</td>
<td><?php
echo $row['email'];
?>
</td>
<td><?php
echo wordwrap($row['address1'], 40, '<br/>');
echo wordwrap($row['address2'], 40, '<br/>');
?>
</td>
<td><?php
echo wordwrap($row['city'], 40, '<br/>');
?>
</td>
<td><?php
echo dateformat($row['created_at']);
?>
</td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
</div>
</div>
</div>
<!-- Modal -->
示例12: Pharmacy
$info .= ', Home: ' . $result['phone_home'];
}
if ($result['pharmacy_id']) {
$pharmacy = new Pharmacy($result['pharmacy_id']);
if ($pharmacy->get_phone()) {
$info .= ', Pharm: ' . $pharmacy->get_phone();
}
}
if (!empty($_GET["set_encounter"])) {
setencounter($_GET["set_encounter"]);
}
if (!empty($encounter)) {
$subresult = getEncounterDateByEncounter($encounter);
$encounter_date = dateformat(strtotime($subresult['date']));
} else {
$encounter_date = dateformat();
//otherwise, set today's date
}
?>
<table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%">
<tr>
<td width="33%" valign="middle" nowrap>
<span class="title_bar_top"><?php
echo $result["fname"] . " " . $result["lname"];
?>
</span>
<span style="font-size:8pt;">(<?php
echo $info;
示例13: write_log
function write_log($text, $unit, $ket)
{
$filename = dateformat(now(), "Ymd_His") . "_" . $unit . "_" . $_SESSION['xusername'] . "_" . $ket . ".txt";
$filedir = "menus/siapp/log/" . $filename;
$fr = fopen($filedir, 'w');
if (!$fr) {
echo "Error!!";
} else {
fwrite($fr, $text);
fclose($fr);
}
}
示例14: dateformat
?>
</dl>
</div><!-- /.box-body -->
</div><!-- /.box -->
<div class="box box-solid">
<div class="box-header">
<i class="fa fa-clock-o"></i>
<h3 class="box-title">Activities</h3>
</div><!-- /.box-header -->
<div class="box-body">
<dl class="dl-horizontal">
<dt>Last Activity </dt>
<dd>
<?php
if (!empty($project_comment)) {
echo dateformat($project_comment[0]['created_at'], "d M Y H:i a");
} else {
echo "";
}
?>
</dd>
</dl>
</div><!-- /.box-body -->
</div><!-- /.box -->
<?php
if (!empty($files)) {
?>
<div class="box box-solid">
<div class="box-header">
<i class="fa fa-fw fa-files-o"></i>
<h3 class="box-title">File Details</h3>
示例15: lang
<td><?php
echo lang('invoice_no_label');
?>
</td>
<td class="text-right"><?php
echo $invoice['invoice']['id'];
?>
</td>
</tr>
<tr>
<td><?php
echo lang('date_label');
?>
: </td>
<td class="text-right"><?php
echo dateformat($invoice['invoice']['current_time_stamp']);
?>
</td>
</tr>
<tr>
<td> </td>
<td class="text-right"> </td>
</tr>
<tr>
<td width="40%"><?php
echo lang('total_label');
?>
</td>
<td width="60%" class="text-right">
<?php
echo $invoice['invoice']['currency_symbol_left'] . $invoice['invoice']['total'] . " " . $invoice['invoice']['currency_symbol_right'];