本文整理匯總了PHP中paging::setPerPage方法的典型用法代碼示例。如果您正苦於以下問題:PHP paging::setPerPage方法的具體用法?PHP paging::setPerPage怎麽用?PHP paging::setPerPage使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類paging
的用法示例。
在下文中一共展示了paging::setPerPage方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: pluralizeKeywords
}
// Pluralize keywords function - singularize and pluralize
function pluralizeKeywords($keyword)
{
}
// XXXXXXXX Search fields
// Title
// Description
//echo 'psf: '.$postSearchForm.'-';
/*
* Paging
*/
$mediaPerPage = $config['settings']['media_perpage'];
// Set the default media per page amount
$mediaPages = new paging('search');
$mediaPages->setPerPage($mediaPerPage);
$mediaPages->setPageName('search.php?');
$mediaPages->setPageVar();
// No get or post data sent or a clearSearch request - resetting search
if (!$_GET and !$_POST or $_REQUEST['clearSearch']) {
$mediaPages->setCurrentPage(1);
unset($_SESSION['searchForm']);
$_SESSION['searchForm']['allFields'] = true;
}
//echo $_SESSION['searchForm']['firstLoad'];
if ($postSearchForm) {
$mediaPages->setCurrentPage(1);
unset($_SESSION['searchForm']['resultsArray']);
// Clear any previous results array
}
if ($_GET['clear']) {
示例2: paging
}
// If gallerySortType is passed update the session
/*
* Media Paging
*/
$mediaPerPage = $config['settings']['media_perpage'];
// Set the default media per page amount
$mediaPages = new paging('media');
$mediaPages->setPerPage($mediaPerPage);
/*
* Gallery Paging
*/
$galleryPerPage = $config['settings']['gallery_perpage'];
// Set the default galleries per page amount
$galleryPages = new paging('gallery');
$galleryPages->setPerPage($galleryPerPage);
if ($_SESSION['currentMode'] != $mode) {
$_SESSION['currentMode'] = $mode;
$mediaPages->setCurrentPage(1);
$galleryPages->setCurrentPage(1);
unset($_SESSION['prevNextArraySess']);
// Clear any prevNextArraySess previously set
unset($_SESSION['sessGallerySortBy']);
// Clear sessGallerySortBy
unset($_SESSION['sessGallerySortType']);
// Clear sessGallerySortType
}
if (!$_SESSION['id'] or !$_GET['id']) {
$_SESSION['id'] = 0;
}
// If there is no id then set the session to 0