• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP pager类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: actionIndex

 /**
  * 
  * 订单数据服务费列表
  * 
  */
 public function actionIndex()
 {
     $ecmsTaxModel = new EcmsTaxReceiptModel();
     $dataserviceModel = new DataServiceFeeModel();
     $plamfromType = CDict::$platform_type;
     $getData = $this->_get();
     $curr_page = $getData['page'] ? $getData['page'] : 1;
     $platform_type = $this->_get('platform_type');
     // 平台类型
     $platfromType = CDict::$platform_type;
     $whereSql = '';
     if ($getData['platform_type'] != '0' && $getData['platform_type']) {
         $whereSql .= "AND ORDERTYPE = '" . $getData['platform_type'] . "'";
     }
     if (strlen($getData['gbillno']) > 0) {
         $whereSql .= "AND GENERALBILLNO LIKE '%" . $getData['gbillno'] . "%'";
     }
     if (strlen($getData['start-time']) > 0) {
         $whereSql .= " AND TO_CHAR(REALARRIVALDATE, 'YYYY-MM-DD HH24:MI:SS') > '" . $getData['start-time'] . " 00:00:00'";
     }
     if (strlen($getData['end-time']) > 0) {
         $whereSql .= " AND TO_CHAR(REALARRIVALDATE, 'YYYY-MM-DD HH24:MI:SS') < '" . $getData['end-time'] . " 24:00:00'";
     }
     $data = $dataserviceModel->getList($whereSql, $curr_page, $this->_pageSize);
     $count = $dataserviceModel->getNowhereCount($whereSql);
     $page = new pager($count, $curr_page, $this->_pageSize);
     $pageStr = $page->GetPagerContent();
     //var_dump($data);
     //var_dump($getData);
     //var_dump($whereSql);
     $count1 = $this->_orderHeadModel->get_count(" AND HANDLESTATE='3' AND BILLSTATUS='0' ");
     $count2 = $this->_orderHeadModel->get_count(" AND HANDLESTATE='3' AND BILLSTATUS='1' ");
     $count3 = $this->_orderHeadModel->get_count(" AND HANDLESTATE='3' AND BILLSTATUS='2' ");
     $count4 = $ecmsTaxModel->get_count(" AND TYPE='ECMS'");
     $count5 = $ecmsTaxModel->get_count(" AND TYPE='UPS'");
     $count6 = $dataserviceModel->getNowhereCount("");
     $this->assign("count1", $count1);
     $this->assign("count2", $count2);
     $this->assign("count3", $count3);
     $this->assign("count4", $count4);
     $this->assign("count5", $count5);
     $this->assign("count6", $count6);
     array_unshift($plamfromType, "选择平台类型");
     $this->assign('page', $pageStr);
     $this->assign('count', $count);
     $this->assign('platform_type', $getData['platform_type']);
     $this->assign('gbillno', $getData['gbillno']);
     $this->assign('starttime', $getData['start-time']);
     $this->assign('endtime', $getData['end-time']);
     $this->assign('data', $data);
     $this->assign("platformType", $plamfromType);
     $this->display('dataservicefee/dataservicefee_index.html');
 }
开发者ID:WX-T,项目名称:PHP,代码行数:58,代码来源:php操作Excel.php


示例2: init

 function init($pages, $cur_page, $uri)
 {
     self::$pager = true;
     self::$pages = $pages;
     self::$cur_page = $cur_page;
     self::$pager_uri = $uri;
 }
开发者ID:rigidus,项目名称:ea,代码行数:7,代码来源:pager.php


示例3: trash

 /**
  * Trash 
  * 
  * @param  string $type all|hidden 
  * @param  string $orderBy 
  * @param  int    $recTotal 
  * @param  int    $recPerPage 
  * @param  int    $pageID 
  * @access public
  * @return void
  */
 public function trash($type = 'all', $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
 {
     /* Save session. */
     $uri = $this->app->getURI(true);
     $this->session->set('productList', $uri);
     $this->session->set('productPlanList', $uri);
     $this->session->set('releaseList', $uri);
     $this->session->set('storyList', $uri);
     $this->session->set('projectList', $uri);
     $this->session->set('taskList', $uri);
     $this->session->set('buildList', $uri);
     $this->session->set('bugList', $uri);
     $this->session->set('caseList', $uri);
     $this->session->set('testtaskList', $uri);
     $this->session->set('docList', $uri);
     /* Get deleted objects. */
     $this->app->loadClass('pager', $static = true);
     $pager = pager::init($recTotal, $recPerPage, $pageID);
     $trashes = $this->action->getTrashes($type, $orderBy, $pager);
     /* Title and position. */
     $this->view->title = $this->lang->action->trash;
     $this->view->position[] = $this->lang->action->trash;
     $this->view->trashes = $trashes;
     $this->view->type = $type;
     $this->view->orderBy = $orderBy;
     $this->view->pager = $pager;
     $this->view->users = $this->loadModel('user')->getPairs('noletter');
     $this->display();
 }
开发者ID:iamazhi,项目名称:zentaopms,代码行数:40,代码来源:control.php


示例4: _get

 public function _get()
 {
     $total = oo::m()->count();
     $page = $this->req('page');
     pager::init($page, $total);
     $list = oo::m()->limit(pager::$start, pager::$num)->orderby('id desc')->getall();
     method_exists($this, 'after_get') && $this->after_get($list);
     $this->assign('pager', pager::get());
     $this->assign('list', $list);
     $this->display("{$this->form['tpl']}_list");
 }
开发者ID:justlikeheaven,项目名称:buxun,代码行数:11,代码来源:controller_form.php


示例5: getPager

 public function getPager($addWhere = '', $addSql = '', $showMax = 20, $select = '', $key = '', $form_vars = array())
 {
     $db = sf::getLib("db");
     if ($select) {
         $sql = $select . " ";
     } else {
         $sql = "SELECT * FROM `" . $this->table . "` ";
     }
     $addWhere && ($sql .= "WHERE " . $addWhere . " ");
     $addSql && ($sql .= $addSql . " ");
     if (!router::get("totalnum" . $key)) {
         $_sql = "SELECT COUNT(*) AS NUM FROM `" . $this->table . "` ";
         $addWhere && ($_sql .= "WHERE " . $addWhere . " ");
         $addSql && ($_sql .= $addSql . " ");
         $row = $db->fetch_first($_sql);
         $total = $row['NUM'];
     } else {
         $total = router::get("totalnum" . $key);
     }
     $pager = new pager($total, $showMax, $key, $form_vars);
     $sql .= "LIMIT " . $pager->getStartNum() . "," . $pager->getShowNum();
     $query = $db->query($sql);
     $pager->setField($db->result_array($query));
     $pager->setObject(clone $this);
     return $pager;
 }
开发者ID:meetcd,项目名称:sofast,代码行数:26,代码来源:Model.php


示例6: display

 public function display($page, $nb_per_page, $enclose_block = '')
 {
     if ($this->rs->isEmpty()) {
         echo '<p><strong>' . __('No page') . '</strong></p>';
     } else {
         $pager = new pager($page, $this->rs_count, $nb_per_page, 10);
         $pager->html_prev = $this->html_prev;
         $pager->html_next = $this->html_next;
         $pager->var_page = 'page';
         $html_block = '<table class="clear"><tr>' . '<th colspan="2">' . __('Title') . '</th>' . '<th>' . __('Date') . '</th>' . '<th>' . __('Author') . '</th>' . '<th>' . __('Comments') . '</th>' . '<th>' . __('Trackbacks') . '</th>' . '<th>' . __('Status') . '</th>' . '</tr>%s</table>';
         if ($enclose_block) {
             $html_block = sprintf($enclose_block, $html_block);
         }
         echo '<p>' . __('Page(s)') . ' : ' . $pager->getLinks() . '</p>';
         $blocks = explode('%s', $html_block);
         echo $blocks[0];
         while ($this->rs->fetch()) {
             echo $this->postLine();
         }
         echo $blocks[1];
         echo '<p>' . __('Page(s)') . ' : ' . $pager->getLinks() . '</p>';
     }
 }
开发者ID:HackerMajor,项目名称:root,代码行数:23,代码来源:list.php


示例7: processInput

 /**
  * Processes available input adjusting internal state of databrowser.
  *
  * @return \de\toxa\txf\databrowser current instance
  */
 public function processInput()
 {
     if (!$this->pager) {
         // process all input once USING pager for semaphore
         $this->pager = new pager($this->datasource->count(), $this->volatilePager);
         if ($this->pager->isEnabled()) {
             $this->datasource->size($this->pager->size())->offset($this->pager->offset());
             if ($this->getForm()) {
                 $this->pager->enableButtons(true);
             }
         }
     }
     return $this;
 }
开发者ID:cepharum,项目名称:txf,代码行数:19,代码来源:databrowser.php


示例8: index

 public function index()
 {
     $cid = $this->req('cid', 0, 'intval');
     $where = array();
     $cid && ($where = array('cateid' => $cid));
     $total = oo::m('product')->where($where)->count();
     $page = $this->req('page');
     pager::init($page, $total);
     $list = oo::m('product')->limit(pager::$start, pager::$num)->orderby('id desc')->where($where)->getall();
     $this->assign('list', $list);
     //推荐商家
     $seller = oo::m('seller')->limit(5)->getall();
     $this->assign('seller', $seller);
     $this->display('list');
 }
开发者ID:justlikeheaven,项目名称:buxun,代码行数:15,代码来源:list_c.php


示例9: indexAction

 /**
  * отображаем весь список материалов
  */
 function indexAction()
 {
     if (isset($_POST['status'])) {
         $_SESSION['status'] = $_POST['status'];
     }
     if (isset($_POST['status'])) {
         $limit = 1000;
     } else {
         $_total_news = dbh::news_get_total_count();
         $limit = pager::pager_limit($_total_news, ADMIN_NEWS_AT_PAGE);
     }
     // строим запрос
     $_sql = 'SELECT * FROM ' . $this->tablename . ' where id>0 ' . general::get_status_for_filter($this->tablename) . ' order by created_at desc, sort limit ' . $limit;
     // выполняем запрос + при необходимости выводим сам запрос
     $result = mysql::query($_sql, 3);
     return system::show_tpl(array('result' => $result, 'msg' => $this->msg, '_status' => isset($_POST['status']) ? $_POST['status'] : 2, 'tpl_folder' => $this->tpl_folder, '_total_news' => $_total_news), $this->tpl_folder . '/index.php');
 }
开发者ID:AngelWayfarer,项目名称:prizvanie,代码行数:20,代码来源:newsController.php


示例10: indexAction

 /**
  * отображаем весь список материалов
  */
 function indexAction()
 {
     // если перешли по get ссылке из меню
     if (isset($_POST['name'])) {
         $_SESSION['name'] = $_POST['name'];
     }
     if (isset($_POST['artikul'])) {
         $_SESSION['artikul'] = $_POST['artikul'];
     }
     if ($_POST) {
         if (isset($_POST['block_new'])) {
             $_SESSION['block_new'] = $_POST['block_new'];
         } else {
             unset($_SESSION['block_new']);
         }
         if (isset($_POST['block_lider'])) {
             $_SESSION['block_lider'] = $_POST['block_lider'];
         } else {
             unset($_SESSION['block_lider']);
         }
     }
     if (isset($_POST['id_parent'])) {
         $_SESSION['id_parent'] = $_POST['id_parent'];
     }
     if (isset($_POST['brand'])) {
         $_SESSION['brand'] = $_POST['brand'];
     }
     if (isset($_POST['photo'])) {
         $_SESSION['photo'] = $_POST['photo'];
     }
     if (isset($_POST['sklad'])) {
         $_SESSION['sklad'] = $_POST['sklad'];
     }
     if (isset($_POST['status'])) {
         $_SESSION['status'] = $_POST['status'];
     }
     // get limit
     // всего в каталоге
     $_total_catalog = dbh::catalog_get_total_count();
     $limit = pager::pager_limit($_total_catalog, ADMIN_CATALOG_AT_PAGE);
     // строим запрос
     $_sql = 'SELECT * FROM ' . $this->tablename . ' where id>0 ' . general::get_status_for_filter($this->tablename) . ' order by sort limit ' . $limit;
     // выполняем запрос + при необходимости выводим сам запрос
     $result = mysql::query($_sql, 0);
     return system::show_tpl(array('result' => $result, 'msg' => $this->msg, '_total_catalog' => $_total_catalog, '_status' => isset($_SESSION['status']) ? $_SESSION['status'] : 2, '_brand' => isset($_SESSION['brand']) ? $_SESSION['brand'] : 0, '_photo' => isset($_SESSION['photo']) ? $_SESSION['photo'] : 2, '_sklad' => isset($_SESSION['sklad']) ? $_SESSION['sklad'] : 3, 'tpl_folder' => $this->tpl_folder, 'select' => dbh::get_catolog_tree(), 'brand' => dbh::get_brand(), 'curent_id_parent' => isset($_SESSION['id_parent']) ? $_SESSION['id_parent'] : 0), $this->tpl_folder . '/index.php');
 }
开发者ID:AngelWayfarer,项目名称:prizvanie,代码行数:49,代码来源:catalogController.php


示例11: defaultpwd

 public function defaultpwd($recTotal = 0, $recPerPage = 20, $pageID = 1)
 {
     /* Load pager. */
     $this->app->loadClass('pager', $static = true);
     if ($this->app->getViewType() == 'mhtml') {
         $recPerPage = 10;
     }
     $pager = pager::init($recTotal, $recPerPage, $pageID);
     $passwords = $this->kevinlogin->getPasswordList($pager);
     if (!empty($_POST)) {
         $this->kevinlogin->updateDefaultPwd();
         die(js::reload('parent'));
     }
     $this->view->title = $this->lang->kevinlogin->common . $this->lang->colon . $this->lang->kevinlogin->defaultpwd;
     $this->view->position[] = $this->lang->kevinlogin->defaultpwd;
     $this->view->pager = $pager;
     $this->view->passwords = $passwords;
     $this->view->controlType = 'defaultpwd';
     $this->display();
 }
开发者ID:xupnge1314,项目名称:project,代码行数:20,代码来源:control.php


示例12: indexAction

 /**
  * отображаем весь список материалов
  */
 function indexAction()
 {
     if (isset($_POST['status'])) {
         $_SESSION['status'] = $_POST['status'];
     }
     if (isset($_POST['id_parent']) and $_POST['id_parent'] > 0) {
         $limit = 1000;
     } else {
         // get limit
         // всего в каталоге
         $_total_gallery = dbh::gallery_get_total_count();
         $limit = pager::pager_limit($_total_gallery, ADMIN_GALLERY_AT_PAGE);
     }
     // строим запрос
     $_sql = 'SELECT * FROM ' . $this->tablename . ' where id>0 ' . general::get_status_for_filter($this->tablename) . ' ' . general::get_for_filter($this->tablename, 'id_parent') . ' order by sort  limit ' . $limit;
     // выполняем запрос + при необходимости выводим сам запрос
     $result = mysql::query($_sql, 0);
     // выбираем фотоальбомы
     $_sql = 'SELECT * FROM gallery_grupa where status=1 and id_parent=0 order by pole';
     $gallery_grupa = mysql::query($_sql, 0);
     return system::show_tpl(array('result' => $result, 'msg' => $this->msg, '_status' => isset($_POST['status']) ? $_POST['status'] : 2, 'gallery_grupa' => $gallery_grupa, 'tpl_folder' => $this->tpl_folder, '_total_gallery' => $_total_gallery), $this->tpl_folder . '/index.php');
 }
开发者ID:AngelWayfarer,项目名称:prizvanie,代码行数:25,代码来源:galleryController.php


示例13: linkCase

 /**
  * Link cases to a test task.
  * 
  * @param  int    $taskID 
  * @access public
  * @return void
  */
 public function linkCase($taskID, $param = 'all', $recTotal = 0, $recPerPage = 20, $pageID = 1)
 {
     if (!empty($_POST)) {
         $this->testtask->linkCase($taskID);
         $this->locate(inlink('cases', "taskID={$taskID}"));
     }
     /* Save session. */
     $this->session->set('caseList', $this->app->getURI(true));
     /* Get task and product id. */
     $task = $this->testtask->getById($taskID);
     $productID = $this->product->saveState($task->product, $this->products);
     /* Load pager. */
     $this->app->loadClass('pager', $static = true);
     $pager = pager::init($recTotal, $recPerPage, $pageID);
     /* Build the search form. */
     $this->loadModel('testcase');
     $this->config->testcase->search['params']['product']['values'] = array($productID => $this->products[$productID], 'all' => $this->lang->testcase->allProduct);
     $this->config->testcase->search['params']['module']['values'] = $this->loadModel('tree')->getOptionMenu($productID, $viewType = 'case');
     $this->config->testcase->search['actionURL'] = inlink('linkcase', "taskID={$taskID}");
     $this->view->searchForm = $this->fetch('search', 'buildForm', $this->config->testcase->search);
     /* Save session. */
     $this->testtask->setMenu($this->products, $productID);
     $this->view->header['title'] = $this->products[$productID] . $this->lang->colon . $this->lang->testtask->linkCase;
     $this->view->position[] = html::a($this->createLink('testtask', 'browse', "productID={$productID}"), $this->products[$productID]);
     $this->view->position[] = $this->lang->testtask->linkCase;
     /* Get cases. */
     if ($this->session->testcaseQuery == false) {
         $this->session->set('testcaseQuery', ' 1 = 1');
     }
     $query = str_replace("`product` = 'all'", '1', $this->session->testcaseQuery);
     // If search all product, replace product = all to 1=1
     $linkedCases = $this->dao->select('`case`')->from(TABLE_TESTRUN)->where('task')->eq($taskID)->fetchPairs('case');
     if ($param == 'all') {
         $cases = $this->dao->select('*')->from(TABLE_CASE)->where($query)->andWhere('product')->eq($productID)->andWhere('id')->notIN($linkedCases)->andWhere('deleted')->eq(0)->orderBy('id desc')->page($pager)->fetchAll();
     }
     if ($param == 'bystory') {
         $stories = $this->dao->select('stories')->from(TABLE_BUILD)->where('id')->eq($task->build)->fetch('stories');
         $cases = $this->dao->select('*')->from(TABLE_CASE)->where($query)->andWhere('product')->eq($productID)->beginIF($linkedCases)->andWhere('id')->notIN($linkedCases)->fi()->andWhere('story')->in($stories)->andWhere('deleted')->eq(0)->orderBy('id desc')->page($pager)->fetchAll();
     }
     if ($param == 'bybug') {
         $bugs = $this->dao->select('bugs')->from(TABLE_BUILD)->where('id')->eq($task->build)->fetch('bugs');
         $cases = $this->dao->select('*')->from(TABLE_CASE)->where($query)->andWhere('product')->eq($productID)->beginIF($linkedCases)->andWhere('id')->notIN($linkedCases)->fi()->andWhere('fromBug')->in($bugs)->andWhere('deleted')->eq(0)->orderBy('id desc')->page($pager)->fetchAll();
     }
     $this->view->users = $this->loadModel('user')->getPairs('noletter');
     $this->view->cases = $cases;
     $this->view->taskID = $taskID;
     $this->view->pager = $pager;
     $this->display();
 }
开发者ID:huokedu,项目名称:zentao,代码行数:56,代码来源:control.php


示例14: isset

?>
 href="<?php 
echo isset($_GET['id']) ? general::link('filter/id/' . $_GET['id'] . '/type_sort/2') : general::link('filter/type_sort/2');
?>
">Я>А</a> </div>
                    </div><!-- .srt_block-->

                    <div class="tovar_list_3">
					
	<?php 
foreach ($result as $obj) {
    ?>
	
				<?php 
    echo system::show_tpl(array('obj' => $obj, 'level' => ''), '/frontend/catalog/list_index.php');
    ?>
	
	<?php 
}
?>
	
                    </div><!-- .tovar_list_3-->	
	
	
	<?php 
// pager
if (isset($_GET['id'])) {
    echo filter::get_count() > CATALOG_AT_PAGE ? pager::pager_J("filter/id/" . $_GET['id'], CATALOG_AT_PAGE, filter::get_count(), intval($_GET['page'])) : '';
} else {
    echo filter::get_count() > CATALOG_AT_PAGE ? pager::pager_J("filter", CATALOG_AT_PAGE, filter::get_count(), intval($_GET['page'])) : '';
}
开发者ID:AngelWayfarer,项目名称:prizvanie,代码行数:31,代码来源:list.php


示例15: dynamic

 /**
  * Product dynamic.
  * 
  * @param  string $type 
  * @param  string $orderBy 
  * @param  int    $recTotal 
  * @param  int    $recPerPage 
  * @param  int    $pageID 
  * @access public
  * @return void
  */
 public function dynamic($productID = 0, $type = 'today', $param = '', $orderBy = 'date_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
 {
     /* Save session. */
     $uri = $this->app->getURI(true);
     $this->session->set('productList', $uri);
     $this->session->set('productPlanList', $uri);
     $this->session->set('releaseList', $uri);
     $this->session->set('storyList', $uri);
     $this->session->set('projectList', $uri);
     $this->session->set('taskList', $uri);
     $this->session->set('buildList', $uri);
     $this->session->set('bugList', $uri);
     $this->session->set('caseList', $uri);
     $this->session->set('testtaskList', $uri);
     $this->product->setMenu($this->products, $productID);
     /* Append id for secend sort. */
     $sort = $this->loadModel('common')->appendOrder($orderBy);
     /* Set the pager. */
     $this->app->loadClass('pager', $static = true);
     $pager = pager::init($recTotal, $recPerPage, $pageID);
     /* Set the user and type. */
     $account = $type == 'account' ? $param : 'all';
     $period = $type == 'account' ? 'all' : $type;
     /* The header and position. */
     $this->view->title = $this->products[$productID] . $this->lang->colon . $this->lang->product->dynamic;
     $this->view->position[] = html::a($this->createLink($this->moduleName, 'browse'), $this->products[$productID]);
     $this->view->position[] = $this->lang->product->dynamic;
     /* Assign. */
     $this->view->productID = $productID;
     $this->view->type = $type;
     $this->view->users = $this->loadModel('user')->getPairs('nodeleted|noletter');
     $this->view->account = $account;
     $this->view->orderBy = $orderBy;
     $this->view->pager = $pager;
     $this->view->param = $param;
     $this->view->actions = $this->loadModel('action')->getDynamic($account, $period, $sort, $pager, $productID);
     $this->display();
 }
开发者ID:nanata1115,项目名称:zentaopms,代码行数:49,代码来源:control.php


示例16: dynamic

 /**
  * User dynamic.
  * 
  * @param  string $period 
  * @param  string $account 
  * @param  string $orderBy 
  * @param  int    $recTotal 
  * @param  int    $recPerPage 
  * @param  int    $pageID 
  * @access public
  * @return void
  */
 public function dynamic($period = 'today', $account = '', $orderBy = 'date_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
 {
     /* set menus. */
     $this->lang->set('menugroup.user', 'company');
     $this->view->userList = $this->user->setUserList($this->user->getPairs('noempty|noclosed|nodeleted'), $account);
     /* Save session. */
     $uri = $this->app->getURI(true);
     $this->session->set('productList', $uri);
     $this->session->set('productPlanList', $uri);
     $this->session->set('releaseList', $uri);
     $this->session->set('storyList', $uri);
     $this->session->set('projectList', $uri);
     $this->session->set('taskList', $uri);
     $this->session->set('buildList', $uri);
     $this->session->set('bugList', $uri);
     $this->session->set('caseList', $uri);
     $this->session->set('testtaskList', $uri);
     /* Set the pager. */
     $this->app->loadClass('pager', $static = true);
     $pager = pager::init($recTotal, $recPerPage, $pageID);
     $this->view->orderBy = $orderBy;
     $this->view->pager = $pager;
     $this->view->title = $this->lang->user->common . $this->lang->colon . $this->lang->user->dynamic;
     $this->view->position[] = $this->lang->user->dynamic;
     /* Assign. */
     $this->view->period = $period;
     $this->view->users = $this->loadModel('user')->getPairs('nodeleted|noletter');
     $this->view->account = $account;
     $this->view->user = $this->dao->findByAccount($account)->from(TABLE_USER)->fetch();
     $this->view->actions = $this->loadModel('action')->getDynamic($account, $period, $orderBy, $pager);
     $this->display();
 }
开发者ID:heeeello,项目名称:zentaopms,代码行数:44,代码来源:control.php


示例17: pager

        if ($curpage != $pages && $pages != 0) {
            $page_list .= "<a href=\"" . $_SERVER['PHP_SELF'] . "?p=8&page=" . $pages . "\" title=\"Trang cuối\"> >> </a>";
        }
        $page_list .= "</td>\n";
        return $page_list;
    }
}
?>


<?php 
// kết nối CSDL
require 'db.php';
//$ketnoi_maychu = ketnoi_MC();
//chon_CSDL($ketnoi_maychu);
$p = new pager();
$limit = 20;
$start = $p->findStart($limit);
$count = mysql_num_rows(mysql_query("SELECT*FROM gioi_thieu"));
$pages = $p->findPages($count, $limit);
$result = mysql_query("SELECT * FROM gioi_thieu  ORDER BY id DESC limit {$start},{$limit}");
// $result=mysql_query("SELECT * FROM danh_muc_sp ORDER BY masp DESC");
if (mysql_num_rows($result) != 0) {
    echo "<h2 align='div'>Thông Tin Người Dùng </h2>";
    echo " <table border='1' align='div'>";
    echo "<tr bgcolor='orange'>";
    echo "<td >STT</td>";
    echo "<td >Tiêu đề</td>";
    echo "<td >Hình ảnh</td>";
    echo "<td >Xóa</td>";
    echo "<td >Sữa</td>";
开发者ID:hieu-pv,项目名称:phudatthanh,代码行数:31,代码来源:danhsach_gioithieu.php


示例18: test_twelth_of_twelve_pages

 public function test_twelth_of_twelve_pages()
 {
     $first = new pager(100, 1200, 12);
     $actual = $first->pages();
     $expected = array(1, 'skip', 6, 7, 8, 9, 10, 11, 12);
     $this->assertEquals($expected, $actual);
 }
开发者ID:rbclark,项目名称:moodle-theme_bootstrap_renderers,代码行数:7,代码来源:pager_test.php


示例19: pager

<a class="addthis_button_preferred_2"></a>
<a class="addthis_button_preferred_3"></a>
<a class="addthis_button_preferred_4"></a>
<a class="addthis_button_compact"></a>
<a class="addthis_counter addthis_bubble_style"></a>
</div>
<script type="text/javascript">var addthis_config = {"data_track_clickback":true};</script>
<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=ra-4ddc86a40e0ffd66"></script></div>
   
</div>
<div class="sanpham" align="center">

<?php 
include_once "phan_trang.php";
require 'db.php';
$p = new pager();
$limit = 12;
$start = $p->findStart($limit);
$count = mysql_num_rows(mysql_query("SELECT*FROM du_an"));
$pages = $p->findPages($count, $limit);
$id = $_REQUEST["id"];
$result = mysql_query("SELECT * FROM du_an where id<>{$id} ORDER BY id DESC limit {$start},{$limit}");
// hiển thị DL
if (mysql_num_rows($result) != 0) {
    echo " <table width='100%' border='0'>";
    $stt = 0;
    while ($row = mysql_fetch_object($result)) {
        $id = $row->id;
        $tieude = $row->tieude;
        $url = khongdau($tieude);
        // $ngay=$row->ngay;
开发者ID:hieu-pv,项目名称:phudatthanh,代码行数:31,代码来源:chitiet_duan.php


示例20: browse

 /**
  * Browse cases.
  * 
  * @param  int    $productID 
  * @param  string $browseType 
  * @param  int    $param 
  * @param  string $orderBy 
  * @param  int    $recTotal 
  * @param  int    $recPerPage 
  * @param  int    $pageID 
  * @access public
  * @return void
  */
 public function browse($productID = 0, $browseType = 'all', $param = 0, $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
 {
     /* Set browseType, productID, moduleID and queryID. */
     $browseType = strtolower($browseType);
     $productID = $this->product->saveState($productID, $this->products);
     $moduleID = $browseType == 'bymodule' ? (int) $param : 0;
     $queryID = $browseType == 'bysearch' ? (int) $param : 0;
     /* Set menu, save session. */
     $this->testcase->setMenu($this->products, $productID);
     $this->session->set('caseList', $this->app->getURI(true));
     $this->session->set('productID', $productID);
     $this->session->set('moduleID', $moduleID);
     $this->session->set('browseType', $browseType);
     $this->session->set('orderBy', $orderBy);
     /* Load lang. */
     $this->app->loadLang('testtask');
     /* Load pager. */
     $this->app->loadClass('pager', $static = true);
     $pager = pager::init($recTotal, $recPerPage, $pageID);
     $sort = $this->loadModel('common')->appendOrder($orderBy);
     /* By module or all cases. */
     if ($browseType == 'bymodule' or $browseType == 'all') {
         $childModuleIds = $this->tree->getAllChildId($moduleID);
         $this->view->cases = $this->testcase->getModuleCases($productID, $childModuleIds, $sort, $pager);
     } elseif ($browseType == 'needconfirm') {
         $this->view->cases = $this->dao->select('t1.*, t2.title AS storyTitle')->from(TABLE_CASE)->alias('t1')->leftJoin(TABLE_STORY)->alias('t2')->on('t1.story = t2.id')->where("t2.status = 'active'")->andWhere('t1.deleted')->eq(0)->andWhere('t2.version > t1.storyVersion')->orderBy($sort)->page($pager)->fetchAll();
     } elseif ($browseType == 'bysearch') {
         if ($queryID) {
             $query = $this->loadModel('search')->getQuery($queryID);
             if ($query) {
                 $this->session->set('testcaseQuery', $query->sql);
                 $this->session->set('testcaseForm', $query->form);
             } else {
                 $this->session->set('testcaseQuery', ' 1 = 1');
             }
         } else {
             if ($this->session->testcaseQuery == false) {
                 $this->session->set('testcaseQuery', ' 1 = 1');
             }
         }
         $queryProductID = $productID;
         $allProduct = "`product` = 'all'";
         $caseQuery = '(' . $this->session->testcaseQuery;
         if (strpos($this->session->testcaseQuery, $allProduct) !== false) {
             $products = array_keys($this->loadModel('product')->getPrivProducts());
             $caseQuery = str_replace($allProduct, '1', $caseQuery);
             $caseQuery = $caseQuery . ' AND `product`' . helper::dbIN($products);
             $queryProductID = 'all';
         }
         $caseQuery .= ')';
         $this->view->cases = $this->dao->select('*')->from(TABLE_CASE)->where($caseQuery)->beginIF($queryProductID != 'all')->andWhere('product')->eq($productID)->fi()->andWhere('deleted')->eq(0)->orderBy($sort)->page($pager)->fetchAll();
     }
     /* save session .*/
     $this->loadModel('common')->saveQueryCondition($this->dao->get(), 'testcase', $browseType != 'bysearch' ? false : true);
     /* Build the search form. */
     $this->config->testcase->search['params']['product']['values'] = array($productID => $this->products[$productID], 'all' => $this->lang->testcase->allProduct);
     $this->config->testcase->search['params']['module']['values'] = $this->loadModel('tree')->getOptionMenu($productID, $viewType = 'case');
     $this->config->testcase->search['actionURL'] = $this->createLink('testcase', 'browse', "productID={$productID}&browseType=bySearch&queryID=myQueryID");
     $this->config->testcase->search['queryID'] = $queryID;
     $this->loadModel('search')->setSearchParams($this->config->testcase->search);
     /* Assign. */
     $this->view->title = $this->products[$productID] . $this->lang->colon . $this->lang->testcase->common;
     $this->view->position[] = html::a($this->createLink('testcase', 'browse', "productID={$productID}"), $this->products[$productID]);
     $this->view->position[] = $this->lang->testcase->common;
     $this->view->productID = $productID;
     $this->view->productName = $this->products[$productID];
     $this->view->moduleTree = $this->tree->getTreeMenu($productID, $viewType = 'case', $startModuleID = 0, array('treeModel', 'createCaseLink'));
     $this->view->moduleID = $moduleID;
     $this->view->pager = $pager;
     $this->view->users = $this->user->getPairs('noletter');
     $this->view->orderBy = $orderBy;
     $this->view->browseType = $browseType;
     $this->view->param = $param;
     $this->display();
 }
开发者ID:XMGmen,项目名称:zentao,代码行数:88,代码来源:control.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP pagination类代码示例发布时间:2022-05-23
下一篇:
PHP page_generic类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap