function _actionBrowseFans($sUri, $sFuncAllowed, $sFuncDbGetFans, $iPerPage, $sUrlBrowse, $sTitle)
{
if (!($aDataEntry = $this->_preProductTabs($sUri, $sTitle))) {
return;
}
if (!$this->{$sFuncAllowed}($aDataEntry)) {
$this->_oTemplate->displayAccessDenied();
return;
}
$iPage = (int) $_GET['page'];
if ($iPage < 1) {
$iPage = 1;
}
$iStart = ($iPage - 1) * $iPerPage;
$aProfiles = array();
$iNum = $this->_oDb->{$sFuncDbGetFans}($aProfiles, $aDataEntry[$this->_oDb->_sFieldId], $iStart, $iPerPage);
if (!$iNum || !$aProfiles) {
$this->_oTemplate->displayNoData();
return;
}
$iPages = ceil($iNum / $iPerPage);
bx_import('BxTemplSearchProfile');
$oBxTemplSearchProfile = new BxTemplSearchProfile();
$sMainContent = '';
foreach ($aProfiles as $aProfile) {
$sMainContent .= $oBxTemplSearchProfile->displaySearchUnit($aProfile);
}
$sRet = $GLOBALS['oFunctions']->centerContent($sMainContent, '.searchrow_block_simple');
$sRet .= '<div class="clear_both"></div>';
bx_import('BxDolPaginate');
$sUrlStart = BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri() . $sUrlBrowse . $aDataEntry[$this->_oDb->_sFieldUri];
$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' => $iNum, 'per_page' => $iPerPage, 'page' => $iPage, 'on_change_per_page' => "document.location='" . $sUrlStart . "page=1&per_page=' + this.value + '" . (false !== bx_get($this->sFilterName) ? '&' . $this->sFilterName . '=' . bx_get($this->sFilterName) . "';" : "';")));
$sRet .= $oPaginate->getPaginate();
$this->_oTemplate->pageStart();
echo DesignBoxContent($sTitle, $sRet, 11);
$this->_oTemplate->pageCode($sTitle, false, false);
}