예제 #1
0
$GLOBAL_CONFIG = array();
include_once $root_path . 'include/care_api_classes/class_globalconfig.php';
$glob_obj = new GlobalConfig($GLOBAL_CONFIG);
$glob_obj->getConfig('pagin_insurance_list_max_block_rows');
if (empty($GLOBAL_CONFIG['pagin_insurance_list_max_block_rows'])) {
    $GLOBAL_CONFIG['pagin_insurance_list_max_block_rows'] = MAX_BLOCK_ROWS;
}
# Last resort, use the default defined at the start of this page
#Load and create paginator object
require_once $root_path . 'include/care_api_classes/class_paginator.php';
$pagen = new Paginator($pgx, $thisfile, $_SESSION['sess_searchkey'], $root_path);
# Adjust the max nr of rows in a block
$pagen->setMaxCount($GLOBAL_CONFIG['pagin_insurance_list_max_block_rows']);
# Get all the active firms info
$firms = $ins_obj->getLimitActiveFirmsInfo($GLOBAL_CONFIG['pagin_insurance_list_max_block_rows'], $pgx, $oitem, $odir);
$linecount = $ins_obj->LastRecordCount();
$pagen->setTotalBlockCount($linecount);
# Count total available data
if (isset($totalcount) && $totalcount) {
    $pagen->setTotalDataCount($totalcount);
} else {
    $totalcount = $ins_obj->countAllActiveFirms();
    $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