当前位置: 首页>>代码示例>>PHP>>正文


PHP paging::setPageName方法代码示例

本文整理汇总了PHP中paging::setPageName方法的典型用法代码示例。如果您正苦于以下问题:PHP paging::setPageName方法的具体用法?PHP paging::setPageName怎么用?PHP paging::setPageName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在paging的用法示例。


在下文中一共展示了paging::setPageName方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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']) {
    // Clear individual data
开发者ID:spencerlambert,项目名称:willie-php,代码行数:31,代码来源:search.bu.php

示例2:

             $_SESSION['sessGallerySortType'] = $currentGallery['dsorting2'] ? $currentGallery['dsorting2'] : $config['settings']['dsorting2'];
         }
         if ($_SESSION['sessGallerySortBy'] != 'media_id') {
             // Add a secondary ordering type just in case
             $sql .= ",{$dbinfo[pre]}media.media_id DESC";
         }
         $sql = "\r\n\t\t\t\t\tSELECT SQL_CALC_FOUND_ROWS *\r\n\t\t\t\t\tFROM {$dbinfo[pre]}media\r\n\t\t\t\t\tLEFT JOIN {$dbinfo[pre]}media_galleries \r\n\t\t\t\t\tON {$dbinfo[pre]}media.media_id = {$dbinfo[pre]}media_galleries.gmedia_id\r\n\t\t\t\t\tWHERE {$dbinfo[pre]}media_galleries.gallery_id = {$currentAlbumID}\r\n\t\t\t\t\tAND {$dbinfo[pre]}media.active = 1\r\n\t\t\t\t\tGROUP BY {$dbinfo[pre]}media.media_id\r\n\t\t\t\t\tORDER BY {$dbinfo[pre]}media.{$_SESSION[sessGallerySortBy]} {$_SESSION[sessGallerySortType]}\r\n\t\t\t\t";
         // LIMIT {$mediaStartRecord},{$mediaPerPage}
         $crumbs[1]['linkto'] = $siteURL . "/contributor.my.media.php?mode=album&albumID={$albumID}";
         // Check for SEO
         $crumbs[1]['name'] = $currentAblum['name'];
         break;
 }
 $_SESSION['crumbsSession'] = $crumbs;
 // Assign these to a session to be used elsewhere
 $mediaPages->setPageName('contributor.my.media.php?mode=' . $_SESSION['currentContrMode']);
 $mediaPages->setPageVar();
 if ($page) {
     $mediaPages->setCurrentPage($page);
 } else {
     $mediaPages->setCurrentPage($_SESSION['mediaCurrentPage']);
 }
 // Use session current page
 $mediaStartRecord = $mediaPages->getStartRecord();
 // Get the record the db should start at
 if ($sql) {
     /*
      * Previous and next button array
      */
     if (!$_SESSION['prevNextArraySess']) {
         $prevNextResult = mysqli_query($db, str_replace('*', "{$dbinfo[pre]}media.media_id", $sql . $maxPrevNext));
开发者ID:spencerlambert,项目名称:willie-php,代码行数:31,代码来源:contributor.my.media.php

示例3: 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");
开发者ID:spencerlambert,项目名称:willie-php,代码行数:31,代码来源:gallery.php

示例4: paging

require_once BASE_PATH . '/assets/includes/errors.php';
require_once BASE_PATH . '/assets/classes/paging.php';
try {
    $_SESSION['currentMode'] = 'newest-media';
    /*
     * Media Paging
     */
    $mediaPerPage = $config['settings']['media_perpage'];
    // Set the default media per page amount
    $mediaPages = new paging('media');
    $mediaPages->setPerPage($mediaPerPage);
    if (!$_GET['page']) {
        // No page passed go to page 1
        $mediaPages->setCurrentPage(1);
    }
    $mediaPages->setPageName('newest.media.php');
    //?mode='.$_SESSION['currentMode']
    $mediaPages->setPageVar();
    if ($page) {
        $mediaPages->setCurrentPage($page);
    } else {
        $mediaPages->setCurrentPage($_SESSION['mediaCurrentPage']);
    }
    // Use session current page
    $mediaStartRecord = $mediaPages->getStartRecord();
    // Get the record the db should start at
    unset($_SESSION['id']);
    $mediaCount = mysqli_num_rows(mysqli_query($db, "\r\n\t\t\tSELECT {$dbinfo[pre]}media.umedia_id\r\n\t\t\tFROM {$dbinfo[pre]}media\r\n\t\t\tLEFT JOIN {$dbinfo[pre]}media_galleries \r\n\t\t\tON {$dbinfo[pre]}media.media_id = {$dbinfo[pre]}media_galleries.gmedia_id\r\n\t\t\tWHERE {$dbinfo[pre]}media_galleries.gallery_id IN ({$memberPermGalleriesForDB})\r\n\t\t\tAND {$dbinfo[pre]}media.active = 1 \r\n\t\t\tAND {$dbinfo[pre]}media.approval_status = 1 \r\n\t\t\tGROUP BY {$dbinfo[pre]}media.media_id\r\n\t\t"));
    // Get the total number of items
    if ($mediaCount > $mediaPerPage * 20) {
        $mediaCount = $mediaPerPage * 20;
开发者ID:spencerlambert,项目名称:willie-php,代码行数:31,代码来源:newest.media.php


注:本文中的paging::setPageName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。