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


PHP paging::getStartRecord方法代码示例

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


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

示例1: unset

        case "fields":
            unset($_SESSION['searchForm']['fields']);
            $_SESSION['searchForm']['allFields'] = true;
            break;
    }
    $mediaPages->setCurrentPage(1);
    unset($_SESSION['searchForm']['resultsArray']);
    // Clear previous resultsArray
}
if ($page) {
    $mediaPages->setCurrentPage($page);
} else {
    $mediaPages->setCurrentPage($_SESSION['searchCurrentPage']);
}
// Use session current page
$mediaStartRecord = $mediaPages->getStartRecord();
// Get the record the db should start at
//echo "{$mediaStartRecord},{$mediaPerPage} - ".$_SESSION['mediaCurrentPage'];
//$mediaStartRecord = 0;
if ($_REQUEST['searchSortBy']) {
    $_SESSION['searchForm']['searchSortBy'] = $_REQUEST['searchSortBy'];
}
if ($_REQUEST['searchSortType']) {
    $_SESSION['searchForm']['searchSortType'] = $_REQUEST['searchSortType'];
}
if (!$_SESSION['searchForm']['searchSortBy']) {
    $_SESSION['searchForm']['searchSortBy'] = 'date_added';
}
if (!$_SESSION['searchForm']['searchSortType']) {
    switch ($_SESSION['searchForm']['searchSortType']) {
        default:
开发者ID:spencerlambert,项目名称:willie-php,代码行数:31,代码来源:search.bu.php

示例2: header

 } else {
     $mediaPages->setCurrentPage($_SESSION['mediaCurrentPage']);
 }
 // Use session current page
 if ($gpage) {
     if (!is_numeric($gpage)) {
         header("location: error.php?eType=invalidQuery");
         exit;
     }
     $galleryPages->setCurrentPage($gpage);
     // Set new current gallery page
 } else {
     $galleryPages->setCurrentPage($_SESSION['galleryCurrentPage']);
 }
 // Use session current page
 $galleryStartRecord = $galleryPages->getStartRecord();
 // Get the record the db should start at
 $mediaStartRecord = $mediaPages->getStartRecord();
 // Get the record the db should start at
 $smarty->assign('galleryMode', $_SESSION['currentMode']);
 // Assign the gallery mode to smarty
 switch ($_SESSION['currentMode']) {
     default:
         $templateFile = 'noaccess.tpl';
         // No permissions - send to noaccess page
         break;
         /*
          * Gallery
          */
     /*
      * Gallery
开发者ID:spencerlambert,项目名称:willie-php,代码行数:31,代码来源:gallery.php


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