本文整理汇总了PHP中paging::getPagingArray方法的典型用法代码示例。如果您正苦于以下问题:PHP paging::getPagingArray方法的具体用法?PHP paging::getPagingArray怎么用?PHP paging::getPagingArray使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类paging
的用法示例。
在下文中一共展示了paging::getPagingArray方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: range
// Pass the total number of results to the $pages object
$media->getMediaDetails();
// Run the getMediaDetails function to grab all the media file details
$mediaArray = $media->getMediaArray();
// Get the array of media
$thumbMediaDetailsArray = $media->getDetailsFields('thumb');
// Get thumb details
$smarty->assign('thumbMediaDetails', $thumbMediaDetailsArray);
$smarty->assign('mediaRows', $returnRows);
$smarty->assign('mediaArray', $mediaArray);
}
/*
* Get paging info and pass it to smarty
*/
//$mediaPages->setTotalResults($returnRows); // Pass the total number of results to the $pages object
$mediaPagingArray = $mediaPages->getPagingArray();
$mediaPagingArray['pageNumbers'] = range(0, $mediaPagingArray['totalPages']);
unset($mediaPagingArray['pageNumbers'][0]);
// Remove the 0 element from the beginning of the array
$smarty->assign('mediaPaging', $mediaPagingArray);
$smarty->assign('resultsArray', $_SESSION['searchForm']['resultsArray']);
// xxxxxx for testing
//}
}
if (!$_SESSION['searchForm']['inSearch'] or !$returnRows) {
$tagCloudResult = mysqli_query($db, "SELECT *,COUNT(key_id) AS keycounter FROM {$dbinfo[pre]}keywords GROUP BY keyword ORDER BY keycounter DESC LIMIT 300");
// xxxxxxxxx Language
$tagCloudCount = mysqli_num_rows($tagCloudResult);
while ($tag = mysqli_fetch_assoc($tagCloudResult)) {
$tagsArray[$tag['key_id']] = $tag;
$tagsArray[$tag['key_id']]['count'] = $tag['keycounter'];
示例2: range
$thumbMediaDetailsArray = $media->getDetailsFields('thumb');
$smarty->assign('thumbMediaDetails', $thumbMediaDetailsArray);
$smarty->assign('mediaRows', $returnRows);
$smarty->assign('mediaArray', $mediaArray);
}
/*
* Get paging info and pass it to smarty
*/
$mediaPagingArray = $mediaPages->getPagingArray();
//print_r($mediaPagingArray); exit; // Testing
$mediaPagingArray['pageNumbers'] = range(0, $mediaPagingArray['totalPages']);
unset($mediaPagingArray['pageNumbers'][0]);
// Remove the 0 element from the beginning of the array
$smarty->assign('mediaPaging', $mediaPagingArray);
}
$galleryPagingArray = $galleryPages->getPagingArray();
$galleryPagingArray['pageNumbers'] = range(0, $galleryPagingArray['totalPages']);
unset($galleryPagingArray['pageNumbers'][0]);
// Remove the 0 element from the beginning of the array
$smarty->assign('galleryPaging', $galleryPagingArray);
if ($_SESSION['currentMode'] == 'lightbox' or $mode == 'lightbox') {
$smarty->assign('id', $_SESSION['id']);
} else {
if ($config['EncryptIDs']) {
$smarty->assign('id', k_encrypt($_SESSION['id']));
} else {
$smarty->assign('id', $_SESSION['id']);
}
// Pass a gallery id or a contributor id
}
$smarty->assign('startrec', $mediaStartRecord);