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


PHP Paginator::setMaxCount方法代码示例

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


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

示例1: array

        $odir = 'ASC';
    }
}
$GLOBAL_CONFIG = array();
include_once $root_path . 'include/care_api_classes/class_globalconfig.php';
$glob_obj = new GlobalConfig($GLOBAL_CONFIG);
$glob_obj->getConfig('pagin_address_list_max_block_rows');
if (empty($GLOBAL_CONFIG['pagin_address_list_max_block_rows'])) {
    $GLOBAL_CONFIG['pagin_address_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_address_list_max_block_rows']);
# 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);
开发者ID:patmark,项目名称:care2x-tz,代码行数:31,代码来源:citytown_list.php

示例2: Paginator

} else {
    # Reset paginator variables
    $pgx = 0;
    $totalcount = 0;
    $odir = 'ASC';
    $oitem = 'name_last';
}
# Paginator object
require_once $root_path . 'include/care_api_classes/class_paginator.php';
$pagen = new Paginator($pgx, $thisfile, $_SESSION['sess_searchkey'], $root_path);
require_once $root_path . 'include/care_api_classes/class_globalconfig.php';
$glob_obj = new GlobalConfig($GLOBAL_CONFIG);
# Get the max nr of rows from global config
$glob_obj->getConfig('pagin_patient_search_max_block_rows');
if (empty($GLOBAL_CONFIG['pagin_patient_search_max_block_rows'])) {
    $pagen->setMaxCount(MAX_BLOCK_ROWS);
} else {
    $pagen->setMaxCount($GLOBAL_CONFIG['pagin_patient_search_max_block_rows']);
}
if (($mode == 'search' || $mode == 'paginate') && !empty($searchkey)) {
    # Convert other wildcards
    $searchkey = strtr($searchkey, '*?', '%_');
    # Save the search keyword for eventual pagination routines
    if ($mode == 'search') {
        $_SESSION['sess_searchkey'] = $searchkey;
    }
    include_once $root_path . 'include/inc_date_format_functions.php';
    include_once $root_path . 'include/care_api_classes/class_encounter.php';
    $enc_obj = new Encounter();
    $encounter =& $enc_obj->searchLimitEncounterBasicInfo($searchkey, $pagen->MaxCount(), $pgx, $oitem, $odir);
    //echo $enc_obj->getLastQuery();
开发者ID:patmark,项目名称:care2x-tz,代码行数:31,代码来源:labor_test_request_search_patient.php

示例3: display

    /**
     * Displaying the GUI
     */
    function display($skey = '')
    {
        global $db, $searchkey, $root_path, $firstname_too, $HTTP_POST_VARS, $HTTP_GET_VARS, $sid, $lang, $mode, $totalcount, $pgx, $odir, $oitem, $HTTP_SESSION_VARS, $dbf_nodate, $user_origin, $parent_admit, $status, $target, $origin;
        $this->thisfile = $filename;
        $this->searchkey = $skey;
        $this->mode = $mode;
        if (empty($this->targetfile)) {
            $withtarget = FALSE;
            $navcolspan = 5;
        } else {
            $withtarget = TRUE;
            $navcolspan = 6;
        }
        if (!empty($skey)) {
            $searchkey = $skey;
        }
        # Load the language tables
        $lang_tables = $this->langfile;
        include $root_path . 'include/inc_load_lang_tables.php';
        # Initialize pages control variables
        if ($mode == 'paginate') {
            $searchkey = $HTTP_SESSION_VARS['sess_searchkey'];
            //$searchkey='USE_SESSION_SEARCHKEY';
            //$mode='search';
        } else {
            # Reset paginator variables
            $pgx = 0;
            $totalcount = 0;
            $odir = '';
            $oitem = '';
        }
        # Create an array to hold the config values
        $GLOBAL_CONFIG = array();
        #Load and create paginator object
        include_once $root_path . 'include/care_api_classes/class_paginator.php';
        $pagen = new Paginator($pgx, $this->thisfile, $HTTP_SESSION_VARS['sess_searchkey'], $root_path);
        include_once $root_path . 'include/care_api_classes/class_globalconfig.php';
        $glob_obj = new GlobalConfig($GLOBAL_CONFIG);
        $glob_obj->getConfig('person_id_%');
        # Get the max nr of rows from global config
        $glob_obj->getConfig('pagin_person_search_max_block_rows');
        if (empty($GLOBAL_CONFIG['pagin_person_search_max_block_rows'])) {
            # Last resort, use the default defined at the start of this page
            $pagen->setMaxCount($max_block_rows);
        } else {
            $pagen->setMaxCount($GLOBAL_CONFIG['pagin_person_search_max_block_rows']);
        }
        //$db->debug=true;
        if (!defined('SHOW_FIRSTNAME_CONTROLLER')) {
            define('SHOW_FIRSTNAME_CONTROLLER', $this->show_firstname_controller);
        }
        if (SHOW_FIRSTNAME_CONTROLLER) {
            if (isset($HTTP_POST_VARS['firstname_too'])) {
                if ($HTTP_POST_VARS['firstname_too']) {
                    $firstname_too = 1;
                } elseif ($mode == 'paginate' && isset($HTTP_GET_VARS['firstname_too']) && $HTTP_GET_VARS['firstname_too']) {
                    $firstname_too = 1;
                }
            } elseif ($mode != 'search') {
                $firstname_too = TRUE;
            }
        }
        if (($this->mode == 'search' || $this->mode == 'paginate') && !empty($searchkey)) {
            # Translate *? wildcards
            $searchkey = strtr($searchkey, '*?', '%_');
            include_once $root_path . 'include/inc_date_format_functions.php';
            include_once $root_path . 'include/care_api_classes/class_person.php';
            $person =& new Person();
            # Set the sorting directive
            if (isset($oitem) && !empty($oitem)) {
                $sql3 = " ORDER BY {$oitem} {$odir}";
            }
            //$sql='SELECT * FROM '.$dbtable.$sql2;
            if ($mode == 'paginate') {
                $fromwhere = $HTTP_SESSION_VARS['sess_searchkey'];
                $sql = 'SELECT pid, name_last, name_first, date_birth, addr_zip, sex, death_date, status FROM ' . $fromwhere . $sql3;
                $ergebnis = $db->SelectLimit($sql, $pagen->MaxCount(), $pagen->BlockStartIndex());
                $linecount = $ergebnis->RecordCount();
            } 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) {
//.........这里部分代码省略.........
开发者ID:tejdeeps,项目名称:tejcs.com,代码行数:101,代码来源:class_gui_search_person.php

示例4: array

        $odir = 'ASC';
    }
}
$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
/**
开发者ID:patmark,项目名称:care2x-tz,代码行数:31,代码来源:insurance_co_list.php

示例5: Paginator

    # Reset paginator variables
    $pgx = 0;
    $totalcount = 0;
    $odir = '';
    $oitem = '';
}
#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);
$GLOBAL_CONFIG = array();
# Get the max nr of rows from global config
require_once $root_path . 'include/care_api_classes/class_globalconfig.php';
$glob_obj = new GlobalConfig($GLOBAL_CONFIG);
$glob_obj->getConfig('pagin_personell_list_max_block_rows');
if (empty($GLOBAL_CONFIG['pagin_personell_list_max_block_rows'])) {
    $pagen->setMaxCount(MAX_BLOCK_ROWS);
} else {
    $pagen->setMaxCount($GLOBAL_CONFIG['pagin_personell_list_max_block_rows']);
}
if (empty($oitem)) {
    $oitem = 'name_last';
}
if (empty($odir)) {
    $odir = 'ASC';
}
# default, ascending alphabetic
# Set the sort parameters
$pagen->setSortItem($oitem);
$pagen->setSortDirection($odir);
$toggle = 0;
$sql = 'SELECT ps.pid, ps.nr, ps.is_discharged, p.name_last, p.name_first, p.date_birth, p.addr_zip, p.sex, p.photo_filename';
开发者ID:patmark,项目名称:care2x-tz,代码行数:31,代码来源:personell_listall.php


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