2 error_reporting(E_COMPILE_ERROR|E_ERROR|E_CORE_ERROR
);
3 require('./roots.php');
4 require($root_path.'include/inc_environment_global.php');
6 * CARE2X Integrated Hospital Information System Deployment 2.2 - 2006-07-10
7 * GNU General Public License
8 * Copyright 2002,2003,2004,2005,2006 Elpidio Latorilla
11 * See the file "copy_notice.txt" for the licence notice
14 # Default value for the maximum nr of rows per block displayed, define this to the value you wish
15 # In normal cases this value is derived from the db table "care_config_global" using the "pagin_insurance_list_max_block_rows" element.
16 define('MAX_BLOCK_ROWS',30);
18 $lang_tables[]='search.php';
19 define('LANG_FILE','finance.php');
20 $local_user='aufnahme_user';
21 require_once($root_path.'include/inc_front_chain_lang.php');
22 # Load the insurance object
23 require_once($root_path.'include/care_api_classes/class_insurance.php');
24 $ins_obj=new Insurance
;
26 $breakfile='insurance_co_manage.php'.URL_APPEND
;
27 $thisfile=basename(__FILE__
);
29 # Initialize page�s control variables
30 if($mode!='paginate'){
31 # Reset paginator variables
34 # Set the sort parameters
35 if(empty($oitem)) $oitem='name';
36 if(empty($odir)) $odir='ASC';
39 $GLOBAL_CONFIG=array();
40 include_once($root_path.'include/care_api_classes/class_globalconfig.php');
41 $glob_obj=new GlobalConfig($GLOBAL_CONFIG);
42 $glob_obj->getConfig('pagin_insurance_list_max_block_rows');
43 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
45 #Load and create paginator object
46 require_once($root_path.'include/care_api_classes/class_paginator.php');
47 $pagen=new Paginator($pgx,$thisfile,$HTTP_SESSION_VARS['sess_searchkey'],$root_path);
48 # Adjust the max nr of rows in a block
49 $pagen->setMaxCount($GLOBAL_CONFIG['pagin_insurance_list_max_block_rows']);
51 # Get all the active firms info
52 $firms=$ins_obj->getLimitActiveFirmsInfo($GLOBAL_CONFIG['pagin_insurance_list_max_block_rows'],$pgx,$oitem,$odir);
54 $linecount=$ins_obj->LastRecordCount();
55 $pagen->setTotalBlockCount($linecount);
56 # Count total available data
57 if(isset($totalcount)&&$totalcount){
58 $pagen->setTotalDataCount($totalcount);
60 $totalcount=$ins_obj->countAllActiveFirms();
61 $pagen->setTotalDataCount($totalcount);
64 $pagen->setSortItem($oitem);
65 $pagen->setSortDirection($odir);
68 # Start Smarty templating here
72 # Note: it is advisable to load this after the inc_front_chain_lang.php so
73 # that the smarty script can use the user configured template theme
75 require_once($root_path.'gui/smarty_template/smarty_care.class.php');
76 $smarty = new smarty_care('system_admin');
79 $smarty->assign('sToolbarTitle',"$LDInsuranceCo :: $LDListAll");
81 # href for help button
82 $smarty->assign('pbHelp',"javascript:gethelp('insurance_list.php')");
84 # href for close button
85 $smarty->assign('breakfile',$breakfile);
88 $smarty->assign('sWindowTitle',"$LDInsuranceCo :: $LDListAll");
99 if(is_object($firms)){
101 if ($linecount) echo str_replace("~nr~",$totalcount,$LDSearchFound).' '.$LDShowing.' '.$pagen->BlockStartNr().' '.$LDTo.' '.$pagen->BlockEndNr().'.';
102 else echo str_replace('~nr~','0',$LDSearchFound);
105 <table border
=0 cellpadding
=2 cellspacing
=1>
106 <tr
class="wardlisttitlerow">
108 <?php
echo $pagen->makeSortLink($LDFirmID,'firm_id',$oitem,$odir); ?
></b
>
111 <?php
echo $pagen->makeSortLink($LDInsuranceCoName,'name',$oitem,$odir); ?
></b
>
114 <?php
echo $pagen->makeSortLink($LDMainPhoneNr,'phone_main',$oitem,$odir); ?
></b
>
117 <?php
echo $pagen->makeSortLink($LDMainFaxNr,'fax_main',$oitem,$odir); ?
></b
>
120 <?php
echo $pagen->makeSortLink($LDEmailAddress,'addr_email',$oitem,$odir); ?
></b
>
125 while($firm=$firms->FetchRow()){
126 if($toggle) $bgc='#dddddd';
130 <tr bgcolor
="<?php echo $bgc ?>">
131 <td
><a href
="insurance_co_info.php<?php echo URL_APPEND.'&retpath=list&firm_id='.$firm['firm_id']; ?>"><?php
echo $firm['firm_id']; ?
></a
></td
>
132 <td
><a href
="insurance_co_info.php<?php echo URL_APPEND.'&retpath=list&firm_id='.$firm['firm_id']; ?>"><?php
echo $firm['name']; ?
></a
></td
>
133 <td
><?php
echo $firm['phone_main']; ?
></td
>
134 <td
><?php
echo $firm['fax_main']; ?
></td
>
135 <td
><?php
if($firm['addr_email']){ echo '<img '.createComIcon($root_path,'email.gif','0').'>'; ?
> <a href
="mailto:<?php echo $firm['addr_email']; ?>"><?php
echo $firm['addr_email']; ?
></a
><?php
} ?
></td
>
141 <tr><td colspan=4>'.$pagen->makePrevLink($LDPrevious).'</td>
142 <td align=right>'.$pagen->makeNextLink($LDNext).'</td>
148 echo str_replace('~nr~','0',$LDSearchFound);
152 <form action
="insurance_co_new.php" method
="post">
153 <input type
="hidden" name
="lang" value
="<?php echo $lang ?>">
154 <input type
="hidden" name
="sid" value
="<?php echo $sid ?>">
155 <input type
="submit" value
="<?php echo $LDNeedEmptyFormPls ?>">
161 $sTemp = ob_get_contents();
164 # Assign page output to the mainframe template
166 $smarty->assign('sMainFrameBlockData',$sTemp);
170 $smarty->display('common/mainframe.tpl');