- modules/fotolab updated imagej to current version & some cod fixes to make it work
[care2x.git] / Care2007 / modules / system_admin / edv_system_format_date.php
bloba65f85f1651be93553f680f13275f835a92978bb
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 define('LANG_FILE','edp.php');
14 $local_user='ck_edv_user';
15 require_once($root_path.'include/inc_front_chain_lang.php');
17 $breakfile='edv-system-admi-welcome.php'.URL_APPEND;
18 $thisfile=basename(__FILE__);
20 if(!isset($mode)) $mode='';
21 if(!isset($date_format)) $date_format='';
22 if(!isset($validator)) $validator='';
24 $dbtable='care_config_global'; // Table name for global configurations
25 $GLOBAL_CONFIG=array();
27 $new_date_ok=0;
29 # Create global config object
30 require_once($root_path.'include/care_api_classes/class_globalconfig.php');
31 $glob_obj=new GlobalConfig($GLOBAL_CONFIG);
33 if(($mode=='save')&&($date_format!='')&&(eregi($date_format,$validator))){
34 $new_date_ok=$glob_obj->saveConfigItem('date_format',$date_format);
35 }else{
36 if($glob_obj->getConfig('date_format')) $date_format=$GLOBAL_CONFIG['date_format'];
39 # Start Smarty templating here
40 /**
41 * LOAD Smarty
43 # Note: it is advisable to load this after the inc_front_chain_lang.php so
44 # that the smarty script can use the user configured template theme
46 require_once($root_path.'gui/smarty_template/smarty_care.class.php');
47 $smarty = new smarty_care('system_admin');
49 # Title in toolbar
50 $smarty->assign('sToolbarTitle',$LDDate);
52 # href for help button
53 $smarty->assign('pbHelp',"javascript:gethelp('date_format_set.php')");
55 # href for close button
56 $smarty->assign('breakfile',$breakfile);
58 # Window bar title
59 $smarty->assign('sWindowTitle',$LDDate);
61 # Buffer page output
63 ob_start();
67 <ul>
68 <FONT SIZE=+2>
69 <?php echo $LDSetDateFormat ?> </FONT><FONT class="prompt"><p>
70 <?php
71 if(($mode=='save')&&$new_date_ok) echo '<img '.createMascot($root_path,'mascot1_r.gif','0','bottom').'> '.$LDNewDateFormatSaved.'<p>';
72 echo $LDSelectDateFormat;
74 </font>
76 <form action="<?php echo $thisfile ?>" method="get">
77 <table border=0 cellspacing=1 cellpadding=5>
78 <?php
79 for($i=0;$i<sizeof($LDDateFormats);$i++)
81 echo '<tr>
82 <td bgcolor="#e9e9e9"><input type="radio" name="date_format" value="'.$LDDateFormats[$i].'"';
83 if($date_format==$LDDateFormats[$i]) echo " checked";
84 echo '></td>
85 <td bgcolor="#e9e9e9"><FONT color="#0000cc"><b>';
86 $dfbuffer="LD_".strtr($LDDateFormats[$i],".-/","phs");
87 echo $$dfbuffer;
88 echo '</b> </FONT></td>
89 <td>'.$LDDateFormatsTxt[$i].'<br></td>
90 </tr>';
93 </table>
94 <p>
95 <input type="image" <?php echo createLDImgSrc($root_path,'apply.gif','0') ?>>&nbsp;&nbsp;
96 <a href="<?php echo $breakfile ?>"><img <?php echo createLDImgSrc($root_path,'cancel.gif','0') ?>></a>
97 <input type="hidden" name="sid" value="<?php echo $sid;?>">
98 <input type="hidden" name="lang" value="<?php echo $lang; ?>">
99 <input type="hidden" name="mode" value="save">
100 <input type="hidden" name="validator" value="<?php for($i=0;$i<sizeof($LDDateFormats);$i++) echo $LDDateFormats[$i]."_"; ?>">
101 </form>
103 </ul>
105 <?php
107 $sTemp = ob_get_contents();
108 ob_end_clean();
110 # Assign page output to the mainframe template
112 $smarty->assign('sMainFrameBlockData',$sTemp);
114 * show Template
116 $smarty->display('common/mainframe.tpl');