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


PHP Paginator::MaxCount方法代码示例

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


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

示例1: IN

                 $where .= " AND p.pid=e.pid AND f.encounter_nr=e.encounter_nr";
             }
         }
     }
     $sql = "{$select}{$from} WHERE {$where} AND e.encounter_status <> 'cancelled' AND e.status NOT IN ('void','inactive','hidden','deleted') ORDER by ";
     $_SESSION['sess_searchkey'] = $sql;
 }
 if (!empty($where)) {
     # Filter the encounter nr:
     if ($oitem == 'encounter_nr' || $oitem == 'encounter_date') {
         $tab = 'e';
     } else {
         $tab = 'p';
     }
     //echo "$sql $tab.$oitem $odir";
     if ($ergebnis = $db->SelectLimit("{$sql} {$tab}.{$oitem} {$odir}", $pagen->MaxCount(), $pagen->BlockStartIndex())) {
         $rows = $ergebnis->RecordCount();
         if (AUTOSHOW_ONERESULT) {
             if ($rows == 1) {
                 # If result is single item, display the data immediately
                 $result = $ergebnis->FetchRow();
                 header("location:aufnahme_daten_zeigen.php" . URL_REDIRECT_APPEND . "&target=archiv&origin=archiv&encounter_nr=" . $result['encounter_nr']);
                 exit;
             }
         }
         $pagen->setTotalBlockCount($rows);
         # If more than one count all available
         if (isset($totalcount) && $totalcount) {
             $pagen->setTotalDataCount($totalcount);
         } else {
             # Count total available data
开发者ID:patmark,项目名称:care2x-tz,代码行数:31,代码来源:aufnahme_list.php

示例2: strtr

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();
    # Get the resulting record count
    $linecount = $enc_obj->LastRecordCount();
    if ($linecount == 1 && $mode == 'search') {
        $row = $encounter->FetchRow();
        header("location:" . $root_path . "modules/nursing/nursing-station-patientdaten-doconsil-" . $target . ".php" . URL_REDIRECT_APPEND . "&pn=" . $row['encounter_nr'] . "&edit=1&status=" . $status . "&target=" . $target . "&user_origin=" . $user_origin . "&noresize=1&mode=");
        exit;
    }
    //$linecount=$address_obj->LastRecordCount();
    $pagen->setTotalBlockCount($linecount);
    # Count total available data
    if (isset($totalcount) && $totalcount) {
        $pagen->setTotalDataCount($totalcount);
    } else {
        @$enc_obj->searchEncounterBasicInfo($searchkey);
开发者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: strtr

if (empty($GLOBAL_CONFIG['pagin_personell_search_max_block_rows'])) {
    $pagen->setMaxCount(MAX_BLOCK_ROWS);
} else {
    $pagen->setMaxCount($GLOBAL_CONFIG['pagin_personell_search_max_block_rows']);
}
# Load date formatter
require_once $root_path . 'include/inc_date_format_functions.php';
# Check mode
if ($mode == 'search' || $mode == 'paginate') {
    # Convert other wildcards
    $searchkey = strtr($searchkey, '*?', '%_');
    # Save the search keyword for eventual pagination routines
    if ($mode == 'search') {
        $_SESSION['sess_searchkey'] = $searchkey;
    }
    $search_result =& $pers_obj->searchLimitPersonellBasicInfo($searchkey, $pagen->MaxCount(), $pgx, $oitem, $odir);
    //echo $pers_obj->getLastQuery();
    # Get the resulting record count
    $linecount = $pers_obj->LastRecordCount();
    //$linecount=$address_obj->LastRecordCount();
    $pagen->setTotalBlockCount($linecount);
    # Count total available data
    if (isset($totalcount) && $totalcount) {
        $pagen->setTotalDataCount($totalcount);
    } else {
        @$pers_obj->searchPersonellBasicInfo($searchkey, '');
        # The second param is empty to prevent sorting
        $totalcount = $pers_obj->LastRecordCount();
        $pagen->setTotalDataCount($totalcount);
    }
    $pagen->setSortItem($oitem);
开发者ID:patmark,项目名称:care2x-tz,代码行数:31,代码来源:doctors-dienst-personalliste.php

示例5: Lab

 include_once $root_path . 'include/care_api_classes/class_lab.php';
 $lab_obj = new Lab();
 #Load and create paginator object
 include_once $root_path . 'include/care_api_classes/class_paginator.php';
 $pagen = new Paginator($pgx, $thisfile, $_SESSION['sess_searchkey'], $root_path);
 $GLOBAL_CONFIG = array();
 include_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']);
 }
 $encounter =& $lab_obj->searchPatientWithPendingLabResults($keyword, $pagen->MaxCount(), $pgx, $oitem, $odir);
 //echo $lab_obj->getLastQuery()."<p>";
 # Get the resulting record count
 if ($linecount = $lab_obj->LastRecordCount()) {
     if ($mode != 'paginate') {
         $_SESSION['sess_searchkey'] = $keyword;
     }
     $pagen->setTotalBlockCount($linecount);
     # Count total available data
     if (isset($totalcount) && $totalcount) {
         $pagen->setTotalDataCount($totalcount);
     } else {
         if ($editmode) {
             @$lab_obj->searchEncounterLaboratoryInfo($keyword);
         } else {
             @$lab_obj->searchEncounterLabResults($keyword);
开发者ID:patmark,项目名称:care2x-tz,代码行数:31,代码来源:labor_data_patient_such.php

示例6: AND

            }
            # default, ascending alphabetic
        }
    }
    $sql2 .= " AND enc.pid=reg.pid\n\t\t\t\t\t  AND enc.encounter_status <> 'cancelled'\n\t\t\t\t\t  AND (enc.is_discharged = '' OR enc.is_discharged=0)\n\t\t\t\t\t  AND enc.status NOT IN ('void','hidden','inactive','deleted')  ORDER BY ";
    # Filter if it is personnel nr
    if ($oitem == 'encounter_nr') {
        $sql2 .= 'enc.' . $oitem . ' ' . $odir;
    } else {
        $sql2 .= 'reg.' . $oitem . ' ' . $odir;
    }
    $dbtable = 'FROM care_encounter as enc,care_person as reg ';
    $sql = 'SELECT enc.encounter_nr, enc.encounter_class_nr, enc.is_discharged,
								reg.pid, reg.name_2, reg.name_last, reg.name_first, reg.date_birth, reg.selian_pid,reg.sex, reg.selian_pid ' . $dbtable . $sql2;
    // echo $sql;
    if ($ergebnis = $db->SelectLimit($sql, $pagen->MaxCount(), $pagen->BlockStartIndex())) {
        if ($linecount = $ergebnis->RecordCount()) {
            // $pharmacy is delivered searching patients from pharmacy-module (cross link)
            // This is empty when it is not defined.
            if ($linecount == 1 && $numeric && $mode == 'search') {
                $zeile = $ergebnis->FetchRow();
                if (!empty($pharmacy)) {
                    $_SESSION['sess_pid'] = $zeile['pid'];
                    //echo 'Location:../registration_admission/show_prescription.php'.URL_REDIRECT_APPEND.'&pid='.$zeile['pid'].'&back_path='.$back_path.'&externalcall=true';
                    header('Location:../registration_admission/show_prescription.php' . URL_REDIRECT_APPEND . '&pid=' . $zeile['pid'] . '&back_path=' . $back_path . '&externalcall=true');
                    exit;
                } else {
                    //echo 'Location:aufnahme_daten_zeigen.php'.URL_REDIRECT_APPEND.'&from=such&encounter_nr='.$zeile['encounter_nr'].'&target=search';
                    header('Location:aufnahme_daten_zeigen.php' . URL_REDIRECT_APPEND . '&from=such&encounter_nr=' . $zeile['encounter_nr'] . '&target=search');
                    exit;
                }
开发者ID:patmark,项目名称:care2x-tz,代码行数:31,代码来源:aufnahme_daten_such.php

示例7: addslashes

 if (is_numeric($suchwort)) {
     $suchwort = (int) $suchwort;
     $numeric = 1;
     $sqlwhere1 = " WHERE enc.encounter_nr='{$suchwort}' ";
 } else {
     $sqlwhere1 = "WHERE (\n\t\t\t            \treg.name_last {$sql_LIKE} '" . addslashes($suchwort) . "%' \n\t\t\t\t\t\t\tOR reg.name_first {$sql_LIKE} '" . addslashes($suchwort) . "%'";
     # Try converting the keyword to a proper date format
     $DOB = formatDate2Std($suchwort, $date_format);
     if (!empty($DOB) && $DOB != '--') {
         $sqlwhere1 .= "\tOR reg.date_birth {$sql_LIKE} '{$DOB}' ";
     }
     $sqlwhere1 .= ")";
 }
 # Compose final sql query
 $sql = $sqlselect . $sqlfrom . $sqlwhere1 . $sqlwhere2 . $orderby;
 if ($ergebnis = $db->SelectLimit($sql, $pagen->MaxCount(), $pgx)) {
     if (defined('SHOW_SQLQUERY') && SHOW_SQLQUERY) {
         echo $sql;
     }
     if ($linecount = $ergebnis->RecordCount()) {
         if ($linecount == 1 && $numeric && (!defined('SHOW_SQLQUERY') || !SHOW_SQLQUERY)) {
             $zeile = $ergebnis->FetchRow();
             header('location:patientbill.php' . URL_REDIRECT_APPEND . '&patnum=' . $zeile['encounter_nr'] . '&update=1&mode=' . $mode . '&full_en=' . $zeile['encounter_nr']);
             exit;
         }
     }
     $pagen->setTotalBlockCount($linecount);
     # Count total available data
     if (isset($totalcount) && $totalcount) {
         $pagen->setTotalDataCount($totalcount);
     } else {
开发者ID:patmark,项目名称:care2x-tz,代码行数:31,代码来源:search.php

示例8: AND

 			              OR enc.encounter_nr LIKE "'.addslashes($suchbuffer).'"
 					  )
 					  AND enc.pid=reg.pid  
 					  AND enc.encounter_status<>"cancelled"
 					  AND NOT enc.is_discharged
 					  AND (enc.in_ward OR enc.in_dept)
 					  AND enc.status NOT IN ("void","hidden","deleted","inactive")
 			          ORDER BY ';
 */
 if ($oitem == 'encounter_nr') {
     $sql3 = " ORDER BY enc.{$oitem} {$odir}";
 } else {
     $sql3 = " ORDER BY reg.{$oitem} {$odir}";
 }
 //echo $sql.$dbtable.$sql2;
 if ($ergebnis = $db->SelectLimit($sql . $dbtable . $sql2 . $sql3, $pagen->MaxCount(), $pagen->BlockStartIndex())) {
     if ($linecount = $ergebnis->RecordCount()) {
         if ($linecount == 1 && $numeric && $mode == 'search') {
             $zeile = $ergebnis->FetchRow();
             header("location:aufnahme_daten_zeigen.php" . URL_REDIRECT_APPEND . "&from=such&target=search&pid=" . $zeile['pid'] . "&encounter_nr=" . $zeile['encounter_nr'] . "&sem=" . !$zeile['is_discharged']);
             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(enc.encounter_nr) AS maxnr ' . $dbtable . $sql2;
             //$sql='SELECT enc.encounter_nr '.$dbtable.$sql2;
             //echo $sql;
开发者ID:patmark,项目名称:care2x-tz,代码行数:31,代码来源:medocs_data_search.php

示例9: strtr

             if (empty($enc_nr)) {
             } else {
                 $sk = $enc_nr;
             }
         } else {
             $sk = $pname;
         }
     } else {
         $sk = $gebdatum;
     }
     # Save searchkey to sessin for subsequent paginations
     $_SESSION['sess_searchkey'] = $sk;
 }
 # Convert other wildcards
 $sk = strtr($sk, '*?', '%_');
 $result =& $enc_obj->searchLimitEncounterBasicInfo($sk, $pagen->MaxCount(), $pgx, $oitem, $odir);
 //echo $enc_obj->getLastQuery();
 # Get the resulting record count
 $linecount = $enc_obj->LastRecordCount();
 if ($linecount == 1 && $mode == 'search' && REDIRECT_SINGLERESULT) {
     $pdata = $result->FetchRow();
     header("location:oploginput.php" . URL_REDIRECT_APPEND . "&mode=get&enc_nr=" . $pdata['encounter_nr'] . "&dept_nr={$dept_nr}&saal={$saal}&op_nr={$op_nr}&pday={$pday}&pmonth={$pmonth}&pyear={$pyear}");
     exit;
 }
 //$linecount=$address_obj->LastRecordCount();
 $pagen->setTotalBlockCount($linecount);
 # Count total available data
 if (isset($totalcount) && $totalcount) {
     $pagen->setTotalDataCount($totalcount);
 } else {
     @$enc_obj->searchEncounterBasicInfo($sk);
开发者ID:patmark,项目名称:care2x-tz,代码行数:31,代码来源:oploginput.php


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