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


PHP Pagination::paginate方法代码示例

本文整理汇总了PHP中Pagination::paginate方法的典型用法代码示例。如果您正苦于以下问题:PHP Pagination::paginate方法的具体用法?PHP Pagination::paginate怎么用?PHP Pagination::paginate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Pagination的用法示例。


在下文中一共展示了Pagination::paginate方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: process

 /**
  * Applies orderby(ies) and limits to the query and returns pagination data for the client
  * @param  Pagination $pagination [Pagination object, needed for clientside pagination]
  * @param  string     $sql        [SQL's string, passed by reference in order to modify it for sort and pagination]
  * @return void
  */
 public function process(Pagination $pagination, &$sql)
 {
     /** Applies changes to the SQL for sort purposes */
     $this->sortQuery($sql);
     /** @var array pagination data for the client */
     $pagination_data = $pagination->paginate($sql);
     /** Sets the pagination data on this object, to later be exposed to the client */
     $this->setPaginationData($pagination_data);
 }
开发者ID:tekaaa,项目名称:Datatables,代码行数:15,代码来源:Datatable.php

示例2: userchecklistAction

 public function userchecklistAction($I_pageNumber)
 {
     $O_checkMapper = new CheckMapper();
     $O_pagination = new Pagination($O_checkMapper);
     $A_limit = $O_pagination->paginate($I_pageNumber);
     $I_nbPage = $A_limit['nbPage'];
     $A_checks = $O_checkMapper->findByUserPerPage($A_limit);
     Buffer::flushBuffer('check/userchecklist', array('checks' => $A_checks, 'nbPage' => $I_nbPage, 'pageNumber' => $I_pageNumber));
 }
开发者ID:Vincent-Troccaz,项目名称:safety,代码行数:9,代码来源:ControllerCheck.php

示例3: paginateAction

 public function paginateAction($I_pageNumber)
 {
     // On vérifie si l'utilisateur connecté est bien un admin
     $this->haveAccess();
     $O_profileMapper = new ProfileMapper();
     $O_pagination = new Pagination($O_profileMapper);
     $A_limit = $O_pagination->paginate($I_pageNumber);
     $I_nbPage = $A_limit['nbPage'];
     $A_profiles = $O_profileMapper->findPerPage($A_limit);
     Buffer::flushBuffer('profile/list', array('profile' => $A_profiles, 'nbPage' => $I_nbPage, 'pageNumber' => $I_pageNumber));
 }
开发者ID:Vincent-Troccaz,项目名称:safety,代码行数:11,代码来源:ControllerProfile.php

示例4: paginateAction

 public function paginateAction($I_pageNumber)
 {
     // On vérifie si l'utilisateur connecté est bien un admin
     $this->isAdmin();
     $O_userMapper = new UserMapper();
     $O_pagination = new Pagination($O_userMapper);
     $A_limit = $O_pagination->paginate($I_pageNumber);
     $I_nbPage = $A_limit['nbPage'];
     $A_users = $O_userMapper->findPerPage($A_limit);
     Buffer::flushBuffer('user/list', array('users' => $A_users, 'nbPage' => $I_nbPage, 'pageNumber' => $I_pageNumber));
 }
开发者ID:Vincent-Troccaz,项目名称:safety,代码行数:11,代码来源:ControllerUser.php

示例5: ON

<?php

require_once 'init.php';
require_once LIB_PATH . 'functions.lib.php';
require_once LIB_PATH . 'paging.lib.php';
chkLicense();
chkSession();
$page_title = "Report";
$page_id = "12";
chkSecurity($page_id);
$ev_q = "SELECT e.id,\n\t\t\t\tCONCAT(u.fname,' ',u.lname) AS fullname,\n\t\t        e.name AS evname,\n\t\t \t\te.ticker,\n\t\t\t\te.sdate,\n\t\t\t\te.edate,\n\t\t\t\te.createBy,\n\t\t\t\te.createDate,\n\t\t\t\te.qty_locket\n\t\t FROM events e\n\t\t INNER JOIN user u ON (u.id = e.createBy)\n\t     WHERE e.createBy = '" . $_SESSION["uid"] . "' AND e.del = '0'\n\t\t ORDER BY e.sdate DESC ";
$pagingResult = new Pagination();
$pagingResult->setPageQuery($ev_q);
$pagingResult->paginate();
$this_page = $_SERVER['PHP_SELF'] . "?" . $pagingResult->getPageQString();
include THEME_DEFAULT . 'header.php';
?>
             			
<//-----------------CONTENT-START-------------------------------------------------//>
<h1 class="page-header"><?php 
echo $page_title;
?>
 Page</h1>

<div class="sub-header">
	<div class="panel panel-default">
		<div class="panel-heading">&nbsp;
		</div>
		<div class="panel-body">
        	<?php 
echo $pagingResult->pagingMenu();
开发者ID:aryonp,项目名称:hai-dms,代码行数:31,代码来源:report.php

示例6:

        ?>
</a></td>
                        <td><?php 
        echo Functions::DateFormat('m/d/Y', $comment->date_created);
        ?>
</td>
                    </tr>

                <?php 
    }
    ?>
                </tbody>
            </table>
        </div>

        <?php 
    echo $pagination->paginate();
    ?>

    <?php 
} else {
    ?>
        <div class="block"><strong>No comments found</strong></div>
    <?php 
}
?>

</div>

<?php 
include 'footer.php';
开发者ID:KmServer,项目名称:CumulusClips,代码行数:31,代码来源:comments.php

示例7: Pagination

                <div class="panel-body">
                    <div class="table-responsive">
                        <table class="table table-bordered">
                            <thead>
                            <th>ID</th>
                            <th>Title</th>
                            <th>Author</th>
                            <th>Date Created</th>
                            <th>Action</th>
                            </thead>

                            <?php 
    $pages = new Pagination();
    //Pagination Initialization
    $data = $user->getTable('news', array('id', 'title', 'author', 'date'), 'date DESC', 100);
    $numbers = $pages->paginate($data, 6);
    $result = $pages->fetchResult();
    foreach ($result as $news) {
        //Output Last 10 Registered Users
        ?>

                                <tbody>
                                <tr>
                                    <td><?php 
        echo escape($news->id);
        ?>
</td>
                                    <td><?php 
        echo escape($news->title);
        ?>
</td>
开发者ID:TalehFarzaliey,项目名称:PHP-OOP-User-System-with-Bootstrap-Material-Design,代码行数:31,代码来源:news.php


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