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


PHP Pagination::findCurrentPage方法代码示例

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


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

示例1: search_frontend

 public function search_frontend($f3)
 {
     $this->response->data['SUBPART'] = 'payload_list.html';
     $page = \Pagination::findCurrentPage();
     $term = $f3->get('GET.term');
     $search_filter = array('pName LIKE ? OR pDescription LIKE ? OR payload LIKE ? OR pCategory LIKE ? ', "%{$term}%", "%{$term}%", "%{$term}%", "%{$term}%");
     $records = $this->resource->paginate($page - 1, 10, $search_filter, array('order' => 'id desc'));
     $this->response->data['content'] = $records;
 }
开发者ID:kimkiogora,项目名称:mth3l3m3nt-framework,代码行数:9,代码来源:payload.php

示例2: index

 /**
  * Returns index page for logs with pagination
  */
 public function index()
 {
     $page = \Pagination::findCurrentPage();
     $result = $this->model->paginate($page - 1, $this->app->get('limit'), [], ['order' => self::ORDER]);
     $pages = new Pagination($result['total'], $result['limit']);
     $pages->setTemplate('../views/pagebrowser.html');
     $this->app->set('pagebrowser', $pages->serve());
     $this->app->set('logs', $result);
     echo Template::instance()->render('../views/logs.htm');
 }
开发者ID:piggydoughnut,项目名称:gitHubWatcher,代码行数:13,代码来源:LogsController.php

示例3: do_list

 function do_list($f3, $args)
 {
     $subset = fPress::load_list(Pagination::findCurrentPage(), $args['slug']);
     $cate = array();
     foreach ($subset['subset'] as &$row) {
         $cate[$row->category_id] = rCategory::breadcrumb_categories($row->category_id);
         $f3->set('act_link', str_replace('/', '', $cate[$row->category_id]['slug']));
     }
     $f3->set('pagebrowser', parent::paginate($subset['total'], $subset['limit'], '/presses/' . $args['slug']));
     $f3->set('rows', $subset);
     $f3->set('cate', $cate);
     parent::wrapper('press/list.html', '展覽、文章', '/presses');
 }
开发者ID:trevorpao,项目名称:f3cms,代码行数:13,代码来源:outfit.php

示例4: getList

 /**
  * display a list of post entries
  * @param \Base $f3
  * @param array $params
  */
 public function getList(\Base $f3, $params)
 {
     $this->response->data['SUBPART'] = 'post_list.html';
     $page = \Pagination::findCurrentPage();
     if ($this->response instanceof \View\Backend) {
         // backend view
         $records = $this->resource->paginate($page - 1, 5, null, array('order' => 'publish_date desc'));
     } else {
         // frontend view
         $tags = new Tag();
         $f3->set('tag_cloud', $tags->tagCloud());
         $this->resource->filter('comments', array('approved = ?', 1));
         $this->resource->countRel('comments');
         $records = $this->resource->paginate($page - 1, 10, array('publish_date <= ? and published = ?', date('Y-m-d'), true), array('order' => 'publish_date desc'));
     }
     $this->response->data['content'] = $records;
 }
开发者ID:xfra35,项目名称:fabulog,代码行数:22,代码来源:post.php

示例5: getList

 /**
  * display list of comments
  * @param \Base $f3
  * @param array $params
  */
 public function getList(\Base $f3, $params)
 {
     $this->response->data['SUBPART'] = 'comment_list.html';
     $filter = array('approved = ?', 0);
     // new
     if (isset($params['viewtype'])) {
         if ($params['viewtype'] == 'published') {
             $filter = array('approved = ?', 1);
         } elseif ($params['viewtype'] == 'rejected') {
             $filter = array('approved = ?', 2);
         } elseif (!empty($params['viewtype'])) {
             // display all comments for a specified post
             $filter = array('post = ?', $params['viewtype']);
         }
     }
     $page = \Pagination::findCurrentPage();
     $limit = 10;
     $this->response->data['comments'] = $this->resource->paginate($page - 1, $limit, $filter, array('order' => 'datetime desc'));
 }
开发者ID:xfra35,项目名称:fabulog,代码行数:24,代码来源:comment.php

示例6: getSearchResults

 /**
  * @param $f3
  */
 public function getSearchResults($f3)
 {
     $this->response->data['SUBPART'] = 'webot_list.html';
     $page = \Pagination::findCurrentPage();
     $term = $f3->get('GET.term');
     $search_filter = array('zName LIKE ? zParam LIKE ? ', "%{$term}%", "%{$term}%");
     $records = $this->resource->paginate($page - 1, 10, $search_filter, array('order' => 'id desc'));
     $this->response->data['content'] = $records;
 }
开发者ID:theralfbrown,项目名称:OWASP-mth3l3m3nt-framework,代码行数:12,代码来源:webot.php

示例7: getSearchResults

 public function getSearchResults($f3)
 {
     $this->response->data['SUBPART'] = 'ctdb_list.html';
     $page = \Pagination::findCurrentPage();
     $term = $f3->get('GET.term');
     $search_filter = array('hosttag LIKE ? OR vulnerableUrl LIKE ? OR referer LIKE ? ', "%{$term}%", "%{$term}%", "%{$term}%");
     $records = $this->resource->paginate($page - 1, 10, $search_filter, array('order' => 'id desc'));
     $this->response->data['content'] = $records;
 }
开发者ID:alienwithin,项目名称:OWASP-mth3l3m3nt-framework,代码行数:9,代码来源:ctdb.php


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