本文整理汇总了PHP中pretty_date函数的典型用法代码示例。如果您正苦于以下问题:PHP pretty_date函数的具体用法?PHP pretty_date怎么用?PHP pretty_date使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了pretty_date函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: PostedFragment
function PostedFragment(&$r)
{
$orgs = get_org_names();
$org = $orgs[$r['srcorg']];
$pubdate = pretty_date(strtotime($r['pubdate']));
return "<cite class=\"posted\"><a href=\"{$r['permalink']}\">{$pubdate}, <em>{$org}</em></a></cite>";
}
示例2: index
public function index()
{
$this->load->model('Present_model');
$this->load->model('Member_model');
$this->load->library('form_validation');
$this->form_validation->set_rules('member_nip', 'Nip', 'trim|required|xss_clean');
$this->form_validation->set_rules('present_date', 'Tanggal', 'trim|required|xss_clean');
$this->form_validation->set_rules('present_desc', 'Kehadiran', 'trim|required|xss_clean');
$this->form_validation->set_error_delimiters('<div class="alert alert-danger"><button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>', '</div>');
if ($_POST and $this->form_validation->run() == TRUE) {
$nip = $this->input->post('member_nip');
$date = $this->input->post('present_date');
$member = $this->Member_model->get(array('member_nip' => $nip));
$check = $this->Present_model->get(array('date' => $date, 'member_nip' => $nip));
if (empty($member)) {
$this->session->set_flashdata('failed', 'Maaf, nip yang anda masukkan salah.');
redirect('admin');
} else {
if (!empty($check)) {
$this->session->set_flashdata('failed', 'Maaf, nip tersebut sudah menginput kehadiran');
redirect('admin');
} else {
$params['present_year'] = pretty_date($date, 'Y', FALSE);
$params['present_month'] = pretty_date($date, 'm', FALSE);
$params['present_date'] = $date;
$params['present_desc'] = $this->input->post('present_desc');
$params['member_member_id'] = $member['member_id'];
$params['member_member_nip'] = $nip;
$this->Present_model->add($params);
$this->session->set_flashdata('success', 'Tambah kehadiran berhasil');
redirect('admin');
}
}
} else {
$data['present'] = $this->Present_model->get(array('date' => date('Y-m-d')));
$data['title'] = 'Dashboard';
$data['main'] = 'admin/dashboard/dashboard';
$this->load->view('admin/layout', $data);
}
}
示例3: pretty_date
<tbody class="table-a">
<tr>
<td ><?php
echo $row['stl_number'];
?>
</td>
<td ><?php
echo $row['stl_employe_nik'];
?>
</td>
<td ><?php
echo $row['stl_employe_name'];
?>
</td>
<td ><?php
echo pretty_date($row['stl_date'], 'd F Y', false);
?>
</td>
<td ><?php
echo $row['stl_batch'];
?>
</td>
<td>
<a data-toggle="tooltip" data-placement="top" title="Detail" class="btn btn-warning btn-xs" href="<?php
echo site_url('admin/stl/detail/' . $row['stl_id']);
?>
" ><span class="glyphicon glyphicon-eye-open"></span></a>
<a data-toggle="tooltip" data-placement="top" title="Edit" class="btn btn-success btn-xs" href="<?php
echo site_url('admin/stl/edit/' . $row['stl_id']);
?>
" ><span class="glyphicon glyphicon-edit"></span></a>
示例4: EmitArticles
function EmitArticles($journo_id)
{
$orgs = get_org_names();
print "<h3>Articles</h3>\n";
$sql = <<<EOT
SELECT id,title,permalink,status,srcorg,pubdate,wordcount
\tFROM (article a INNER JOIN journo_attr attr ON a.id=attr.article_id)
\t\tWHERE attr.journo_id=? ORDER BY pubdate DESC
EOT;
$rows = db_getAll($sql, $journo_id);
printf("<p>%d Articles:</p>\n", sizeof($rows));
?>
<ul>
<?php
foreach ($rows as $row) {
$id = $row['id'];
$permalink = $row['permalink'];
$title = $row['title'];
$status = $row['status'];
$org = $orgs[$row['srcorg']];
$pubdate = pretty_date(strtotime($row['pubdate']));
// TODO: correct the class usage!
$divclass = $status == 'a' ? 'bio_approved' : 'bio_unapproved';
?>
<li>
<div class="<?php
echo $divclass;
?>
"><a href="/adm/article?id=<?php
echo $id;
?>
"><?php
echo $title;
?>
</a>
<small><?php
echo $pubdate;
?>
, <em><?php
echo $org;
?>
</em> (<?php
echo $row['wordcount'];
?>
words) [<a href="<?php
echo $permalink;
?>
">original article</a>]</small></div>
</li>
<?php
}
?>
</ul>
<?php
}
示例5: foreach
}
?>
<ul class="search-result-list list-unstyled">
<?php
// the needed array key is $show - 1;
$result_page = $show - 1;
foreach ($paginated_results[$result_page] as $result) {
$page_var = $show;
$id = $result['ID'];
$title = $result['post_title'];
$post_type = $result['post_type'];
// don't display non-linked items
if (isset($result['guid']) && isset($result['post_name'])) {
$link = create_useable_link($result['guid'], $result['post_name']);
$pdate = pretty_date($result['post_date']);
echo "<li class='{$post_type}'><a href='{$link}' rel='bookmark' title='{$title}' class='list-group-item'>{$title}<p class='search-result-date'>{$pdate}</p></a></li>";
}
}
?>
</ul>
<?php
// PAGINATION
// prepare search terms for the url query var
$url_search_terms = implode('+', $search_terms);
$pagination_btns = '';
//if more than one page of results, loop through paginated results for our pagination links
if (count($results) > $results_per_page) {
echo "<div class='pagination'>";
示例6: pretty_date
<?php
echo $TOPICS['forum_category'];
?>
</td>
<td class="info">
<a href="../Forum/TopicDetail.php?id=<?php
echo $TOPICS['id'];
?>
"><?php
echo $TOPICS['title'];
?>
</a>
</td>
<td>
<?php
echo pretty_date($TOPICS['post_date']);
?>
</td>
<td>
<?php
echo $TOPICS['username'];
?>
</td>
<td class="danger">
<a href="index.php?delete=<?php
echo $TOPICS['id'];
?>
" onclick="return confirm('Are you sure you want to delete Topic?')"><span class="glyphicon glyphicon-remove-circle"></span></a>
</td>
</tr>
<?php
示例7: base_url
</div>
<div class="content_container box-content">
<p class="stat_bar">
Video by <a href="<?php
echo base_url();
?>
user/<?php
echo $account->user_name;
?>
"><?php
echo $account->user_name;
?>
</a>
Posted <?php
echo pretty_date($post->entry_date);
?>
|
<?php
echo $post->view;
?>
view |
<?php
echo count($comments);
?>
Comment<?php
if (count($comments) > 1) {
echo 's';
}
?>
|
示例8: pretty_date
?>
</td>
<td ><?php
echo $row['memorandum_employe_name'];
?>
</td>
<td ><?php
echo pretty_date($row['memorandum_absent_date'], 'd F Y', false);
?>
</td>
<td ><?php
echo pretty_date($row['memorandum_date_sent'], 'd F Y', false);
?>
</td>
<td ><?php
echo pretty_date($row['memorandum_call_date'], 'd F Y', false);
?>
</td>
<td>
<a data-toggle="tooltip" data-placement="top" title="Detail" class="btn btn-warning btn-xs" href="<?php
echo site_url('admin/memorandum1/detail/' . $row['memorandum_id']);
?>
" ><span class="glyphicon glyphicon-eye-open"></span></a>
<a data-toggle="tooltip" data-placement="top" title="Print Surat" class="btn btn-success btn-xs" href="<?php
echo site_url('admin/memorandum1/printPdf/' . $row['memorandum_id']);
?>
"target="_blank"><span class="glyphicon glyphicon-print"></span></a>
<a data-toggle="tooltip" data-placement="top" title="Print Amplop" class="btn btn-info btn-xs" href="<?php
echo site_url('admin/memorandum1/printEnvl/' . $row['memorandum_id']);
?>
"target="_blank"><span class="fa fa-envelope"></span></a>
示例9: pretty_date
?>
</td>
<td><?php
echo $editor['full_name'];
?>
</td>
<td><?php
echo $editor['email'];
?>
</td>
<td><?php
echo pretty_date($editor['join_date']);
?>
</td>
<td><?php
echo $editor['last_login'] == '0000-00-00 00:00:00' ? 'Never' : pretty_date($editor['last_login']);
?>
</td>
<td><?php
echo $editor['permissions'];
?>
</td>
</tr>
<?php
}
?>
</tbody>
</table>
</div> <!-- Close container -->
示例10: pretty_date
?>
</td>
</tr>
<tr>
<td>Habis Kontrak</td>
<td>:</td>
<td><?php
echo $contract['contract_ke'] == '1' ? 'Pertama' : 'Kedua';
?>
</td>
</tr>
<tr>
<td>Tanggal Input</td>
<td>:</td>
<td><?php
echo pretty_date($contract['contract_input_date'], 'l, d F Y', false);
?>
</td>
</tr>
<tr>
<td>User Input</td>
<td>:</td>
<td><?php
echo $contract['user_full_name'];
?>
</td>
</tr>
</tbody>
</table>
</div>
</div>
示例11: export
public function export()
{
$this->load->helper('csv');
$params = array();
$data['member'] = $this->Member_model->get($params);
$csv = array(0 => array('No.', 'NIPM', 'Nama', 'Jenis Kelamin', 'Tempat Lahir', 'Tanggal Lahir', 'Asal Sekolah', 'Pembimbing', 'No Telp', 'Alamat', 'Departement', 'Status', 'Mulai Prakerin'));
$i = 1;
foreach ($data['member'] as $row) {
$csv[] = array($i, $row['member_nip'], $row['member_full_name'], $row['member_sex'] == 'MALE' ? 'Laki-laki' : 'Perempuan', $row['member_birth_place'], $row['member_birth_date'], $row['member_school'], $row['member_mentor'], $row['member_phone'], $row['member_address'], $row['member_division'], $row['member_status'] == 0 ? 'Non-Aktif' : 'Aktif', pretty_date($row['member_entry_date'], 'm/d/Y', FALSE));
$i++;
}
// echo "<pre>";
// echo print_r($csv);
// echo "</pre>";
// die();
array_to_csv($csv, 'Data_Peserta_Prakerin.csv');
}
示例12: WriteMPvoterow
function WriteMPvoterow($mpanchor, $a, $vnvote)
{
if ($vnvote[3] == "notmp") {
return;
}
$vv = $vnvote[3];
if ($vv == "tellno") {
$vv = "no";
}
if ($vv == "tellaye") {
$vv = "aye";
}
if ($a == "aye" && $vv == "aye" || $a == "no" && $vv == "no") {
print "<tr class=\"agree\">\n";
} else {
if ($a == "aye" && $vv == "no" || $a == "no" && $vv == "aye") {
print "<tr class=\"disagree\">\n";
} else {
print "<tr>\n";
}
}
print "<td>" . pretty_date($vnvote[0]) . "</td>";
print "<td><a href=\"http://www.publicwhip.org.uk/division.php?date=" . $vnvote[0] . "&number=" . $vnvote[1] . "&{$mpanchor}\">";
print $vnvote[2];
print "</a></td>";
if ($vv == "aye") {
$vv = "for";
}
if ($vv == "no") {
$vv = "against";
}
print "<td>{$vv}</td>";
print "</tr>\n";
}
示例13: pretty_date
<tr>
<td>Alamat</td>
<td>:</td>
<td><?php
echo $employe['employe_address'];
?>
</td>
</tr>
<tr>
<td>No. Telepon</td>
<td>:</td>
<td><?php
echo $employe['employe_phone'];
?>
</td>
</tr>
<tr>
<td>Tanggal Bekerja</td>
<td>:</td>
<td><?php
echo pretty_date($employe['employe_date_register'], 'd F Y', False);
?>
</td> </tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
示例14: foreach
<th class="controls" align="center">RUPIAH</th>
<th class="controls" align="center">AKSI</th>
</tr>
</thead>
<tbody>
<?php
if (count($output) > 0) {
foreach ($output as $row) {
?>
<tr>
<td ><?php
echo $row['transaction_title'];
?>
</td>
<td ><?php
echo pretty_date($row['transaction_date'], 'd F Y', FALSE);
?>
</td>
<td ><?php
echo 'Rp ' . number_format($row['transaction_budget'], 2, ',', '.');
?>
</td>
<td>
<a class="text-warning" href="<?php
echo site_url('admin/output_transaction/detail/' . $row['output_transaction_id']);
?>
" ><span class="glyphicon glyphicon-eye-open"></span></a>
<a class="text-success" href="<?php
echo site_url('admin/output_transaction/edit/' . $row['output_transaction_id']);
?>
" ><span class="glyphicon glyphicon-edit"></span></a>
示例15: pretty_date
</div>
</div>
<div style="position:absolute; top:135pt; left:40.25pt; z-index:15; width: 88px;">
<div align="center" class="style3">
<div align="left">Tanggal lahir </div>
</div>
</div>
<div style="position:absolute; top:135pt; left:120pt; z-index:15; width: 10px;">
<div align="center" class="style3">
<div align="left">:</div>
</div>
</div>
<div style="position:absolute; top:135pt; left:124pt; z-index:15; width: 130px;">
<div align="center" class="style3">
<div align="left"><?php
echo pretty_date($bpjs['bpjs_date'], 'd-m-Y', false);
?>
</div>
</div>
</div>
<div style="position:absolute; top:147.75pt; left:41.25pt; z-index:15; width: 27px;">
<div align="center" class="style3">
<div align="left">NIK</div>
</div>
</div>
<div style="position:absolute; top:147.75pt; left:120pt; z-index:15; width: 10px;">
<div align="center" class="style3">
<div align="left">:</div>
</div>
</div>
<div style="position:absolute; top:147.75pt; left:124pt; z-index:15; width: 130px;">