本文整理汇总了PHP中Paginator::setSortDirection方法的典型用法代码示例。如果您正苦于以下问题:PHP Paginator::setSortDirection方法的具体用法?PHP Paginator::setSortDirection怎么用?PHP Paginator::setSortDirection使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Paginator
的用法示例。
在下文中一共展示了Paginator::setSortDirection方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
# Get all the active firms info
//$address=$address_obj->getAllActiveCityTown();
$address =& $address_obj->getLimitActiveCityTown($GLOBAL_CONFIG['pagin_address_list_max_block_rows'], $pgx, $oitem, $odir);
# Get the resulting record count
//echo $address_obj->getLastQuery();
$linecount = $address_obj->LastRecordCount();
$pagen->setTotalBlockCount($linecount);
# Count total available data
if (isset($totalcount) && $totalcount) {
$pagen->setTotalDataCount($totalcount);
} else {
$totalcount = $address_obj->countAllActiveCityTown();
$pagen->setTotalDataCount($totalcount);
}
$pagen->setSortItem($oitem);
$pagen->setSortDirection($odir);
# Start Smarty templating here
/**
* LOAD Smarty
*/
# Note: it is advisable to load this after the inc_front_chain_lang.php so
# that the smarty script can use the user configured template theme
require_once $root_path . 'gui/smarty_template/smarty_care.class.php';
$smarty = new smarty_care('system_admin');
# Title in toolbar
$smarty->assign('sToolbarTitle', "{$LDAddress} :: {$LDListAll}");
# href for help button
$smarty->assign('pbHelp', "javascript:gethelp('address_list.php')");
# href for close button
$smarty->assign('breakfile', $breakfile);
# Window bar title
示例2: display
//.........这里部分代码省略.........
} else {
$ergebnis = $person->SearchSelect($searchkey, $pagen->MaxCount(), $pagen->BlockStartIndex(), $oitem, $odir, $firstname_too);
#Retrieve the sql fromwhere portion
$fromwhere = $person->buffer;
$HTTP_SESSION_VARS['sess_searchkey'] = $fromwhere;
$sql = $person->getLastQuery();
$linecount = $person->LastRecordCount();
}
if ($ergebnis) {
if ($linecount == 1) {
if ($this->auto_show_bynumeric && $person->is_nr || $this->auto_show_byalphanumeric) {
$zeile = $ergebnis->FetchRow();
header("location:" . $this->targetfile . "?sid=" . $sid . "&lang=" . $lang . "&pid=" . $zeile['pid'] . "&edit=1&status=" . $status . "&user_origin=" . $user_origin . "&noresize=1&mode=");
exit;
}
}
$pagen->setTotalBlockCount($linecount);
# If more than one count all available
if (isset($totalcount) && $totalcount) {
$pagen->setTotalDataCount($totalcount);
} else {
# Count total available data
$sql = 'SELECT COUNT(pid) AS maxnr FROM ' . $fromwhere;
if ($result = $db->Execute($sql)) {
if ($result->RecordCount()) {
$rescount = $result->FetchRow();
$totalcount = $rescount['maxnr'];
}
}
$pagen->setTotalDataCount($totalcount);
}
# Set the sort parameters
$pagen->setSortItem($oitem);
$pagen->setSortDirection($odir);
} else {
if ($show_sqlquery) {
echo $sql;
}
}
} else {
$mode = '';
}
$entry_block_bgcolor = $this->entry_block_bgcolor;
$entry_border_bgcolor = $this->entry_border_bgcolor;
$entry_body_bgcolor = $this->entry_body_bgcolor;
$searchmask_bgcolor = $this->searchmask_bgcolor;
############## Here starts the html output
# Start Smarty templating here
# Create smarty object without initiliazing the GUI (2nd param = FALSE)
include_once $root_path . 'gui/smarty_template/smarty_care.class.php';
$this->smarty = new smarty_care('common', FALSE);
# Output any existing text before the search block
if (!empty($this->pretext)) {
$this->smarty->assign('sPretext', $this->pretext);
}
# Show tips and tricks link and the javascript
if ($this->showtips) {
ob_start();
include_once $root_path . 'include/inc_js_gethelp.php';
$sTemp = ob_get_contents();
$this->smarty->assign('sJSGetHelp', $sTemp);
ob_end_clean();
$this->smarty->assign('LDTipsTricks', '<a href="javascript:gethelp(\'person_search_tips.php\')">' . $LDTipsTricks . '</a>');
}
#
# Prepare the javascript validator