本文整理汇总了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:
示例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