- modules/fotolab updated imagej to current version & some cod fixes to make it work
[care2x.git] / Care2007 / modules / system_admin / edv_general_info_quick.php
blob1bfc22b72d9ffbf08483395b0c7072bd06864aa7
1 <?php
2 error_reporting(E_COMPILE_ERROR|E_ERROR|E_CORE_ERROR);
3 require('./roots.php');
4 require($root_path.'include/inc_environment_global.php');
5 /**
6 * CARE2X Integrated Hospital Information System Deployment 2.1 - 2004-10-02
7 * GNU General Public License
8 * Copyright 2002,2003,2004,2005 Elpidio Latorilla
9 * elpidio@care2x.org,
11 * See the file "copy_notice.txt" for the licence notice
13 $lang_tables[]='startframe.php';
14 define('LANG_FILE','edp.php');
15 $local_user='ck_edv_user';
16 require_once($root_path.'include/inc_front_chain_lang.php');
18 $breakfile='edv-system-admi-welcome.php'.URL_APPEND;
19 $thisfile=basename(__FILE__);
21 $GLOBAL_CONFIG=array();
22 require_once($root_path.'include/care_api_classes/class_globalconfig.php');
23 # Create object linking our global config array to the object
24 $glob_obj=new GlobalConfig($GLOBAL_CONFIG);
26 # Save data if save mode
27 if(isset($mode)&&$mode=='save'){
29 $filter='main_info_'; # The index filter
30 $numeric=FALSE; # Values are not strictly numeric
31 $addslash=TRUE; # Slashes should be added to the stored values
33 # Save the configuration
34 $glob_obj->saveConfigArray($HTTP_POST_VARS,$filter,$numeric,'',$addslash);
36 # Loop back to self to get the newly stored values
37 header("location:$thisfile".URL_REDIRECT_APPEND."&save_ok=1");
38 exit;
40 # Else get current global data
41 }else{
42 $glob_obj->getConfig('main_info%');
45 # Start Smarty templating here
46 /**
47 * LOAD Smarty
49 # Note: it is advisable to load this after the inc_front_chain_lang.php so
50 # that the smarty script can use the user configured template theme
52 require_once($root_path.'gui/smarty_template/smarty_care.class.php');
53 $smarty = new smarty_care('system_admin');
55 # Title in toolbar
56 $smarty->assign('sToolbarTitle',$LDQuickInformer);
58 # href for help button
59 $smarty->assign('pbHelp',"javascript:gethelp('quickinfo.php')");
61 # href for close button
62 $smarty->assign('breakfile',$breakfile);
64 # Window bar title
65 $smarty->assign('sWindowTitle',$LDQuickInformer);
67 # Assign prompt if saved
68 if(isset($save_ok)&&$save_ok){
69 $smarty->assign('sMascotImg','<img '.createMascot($root_path,'mascot1_r.gif','0','absmiddle').'>');
70 $smarty->assign('LDDataSaved',$LDDataSaved);
73 # Assign prompt
74 $smarty->assign('LDEnterInfo',$LDEnterInfo);
76 # Assign form elements
77 $smarty->assign('LDPhonePolice',$LDPhonePolice);
78 $smarty->assign('LDPhoneFire',$LDPhoneFire);
79 $smarty->assign('LDAmbulance',$LDAmbulance);
80 $smarty->assign('LDPhone',$LDPhone);
81 $smarty->assign('LDFax',$LDFax);
82 $smarty->assign('LDAddress',$LDAddress);
83 $smarty->assign('LDEmail',$LDEmail);
85 # Assign input values
86 $smarty->assign('main_info_police_nr',$GLOBAL_CONFIG['main_info_police_nr']);
87 $smarty->assign('main_info_fire_dept_nr',$GLOBAL_CONFIG['main_info_fire_dept_nr']);
88 $smarty->assign('main_info_emgcy_nr',$GLOBAL_CONFIG['main_info_emgcy_nr']);
89 $smarty->assign('main_info_phone',$GLOBAL_CONFIG['main_info_phone']);
90 $smarty->assign('main_info_fax',$GLOBAL_CONFIG['main_info_fax']);
91 $smarty->assign('main_info_address',$GLOBAL_CONFIG['main_info_address']);
92 $smarty->assign('main_info_email',$GLOBAL_CONFIG['main_info_email']);
94 # Create and assign save button
95 $smarty->assign('sSave','<input type="image" '.createLDImgSrc($root_path,'savedisc.gif','0').'>
96 <input type="hidden" name="sid" value="'.$sid.'">
97 <input type="hidden" name="lang" value="'.$lang.'">
98 <input type="hidden" name="mode" value="save">');
100 # Cancel button
101 $smarty->assign('sCancel','<a href="'.$breakfile.'"><img '.createLDImgSrc($root_path,'cancel.gif','0').'></a>');
103 # Assign template as include file to the mainframe template
105 $smarty->assign('sMainBlockIncludeFile','system_admin/quick_informer.tpl');
107 * show Template
109 $smarty->display('common/mainframe.tpl');