当前位置: 首页>>代码示例>>PHP>>正文


PHP BxDolPaginate类代码示例

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


在下文中一共展示了BxDolPaginate类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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


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