FleaPHP1.0.70 用来分页
FleaPHP1.0.70 框架分页. 中$tpl = & $this->_getView(); 这句话一值返回falsefunction 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]