Exemplo n.º 1
0
 function &_getPageNavi()
 {
     $navi = new XCube_PageNavigator($this->_getBaseUrl(), XCUBE_PAGENAVI_START | XCUBE_PAGENAVI_PERPAGE);
     if (isset($_REQUEST[$navi->mPrefix . 'perpage']) && intval($_REQUEST[$navi->mPrefix . 'perpage']) == 0) {
         $navi->setPerpage(0);
     }
     return $navi;
 }
Exemplo n.º 2
0
 function &_getPageNavi()
 {
     $navi = new XCube_PageNavigator($this->_getBaseUrl(), XCUBE_PAGENAVI_START | XCUBE_PAGENAVI_PERPAGE);
     $root =& XCube_Root::getSingleton();
     $perpage = $root->mContext->mRequest->getRequest($navi->mPrefix . 'perpage');
     if (isset($perpage) && intval($perpage) == 0) {
         $navi->setPerpage(0);
     }
     return $navi;
 }
 /**
  * get criteria.
  * 
  * @param int $start
  * @param int $limit
  *
  * @return CriteriaElement
  */
 public function &getCriteria($start = null, $limit = null)
 {
     $t_start = $start === null ? $this->mNavi->getStart() : intval($start);
     $t_limit = $limit === null ? $this->mNavi->getPerpage() : intval($limit);
     $criteria = $this->_mCriteria;
     $criteria->setStart($t_start);
     $criteria->setLimit($t_limit);
     return $criteria;
 }
Exemplo n.º 4
0
 function &_getPageNavi()
 {
     $navi = new XCube_PageNavigator($this->_getBaseUrl(), XCUBE_PAGENAVI_START | XCUBE_PAGENAVI_PERPAGE);
     $root =& XCube_Root::getSingleton();
     $perpage = $root->mContext->mRequest->getRequest($navi->mPrefix . 'perpage');
     if (isset($perpage) && intval($perpage) == 0) {
         $navi->setPerpage(0);
     }
     // naao added selectedMid filter
     $selectedMid = (int) $root->mContext->mRequest->getRequest('selmid');
     if ($selectedMid != 0) {
         $navi->addExtra('selmid', $selectedMid);
     }
     $selectedGid = (int) $root->mContext->mRequest->getRequest('selgid');
     if ($selectedGid != 0) {
         $navi->addExtra('selgid', $selectedGid);
     }
     return $navi;
 }
Exemplo n.º 5
0
<?php

require dirname(__FILE__) . '/../../mainfile.php';
require_once XOOPS_ROOT_PATH . "/core/XCube_PageNavigator.class.php";
$criteria = new CriteriaCompo();
$criteria->add(new Criteria('level', 0, '>'));
// We can not use IN statement here,
// because XoopsObjectGenericHandler doesn't support a conditon which is not a property of an XoopsObject
$subcriteria = new CriteriaCompo();
foreach ($xoopsModuleConfig['listed_groups'] as $groupId) {
    $subcriteria->add(new Criteria('g.groupid', $groupId), 'OR');
}
$criteria->add($subcriteria);
$criteria->addSort('uname', 'ASC');
$userGroupHandler = xoops_getmodulehandler('UserGroup');
$total = $userGroupHandler->getCount($criteria);
$pageNavigator = new XCube_PageNavigator('./index.php');
$pageNavigator->setPerpage($xoopsModuleConfig['users_per_page']);
$pageNavigator->setTotalItems($total);
$pageNavigator->fetch();
$criteria->setStart($pageNavigator->getStart());
$criteria->setLimit($pageNavigator->getPerpage());
/** @var $userGroupHandler Xoopsmembers_UserGroupHandler */
$xoopsTpl->assign('total', $total);
$xoopsTpl->assign('users', $userGroupHandler->getObjects($criteria));
$xoopsTpl->assign('pageNavigator', $pageNavigator);
require_once XOOPS_ROOT_PATH . "/header.php";
$xoopsOption['template_main'] = 'xoopsmembers_index.html';
require_once XOOPS_ROOT_PATH . "/footer.php";
Exemplo n.º 6
0
 /**
  * &_getPageNavi
  *
  * @param	void
  *
  * @return	&XCube_PageNavigator
  **/
 protected function &_getPageNavi()
 {
     $navi = new XCube_PageNavigator($this->_getBaseUrl(), XCUBE_PAGENAVI_START);
     $navi->setPerpage($this->mod_config['topics_per_page']);
     return $navi;
 }