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


PHP Paging::getPageStartLimit方法代码示例

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


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

示例1: ClientsLogin

require_once '../common/config/config.inc.php';
require_once SOURCE_ROOT . 'classes/class.urns.php';
require_once SOURCE_ROOT . 'classes/class.niches.php';
require_once SOURCE_ROOT . 'classes/class.paging.php';
require_once SOURCE_ROOT . 'classes/class.sort.php';
require_once SOURCE_ROOT . 'classes/class.client.php';
require_once SOURCE_ROOT . 'classes/class.clients_login.php';
require_once SOURCE_ROOT . '/classes/excelwriter.php';
$objClientLogin = new ClientsLogin();
$objClientLogin->isValidClients();
$objSessionRedirectUrl = new SessionRedirectUrl();
$objUrns = new Urns();
$objPaging = new Paging();
$varClientID = $_SESSION['sessClientID'];
$varWhere = "1 AND urns.fkClientID=" . $varClientID . " AND niches.fkClientID =" . $varClientID;
$varPageStart = $objPaging->getPageStartLimit($_GET['page'], $_SESSION['sessClientPagingLimit']);
$varLimit = $varPageStart . ',' . $_SESSION['sessClientPagingLimit'];
$arrUrnsFlds = array('pkUrnID', 'fkNicheID', 'NicheTitle', 'urns.fkClientID', 'UrnTitle', 'UrnFirstName', 'UrnLastName', 'Public', 'UrnSuffix', 'UrnAddedDate', 'UrnTagNumber');
$arrUrnsRecord = $objGeneral->getRecord('niches JOIN urns ON niches.pkNicheID = urns.fkNicheID', $arrUrnsFlds, $varWhere);
$NumberofRows = count($arrUrnsRecord);
$varNumberPages = $objPaging->calculateNumberofPages($NumberofRows, $_SESSION['sessClientPagingLimit']);
$arrUrnsList = $objUrns->getUrnsList('niches JOIN urns ON niches.pkNicheID = urns.fkNicheID', $arrUrnsFlds, $varLimit, $varWhere);
$excel = new ExcelWriter("urns_list.xls");
if ($excel == false) {
    echo $excel->error;
}
$main_array = array('<b>Urn ID</b>', '<b>Niche ID</b>', '<b>Niche Title</b>', '<b>Client ID</b>', '<b>Urn Title</b>', '<b>First Name</b>', '<b>Last Name</b>', '<b>Public</b>', '<b>Suffix</b>', '<b>Added Date</b>', '<b>Tag Number</b>');
$columnTitles = array_values($main_array);
$numColumns = count($columnTitles);
$row++;
$arrSeparator = array_fill(0, 24, '  ');
开发者ID:saurabhs4,项目名称:niches,代码行数:31,代码来源:urns_export.php

示例2: Paging

//	CREATING THE CLASS OBJECTS FOR INCLUDING CLASS FILES
$objPaging = new Paging();
$objTaxDiscount = new TaxDiscount();
$_SESSION['sessTaxRedirectUrl'] = '';
$_SESSION['sessTaxDiscountAdd'] = '';
if ($_SERVER['QUERY_STRING'] != '') {
    $_SESSION['sessTaxRedirectUrl'] = $_SERVER['PHP_SELF'] . '?' . $_SERVER['QUERY_STRING'];
} else {
    $_SESSION['sessTaxRedirectUrl'] = $_SERVER['PHP_SELF'];
}
//	CREATING THE FIELDS ARRAYS TO SHOW & TABLE (IF JOIN OR OTHER CONDITION EXISTS) & A WHERE CONDITION
$arrTaxDiscountFlds = array('pkTaxDiscountID', 'TaxDiscountType', 'TaxDiscountName', 'TaxDiscountValue', 'TaxDiscountDateAdded', 'TaxDiscountDateModified', 'TaxDiscountStatus');
//	GET THE SEARCHING CONDITION ON THE SPECIFIC SEARCHING
$varSearchWhere = $objTaxDiscount->getSearchKeyWhere($_GET);
//applied the paging
$varPageStart = $objPaging->getPageStartLimit($_GET['page'], ADMIN_PAGE_RECORD_SIZE);
$varLimit = $varPageStart . ',' . ADMIN_PAGE_RECORD_SIZE;
$varTaxDiscountClm = 'pkTaxDiscountID';
$varSearchWhr = $varSearchWhere;
$NumberofRows = $objDatabase->getNumRows(TABLE_TAX_DISCOUNTS, $varTaxDiscountClm, $varSearchWhr);
$varNumberPages = $objPaging->calculateNumberofPages($NumberofRows, ADMIN_PAGE_RECORD_SIZE);
$arrTaxDiscountList = $objTaxDiscount->getTaxDiscountRecord(TABLE_TAX_DISCOUNTS, $arrTaxDiscountFlds, $varLimit, $varSearchWhr);
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
开发者ID:saurabhs4,项目名称:demoshop,代码行数:31,代码来源:tax_discount_list_uil.php

示例3: Category

require_once 'common/config/config.inc.php';
require_once SOURCE_ROOT . 'classes/class.paging.php';
require_once SOURCE_ROOT . 'classes/class.category.php';
//CREATING THE CLASS OBJECTS FOR INCLUDING CLASS FILES
$objCategory = new Category();
$objPaging = new Paging();
//CREATING THE FIELDS ARRAYS TO SHOW & TABLE (IF JOIN OR OTHER CONDITION EXISTS) & A WHERE CONDITION
if (isset($_REQUEST['frmSearchPressed']) && $_REQUEST['frmSearchPressed'] == 'Yes') {
    $varSearchWhr .= $objCategory->getCategoryFrontEndSearchKey($_GET);
}
//Listing product by category
if ($_GET['categoryID']) {
    $varSearchWhr .= $objCategory->getCategoryFrontEndSearchKey($_GET);
}
$arrProductFlds = array('pkProductID', 'fkCategoryID', 'ProductName', 'ProductCode', 'ProductDescription', 'ProductSpecifications', 'ProductCost', 'ProductActualCost', 'ProductQuantity', 'ProductStatus', 'ProductImage');
$varPageStart = $objPaging->getPageStartLimit($_GET['page'], SITE_RECORD_LIMIT);
$varLimit = $varPageStart . ',' . SITE_RECORD_LIMIT;
$varSearchWhr = ' 1 ' . $varSearchWhr . ' AND ProductStatus = \'Active\'';
$arrProductList = $objGeneral->getRecord(TABLE_PRODUCTS, $arrProductFlds, $varSearchWhr, '', $varLimit);
$arrProduct = $objGeneral->getRecord(TABLE_PRODUCTS, $arrProductFlds, $varSearchWhr);
//code for paging
$NumberofRows = count($arrProduct);
$varNumberPages = $objPaging->calculateNumberofPages($NumberofRows, SITE_RECORD_LIMIT);
//end for paging
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US">

<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
开发者ID:saurabhs4,项目名称:demoshop,代码行数:31,代码来源:search_result.php


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