QeePHP 开源社区 - 引领 PHP 开发新思想、新模式's Archiver

rongcong 发表于 2009-7-2 12:10

FleaPHP1.0.70 用来分页

FleaPHP1.0.70 框架分页. 中$tpl = & $this->_getView(); 这句话一值返回false

function actionPage() {
  FLEA::loadClass('FLEA_Helper_Pager');
  $tpl = & $this->_getView();
  
  $this->_tbNodes = & FLEA::getSingleton ( 'Table_Storagehistorys' );
  $page = (isset ( $_GET ['page'] )) ? ( int ) $_GET ['page'] : 1;
  $pageSize = 10;
  $conditions = null;
  $sort = "`storagetime` DESC";
  $pager = &new FLEA_Helper_Pager ( $this->_tbNodes, $page, $pageSize, $conditions, $sort );
  $pager->setBasePageIndex ( 1 ); // 起始页码设为1
  $rows = $pager->findAll ( 'historyid,shirtId,sizeId,price,storagetime,count,remark');
  $tpl->assign ( 'newsNavbar', $pager->getNavbarIndexs ( $page, 8 ));
  $tpl->assign ( 'newsPager', $pager->getPagerData ());
  $url = array ('ctl' => 'AdminNews', 'act' => null );
  $tpl->assign ( 'url', $url );
  
  // 列表显示新闻标题
// $tpl->assign ( 'news', $this->_tbNodes->doRead ( $rows, $page ) );
  $tpl->display ( 'newslist.php' );

页: [1]

Powered by Discuz! Archiver 7.0.0  © 2001-2009 Comsenz Inc.