本文整理汇总了PHP中Navigation::getNavigationFirst方法的典型用法代码示例。如果您正苦于以下问题:PHP Navigation::getNavigationFirst方法的具体用法?PHP Navigation::getNavigationFirst怎么用?PHP Navigation::getNavigationFirst使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Navigation
的用法示例。
在下文中一共展示了Navigation::getNavigationFirst方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: rule_report
function rule_report($tmp, $page)
{
global $RS;
list($filter, $fwhere) = Filter::getFilter($_POST, $_GET);
$filters = Filter::getFilters();
foreach ($fwhere as $w) {
$where .= $w;
}
$total_row =& Report::countRuleRecords($where);
$navigation = new Navigation($_POST['start'], $_POST['rows'], $_POST['begin'], $_POST['first'], $total_row);
$start = $navigation->getNavigationStart();
$rows = $navigation->getNavigationRows();
$begin = $navigation->getNavigationBegin();
$first = $navigation->getNavigationFirst();
$wlimit .= $navigation->getNavigationWhere();
$audits_a =& Report::getRuleRecords($where, $wlimit);
$audit_logs = array();
$total_rows = 0;
foreach ($audits_a as $alog) {
$audit_logs[] = array('rule_id' => $alog->getRuleID(), 'rule_id_count' => $alog->getRuleIDCount());
$total_rows++;
}
$tmp->assign('rows', $rows);
$tmp->assign('ceil', ceil($total_row / $rows));
$tmp->assign('total_row', $total_row);
$tmp->assign('begin', $begin);
$tmp->assign('start', $start);
$tmp->assign('filters', $filters);
$tmp->assign('filter', $filter);
$tmp->assign('data', $audit_logs);
$tmp->assign('tab_page', $page);
$tmp->assign('tab', 'rule');
$tmp->display('reports.tpl');
}
示例2: white_list
function white_list($tmp, $page)
{
global $RS;
$wlist_filter = $_POST['wlist_filter'];
if ($wlist_filter) {
$where .= " AND WL.WhiteListType={$wlist_filter}";
}
$total_row =& Rule::countWhiteListRecord($where);
$navigation = new Navigation($_POST['start'], $_POST['rows'], $_POST['begin'], $_POST['first'], $total_row);
$start = $navigation->getNavigationStart();
$rows = $navigation->getNavigationRows();
$begin = $navigation->getNavigationBegin();
$first = $navigation->getNavigationFirst();
$wlimit .= $navigation->getNavigationWhere();
$wlists =& Rule::getAllWhiteLists($where, $wlimit);
$rules = array();
foreach ($wlists as $white_list) {
$white_lists[] = array('wl_id' => $white_list->getWhiteListRecordID(), 'wl_type' => $RS['LIST_WHITE_LIST_TYPE'][$white_list->getWhiteListType()], 'wl_data' => $white_list->getWhiteListData(), 'wl_isactive' => $white_list->getWhiteListActive());
}
$filters['wlist_filter'] = array_values($RS['LIST_WHITE_LIST_TYPE']);
$tmp->assign('rows', $rows);
$tmp->assign('ceil', ceil($total_row / $rows));
$tmp->assign('total_row', $total_row);
$tmp->assign('begin', $begin);
$tmp->assign('start', $start);
$tmp->assign('filters', $filters);
$tmp->assign('wl_type_id', $_POST['wlist_filter']);
$tmp->assign('data', $white_lists);
$tmp->assign('tab_page', $page);
$tmp->assign('tab', 'wlist');
}