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


PHP BxDolPaginate::getPaginate方法代码示例

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


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

示例1: array

 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

示例2: 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

示例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: 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

示例6: showPagination

 function showPagination($sUrlAdmin = false)
 {
     $oMain = $this->getMain();
     $oConfig = $oMain->_oConfig;
     bx_import('BxDolPaginate');
     $sUrlStart = BX_DOL_URL_ROOT . $oConfig->getBaseUri() . ($sUrlAdmin ? $sUrlAdmin : $this->sBrowseUrl);
     $sUrlStart .= false === strpos($sUrlStart, '?') ? '?' : '&';
     $oPaginate = new BxDolPaginate(array('page_url' => $sUrlStart . 'page={page}&per_page={per_page}' . (false !== bx_get($this->sFilterName) ? '&' . $this->sFilterName . '=' . bx_get($this->sFilterName) : ''), 'count' => $this->aCurrent['paginate']['totalNum'], 'per_page' => $this->aCurrent['paginate']['perPage'], 'page' => $this->aCurrent['paginate']['page'], 'per_page_changer' => true, 'page_reloader' => true, 'on_change_page' => '', 'on_change_per_page' => "document.location='" . $sUrlStart . "page=1&per_page=' + this.value + '" . (false !== bx_get($this->sFilterName) ? '&' . $this->sFilterName . '=' . bx_get($this->sFilterName) . "';" : "';")));
     return '<div class="clear_both"></div>' . $oPaginate->getPaginate();
 }
开发者ID:noormcs,项目名称:studoro,代码行数:10,代码来源:BxDolTwigSearchResult.php

示例7: 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

示例8: 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

示例9: 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

示例10: 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

示例11: 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

示例12: array

 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

示例13: GenBlogLists

    /**
     * Generate List of Blogs
     *
     * @param $sType - tyle of list ('top', 'last')
     * @return HTML presentation of data
     */
    function GenBlogLists($sType = '', $bBlock = true)
    {
        if (!$this->isAllowedBlogsBrowse()) {
            return $this->_oTemplate->displayAccessDenied();
        }
        // lang keys
        $sPostsC = _t('_bx_blog_Posts');
        $sNoBlogsC = _t('_Empty');
        $sAllBlogsC = _t('_bx_blog_All_Blogs');
        $sTopBlogsC = _t('_bx_blog_Top_Blogs');
        $iCheckedMemberID = $this->_iVisitorID;
        //////////////////pagination addition//////////////////////////
        //number elements for per page
        $iPerPage = false !== bx_get('per_page') ? (int) bx_get('per_page') : 10;
        if ($iPerPage > 100) {
            $iPerPage = 100;
        }
        $iCurPage = false !== bx_get('page') ? (int) bx_get('page') : 1;
        if ($iCurPage < 1) {
            $iCurPage = 1;
        }
        $sLimitFrom = ($iCurPage - 1) * $iPerPage;
        $sqlLimit = "LIMIT {$sLimitFrom}, {$iPerPage}";
        ////////////////////////////
        $sCaption = $sAllBlogsC;
        $sStatusFilter = $this->isAdmin() == true || $this->isAllowedApprove() || $this->isAllowedPostEdit(-1) || $this->isAllowedPostDelete(-1) ? '1' : "`PostStatus`='approval'";
        switch ($sType) {
            case 'top':
                $vBlogsRes = $this->_oDb->getTopBlogs($sStatusFilter, $sqlLimit);
                $sCaption = $sTopBlogsC;
                break;
            case 'last':
            default:
                $vBlogsRes = $this->_oDb->getLastBlogs($sStatusFilter, $sqlLimit);
                break;
        }
        $iTotalBlogs = $this->_oDb->getAllBlogsCnt($sStatusFilter);
        // process database queries
        $iTotalNum = mysql_num_rows($vBlogsRes);
        if ($iTotalNum == 0) {
            $sCode = MsgBox($sNoBlogsC);
            return $bBlock ? DesignBoxContent($sCaption, $sCode, 1) : $sCode;
        }
        $iGenPostsCnt = 0;
        while ($aBlogsRes = mysql_fetch_assoc($vBlogsRes)) {
            if ($aBlogsRes['PostCount'] == 0 && $sType == 'top') {
                //in Top blogs skip posts with 0 comments
                continue;
            }
            $aOwnerInfo = getProfileInfo($aBlogsRes['OwnerID']);
            $sOwnerNickname = getNickName($aBlogsRes['OwnerID']);
            if ($aBlogsRes['OwnerID'] == 0) {
                $sOwnerNickname = _t('_Admin');
            }
            if ($sOwnerNickname) {
                $sCont = get_member_thumbnail($aBlogsRes['OwnerID'], 'left');
                $sBlogOwnerLink = $this->genBlogLink('show_member_blog', array('Permalink' => $aOwnerInfo['NickName'], 'Link' => $aBlogsRes['OwnerID']));
                $sDescription = htmlspecialchars(strip_tags($aBlogsRes['Description']));
                $aBlogUnitVariables = array('owner_thumbnail' => $sCont, 'owner_nickname' => $sOwnerNickname . ' ' . _t('_bx_blog_Blog'), 'posts_count' => $aBlogsRes['PostCount'] . ' ' . $sPostsC, 'blog_link' => $sBlogOwnerLink, 'blog_description' => $sDescription);
                $sRetHtml .= $this->_oTemplate->parseHtmlByTemplateName('blog_unit', $aBlogUnitVariables);
                $iGenPostsCnt++;
            }
        }
        /////////pagination addition//////////////////
        if ($this->isPermalinkEnabled() == false) {
            $sRequest = bx_html_attribute($_SERVER['PHP_SELF']) . '?action=top_blogs&page={page}&per_page={per_page}';
        } else {
            $sRequest = bx_get('action') == 'top_blogs' ? BX_DOL_URL_ROOT . 'blogs/top/' : BX_DOL_URL_ROOT . 'blogs/all/';
            $sRequest .= '{per_page}/{page}' . $sPaginAddon;
        }
        ///////////////////////////
        $oPaginate = new BxDolPaginate(array('page_url' => $sRequest, 'count' => $iTotalBlogs, 'per_page' => $iPerPage, 'page' => $iCurPage));
        $sPagination = $oPaginate->getPaginate();
        $sRetHtmlVal = <<<EOF
<div class="bx-def-bc-padding">
    {$sRetHtml}
</div>
{$sPagination}
EOF;
        return $bBlock ? DesignBoxContent($sCaption, $sRetHtmlVal, 1) : $sRetHtmlVal;
    }
开发者ID:Gotgot59,项目名称:dolphin.pro,代码行数:87,代码来源:BxBlogsModule.php

示例14: getAlbumsBlock

 function getAlbumsBlock($aSectionParams = array(), $aAlbumParams = array(), $aCustom = array())
 {
     $aCustomTmpl = array('caption' => _t('_' . $this->oModule->_oConfig->getMainPrefix() . '_albums'), 'enable_center' => true, 'unit_css_class' => '.sys_album_unit', 'page' => isset($_GET['page']) ? (int) $_GET['page'] : 1, 'per_page' => isset($_GET['per_page']) ? (int) $_GET['per_page'] : (int) $this->oModule->_oConfig->getGlParam('number_albums_home'), 'simple_paginate' => true, 'menu_top' => '', 'menu_bottom' => '', 'paginate_url' => '', 'simple_paginate_url' => BX_DOL_URL_ROOT . $this->oModule->_oConfig->getUri() . '/albums/browse', 'simple_paginate_view_all' => true);
     $aCustom = array_merge($aCustomTmpl, $aCustom);
     $this->aCurrent['paginate']['perPage'] = $aCustom['per_page'];
     $this->aCurrent['paginate']['page'] = $aCustom['page'];
     $this->fillFilters($aSectionParams);
     $sCode = $this->getAlbumList($this->aCurrent['paginate']['page'], $this->aCurrent['paginate']['perPage'], $aAlbumParams);
     if ($this->aCurrent['paginate']['totalAlbumNum'] > 0) {
         if ($aCustom['enable_center']) {
             $sCode = $GLOBALS['oFunctions']->centerContent($sCode, $aCustom['unit_css_class']);
         }
         if (empty($aCustom['menu_bottom'])) {
             $aLinkAddon = $this->getLinkAddByPrams(array('r'));
             $oPaginate = new BxDolPaginate(array('page_url' => $aCustom['paginate_url'], 'count' => $this->aCurrent['paginate']['totalAlbumNum'], 'per_page' => $this->aCurrent['paginate']['perPage'], 'page' => $this->aCurrent['paginate']['page'], 'on_change_page' => 'return !loadDynamicBlock({id}, \'' . $aCustom['paginate_url'] . $aLinkAddon['params'] . '&page={page}&per_page={per_page}\');'));
             $aCode['menu_bottom'] = $aCustom['simple_paginate'] ? $oPaginate->getSimplePaginate($aCustom['simple_paginate_url'], -1, -1, $aCustom['simple_paginate_view_all']) : $oPaginate->getPaginate();
         } else {
             $aCode['menu_bottom'] = $aCustom['menu_bottom'];
         }
         $aCode['code'] = DesignBoxContent($aCustom['caption'], $sCode);
     }
     $aCode['menu_top'] = $aCustom['menu_top'];
     return array($aCode['code'], $aCode['menu_top'], $aCode['menu_bottom'], !empty($aCode['code']) ? false : '');
 }
开发者ID:Prashank25,项目名称:dolphin.pro,代码行数:24,代码来源:BxBaseSearchResultSharedMedia.php

示例15: BxDolPaginate

        <input id="ch{$iRssID}" type="checkbox" value="{$iRssID}" name="crsss[]" />
    </div>
    <div class="bx-def-font-h3" >
        {$sRssUrl}
    </div>
    <div>
        <span style="color:{$sStatusColor};">{$sRssStatus}</span> <span class="sys-bullet"></span> {$sRssDesc}
    </div>
</div>
EOF;
    }
    $sRequest = bx_html_attribute($_SERVER['PHP_SELF']) . '?page={page}&per_page={per_page}';
    ///////////////pagination/////////////////////
    // gen pagination block ;
    $oPaginate = new BxDolPaginate(array('page_url' => $sRequest, 'count' => $iTotalNum, 'per_page' => $iPerPage, 'page' => $iCurPage));
    $sPagination = $oPaginate->getPaginate();
    ///////////////eof pagination/////////////////////
    bx_import('BxTemplSearchResult');
    $oSearchResult = new BxTemplSearchResult();
    $sAdmPanel = $oSearchResult->showAdminActionsPanel('crss_box', array('action_approve' => '_Approve', 'action_disapprove' => '_Disapprove', 'action_delete' => '_Delete'), 'crsss');
    $sUrl = bx_html_attribute($_SERVER['PHP_SELF']);
    $sCode .= <<<EOF
<form action="{$sUrl}" method="post" name="ads_moderation">
    <div id="crss_box" class="bx-def-bc-padding">
        {$sRSSs}
    </div>
    {$sPagination}
    {$sAdmPanel}
</form>
EOF;
}
开发者ID:Gotgot59,项目名称:dolphin.pro,代码行数:31,代码来源:post_mod_crss.php


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