- modules/fotolab updated imagej to current version & some cod fixes to make it work
[care2x.git] / Care2007 / modules / system_admin / edv_system_forms_set.php
blobdf8465e3cfda4cd6ede04bbe09ec1e12cbc24982
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=array('indexframe.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 if($from=='add') $returnfile='edv_system_format_menu_item_add.php'.URL_APPEND.'&from=set';
20 else $returnfile=$breakfile;
21 $thisfile=basename(__FILE__);
22 $editfile='edv_system_format_menu_item_add.php'.URL_REDIRECT_APPEND.'&mode=edit&from=set&item_no=';
23 /**
24 * Load the db routine
27 if(!isset($GCONFIG)) $GCONFIG=array();
28 include_once($root_path.'include/care_api_classes/class_globalconfig.php');
29 $gc=new GlobalConfig($GCONFIG);
31 if(isset($mode)&&($mode=='save')&&!empty($max_items)){
33 for($i=1;$i<=$max_items;$i++){
34 if(empty($HTTP_POST_VARS["value$i"])) $HTTP_POST_VARS["value$i"]='0';
35 //echo $HTTP_POST_VARS["index$i"].'==>'.$HTTP_POST_VARS["value$i"].'<br>';
36 $gc->saveConfigItem($HTTP_POST_VARS["index$i"],$HTTP_POST_VARS["value$i"]);
38 header('location:'.$thisfile.URL_REDIRECT_APPEND.'&mode=0');
39 exit;
40 }else{
41 $gc->getConfig('person_%_hide');
42 $gc->getConfig('patient_%_hide');
43 $gc->getConfig('patient_%_show');
46 # Start Smarty templating here
47 /**
48 * LOAD Smarty
50 # Note: it is advisable to load this after the inc_front_chain_lang.php so
51 # that the smarty script can use the user configured template theme
53 require_once($root_path.'gui/smarty_template/smarty_care.class.php');
54 $smarty = new smarty_care('system_admin');
56 # Title in toolbar
57 $smarty->assign('sToolbarTitle',$LDDataEntryForms);
59 # href for return button
60 $smarty->assign('pbBack',$returnfile);
62 # href for help button
63 $smarty->assign('pbHelp',"javascript:gethelp('system_forms_set.php')");
65 # href for close button
66 $smarty->assign('breakfile',$breakfile);
68 # Window bar title
69 $smarty->assign('sWindowTitle',$LDDataEntryForms);
71 if($rows) {
72 $smarty->append('JavaScript','<script language="javascript" src="'.$root_path.'js/check_menu_item_same_item.js"></script>');
75 # Buffer page output
77 ob_start();
80 <ul>
81 <form method="post">
82 <table border=0 cellspacing=1 cellpadding=2>
83 <tbody class="submenu">
84 <tr class="wardlisttitlerow">
85 <td><FONT color="#000099"><b></b></td>
86 <td><FONT color="#000099"><b><?php echo $LDItem; ?></b></td>
87 <td><FONT color="#000099"><b><?php echo $LDStatus; ?></b></td>
88 </tr>
90 <?php
91 $i=1;
92 while(list($x,$v)=each($GCONFIG))
94 echo '<tr>
95 <td><img '.createComIcon($root_path,'post_discussion.gif','0').'></td>
96 <td><FONT color="#0000cc"><b>'.strtr($x,'_',' ').'</b> </FONT></td>
97 <td align="center"><input type="checkbox" name="value'.$i.'" value="1" ';
98 if($v) echo 'checked';
99 echo '><input type="hidden" name="index'.$i.'" value="'.$x.'">
100 </td>
101 </tr>';
103 $i++;
106 </tbody>
107 </table>
108 <?php
109 if($not_trans_id){
111 <input type="hidden" name="sid" value="<?php echo $sid; ?>">
112 <?php
115 <input type="hidden" name="max_items" value="<?php echo ($i-1); ?>">
116 <input type="hidden" name="lang" value="<?php echo $lang; ?>">
117 <input type="hidden" name="mode" value="save">
118 <input type="image" <?php echo createLDImgSrc($root_path,'savedisc.gif','0'); ?> border=0>
120 </form>
121 </ul>
122 <?php
124 $sTemp = ob_get_contents();
125 ob_end_clean();
127 # Assign page output to the mainframe template
129 $smarty->assign('sMainFrameBlockData',$sTemp);
131 * show Template
133 $smarty->display('common/mainframe.tpl');