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.1 - 2004-10-02
7 * GNU General Public License
8 * Copyright 2002,2003,2004,2005 Elpidio Latorilla
11 * See the file "copy_notice.txt" for the licence notice
14 # Default maximum values for the time out time
16 $def_max_mins=15; # 15 minutes
17 $def_max_secs=59; # 59 seconds
19 $lang_tables[]='startframe.php';
20 $lang_tables[]='date_time.php';
21 define('LANG_FILE','edp.php');
22 $local_user='ck_edv_user';
23 require_once($root_path.'include/inc_front_chain_lang.php');
25 $breakfile='edv-system-admi-welcome.php'.URL_APPEND
;
26 $thisfile=basename(__FILE__
);
28 $GLOBAL_CONFIG=array();
29 require_once($root_path.'include/care_api_classes/class_globalconfig.php');
30 # Create object linking our global config array to the object
31 $glob_obj=new GlobalConfig($GLOBAL_CONFIG);
33 # Save data if save mode
34 if(isset($mode)&&$mode=='save'){
36 # Validate time values
37 if(!is_numeric($HTTP_POST_VARS['thours'])||
$HTTP_POST_VARS['thours']>24) $HTTP_POST_VARS['thours']=0;
38 if(!is_numeric($HTTP_POST_VARS['tmins'])||
$HTTP_POST_VARS['tmins']>59||
$HTTP_POST_VARS['tmins']<1) $HTTP_POST_VARS['tmins']=$def_max_mins;
39 if(!is_numeric($HTTP_POST_VARS['tsecs'])||
$HTTP_POST_VARS['tsecs']>59) $HTTP_POST_VARS['tsecs']=$def_max_tsecs;
41 # combine the values to final format HoursMinsSecs
42 //$HTTP_POST_VARS['timeout_time']=$HTTP_POST_VARS['thours'].$HTTP_POST_VARS['tmins'].$HTTP_POST_VARS['tsecs'];
43 $HTTP_POST_VARS['timeout_time']=date('His',mktime($HTTP_POST_VARS['thours'],$HTTP_POST_VARS['tmins'],$HTTP_POST_VARS['tsecs'],1,1,1971));
45 $filter='timeout_'; # The index filter
47 $numeric=FALSE; # Values are not strictly numeric
48 $addslash=FALSE; # Slashes should be added to the stored values
50 # Save the configuration
51 $glob_obj->saveConfigArray($HTTP_POST_VARS,$filter,$numeric,'',$addslash);
53 # Loop back to self to get the newly stored values
54 header("location:$thisfile".URL_REDIRECT_APPEND
."&save_ok=1");
56 # Else get current global data
58 $glob_obj->getConfig('timeout_%');
59 # Parse the time value to hours mins and secs
60 $buffer='000000'.$GLOBAL_CONFIG['timeout_time'];
61 $thours=substr($buffer,-6,2);
62 $tmins=substr($buffer,-4,2);
63 $tsecs=substr($buffer,-2);
66 # Start Smarty templating here
70 # Note: it is advisable to load this after the inc_front_chain_lang.php so
71 # that the smarty script can use the user configured template theme
73 require_once($root_path.'gui/smarty_template/smarty_care.class.php');
74 $smarty = new smarty_care('system_admin');
77 $smarty->assign('sToolbarTitle',$LDTimeOut);
79 # href for help button
80 $smarty->assign('pbHelp',"javascript:gethelp('timeout.php')");
82 # href for close button
83 $smarty->assign('breakfile',$breakfile);
86 $smarty->assign('sWindowTitle',$LDTimeOut);
99 if(isset($save_ok)&&$save_ok) echo '<img '.createMascot($root_path,'mascot1_r.gif','0','absmiddle').'>'.$LDDataSaved.'<p>';
107 <form action
="<?php echo $thisfile ?>" method
="post" name
="quickinfo">
108 <table border
=0 cellspacing
=1 cellpadding
=5>
110 <td
class="wardlisttitlerow" align
="right"><FONT color
="#0000cc"><b
><nobr
><?php
echo $LDTimeOutActive ?
></nobr
></b
> </FONT
></td
>
111 <td
class="wardlistrow1">
112 <input type
="radio" name
="timeout_inactive" value
="0" <?php
if(!$GLOBAL_CONFIG['timeout_inactive']) echo 'checked' ?
>> <nobr
><?php
echo $LDYes ?
> 
; 
; 
;
113 <input type
="radio" name
="timeout_inactive" value
="1" <?php
if($GLOBAL_CONFIG['timeout_inactive']) echo 'checked' ?
>> <?php
echo $LDNo ?
></nobr
>
115 <td
class="wardlistrow2"><?php
echo $LDTimeOutTxt ?
></td
>
118 <td
class="wardlisttitlerow" align
="right"><FONT color
="#0000cc"><b
><nobr
><?php
echo $LDTimeOutTime ?
></nobr
></b
> </FONT
></td
>
119 <td
class="wardlistrow1"><nobr
>
120 <input type
="text" name
="thours" size
=2 maxlength
=2 value
=<?php
echo $thours ?
>> <?php
echo $LDHours ?
> 
;
121 <input type
="text" name
="tmins" size
=2 maxlength
=2 value
=<?php
echo $tmins ?
>> <?php
echo $LDMinutes ?
> 
;
122 <input type
="text" name
="tsecs" size
=2 maxlength
=2 value
=<?php
echo $tsecs ?
>> <?php
echo $LDSeconds ?
></nobr
>
125 <td
class="wardlistrow2"><?php
echo $LDTimeOutTimeTxt ?
></td
>
129 <?php
if($item_no) $save_button='update.gif'; else $save_button='savedisc.gif'; ?
>
130 <input type
="image" <?php
echo createLDImgSrc($root_path,$save_button,'0') ?
>> 
; 
; 
; 
;
131 <a href
="<?php echo $breakfile ?>"><img
<?php
echo createLDImgSrc($root_path,'cancel.gif','0') ?
>></a
>
132 <?php
if($item_no) : ?
>
133 <a href
="<?php echo $thisfile.''.URL_APPEND.'&from='.$from ?>"><img
<?php
echo createLDImgSrc($root_path,'newcurrency.gif','0') ?
>></a
>
135 <input type
="hidden" name
="sid" value
="<?php echo $sid;?>">
136 <input type
="hidden" name
="lang" value
="<?php echo $lang; ?>">
137 <input type
="hidden" name
="mode" value
="save">
144 $sTemp = ob_get_contents();
147 # Assign page output to the mainframe template
149 $smarty->assign('sMainFrameBlockData',$sTemp);
153 $smarty->display('common/mainframe.tpl');