本文整理汇总了PHP中BxDolPaginate类的典型用法代码示例。如果您正苦于以下问题:PHP BxDolPaginate类的具体用法?PHP BxDolPaginate怎么用?PHP BxDolPaginate使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了BxDolPaginate类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: GenStoredMemIPs
function GenStoredMemIPs()
{
$sCntSQL = "SELECT COUNT(*) FROM `sys_ip_members_visits`";
////////////////////////////
$iTotalNum = db_value($sCntSQL);
if (!$iTotalNum) {
return MsgBox(_t('_Empty'));
}
$iPerPage = (int) $_GET['per_page'];
if (!$iPerPage) {
$iPerPage = 10;
}
$iCurPage = (int) $_GET['page'];
if ($iCurPage < 1) {
$iCurPage = 1;
}
$sLimitFrom = ($iCurPage - 1) * $iPerPage;
$sqlLimit = "LIMIT {$sLimitFrom}, {$iPerPage}";
////////////////////////////
$sSQL = "SELECT *, UNIX_TIMESTAMP(`DateTime`) AS `DateTimeTS` FROM `sys_ip_members_visits` ORDER BY `DateTime` DESC {$sqlLimit}";
$rIPList = db_res($sSQL);
$aTmplVarsItems = array();
while ($aIPList = mysql_fetch_assoc($rIPList)) {
$iID = (int) $aIPList['ID'];
$sFrom = long2ip($aIPList['From']);
$sLastDT = getLocaleDate($aIPList['DateTimeTS'], BX_DOL_LOCALE_DATE);
$sMember = $aIPList['MemberID'] ? '<a href="' . getProfileLink($aIPList['MemberID']) . '">' . getNickname($aIPList['MemberID']) . '</a>' : '';
$aTmplVarsItems[] = array('from' => $sFrom, 'bx_if:show_profile_link' => array('condition' => !empty($aIPList['MemberID']), 'content' => array('href' => getProfileLink($aIPList['MemberID']), 'caption' => getNickname($aIPList['MemberID']))), 'date' => $sLastDT);
}
$oPaginate = new BxDolPaginate(array('page_url' => $GLOBALS['site']['url_admin'] . 'ip_blacklist.php?mode=list&page={page}&per_page={per_page}', 'count' => $iTotalNum, 'per_page' => $iPerPage, 'page' => $iCurPage));
return $GLOBALS['oAdmTemplate']->parseHtmlByName('ip_blacklist_list_ips.html', array('bx_repeat:items' => $aTmplVarsItems, 'paginate' => $oPaginate->getPaginate()));
}
开发者ID:Gotgot59,项目名称:dolphin.pro,代码行数:32,代码来源:BxDolAdminIpBlockList.php
示例2: getBlockCode_All
function getBlockCode_All($id)
{
$this->oSearch->clearFilters(array('activeStatus', 'allow_view', 'album_status', 'albumType', 'ownerStatus'), array('albumsObjects', 'albums'));
$this->oSearch->aCurrent['paginate']['perPage'] = (int) $this->oConfig->getGlParam('number_all');
$this->oSearch->aCurrent['view'] = 'full';
if (isset($this->oSearch->aCurrent['rss'])) {
$this->oSearch->aCurrent['rss']['link'] = $this->oSearch->getCurrentUrl('browseAll', 0, '');
}
$sCode = $this->oSearch->displayResultBlock();
if ($this->oSearch->aCurrent['paginate']['totalNum'] > 0) {
$sCode = $GLOBALS['oFunctions']->centerContent($sCode, '.sys_file_search_unit');
$aExclude = array('r');
$sMode = isset($_GET[$this->oConfig->getMainPrefix() . '_mode']) ? '&_' . $this->oConfig->getMainPrefix() . '_mode=' . $_GET['bx_' . $this->oConfig->getUri() . '_mode'] : '';
$sLink = $this->oConfig->getBaseUri() . 'home/';
$aLinkAddon = $this->oSearch->getLinkAddByPrams($aExclude);
$oPaginate = new BxDolPaginate(array('page_url' => $sLink, 'count' => $this->oSearch->aCurrent['paginate']['totalNum'], 'per_page' => $this->oSearch->aCurrent['paginate']['perPage'], 'page' => $this->oSearch->aCurrent['paginate']['page'], 'per_page_changer' => true, 'page_reloader' => true, 'on_change_page' => 'return !loadDynamicBlock(' . $id . ', \'' . $sLink . $sMode . $aLinkAddon['params'] . '&page={page}&per_page={per_page}\');', 'on_change_per_page' => 'return !loadDynamicBlock(' . $id . ', \'' . $sLink . $sMode . $aLinkAddon['params'] . '&page=1&per_page=\' + this.value);'));
$aTopMenu = $this->oSearch->getTopMenu(array($this->oConfig->getMainPrefix() . '_mode'));
$sPaginate = $oPaginate->getPaginate();
} else {
$sCode = MsgBox(_t("_Empty"));
$aTopMenu = array();
$sPaginate = '';
}
return array($sCode, $aTopMenu, $sPaginate, '');
}
开发者ID:dalinhuang,项目名称:shopexts,代码行数:25,代码来源:BxSoundsPageHome.php
示例3: showPagination
function showPagination($bAdmin = false)
{
require_once BX_DIRECTORY_PATH_CLASSES . 'BxDolPaginate.php';
$aLinkAddon = $this->getLinkAddByPrams();
$oPaginate = new BxDolPaginate(array('page_url' => $this->aCurrent['paginate']['page_url'], 'count' => $this->aCurrent['paginate']['totalNum'], 'per_page' => $this->aCurrent['paginate']['perPage'], 'page' => $this->aCurrent['paginate']['page'], 'per_page_changer' => true, 'page_reloader' => true));
$sPaginate = '<div class="clear_both"></div>' . $oPaginate->getPaginate();
return $sPaginate;
}
开发者ID:dalinhuang,项目名称:shopexts,代码行数:8,代码来源:BxOSiSearchUnit.php
示例4: PageCodeSubscribers
function PageCodeSubscribers($oSubscription)
{
$iStart = bx_get('start') !== false ? (int) bx_get('start') : 0;
$iPerPage = 20;
$oPaginate = new BxDolPaginate(array('start' => $iStart, 'per_page' => $iPerPage, 'count' => $oSubscription->getSubscribersCount(), 'page_url' => $GLOBALS['site']['url_admin'] . 'manage_subscribers.php?start={start}'));
$sControls = BxTemplSearchResult::showAdminActionsPanel('adm-ms-form', array('adm-ms-delete' => _t('_adm_btn_ms_delete')), 'members');
$aSubscribers = $oSubscription->getSubscribers(BX_DOL_SBS_TYPE_VISITOR, $iStart, $iPerPage);
return $GLOBALS['oAdmTemplate']->parseHtmlByName('manage_subscribers.html', array('bx_repeat:items' => is_array($aSubscribers) && !empty($aSubscribers) ? $aSubscribers : MsgBox(_t('_Empty')), 'paginate' => $oPaginate->getPaginate(), 'controls' => $sControls));
}
开发者ID:dalinhuang,项目名称:shopexts,代码行数:9,代码来源:manage_subscribers.php
示例5: showPaginationAjax
function showPaginationAjax($sBlockId)
{
$oMain = $this->getMain();
$oConfig = $oMain->_oConfig;
bx_import('BxDolPaginate');
$sUrlStart = BX_DOL_URL_ROOT . $oConfig->getBaseUri() . $this->sBrowseUrl;
$sUrlStart .= false === strpos($sUrlStart, '?') ? '?' : '&';
$oPaginate = new BxDolPaginate(array('page_url' => 'javascript:void(0);', 'count' => $this->aCurrent['paginate']['totalNum'], 'per_page' => $this->aCurrent['paginate']['perPage'], 'page' => $this->aCurrent['paginate']['page'], 'on_change_page' => "getHtmlData('{$sBlockId}', '{$sUrlStart}page={page}&per_page={per_page}&block={$sBlockId}" . (false !== bx_get($this->sFilterName) ? '&' . $this->sFilterName . '=' . bx_get($this->sFilterName) : '') . "');"));
return $oPaginate->getSimplePaginate(false, -1, -1, false);
}
开发者ID:noormcs,项目名称:studoro,代码行数:10,代码来源:BxDolTwigSearchResult.php
示例6: PageCodeManageSubscribers
function PageCodeManageSubscribers($oSubscription)
{
$iStart = bx_get('start') !== false ? (int) bx_get('start') : 0;
$iPerPage = 20;
$oPaginate = new BxDolPaginate(array('start' => $iStart, 'per_page' => $iPerPage, 'count' => $oSubscription->getSubscribersCount(), 'page_url' => BX_DOL_URL_ADMIN . 'notifies.php?mode=manage_subscribers&start={start}'));
$sControls = BxTemplSearchResult::showAdminActionsPanel('adm-ms-form', array('adm-ms-delete' => _t('_adm_btn_ms_delete')), 'members');
$aSubscribers = $oSubscription->getSubscribers(BX_DOL_SBS_TYPE_VISITOR, $iStart, $iPerPage);
$s = $GLOBALS['oAdmTemplate']->parseHtmlByName('manage_subscribers.html', array('bx_repeat:items' => is_array($aSubscribers) && !empty($aSubscribers) ? $aSubscribers : MsgBox(_t('_Empty')), 'paginate' => $oPaginate->getPaginate(), 'controls' => $sControls));
return array('page_main_code' => DesignBoxAdmin(_t('_adm_page_cpt_manage_subscribers'), $s, $GLOBALS['aTopItems'], '', 1));
}
开发者ID:Gotgot59,项目名称:dolphin.pro,代码行数:10,代码来源:notifies.php
示例7: showPagination
/**
* Function will generate page's pagination;
*
* @param : $sModulePath (string) - path to current module;
* @return : (text) - html presentation data;
*/
function showPagination($sModulePath, $sScript = null)
{
$aParameters['settings'] = array('count' => $this->aCurrent['paginate']['totalNum'], 'per_page' => $this->aCurrent['paginate']['perPage'], 'page' => $this->aCurrent['paginate']['page']);
$aParameters['settings']['page_url'] = $sModulePath . '&page={page}&per_page={per_page}';
$aParameters['settings']['on_change_page'] = $sScript ? $sScript : null;
$aParameters['settings']['on_change_per_page'] = null;
$oPaginate = new BxDolPaginate(array_shift($aParameters));
$sPaginate = '<div class="clear_both"></div>' . $oPaginate->getSimplePaginate(null, -1, -1, false);
return $sPaginate;
}
开发者ID:toxalot,项目名称:dolphin.pro,代码行数:16,代码来源:BxSpySearch.php
示例8: GenStoredMemIPs
function GenStoredMemIPs()
{
$sFromC = _t('_From');
$sMemberC = _t('_Member');
$sDatatimeC = _t('_Date');
$sCaptionC = _t('_adm_ipbl_Stored_members_caption');
$sRes = '<br /><h2>' . $sCaptionC . '</h2>';
$sTableRes .= <<<EOF
<table style="width:99%;" border="1" cellpadding="2" cellspacing="1" style="border-collapse: collapse">
\t<tr>
\t\t<td>{$sFromC}</td>
<td>{$sMemberC}</td>
\t\t<td>{$sDatatimeC}</td>
\t</tr>
EOF;
$sCntSQL = "SELECT COUNT(*) FROM `sys_ip_members_visits`";
////////////////////////////
$iTotalNum = db_value($sCntSQL);
if (!$iTotalNum) {
return $sRes . MsgBox(_t('_Empty'));
}
$iPerPage = (int) $_GET['per_page'];
if (!$iPerPage) {
$iPerPage = 10;
}
$iCurPage = (int) $_GET['page'];
if ($iCurPage < 1) {
$iCurPage = 1;
}
$sLimitFrom = ($iCurPage - 1) * $iPerPage;
$sqlLimit = "LIMIT {$sLimitFrom}, {$iPerPage}";
////////////////////////////
$sSQL = "SELECT * FROM `sys_ip_members_visits` ORDER BY `DateTime` ASC {$sqlLimit}";
$rIPList = db_res($sSQL);
while ($aIPList = mysql_fetch_assoc($rIPList)) {
$iID = (int) $aIPList['ID'];
$sFrom = long2ip($aIPList['From']);
$sLastDT = $aIPList['DateTime'];
$sMember = $aIPList['MemberID'] ? '<a href="' . getProfileLink($aIPList['MemberID']) . '">' . getNickname($aIPList['MemberID']) . '</a>' : '';
$sTableRes .= "<tr><td>{$sFrom}</td><td>{$sMember}</td><td>{$sLastDT}</td></tr>";
}
$sTableRes .= <<<EOF
</table>
<div class="clear_both"></div>
<br />
EOF;
$sRequest = $GLOBALS['site']['url_admin'] . 'ip_blacklist.php?page={page}&per_page={per_page}';
$oPaginate = new BxDolPaginate(array('page_url' => $sRequest, 'count' => $iTotalNum, 'per_page' => $iPerPage, 'page' => $iCurPage, 'per_page_changer' => true, 'page_reloader' => true, 'on_change_page' => null, 'on_change_per_page' => null));
return $sRes . $sTableRes . $oPaginate->getPaginate();
}
开发者ID:dalinhuang,项目名称:shopexts,代码行数:50,代码来源:BxDolAdminIpBlockList.php
示例9: GenStoredMemIPs
function GenStoredMemIPs()
{
$sRes = '';
$sFromC = _t('_From');
$sMemberC = _t('_Member');
$sDatatimeC = _t('_Date');
$sTableRes .= <<<EOF
<table style="width:99%; border-collapse:collapse;" cellpadding="4" style="border-collapse: collapse">
<tr>
<td class="bx-def-border">{$sFromC}</td>
<td class="bx-def-border">{$sMemberC}</td>
<td class="bx-def-border">{$sDatatimeC}</td>
</tr>
EOF;
$sCntSQL = "SELECT COUNT(*) FROM `sys_ip_members_visits`";
////////////////////////////
$iTotalNum = db_value($sCntSQL);
if (!$iTotalNum) {
return $sRes . MsgBox(_t('_Empty'));
}
$iPerPage = (int) $_GET['per_page'];
if (!$iPerPage) {
$iPerPage = 10;
}
$iCurPage = (int) $_GET['page'];
if ($iCurPage < 1) {
$iCurPage = 1;
}
$sLimitFrom = ($iCurPage - 1) * $iPerPage;
$sqlLimit = "LIMIT {$sLimitFrom}, {$iPerPage}";
////////////////////////////
$sSQL = "SELECT *, UNIX_TIMESTAMP(`DateTime`) AS `DateTimeTS` FROM `sys_ip_members_visits` ORDER BY `DateTime` DESC {$sqlLimit}";
$rIPList = db_res($sSQL);
while ($aIPList = mysql_fetch_assoc($rIPList)) {
$iID = (int) $aIPList['ID'];
$sFrom = long2ip($aIPList['From']);
$sLastDT = getLocaleDate($aIPList['DateTimeTS'], BX_DOL_LOCALE_DATE);
$sMember = $aIPList['MemberID'] ? '<a href="' . getProfileLink($aIPList['MemberID']) . '">' . getNickname($aIPList['MemberID']) . '</a>' : '';
$sTableRes .= "<tr><td class='bx-def-border'>{$sFrom}</td><td class='bx-def-border'>{$sMember}</td><td class='bx-def-border'>{$sLastDT}</td></tr>";
}
$sTableRes .= <<<EOF
</table>
<div class="clear_both"></div>
EOF;
$sRequest = $GLOBALS['site']['url_admin'] . 'ip_blacklist.php?mode=list&page={page}&per_page={per_page}';
$oPaginate = new BxDolPaginate(array('page_url' => $sRequest, 'count' => $iTotalNum, 'per_page' => $iPerPage, 'page' => $iCurPage, 'per_page_changer' => true, 'page_reloader' => true, 'on_change_page' => null, 'on_change_per_page' => null));
$sContent = $GLOBALS['oAdmTemplate']->parseHtmlByName('design_box_content.html', array('content' => $sRes . $sTableRes));
return $sContent . $oPaginate->getPaginate();
}
开发者ID:noormcs,项目名称:studoro,代码行数:49,代码来源:BxDolAdminIpBlockList.php
示例10: actionGetCurrentImage
function actionGetCurrentImage($iPicId)
{
$iPicId = (int) $iPicId;
if ($iPicId > 0) {
bx_import('Search', $this->_aModule);
$oMedia = new BxPhotosSearch();
$aInfo = $oMedia->serviceGetPhotoArray($iPicId, 'file');
$aInfo['ownerUrl'] = getProfileLink($aInfo['owner']);
$aInfo['ownerName'] = getNickName($aInfo['owner']);
$aInfo['date'] = defineTimeInterval($aInfo['date']);
$oMedia->getRatePart();
$aInfo['rate'] = $oMedia->oRate->getJustVotingElement(0, 0, $aInfo['rate']);
$aLinkAddon = $oMedia->getLinkAddByPrams();
$oPaginate = new BxDolPaginate(array('count' => (int) $_GET['total'], 'per_page' => 1, 'page' => (int) $_GET['page'], 'on_change_page' => 'getCurrentImage({page})'));
$aInfo['paginate'] = $oPaginate->getPaginate();
header('Content-Type:text/javascript; charset=utf-8');
echo json_encode($aInfo);
}
}
开发者ID:Prashank25,项目名称:dolphin.pro,代码行数:19,代码来源:BxPhotosModule.php
示例11: actionGetCurrentImage
function actionGetCurrentImage($iPicId)
{
$iPicId = (int) $iPicId;
if ($iPicId > 0) {
require_once 'BxPhotosSearch.php';
$oMedia = new BxPhotosSearch();
$aInfo = $oMedia->serviceGetPhotoArray($iPicId, 'file');
$aInfo['ownerUrl'] = getProfileLink($aInfo['owner']);
$aInfo['ownerName'] = getNickName($aInfo['owner']);
$aInfo['date'] = defineTimeInterval($aInfo['date']);
$oMedia->getRatePart();
$aInfo['rate'] = $oMedia->oRate->getJustVotingElement(0, 0, $aInfo['rate']);
$aLinkAddon = $oMedia->getLinkAddByPrams();
$oPaginate = new BxDolPaginate(array('count' => (int) $_GET['total'], 'per_page' => 1, 'page' => (int) $_GET['page'], 'info' => false, 'per_page_changer' => false, 'page_reloader' => false, 'on_change_page' => 'getCurrentImage({page})'));
$aInfo['paginate'] = $oPaginate->getPaginate();
header('Content-Type:text/javascript');
$oJSON = new Services_JSON();
echo $oJSON->encode($aInfo);
}
}
开发者ID:dalinhuang,项目名称:shopexts,代码行数:20,代码来源:BxPhotosModule.php
示例12: ajaxBrowse
function ajaxBrowse($sMode, $iPerPage, $aMenu = array(), $sValue = '', $isDisableRss = false, $isPublicOnly = true)
{
bx_import('SearchResult', $this->oMain->_aModule);
$sClassName = $this->sSearchResultClassName;
$o = new $sClassName($sMode, $sValue);
$o->aCurrent['paginate']['perPage'] = $iPerPage;
$o->setPublicUnitsOnly($isPublicOnly);
if (!$aMenu) {
$aMenu = $isDisableRss ? '' : array(_t('_RSS') => array('href' => $o->aCurrent['rss']['link'] . (false === strpos($o->aCurrent['rss']['link'], '?') ? '?' : '&') . 'rss=1', 'icon' => 'rss'));
}
if ($o->isError) {
return array(MsgBox(_t('_Error Occured')), $aMenu);
}
if (!($s = $o->displayResultBlock())) {
return $isPublicOnly ? array(MsgBox(_t('_Empty')), $aMenu) : '';
}
$sFilter = false !== bx_get($this->sFilterName) ? $this->sFilterName . '=' . bx_get($this->sFilterName) . '&' : '';
$oPaginate = new BxDolPaginate(array('page_url' => 'javascript:void(0);', 'count' => $o->aCurrent['paginate']['totalNum'], 'per_page' => $o->aCurrent['paginate']['perPage'], 'page' => $o->aCurrent['paginate']['page'], 'on_change_page' => 'return !loadDynamicBlock({id}, \'' . $this->sUrlStart . $sFilter . 'page={page}&per_page={per_page}\');'));
$sAjaxPaginate = $oPaginate->getSimplePaginate($this->oConfig->getBaseUri() . $o->sBrowseUrl);
return array($s, $aMenu, $sAjaxPaginate, '');
}
开发者ID:Prashank25,项目名称:dolphin.pro,代码行数:21,代码来源:BxDolTwigPageMain.php
示例13: getSearchContent
function getSearchContent($aRestrictions, $sUri, $iPage = 1, $iPerPage = 0)
{
$iPerPage = !empty($iPerPage) ? $iPerPage : $this->_oConfig->getPerPage();
$sClassName = $this->_oConfig->getClassPrefix() . 'SearchResult';
$oSearchResult = new $sClassName($this);
foreach ($aRestrictions as $sKey => $mixedValue) {
if (is_array($mixedValue)) {
$oSearchResult->aCurrent['restriction'][$sKey] = $mixedValue;
} else {
if (is_string($mixedValue)) {
$oSearchResult->aCurrent['restriction'][$sKey]['value'] = $mixedValue;
}
}
}
$oSearchResult->aCurrent['paginate']['forcePage'] = $iPage;
$oSearchResult->aCurrent['paginate']['perPage'] = $iPerPage;
$sCode = $oSearchResult->displayResultBlock();
if (!empty($sCode)) {
$oPaginate = new BxDolPaginate(array('page_url' => BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri() . $sUri . '{page}/{per_page}', 'count' => $oSearchResult->aCurrent['paginate']['totalNum'], 'per_page' => $iPerPage, 'page' => $iPage, 'per_page_changer' => true, 'page_reloader' => false, 'on_change_page' => '', 'on_change_per_page' => ''));
$sCode .= $oPaginate->getPaginate();
}
return $sCode;
}
开发者ID:dalinhuang,项目名称:shopexts,代码行数:23,代码来源:BxDolTextModule.php
示例14: getBlockCode_Objects
function getBlockCode_Objects($iBlockId)
{
if (!empty($this->sBrowseCode)) {
return $this->sBrowseCode;
}
$sClassName = $this->oConfig->getClassPrefix() . 'Search';
bx_import('Search', $this->oModule->_aModule);
$oSearch = new $sClassName('album');
$aParams = array('album' => $this->aInfo['Uri'], 'owner' => getUsername($this->aInfo['Owner']));
$aCustom = array('enable_center' => true, 'per_page' => $this->oConfig->getGlParam('number_top'), 'sorting' => 'album_order');
$aHtml = $oSearch->getBrowseBlock($aParams, $aCustom);
$iCount = $oSearch->aCurrent['paginate']['totalNum'];
$sPaginate = '';
if ($iCount > $oSearch->aCurrent['paginate']['perPage']) {
$sLink = $this->oConfig->getBaseUri() . 'browse/album/' . $aParams['album'] . '/owner/' . $aParams['owner'];
$oPaginate = new BxDolPaginate(array('page_url' => $sLink . '&page={page}&per_page={per_page}', 'count' => $iCount, 'per_page' => $oSearch->aCurrent['paginate']['perPage'], 'page' => $oSearch->aCurrent['paginate']['page'], 'on_change_per_page' => 'document.location=\'' . BX_DOL_URL_ROOT . $sLink . '&page=1&per_page=\' + this.value;'));
$sPaginate = $oPaginate->getPaginate();
}
if (empty($aHtml['code'])) {
$aHtml['code'] = MsgBox(_t('_Empty'));
}
return DesignBoxContent(_t('_' . $this->oConfig->getMainPrefix() . '_browse_by_album', $this->aInfo['Caption']), $aHtml['code'], 1, '', $sPaginate);
}
开发者ID:newton27,项目名称:dolphin.pro,代码行数:23,代码来源:BxFilesPageAlbumView.php
示例15: getAdminPart
function getAdminPart($aCondition = array(), $aCustom = array())
{
$this->oSearch->clearFilters(array('allow_view', 'album_status'), array('albumsObjects', 'albums'));
$iPerPage = isset($_GET['per_page']) ? (int) $_GET['per_page'] : (int) $this->oConfig->getGlParam('number_albums_home');
$iPage = isset($_GET['page']) ? (int) $_GET['page'] : $this->oSearch->aCurrent['paginate']['page'];
$this->oSearch->bAdminMode = true;
$aCondition['show_empty'] = true;
$aCondition['hide_default'] = true;
$aCondition['owner'] = $this->iOwnerId;
$sCode = $this->oSearch->getAlbumList($iPage, $iPerPage, $aCondition);
$iCount = $this->oSearch->aCurrent['paginate']['totalAlbumNum'];
$aBtns = array('action_delete' => _t('_Delete'));
$sPaginate = '';
if ($iCount > $iPerPage) {
$sSection = isset($aCustom['section']) ? strip_tags($aCustom['section']) : '';
if ($this->oConfig->isPermalinkEnabled) {
$sSection .= '?';
}
$iId = isset($aCustom['page_block_id']) ? (int) $aCustom['page_block_id'] : 1;
$aLinkAddon = $this->oSearch->getLinkAddByPrams();
$sLink = BX_DOL_URL_ROOT . $this->oConfig->getBaseUri() . 'albums/my/';
$sLinkJs = $sLink . $sSection . $aLinkAddon['params'];
$oPaginate = new BxDolPaginate(array('page_url' => $sLink, 'count' => $iCount, 'per_page' => $iPerPage, 'page' => $iPage, 'per_page_changer' => true, 'page_reloader' => true, 'on_change_page' => 'return !loadDynamicBlock(' . $iId . ', \'' . $sLinkJs . '&page={page}&per_page={per_page}\');', 'on_change_per_page' => 'return !loadDynamicBlock(' . $iId . ', \'' . $sLinkJs . '&page=1&per_page=\' + this.value);'));
$sPaginate = $oPaginate->getSimplePaginate(BX_DOL_URL_ROOT . $this->oConfig->getBaseUri() . 'albums/browse/owner/' . getUsername($this->iOwnerId));
}
$sManage = $this->oSearch->showAdminActionsPanel($this->oSearch->aCurrent['name'] . '_admin_form', $aBtns);
$aUnit = array('main_code' => $sCode, 'paginate' => $sPaginate, 'manage' => $sManage);
return $this->oTemplate->parseHtmlByName('manage_form_albums.html', $aUnit);
}
开发者ID:noormcs,项目名称:studoro,代码行数:29,代码来源:BxPhotosPageAlbumsMy.php
示例16: displayOrders
function displayOrders($sType, $aParams)
{
if (empty($aParams['per_page'])) {
$aParams['per_page'] = $this->_oConfig->getPerPage('orders');
}
$sJsObject = $this->_oConfig->getJsObject('orders');
$sMethodNameInfo = 'get' . ucfirst($sType) . 'Orders';
$aOrders = $this->_oDb->{$sMethodNameInfo}($aParams);
if (empty($aOrders)) {
return MsgBox(_t($this->_sLangsPrefix . 'msg_no_results'));
}
$aAdministrator = $this->_oDb->getVendorInfoProfile(BX_PMT_ADMINISTRATOR_ID);
$sTxtMoreProducts = _t($this->_sLangsPrefix . 'txt_more_products');
$sTxtMoreItems = _t($this->_sLangsPrefix . 'txt_more_items');
$sTxtActionMore = _t($this->_sLangsPrefix . 'txt_action_more');
//--- Get Orders ---//
$aResultOrders = array();
foreach ($aOrders as $aOrder) {
if (empty($aOrder['user_id'])) {
$aOrder['user_name'] = $aAdministrator['profile_name'];
$aOrder['user_url'] = $aAdministrator['profile_url'];
} else {
$aOrder['user_name'] = getNickName($aOrder['user_id']);
$aOrder['user_url'] = getProfileLink($aOrder['user_id']);
if (!$aOrder['user_name']) {
$aOrder['user_name'] = _t('_undefined');
$aOrder['user_url'] = '';
}
}
$aResultOrders[] = array_merge($aOrder, array('js_object' => $sJsObject, 'type' => $sType, 'txt_more_products' => $sTxtMoreProducts, 'txt_more_items' => $sTxtMoreItems, 'txt_action_more' => $sTxtActionMore, 'bx_if:show_link' => array('condition' => !empty($aOrder['user_url']), 'content' => array('user_name' => $aOrder['user_name'], 'user_url' => $aOrder['user_url'])), 'bx_if:show_text' => array('condition' => empty($aOrder['user_url']), 'content' => array('user_name' => $aOrder['user_name'])), 'bx_if:pending' => array('condition' => $sType == BX_PMT_ORDERS_TYPE_PENDING, 'content' => array('id' => $aOrder['id'], 'order' => $aOrder['order'])), 'bx_if:processed' => array('condition' => $sType == BX_PMT_ORDERS_TYPE_PROCESSED || BX_PMT_ORDERS_TYPE_SUBSCRIPTION || $sType == BX_PMT_ORDERS_TYPE_HISTORY, 'content' => array('order' => $aOrder['order'])), 'products' => $aOrder['products'], 'items' => $aOrder['items'], 'subscription' => $this->_isSubscription($aOrder)));
}
//--- Get Paginate Panel ---//
$sPaginatePanel = "";
$sMethodNameCount = 'get' . ucfirst($sType) . 'OrdersCount';
if (($iCount = $this->_oDb->{$sMethodNameCount}($aParams)) > $aParams['per_page']) {
$oPaginate = new BxDolPaginate(array('start' => $aParams['start'], 'count' => $iCount, 'per_page' => $aParams['per_page'], 'per_page_step' => 2, 'per_page_interval' => 3, 'page_url' => BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri() . ($sType == BX_PMT_ORDERS_TYPE_HISTORY ? 'history' : 'orders') . '/', 'on_change_page' => $sJsObject . ".changePage('" . $sType . "', {start}, {per_page}, " . $aParams['seller_id'] . ")"));
$sPaginatePanel = $oPaginate->getPaginate();
}
return $this->parseHtmlByName($sType . '_orders.html', array('bx_repeat:orders' => $aResultOrders, 'paginate_panel' => $sPaginatePanel));
}
开发者ID:Prashank25,项目名称:dolphin.pro,代码行数:40,代码来源:BxPmtTemplate.php
示例17: getBlockCode_Friends
function getBlockCode_Friends()
{
$iLimit = 10;
$sContent = $sPaginate = '';
$sAllFriends = 'viewFriends.php?iUser=' . $this->iMember;
// count all friends ;
$iCount = getFriendNumber($this->iMember);
if ($iCount == 0) {
return;
}
$iPages = ceil($iCount / $iLimit);
$iPage = isset($_GET['page']) ? (int) $_GET['page'] : 1;
if ($iPage < 1) {
$iPage = 1;
}
if ($iPage > $iPages) {
$iPage = $iPages;
}
$sSqlFrom = ($iPage - 1) * $iLimit;
$sSqlLimit = "LIMIT {$sSqlFrom}, {$iLimit}";
$aFriends = getMyFriendsEx($this->iMember, '', 'image', $sSqlLimit);
$aTmplParams['bx_repeat:friends'] = array();
foreach ($aFriends as $iId => $aFriend) {
$aTmplParams['bx_repeat:friends'][] = array('content' => get_member_thumbnail($iId, 'none', true, 'visitor', array('is_online' => $aFriend[5])));
}
$sContent = $GLOBALS['oSysTemplate']->parseHtmlByName('member_friends.html', $aTmplParams);
$oPaginate = new BxDolPaginate(array('page_url' => BX_DOL_URL_ROOT . 'member.php', 'count' => $iCount, 'per_page' => $iLimit, 'page' => $iPage, 'on_change_page' => 'return !loadDynamicBlock({id}, \'member.php?page={page}&per_page={per_page}\');'));
$sPaginate = $oPaginate->getSimplePaginate($sAllFriends);
return array($sContent, array(), $sPaginate);
}
开发者ID:toxalot,项目名称:dolphin.pro,代码行数:30,代码来源:BxBaseAccountView.php
示例18: getAdminPart
function getAdminPart($aCondition = array(), $aCustom = array())
{
$this->oSearch->bAdminMode = true;
$iPerPage = isset($_GET['per_page']) ? (int) $_GET['per_page'] : (int) $this->oConfig->getGlParam('number_albums_home');
$iPage = isset($_GET['page']) ? (int) $_GET['page'] : $this->oSearch->aCurrent['paginate']['page'];
$this->oSearch->aCurrent['restriction']['owner']['value'] = $this->iOwnerId;
$aCondition['show_empty'] = true;
$sCode = $this->oSearch->getAlbumList($iPage, $iPerPage, $aCondition);
$aBtns = array('action_delete' => _t('_Delete'));
$sSection = isset($aCustom['section']) ? strip_tags($aCustom['section']) : '';
$iId = isset($aCustom['page_block_id']) ? (int) $aCustom['page_block_id'] : 1;
$aLinkAddon = $this->oSearch->getLinkAddByPrams();
$sLink = BX_DOL_URL_ROOT . $this->oConfig->getBaseUri() . 'albums/my/' . $sSection;
$this->oSearch->aCurrent['paginate']['perPage'] = 2;
$oPaginate = new BxDolPaginate(array('page_url' => $sLink, 'count' => $this->oSearch->aCurrent['paginate']['totalAlbumNum'], 'per_page' => $iPerPage, 'page' => $iPage, 'per_page_changer' => true, 'page_reloader' => true, 'on_change_page' => 'return !loadDynamicBlock(' . $iId . ', \'' . $sLink . $aLinkAddon['params'] . '&page={page}&per_page={per_page}\');', 'on_change_per_page' => 'return !loadDynamicBlock(' . $iId . ', \'' . $sLink . $aLinkAddon['params'] . '&page=1&per_page=\' + this.value);'));
$sPaginate = $oPaginate->getSimplePaginate(BX_DOL_URL_ROOT . $this->oConfig->getBaseUri() . 'albums/browse/owner/' . getNickName($this->iOwnerId));
$sManage = $this->oSearch->showAdminActionsPanel($this->oSearch->aCurrent['name'] . '_admin_form', $aBtns);
$aUnit = array('main_code' => $GLOBALS['oFunctions']->centerContent($sCode, '.sys_album_unit') . $sPaginate . $sManage, 'bx_if:hidden' => '');
return $this->oTemplate->parseHtmlByName('manage_form.html', $aUnit);
}
开发者ID:dalinhuang,项目名称:shopexts,代码行数:20,代码来源:BxVideosPageAlbumsMy.php
示例19: showPaginationAjax
function showPaginationAjax()
{
bx_import('BxDolPaginate');
$oConfig = $this->_oMain->_oConfig;
$sUrlStart = BX_DOL_URL_ROOT . $oConfig->getBaseUri() . $this->sSitesBrowseUrl;
$sUrlStart .= false === strpos($sUrlStart, '?') ? '?' : '&';
$sUrlStart .= 'page={page}&per_page={per_page}';
$oPaginate = new BxDolPaginate(array('page_url' => 'javascript:void(0);', 'count' => $this->aCurrent['paginate']['totalNum'], 'per_page' => $this->aCurrent['paginate']['perPage'], 'page' => $this->aCurrent['paginate']['page'], 'view_all_url' => BX_DOL_URL_ROOT . $oConfig->getBaseUri() . $this->sSitesBrowseAll, 'info' => false, 'view_all' => true, 'page_links' => false, 'on_change_page' => "getHtmlData('search_result_block_{$this->sMode}', '{$sUrlStart}')"));
return '<div class="clear_both"></div>' . $oPaginate->getPaginate();
}
开发者ID:dalinhuang,项目名称:shopexts,代码行数:10,代码来源:BxSitesSearchResult.php
示例20: GenPostListMobile
/**
* Generate List of Posts for mobile frontend
*
* @param $iAuthor - display posts of provided user only
* @param $sMode - display all latest[default], featured or top posts
* @return HTML presentation of data
*/
function GenPostListMobile($iAuthor = 0, $sMode = false)
{
if ($this->_iVisitorID) {
// some workaround for mobile apps, to force login
bx_login($this->_iVisitorID);
}
bx_import('BxDolMobileTemplate');
$oMobileTemplate = new BxDolMobileTemplate($this->_oConfig, $this->_oDb);
$oMobileTemplate->pageStart();
echo $oMobileTemplate->addCss('blogs_common.css', 1);
$iPerPage = 10;
$iPage = (int) bx_get('page');
if ($iPage < 1) {
$iPage = 1;
}
$this->iPostViewType = 4;
$sOrder = 'last';
$sMobileWrapper = 'mobile_row.html';
$aParams = array();
switch ($sMode) {
case 'post':
$aViewingPostInfo = $this->_oDb->getPostInfo((int) bx_get('id'));
if (!$this->oPrivacy->check('view', (int) bx_get('id'), $this->_iVisitorID) || !$this->isAllowedBlogPostView($aViewingPostInfo['OwnerID'], true)) {
$oMobileTemplate->displayAccessDenied($sCaption);
return;
}
$this->iPostViewType = 3;
$aParams = array('id' => (int) bx_get('id'));
$sCaption = _t('_bx_blog_post_view');
$sMobileWrapper = 'mobile_box.html';
echo $oMobileTemplate->addCss('blogs.css', 1);
break;
case 'user':
$aParams = array('id' => (int) bx_get('id'));
$sCaption = _t('_bx_blog_Members_blog', getNickName((int) bx_get('id')));
break;
case 'featured':
$sCaption = _t('_bx_blog_Featured_Posts');
break;
case 'top':
$sOrder = 'top';
$sCaption = _t('_bx_blog_Top_Posts');
break;
case 'popular':
$sOrder = 'popular';
$sCaption = _t('_bx_blog_Popular_Posts');
break;
case 'last':
default:
$sMode = 'last';
$sCaption = _t('_bx_blog_Latest_posts');
}
if ('post' != $sMode && !$this->isAllowedBlogsPostsBrowse()) {
$oMobileTemplate->displayAccessDenied($sCaption);
return;
}
$oTmpBlogSearch = false;
$sCode = $this->_GenPosts($this->iPostViewType, $iPerPage, $sMode, $aParams, $sOrder, $oBlogSearchResults, $sMobileWrapper);
if (!$sCode || $oBlogSearchResults->aCurrent['paginate']['totalNum'] == 0) {
$oMobileTemplate->displayNoData($sCaption);
return;
}
echo $sCode;
if ($sMode != 'post') {
bx_import('BxDolPaginate');
$oPaginate = new BxDolPaginate(array('page_url' => $this->genBlogSubUrl() . '?action=mobile&mode=' . $sMode . '&page={page}', 'count' => $oBlogSearchResults->aCurrent['paginate']['totalNum'], 'per_page' => $iPerPage, 'page' => $iPage));
echo $oPaginate->getMobilePaginate();
}
$oMobileTemplate->pageCode($sCaption, false);
}
开发者ID:Gotgot59,项目名称:dolphin.pro,代码行数:77,代码来源:BxBlogsModule.php
注:本文中的BxDolPaginate类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论