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
13 define('LANG_FILE','finance.php');
14 $local_user='aufnahme_user';
15 require_once($root_path.'include/inc_front_chain_lang.php');
16 /* Load the insurance object */
17 require_once($root_path.'include/care_api_classes/class_insurance.php');
18 $ins_obj=new Insurance
;
24 case 'list': $breakfile='insurance_co_list.php'.URL_APPEND
; break;
25 case 'search': $breakfile='insurance_co_search.php'.URL_APPEND
; break;
26 default: $breakfile='insurance_co_manage.php'.URL_APPEND
;
38 /* Validate important data */
39 $HTTP_POST_VARS['firm_id']=trim($HTTP_POST_VARS['firm_id']);
40 $HTTP_POST_VARS['name']=trim($HTTP_POST_VARS['name']);
41 if(!(empty($HTTP_POST_VARS['firm_id'])||
empty($HTTP_POST_VARS['name']))){
43 # Check if insurance ID exists
44 if($ins_obj->FirmIDExists($HTTP_POST_VARS['firm_id'])){
50 if($ins_obj->saveFirmInfoFromArray($HTTP_POST_VARS)){
51 header("location:insurance_co_info.php?sid=$sid&lang=$lang&firm_id=$firm_id&mode=show&save_ok=1&retpath=$retpath");
53 }else{echo "$sql<br>$LDDbNoSave";}
60 } // end of switch($mode)
62 $bgc=$root_path.'gui/img/skin/default/tableHeaderbg3.gif';
65 # Start Smarty templating here
69 # Note: it is advisable to load this after the inc_front_chain_lang.php so
70 # that the smarty script can use the user configured template theme
72 require_once($root_path.'gui/smarty_template/smarty_care.class.php');
73 $smarty = new smarty_care('system_admin');
76 $smarty->assign('sToolbarTitle',"$LDInsuranceCo :: $LDNewData");
78 # href for help button
79 $smarty->assign('pbHelp',"javascript:gethelp('insurance_new.php','new')");
81 # href for close button
82 $smarty->assign('breakfile',$breakfile);
85 $smarty->assign('sWindowTitle',"$LDInsuranceCo :: $LDNewData");
87 # Colllect javascript code
93 <script language
="javascript">
97 if((d
.firm_id
.value
=="")){
98 alert("<?php echo "$LDAlertFirmID \\n
$LDPlsEnterInfo"; ?>");
101 }else if((d
.name
.value
=="")){
102 alert("<?php echo "$LDAlertFirmName \\n
$LDPlsEnterInfo"; ?>");
105 }else if((d
.addr_mail
.value
=="")){
106 alert("<?php echo "$LDAlertMailingAddress \\n
$LDPlsEnterInfo"; ?>");
107 d
.addr_mail
.select();
109 }else if((d
.addr_billing
.value
=="")){
110 alert("<?php echo "$LDAlertBillingAddress \\n
$LDPlsEnterInfo"; ?>");
111 d
.addr_billing
.select();
122 $sTemp = ob_get_contents();
125 $smarty->append('JavaScript',$sTemp);
139 <td
><img
<?php
echo createMascot($root_path,'mascot1_r.gif','0','bottom') ?
>></td
>
140 <td valign
="bottom"><br
><font face
="Verdana, Arial" size
=3 color
="#880000"><b
>
146 echo $LDMissingFirmInfo;
151 echo "$LDFirmExists<br>$LDDataNoSave<br>$LDPlsChangeFirmID";
162 <form action
="<?php echo $thisfile; ?>" method
="post" name
="insurance_co" onSubmit
="return check(this)">
163 <font face
="Verdana, Arial" size
=-1><?php
echo $LDEnterAllFields ?
>
166 <td align
=right
class="adm_item"><font color
=#ff0000><b>*</b></font><?php echo $LDInsuranceCoID ?>: </td>
167 <td
class="adm_input"><input type
="text" name
="firm_id" size
=50 maxlength
=60 value
="<?php echo $firm_id ?>"><br
>
171 <td align
=right
class="adm_item"><font color
=#ff0000><b>*</b></font><?php echo $LDInsuranceCoName ?>: </td>
172 <td
class="adm_input"><input type
="text" name
="name" size
=50 maxlength
=60 value
="<?php echo $name ?>"><br
></td
>
175 <td align
=right
class="adm_item"><font color
=#ff0000></font><?php echo $LDAddress ?>: </td>
176 <td
class="adm_input"><textarea name
="addr" cols
=40 rows
=4 wrap
="physical"><?php
echo $addr ?
></textarea
></td
>
179 <td align
=right
class="adm_item"><font color
=#ff0000><b>*</b></font><?php echo $LDMailingAddress ?>: </td>
180 <td
class="adm_input"><textarea name
="addr_mail" cols
=40 rows
=4 wrap
="physical"><?php
echo $addr_mail ?
></textarea
></td
>
183 <td align
=right
class="adm_item"><font color
=#ff0000><b>*</b></font><?php echo $LDBillingAddress ?>: </td>
184 <td
class="adm_input"><textarea name
="addr_billing" cols
=40 rows
=4 wrap
="physical"><?php
echo $addr_billing ?
></textarea
></td
>
187 <td align
=right
class="adm_item"><?php
echo $LDEmailAddress ?
>: </td
>
188 <td
class="adm_input"><input type
="text" name
="addr_email" size
=50 maxlength
=60 value
="<?php echo $addr_email ?>"><br
></td
>
191 <td align
=right
class="adm_item"><?php
echo $LDMainPhoneNr ?
>: </td
>
192 <td
class="adm_input"><input type
="text" name
="phone_main" size
=50 maxlength
=60 value
="<?php echo $phone_main ?>"><br
></td
>
195 <td align
=right
class="adm_item"><?php
echo $LDAuxPhoneNr ?
>: </td
>
196 <td
class="adm_input"><input type
="text" name
="phone_aux" size
=50 maxlength
=60 value
="<?php echo $phone_aux ?>"><br
></td
>
199 <td align
=right
class="adm_item"><?php
echo $LDMainFaxNr ?
>: </td
>
200 <td
class="adm_input"><input type
="text" name
="fax_main" size
=50 maxlength
=60 value
="<?php echo $fax_main ?>"><br
></td
>
203 <td align
=right
class="adm_item"><?php
echo $LDAuxFaxNr ?
>: </td
>
204 <td
class="adm_input"><input type
="text" name
="fax_aux" size
=50 maxlength
=60 value
="<?php echo $fax_aux ?>"><br
></td
>
207 <td align
=right
class="adm_item"><?php
echo $LDContactPerson ?
>: </td
>
208 <td
class="adm_input"><input type
="text" name
="contact_person" size
=50 maxlength
=60 value
="<?php echo $contact_person ?>"><br
></td
>
211 <td align
=right
class="adm_item"><?php
echo $LDContactPersonEmailAddr ?
>: </td
>
212 <td
class="adm_input"><input type
="text" name
="contact_email" size
=50 maxlength
=60 value
="<?php echo $contact_email ?>"><br
></td
>
215 <td align
=right
class="adm_item"><?php
echo $LDContactPersonPhoneNr ?
>: </td
>
216 <td
class="adm_input"><input type
="text" name
="contact_phone" size
=50 maxlength
=60 value
="<?php echo $contact_phone ?>"><br
></td
>
219 <td align
=right
class="adm_item"><?php
echo $LDContactPersonFaxNr ?
>: </td
>
220 <td
class="adm_input"><input type
="text" name
="contact_fax" size
=50 maxlength
=60 value
="<?php echo $contact_fax ?>"><br
></td
>
223 <td
><input type
="image" <?php
echo createLDImgSrc($root_path,'savedisc.gif','0'); ?
>></td
>
224 <td align
=right
><a href
="<?php echo $breakfile ?>"><img
<?php
echo createLDImgSrc($root_path,'cancel.gif','0') ?
> border
="0"></a
></td
>
227 <input type
="hidden" name
="sid" value
="<?php echo $sid ?>">
228 <input type
="hidden" name
="mode" value
="save">
229 <input type
="hidden" name
="lang" value
="<?php echo $lang ?>">
230 <input type
="hidden" name
="retpath" value
="<?php echo $retpath ?>">
239 $sTemp = ob_get_contents();
242 # Assign page output to the mainframe template
244 $smarty->assign('sMainFrameBlockData',$sTemp);
248 $smarty->display('common/mainframe.tpl');