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


PHP paging::setCurrentPage方法代码示例

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


在下文中一共展示了paging::setCurrentPage方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: paging

// 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']) {
        case "mediaTypes":
            unset($_SESSION['searchForm']['mediaTypes']);
            unset($_SESSION['searchForm']['seachForIDs']['mediaTypes']);
开发者ID:spencerlambert,项目名称:willie-php,代码行数:31,代码来源:search.bu.php

示例2: 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
 if ($id != '' and $_SESSION['id'] != $id) {
     $_SESSION['id'] = $id;
     $mediaPages->setCurrentPage(1);
     $galleryPages->setCurrentPage(1);
开发者ID:spencerlambert,项目名称:willie-php,代码行数:31,代码来源:gallery.php


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