本文整理匯總了PHP中util::now方法的典型用法代碼示例。如果您正苦於以下問題:PHP util::now方法的具體用法?PHP util::now怎麽用?PHP util::now使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類util
的用法示例。
在下文中一共展示了util::now方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: w_news_row
function w_news_row($ary) : string
{
extract($ary);
return '
<tr><td colspan="2"><hr></td></tr>
<tr>
<td><a href="?o=w_news&m=read&i=' . $id . '">' . $title . '</a></td>
<td style="text-align:right">
<small>
by <b>' . $author . '</b> - <i>' . util::now($updated) . '</i> -
<a href="?o=w_news&m=update&i=' . $id . '" title="Update">E</a>
<a href="?o=w_news&m=delete&i=' . $id . '" title="Delete" onClick="javascript: return confirm(\'Are you sure you want to remove ' . $id . '?\')">X</a>
</small>
</td>
</tr>
<tr>
<td colspan="2"><p>' . nl2br($content) . '</p></td>
</tr>';
}
示例2: w_news_row
function w_news_row($ary) : string
{
extract($ary);
$ext = util::is_adm() ? '
<div class="col-md-12 text-right">
<a class="btn btn-success btn-xs" href="?o=w_news&m=update&i=' . $id . '" title="Edit">Edit</a>
</div>' : '';
$ext2 = util::is_adm() ? '
<a class="btn btn-success btn-xs" href="?o=w_news&m=update&i=' . $id . '" title="Edit">Edit</a>' : '';
// <a class="btn btn-danger btn-xs" href="?o=w_news&m=delete&i=' . $id . '" title="Delete" onClick="javascript: return confirm(\'Are you sure you want to remove '.$id.'?\')">X</a>' : '';
return '
<div class="row">
<div class="col-md-12">
<h3><a href="?o=w_news&m=read&i=' . $id . '">' . $title . '</a><h3>
</div>
<div class="col-md-12"><p>' . nl2br($content) . '</p>
</div>
<div class="col-md-12 text-right">
<small>
<i>' . util::now($updated) . ' by ' . $author . '</i>' . $ext2 . '
</small>
</div>
</div>';
}
示例3: declare
<?php
declare (strict_types=1);
error_log(__FILE__);
// w/news/item.php 20151030 (C) 2015-2016 Mark Constable <markc@renta.net> (AGPL-3.0)
return '
<hr>
<table>
<tr>
<td><h3><a href="?o=w_news&m=read&i=' . $id . '">' . $title . '</a></h3></td>
<td style="text-align:right"><em><i>' . util::now($updated) . '</em></i></td>
</tr>
<tr>
<td>by <b>' . $author . '</b></td>
<td style="text-align:right">
<small>
<a href="?o=w_news&m=update&i=' . $id . '" title="Update">E</a>
<a href="?o=w_news&m=delete&i=' . $id . '" title="Delete" onClick="javascript: return confirm(\'Are you sure you want to remove ' . $id . '?\')">X</a>
</small>
</td>
</tr>
<tr>
<td colspan="2"><p>' . nl2br($content) . '</p></td>
</tr>
</table>';
示例4: declare
<?php
declare (strict_types=1);
error_log(__FILE__);
// bootstrap/w/news/item.php 20151030 (C) 2015-2016 Mark Constable <markc@renta.net> (AGPL-3.0)
$ext = util::is_adm() ? '
<br>
<div class="col-md-12 text-right">' . $this->a('?o=w_news', '« Back', 'default') . '
<a class="btn btn-success" href="?o=w_news&m=update&i=' . $id . '" title="Update">Edit</a>
<a class="btn btn-danger" href="?o=w_news&m=delete&i=' . $id . '" title="Delete" onClick="javascript: return confirm(\'Are you sure you want to remove ' . $id . '?\')">Delete</a>
</div>' : '';
$ext2 = util::is_adm() ? '
<br><a href="?o=w_news&m=update&i=' . $id . '" title="Edit">Edit</a>' : '';
return '
<h2>
<i class="fa fa-newspaper-o fa-fw"></i>
<a href="?o=w_news">' . $title . '</a>
</h2>
<div class="row">
<div class="col-md-2 text-center">
<small>
<em>' . util::now($updated) . ' by ' . $author . '</em>' . $ext2 . '
</small>
</div>
<div class="col-md-10">' . nl2br($content) . '
</div>
</div>';
示例5: veto_notes_item
public function veto_notes_item($ary) : string
{
extract($ary);
return '
<table class="table">
<tr>
<td><a href="?p=notes&a=read&i=' . $id . '">' . $title . '</a></td>
<td style="text-align:right">
<small>
by <b>' . $author . '</b> - <i>' . util::now($updated) . '</i> -
<a href="?p=notes&a=update&i=' . $id . '" title="Update">E</a>
<a href="?p=notes&a=delete&i=' . $id . '" title="Delete" onClick="javascript: return confirm(\'Are you sure you want to remove ' . $id . '?\')">X</a>
</small>
</td>
</tr>
<tr>
<td colspan="2">' . nl2br($content) . '</td>
</tr>
</table>
<br>';
}