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


PHP Factory::getPagination方法代码示例

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


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

示例1: showRows

 function showRows()
 {
     $order = !$_GET['order'] ? 'id' : $_GET['order'];
     $orderdir = strtoupper($_GET['orderdir']) == 'DESC' ? 'DESC' : 'ASC';
     $ordering = ' ORDER BY ' . $order . ' ' . $orderdir;
     $query = 'SELECT count(*) AS count FROM ' . $this->table->_tbl;
     $this->db->setQuery($query);
     $row = $this->db->LoadObject();
     if ($row->count > 0) {
         $query = 'SELECT prices.*,apps.name AS app' . ' FROM ' . $this->table->_tbl . ' LEFT JOIN apps ON prices.appid=apps.id' . $ordering;
         $pagination =& Factory::getPagination();
         $pagination->pager($row->count, 20, 6);
         $this->db->setQuery($query, $pagination->limiStart, $pagination->pageRows);
         $rows = $this->db->LoadObjectList();
         $this->assign('pagination', $pagination);
         $this->assign('rows', $rows);
     } else {
         $this->assign('noRows', Text::_('No Data Found'));
     }
     $this->display('prices.tpl');
 }
开发者ID:john-saman,项目名称:backend_rac,代码行数:21,代码来源:prices.php

示例2: showRows

 function showRows()
 {
     $html =& Factory::getHtml();
     $order = !$_GET['order'] ? 'id' : $_GET['order'];
     $orderdir = strtoupper($_GET['orderdir']) == 'DESC' ? 'DESC' : 'ASC';
     $ordering = ' ORDER BY ' . $order . ' ' . $orderdir;
     $query = 'SELECT count(*) AS count FROM ' . $this->table->_tbl;
     $this->db->setQuery($query);
     $row = $this->db->LoadObject();
     if ($row->count > 0) {
         $query = 'SELECT *' . ' FROM ' . $this->table->_tbl . $ordering;
         $pagination =& Factory::getPagination();
         $pagination->pager($row->count, 20, 6);
         $this->db->setQuery($query, $pagination->limiStart, $pagination->pageRows);
         $rows = $this->db->LoadObjectList();
         $this->assign('pagination', $pagination);
         $this->assign('rows', $rows);
         $this->assign('orderDis', $orderDis);
         $this->assign('html', $html);
     } else {
         $this->assign('noRows', Text::_('No Data Found'));
     }
     $this->display('reports.tpl');
 }
开发者ID:john-saman,项目名称:backend_rac,代码行数:24,代码来源:reports.php

示例3: showRows

 function showRows()
 {
     $html =& Factory::getHtml();
     $order = !$_GET['order'] ? 'id' : $_GET['order'];
     $orderdir = strtoupper($_GET['orderdir']) == 'DESC' ? 'DESC' : 'ASC';
     $ordering = ' ORDER BY ' . $order . ' ' . $orderdir;
     $query = 'SELECT count(*) AS count FROM ' . $this->table->_tbl;
     $this->db->setQuery($query);
     $row = $this->db->LoadObject();
     if ($row->count > 0) {
         $query = 'SELECT apps.*,' . '(SELECT GROUP_CONCAT(platforms.name," ") FROM platforms INNER JOIN app_platforms ON platforms.id=app_platforms.platformid WHERE app_platforms.appid=apps.id) AS platforms,' . '(SELECT GROUP_CONCAT(apptypes.name," ") FROM apptypes INNER JOIN app_types ON apptypes.id=app_types.typeid WHERE app_types.appid=apps.id) AS apptypes,' . '(SELECT GROUP_CONCAT(groups.name," ") FROM groups INNER JOIN app_groups ON groups.id=app_groups.groupid WHERE app_groups.appid=apps.id) AS groups,' . '(SELECT GROUP_CONCAT(markets.name," ") FROM markets INNER JOIN app_markets ON markets.id=app_markets.marketid WHERE app_markets.appid=apps.id) AS markets' . ' FROM ' . $this->table->_tbl . $ordering;
         $pagination =& Factory::getPagination();
         $pagination->pager($row->count, 20, 6);
         $this->db->setQuery($query, $pagination->limiStart, $pagination->pageRows);
         $rows = $this->db->LoadObjectList();
         $this->assign('pagination', $pagination);
         $this->assign('rows', $rows);
         $this->assign('orderDis', $orderDis);
         $this->assign('html', $html);
     } else {
         $this->assign('noRows', Text::_('No Data Found'));
     }
     $this->display('apps.tpl');
 }
开发者ID:john-saman,项目名称:backend_rac,代码行数:24,代码来源:apps.php

示例4: showRows

 function showRows()
 {
     $html =& Factory::getHtml();
     $order = @(!$_GET['order']) ? 'id' : $_GET['order'];
     $orderDis = isset($order) && strtolower($order) != 'ordering' ? 'disabled="true"' : '';
     $orderdir = @strtoupper($_GET['orderdir']) == 'DESC' ? 'DESC' : 'ASC';
     $ordering = ' ORDER BY ' . $order . ' ' . $orderdir;
     $query = 'SELECT count(*) AS count FROM ' . $this->table->_tbl;
     $this->db->setQuery($query);
     $row = $this->db->LoadObject();
     if ($row->count > 0) {
         $query = 'SELECT fields.id, fields.name, fields.ordering,fields.tabid,tabs.name AS tab' . ' FROM ' . $this->table->_tbl . ' LEFT JOIN tabs ON fields.tabid=tabs.id' . $ordering;
         $pagination =& Factory::getPagination();
         $pagination->pager($row->count, 20, 6);
         $this->db->setQuery($query, $pagination->limiStart, $pagination->pageRows);
         $rows = $this->db->LoadObjectList();
         $this->assign('pagination', $pagination);
         $this->assign('rows', $rows);
         $this->assign('orderDis', $orderDis);
         $this->assign('html', $html);
     } else {
         $this->assign('noRows', Text::_('No Data Now'));
     }
     $this->display('fields.tpl');
 }
开发者ID:john-saman,项目名称:backend_rac,代码行数:25,代码来源:fields.php

示例5: showRows

 function showRows()
 {
     $order = !$_GET['order'] ? 'id' : $_GET['order'];
     $orderdir = strtoupper($_GET['orderdir']) == 'DESC' ? 'DESC' : 'ASC';
     $ordering = ' ORDER BY ' . $order . ' ' . $orderdir;
     $where = '';
     if (!$this->user->admin) {
         if (!empty($this->user->permissions['groups'])) {
             $where[] = 'EXISTS (SELECT expenses_groups.expenseid FROM expenses_groups WHERE expenses_groups.groupid IN (' . implode(',', $this->user->permissions['groups']) . ')' . ' AND expenses.id=expenses_groups.expenseid AND expenses_groups.share>0)';
         } else {
             $where[] = '0';
         }
         if (!empty($this->user->permissions['markets'])) {
             $where[] = 'EXISTS (SELECT expenses_markets.expenseid FROM expenses_markets WHERE expenses_markets.marketid IN (' . implode(',', $this->user->permissions['markets']) . ')' . ' AND expenses.id=expenses_markets.expenseid)';
         } else {
             $where[] = '0';
         }
     }
     if (!empty($where)) {
         $where = ' WHERE ' . implode(' AND ', $where);
     }
     $query = 'SELECT count(*) AS count FROM expenses' . $where;
     $this->db->setQuery($query);
     $row = $this->db->LoadObject();
     if ($row->count > 0) {
         $query = 'SELECT expenses.*' . ' FROM expenses' . $join4where . $where . $ordering;
         $pagination =& Factory::getPagination();
         $pagination->pager($row->count, 20, 6);
         $this->db->setQuery($query, $pagination->limiStart, $pagination->pageRows);
         $rows = $this->db->LoadObjectList();
         $this->assign('pagination', $pagination);
         $this->assign('rows', $rows);
     } else {
         $this->assign('noRows', Text::_('No Data Found'));
     }
     $this->display('expenses.tpl');
 }
开发者ID:john-saman,项目名称:backend_rac,代码行数:37,代码来源:expenses.php


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