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


PHP paging::setPageVar方法代碼示例

本文整理匯總了PHP中paging::setPageVar方法的典型用法代碼示例。如果您正苦於以下問題:PHP paging::setPageVar方法的具體用法?PHP paging::setPageVar怎麽用?PHP paging::setPageVar使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在paging的用法示例。


在下文中一共展示了paging::setPageVar方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: pluralizeKeywords

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']) {
    // Clear individual data
    switch ($_GET['clear']) {
開發者ID:spencerlambert,項目名稱:willie-php,代碼行數:31,代碼來源:search.bu.php

示例2: unset

 // If there is no id then set the session to 0
 if ($id != '' and $_SESSION['id'] != $id) {
     $_SESSION['id'] = $id;
     $mediaPages->setCurrentPage(1);
     $galleryPages->setCurrentPage(1);
     unset($_SESSION['prevNextArraySess']);
     // Clear any prevNextArraySess previously set
     unset($_SESSION['sessGallerySortBy']);
     // Clear sessGallerySortBy
     unset($_SESSION['sessGallerySortType']);
     // Clear sessGallerySortType
 }
 $mediaPages->setPageName('gallery.php?mode=' . $_SESSION['currentMode']);
 $mediaPages->setPageVar();
 $galleryPages->setPageName('gallery.php?mode=' . $_SESSION['currentMode']);
 $galleryPages->setPageVar('gpage');
 if ($page) {
     if (!is_numeric($page)) {
         header("location: error.php?eType=invalidQuery");
         exit;
     }
     $mediaPages->setCurrentPage($page);
     // Set new current media page
 } else {
     $mediaPages->setCurrentPage($_SESSION['mediaCurrentPage']);
 }
 // Use session current page
 if ($gpage) {
     if (!is_numeric($gpage)) {
         header("location: error.php?eType=invalidQuery");
         exit;
開發者ID:spencerlambert,項目名稱:willie-php,代碼行數:31,代碼來源:gallery.php


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