當前位置: 首頁>>代碼示例>>PHP>>正文


PHP paging::setPerPage方法代碼示例

本文整理匯總了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']) {
開發者ID:spencerlambert,項目名稱:willie-php,代碼行數:31,代碼來源:search.bu.php

示例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
開發者ID:spencerlambert,項目名稱:willie-php,代碼行數:31,代碼來源:gallery.php


注:本文中的paging::setPerPage方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。