當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。