当前位置: 首页>>代码示例>>PHP>>正文


PHP Paginator::this_page方法代码示例

本文整理汇总了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 
开发者ID:nepageeks,项目名称:champion,代码行数:31,代码来源:index.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>
开发者ID:TheOddLinguist,项目名称:toolbox,代码行数:31,代码来源:index.php

示例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 
开发者ID:nepageeks,项目名称:champion,代码行数:31,代码来源:index.php


注:本文中的Paginator::this_page方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。