本文整理匯總了PHP中company::makeInfoListPage方法的典型用法代碼示例。如果您正苦於以下問題:PHP company::makeInfoListPage方法的具體用法?PHP company::makeInfoListPage怎麽用?PHP company::makeInfoListPage使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類company
的用法示例。
在下文中一共展示了company::makeInfoListPage方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: implode
}
$strWhere = implode(' AND ', $arrWhere);
$strWhere = " WHERE user_id='{$_SESSION['user_id']}'" . $strWhere;
if (!isset($_GET['page']) || $_GET['page'] == '') {
$_GET['page'] = $arrGPage['page'];
}
$arrData = $objWebInit->getInfoList($strWhere, ' ORDER BY submit_date DESC', ($_GET['page'] - 1) * $arrGPage['page_size'], $arrGPage['page_size']);
if ($arrData == "") {
$arrData = null;
}
//翻頁跳轉link
$strLink = '';
if (!empty($arrLink)) {
$strLink = implode('&', $arrLink);
}
$strPage = $objWebInit->makeInfoListPage($arrData['COUNT_ROWS'], $strLink);
unset($arrData['COUNT_ROWS']);
// 取類別標題
if (is_array($arrMType) && !empty($arrMType)) {
foreach ($arrData as $k => $data) {
foreach ($arrMType as $k1 => $type) {
if ($data['type_id'] == $k1) {
$arrData[$k]['type_title'] = $type;
}
}
}
} else {
$arrType = $objWebInit->getTypeList();
foreach ($arrData as $k => $data) {
foreach ($arrType as $k1 => $type) {
if ($data['type_id'] == $type['type_id']) {
示例2: implode
$strTypeTitle = $arrTypeInfo['type_title'];
$arrMOutput["smarty_assign"]['strTypeTitle'] = $strTypeTitle;
}
}
$strWhere = implode(' AND ', $arrWhere);
$strWhere = 'where ' . $strWhere;
$arrInfoList = $objWebInit->getInfoList($strWhere, ' ORDER BY topflag DESC,submit_date DESC', ($intPage - 1) * $arrGPage['page_size'], $arrGPage['page_size'], true);
$intRows = $arrInfoList['COUNT_ROWS'];
unset($arrInfoList['COUNT_ROWS']);
//靜態url處理
$strLink = '';
if ($arrGWeb['URL_static']) {
if (!empty($arrLink)) {
$strLink = str_replace('=', '-', implode('-', $arrLink));
}
} else {
if (!empty($arrLink)) {
$strLink = implode('&', $arrLink);
}
}
//翻頁跳轉link
$strPage = $objWebInit->makeInfoListPage($intRows, $strLink, $link_type = $arrGWeb['URL_static']);
if (!is_array($arrMType) || empty($arrMType)) {
$arrMType = $objWebInit->getTypeList();
$arrMType = $objWebInit->formatTypeList(0, $arrMType);
}
// 輸出到模板
$arrMOutput["smarty_assign"]['arrInfoList'] = $arrInfoList;
$arrMOutput["smarty_assign"]['strPage'] = $strPage;
$arrMOutput["smarty_assign"]['MAIN'] = $arrGSmarty['main_dir'] . 'list.html';
$objWebInit->output($arrMOutput);