本文整理汇总了PHP中Paginator::this_page方法的典型用法代码示例。如果您正苦于以下问题:PHP Paginator::this_page方法的具体用法?PHP Paginator::this_page怎么用?PHP Paginator::this_page使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Paginator
的用法示例。
在下文中一共展示了Paginator::this_page方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Paginator
$auth_codes = new AuthCode;
$paginator = new Paginator($auth_codes->find());
?>
<p><a href="/admin">Back to Admin Home</a></p>
<a href="./new.php"><img src="/images/admin/button_add.jpg" alt="Add New Auth Code" id="button_add" /></a>
<div id="auth_codes_index">
<table>
<tr>
<th>Code</th>
<th>Name</th>
</tr>
<?php
foreach ($paginator->this_page() as $auth_code) {
?>
<tr>
<td><?php
echo $auth_code->code;
?>
</td>
<td><?php
echo $auth_code->name;
?>
</td>
<td><a href="edit.php?id=<?php
echo $auth_code->id;
?>
"><img src="/images/admin/button_edit.jpg" alt="Edit" id="edit_button" /></a></td>
<td><a href="delete.php?id=<?php
示例2: Paginator
$paginator = new Paginator($extenders->find());
?>
<p><a href="/admin">Back to Admin Home</a></p>
<a href="./new.php"><img src="/images/admin/button_add.jpg" alt="Add New Extender" id="button_add" /></a>
<div id="extenders_index">
<table>
<tr>
<th>Title</th>
<th>Current Version</th>
<th>Display</th>
</tr>
<?php
foreach ($paginator->this_page() as $extender) {
?>
<tr>
<td><?php
echo $extender->title;
?>
</td>
<td <?php
if (!$extender->latest) {
echo 'style="background-color: #eee"';
}
?>
><?php
echo $extender->current_version;
?>
</td>
示例3: Project
$projects = new Project();
$paginator = new Paginator($projects->find());
?>
<p><a href="/admin">Back to Admin Home</a></p>
<a href="./new.php"><img src="/images/admin/button_add.jpg" alt="Add New Project" id="button_add" /></a>
<div id="projects_index">
<table>
<tr>
<th>Title</th>
<th>Location</th>
</tr>
<?php
foreach ($paginator->this_page() as $project) {
?>
<tr>
<td><?php
echo $project->title;
?>
</td>
<td><?php
echo $project->location;
?>
</td>
<td><a href="photos.php?id=<?php
echo $project->id;
?>
">Photos</a></td>
<td><a href="edit.php?id=<?php