Revision: 6583
          http://care2002.svn.sourceforge.net/care2002/?rev=6583&view=rev
Author:   mizuko
Date:     2010-07-21 11:35:21 +0000 (Wed, 21 Jul 2010)

Log Message:
-----------
see  #70 - radios and checkbox have erronous formating

Modified Paths:
--------------
    care2x/branches/gettext/modules/cafeteria/includes/inc_currency_set.php
    care2x/branches/gettext/modules/cafeteria/includes/inc_currency_set_gui.php
    care2x/branches/gettext/modules/dept_admin/dept_new.php
    care2x/branches/gettext/modules/or_admin/or_new.php
    care2x/branches/gettext/modules/system_admin/admin_news_display.php
    
care2x/branches/gettext/modules/system_admin/admin_system_format_currency_set.php
    
care2x/branches/gettext/modules/system_admin/admin_system_menu_main_display_set.php
    care2x/branches/gettext/modules/system_admin/admin_system_timeout.php

Modified: 
care2x/branches/gettext/modules/cafeteria/includes/inc_currency_set.php
===================================================================
--- care2x/branches/gettext/modules/cafeteria/includes/inc_currency_set.php     
2010-07-21 11:34:42 UTC (rev 6582)
+++ care2x/branches/gettext/modules/cafeteria/includes/inc_currency_set.php     
2010-07-21 11:35:21 UTC (rev 6583)
@@ -40,7 +40,7 @@
  
     $sql="DELETE FROM care_currency WHERE item_no=".$item_no;
        
-       if(!$db->Execute($sql)) echo "_("Delete failed!")<p>";
+       if(!$db->Execute($sql)) echo $LDDbNoDelete . "<p>";
        
  } 
  
@@ -50,6 +50,6 @@
      $rows=$ergebnis->RecordCount();
   } // else get default from ini file
   
-} else { echo "_("Link attempt to DB failed!")<br> $sql<br>"; }
+} else { echo $LDDbNoLink . "<br> $sql<br>"; }
 
 ?>

Modified: 
care2x/branches/gettext/modules/cafeteria/includes/inc_currency_set_gui.php
===================================================================
--- care2x/branches/gettext/modules/cafeteria/includes/inc_currency_set_gui.php 
2010-07-21 11:34:42 UTC (rev 6582)
+++ care2x/branches/gettext/modules/cafeteria/includes/inc_currency_set_gui.php 
2010-07-21 11:35:21 UTC (rev 6583)
@@ -1,5 +1,5 @@
 <script language="javascript">
-<!-- 
+
 function deleteCurrency(n,s)
 {
        if(s=="main")
@@ -12,12 +12,10 @@
                }
 
 }
- -->
+
 </script>
 
 
-<ul>
-
 <FONT  COLOR="<?php print $cfg['top_txtcolor']; ?>"  SIZE=+2>
 <?php echo $LDSetCurrency ?> </FONT><FONT  class="prompt"><p>
 <?php

Modified: care2x/branches/gettext/modules/dept_admin/dept_new.php
===================================================================
--- care2x/branches/gettext/modules/dept_admin/dept_new.php     2010-07-21 
11:34:42 UTC (rev 6582)
+++ care2x/branches/gettext/modules/dept_admin/dept_new.php     2010-07-21 
11:35:21 UTC (rev 6583)
@@ -300,7 +300,8 @@
   
   <tr>
     <td class=pblock align=right bgColor="#eeeeee"><font 
color=#ff0000><b>*</b></font><?php echo $LDIsSubDept ?>: </td>
-    <td class=pblock>  <input type="radio" name="is_sub_dept" value="1" <?php 
if($is_sub_dept) echo 'checked'; ?>> <?php echo $LDYes ?> <input type="radio" 
name="is_sub_dept" value="0" <?php if(!$is_sub_dept) echo 'checked'; ?>> <?php 
echo $LDNo ?>
+    <td class=pblock><label><input type="radio" name="is_sub_dept" value="1" 
<?php if($is_sub_dept) echo 'checked'; ?>> <?php echo $LDYes ?></label> 
+    <label><input type="radio" name="is_sub_dept" value="0" <?php 
if(!$is_sub_dept) echo 'checked'; ?>> <?php echo $LDNo ?></label>
 </td>
   </tr> 
 <tr>
@@ -354,25 +355,29 @@
   
   <tr>
     <td class=pblock align=right bgColor="#eeeeee"><font 
color=#ff0000><b>*</b></font><?php echo $LDDoesSurgeryOp ?>: </td>
-    <td class=pblock>  <input type="radio" name="does_surgery" value="1" <?php 
if($does_surgery) echo 'checked'; ?>> <?php echo $LDYes ?> <input type="radio" 
name="does_surgery" value="0" <?php if(!$does_surgery) echo 'checked'; ?>> 
<?php echo $LDNo ?>
+    <td class=pblock><label><input type="radio" name="does_surgery" value="1" 
<?php if($does_surgery) echo 'checked'; ?>> <?php echo $LDYes ?></label> 
+    <label><input type="radio" name="does_surgery" value="0" <?php 
if(!$does_surgery) echo 'checked'; ?>> <?php echo $LDNo ?></label>
 </td>
   </tr> 
   
   <tr>
     <td class=pblock align=right bgColor="#eeeeee"><font 
color=#ff0000><b>*</b></font><?php echo $LDAdmitsInpatients ?>: </td>
-    <td class=pblock>  <input type="radio" name="admit_inpatient" value="1" 
<?php if($admit_inpatient) echo 'checked'; ?>> <?php echo $LDYes ?> <input 
type="radio" name="admit_inpatient" value="0" <?php if(!$admit_inpatient) echo 
'checked'; ?>> <?php echo $LDNo ?>
+    <td class=pblock><label><input type="radio" name="admit_inpatient" 
value="1" <?php if($admit_inpatient) echo 'checked'; ?>> <?php echo $LDYes 
?></label>
+    <label><input type="radio" name="admit_inpatient" value="0" <?php 
if(!$admit_inpatient) echo 'checked'; ?>> <?php echo $LDNo ?></label>
 </td>
   </tr> 
   
   <tr>
     <td class=pblock align=right bgColor="#eeeeee"><font 
color=#ff0000><b>*</b></font><?php echo $LDAdmitsOutpatients ?>: </td>
-    <td class=pblock>  <input type="radio" name="admit_outpatient" value="1" 
<?php if($admit_outpatient) echo 'checked'; ?>> <?php echo $LDYes ?> <input 
type="radio" name="admit_outpatient" value="0" <?php if(!$admit_outpatient) 
echo 'checked'; ?>> <?php echo $LDNo ?>
+    <td class=pblock><label><input type="radio" name="admit_outpatient" 
value="1" <?php if($admit_outpatient) echo 'checked'; ?>> <?php echo $LDYes 
?></label>
+    <label> <input type="radio" name="admit_outpatient" value="0" <?php 
if(!$admit_outpatient) echo 'checked'; ?>> <?php echo $LDNo ?></label>
 </td>
   </tr> 
 
     <tr>
     <td class=pblock align=right bgColor="#eeeeee"><font 
color=#ff0000><b>*</b></font><?php echo $LDBelongsToInst ?>: </td>
-    <td class=pblock>  <input type="radio" name="this_institution" value="1" 
<?php if($this_institution) echo 'checked'; ?>> <?php echo $LDYes ?> <input 
type="radio" name="this_institution" value="0" <?php if(!$this_institution) 
echo 'checked'; ?>> <?php echo $LDNo ?>
+    <td class=pblock><label><input type="radio" name="this_institution" 
value="1" <?php if($this_institution) echo 'checked'; ?>> <?php echo $LDYes 
?></label> 
+    <label><input type="radio" name="this_institution" value="0" <?php 
if(!$this_institution) echo 'checked'; ?>> <?php echo $LDNo ?></label>
 </td>
   </tr> 
   
@@ -438,7 +443,8 @@
   </tr> 
   <tr>
     <td class=pblock align=right bgColor="#eeeeee"><font 
color=#ff0000><b>*</b></font><?php echo $LDIsPharmacy ?>: </td>
-    <td class=pblock>  <input type="radio" name="is_pharmacy" value="1" <?php 
if($is_pharmacy) echo 'checked'; ?>> <?php echo $LDYes ?> <input type="radio" 
name="is_pharmacy" value="0" <?php if(!$is_pharmacy) echo 'checked'; ?>> <?php 
echo $LDNo ?>
+    <td class=pblock><label><input type="radio" name="is_pharmacy" value="1" 
<?php if($is_pharmacy) echo 'checked'; ?>> <?php echo $LDYes ?> </label>
+    <label><input type="radio" name="is_pharmacy" value="0" <?php 
if(!$is_pharmacy) echo 'checked'; ?>> <?php echo $LDNo ?></label>
 </td>
   </tr>  
 

Modified: care2x/branches/gettext/modules/or_admin/or_new.php
===================================================================
--- care2x/branches/gettext/modules/or_admin/or_new.php 2010-07-21 11:34:42 UTC 
(rev 6582)
+++ care2x/branches/gettext/modules/or_admin/or_new.php 2010-07-21 11:35:21 UTC 
(rev 6583)
@@ -354,7 +354,8 @@
   
   <tr>
     <td align=right bgColor="#eeeeee"><?php echo $LDTempClosed ?>: </td>
-    <td bgColor="#f9f9f9"><input type="radio" name="is_temp_closed" value="0" 
<?php if(!$is_temp_closed) echo 'checked'; ?>> <?php echo $LDNo ?> <input 
type="radio" name="is_temp_closed" value="1" <?php if($is_temp_closed) echo 
'checked'; ?>> <?php echo $LDYes ?> 
+    <td bgColor="#f9f9f9"><label><input type="radio" name="is_temp_closed" 
value="0" <?php if(!$is_temp_closed) echo 'checked'; ?>> <?php echo $LDNo 
?></label> 
+    <label><input type="radio" name="is_temp_closed" value="1" <?php 
if($is_temp_closed) echo 'checked'; ?>> <?php echo $LDYes ?></label> 
 </td>
   </tr> 
  

Modified: care2x/branches/gettext/modules/system_admin/admin_news_display.php
===================================================================
--- care2x/branches/gettext/modules/system_admin/admin_news_display.php 
2010-07-21 11:34:42 UTC (rev 6582)
+++ care2x/branches/gettext/modules/system_admin/admin_news_display.php 
2010-07-21 11:35:21 UTC (rev 6583)
@@ -185,8 +185,8 @@
 <tr>
        <td class="wardlisttitlerow" align="right"><FONT  
color="#0000cc"><b><?php echo $LDTitleFontBold ?></b> </FONT></td>
        <td class="submenu">
-               <input type="radio" name="news_headline_title_font_bold" 
value="1" <?php  if($GLOBAL_CONFIG['news_headline_title_font_bold']) echo 
'checked'; ?>><?php echo $LDBold ?> 
-               <input type="radio" name="news_headline_title_font_bold" 
value="0" <?php  if(!$GLOBAL_CONFIG['news_headline_title_font_bold']) echo 
'checked'; ?>><?php echo $LDNormal ?>
+               <label><input type="radio" name="news_headline_title_font_bold" 
value="1" <?php  if($GLOBAL_CONFIG['news_headline_title_font_bold']) echo 
'checked'; ?>><?php echo $LDBold ?> </label>
+               <label><input type="radio" name="news_headline_title_font_bold" 
value="0" <?php  if(!$GLOBAL_CONFIG['news_headline_title_font_bold']) echo 
'checked'; ?>><?php echo $LDNormal ?></label>
       </td>  
        </tr>
 <tr>
@@ -218,8 +218,8 @@
 <tr>
        <td class="wardlisttitlerow" align="right"><FONT  
color="#0000cc"><b><?php echo $LDPrefaceFontBold ?></b> </FONT></td>
        <td class="submenu">
-               <input type="radio" name="news_headline_preface_font_bold" 
value="1" <?php  if($GLOBAL_CONFIG['news_headline_preface_font_bold']) echo 
'checked'; ?>><?php echo $LDBold ?> 
-               <input type="radio" name="news_headline_preface_font_bold" 
value="0" <?php  if(!$GLOBAL_CONFIG['news_headline_preface_font_bold']) echo 
'checked'; ?>><?php echo $LDNormal ?>
+               <label><input type="radio" 
name="news_headline_preface_font_bold" value="1" <?php  
if($GLOBAL_CONFIG['news_headline_preface_font_bold']) echo 'checked'; ?>><?php 
echo $LDBold ?></label>
+               <label><input type="radio" 
name="news_headline_preface_font_bold" value="0" <?php  
if(!$GLOBAL_CONFIG['news_headline_preface_font_bold']) echo 'checked'; ?>><?php 
echo $LDNormal ?></label>
       </td>  
        </tr>
 <tr>

Modified: 
care2x/branches/gettext/modules/system_admin/admin_system_format_currency_set.php
===================================================================
--- 
care2x/branches/gettext/modules/system_admin/admin_system_format_currency_set.php
   2010-07-21 11:34:42 UTC (rev 6582)
+++ 
care2x/branches/gettext/modules/system_admin/admin_system_format_currency_set.php
   2010-07-21 11:35:21 UTC (rev 6583)
@@ -69,14 +69,14 @@
 require($root_path.'modules/cafeteria/includes/inc_currency_set_gui.php');
 
 $sTemp = ob_get_contents();
+
 ob_end_clean();
-
 # Assign page output to the mainframe template
 
 $smarty->assign('sMainFrameBlockData',$sTemp);
  /**
  * show Template
  */
- $smarty->display('common/mainframe.tpl');
+$smarty->display('common/mainframe.tpl');
 
-?>
+?>
\ No newline at end of file

Modified: 
care2x/branches/gettext/modules/system_admin/admin_system_menu_main_display_set.php
===================================================================
--- 
care2x/branches/gettext/modules/system_admin/admin_system_menu_main_display_set.php
 2010-07-21 11:34:42 UTC (rev 6582)
+++ 
care2x/branches/gettext/modules/system_admin/admin_system_menu_main_display_set.php
 2010-07-21 11:35:21 UTC (rev 6583)
@@ -98,8 +98,9 @@
   <tr>
     <td><FONT  color="#000099" FACE="verdana,arial" size=2></td>
     <td class="wardlisttitlerow"><FONT  color="#000099" FACE="verdana,arial" 
size=2><b><?php echo $LDFrameResizable; ?></b></td>
-    <td>       <input type="radio" name="bg_border" value="1" <?php 
if($GLOBALCONFIG['gui_frame_left_nav_border']) echo 'checked'; ?>> <?php echo 
$LDYes; ?>   <input type="radio" name="bg_border" value="0" 
-       <?php if(!$GLOBALCONFIG['gui_frame_left_nav_border']) echo 'checked'; 
?>> <?php echo $LDNo; ?>
+    <td><label><input type="radio" name="bg_border" value="1" <?php 
if($GLOBALCONFIG['gui_frame_left_nav_border']) echo 'checked'; ?>> <?php echo 
$LDYes; ?></label>   
+    <label><input type="radio" name="bg_border" value="0" 
+       <?php if(!$GLOBALCONFIG['gui_frame_left_nav_border']) echo 'checked'; 
?>></label> <?php echo $LDNo; ?>
         </td>
   </tr>
   <tr>
@@ -115,8 +116,9 @@
   <tr>
     <td><FONT  color="#000099" FACE="verdana,arial" size=2></td>
     <td class="wardlisttitlerow"><FONT  color="#000099" FACE="verdana,arial" 
size=2><b><?php echo $LDAllowMultiLang; ?></b></td>
-    <td>       <input type="radio" name="multilang" value="0" <?php 
if(!$GLOBALCONFIG['language_single']) echo 'checked'; ?>> <?php echo $LDYes; ?> 
   <input type="radio" name="multilang" value="1" 
-       <?php if($GLOBALCONFIG['language_single']) echo 'checked'; ?>> <?php 
echo $LDNo; ?>
+    <td><label><input type="radio" name="multilang" value="0" <?php 
if(!$GLOBALCONFIG['language_single']) echo 'checked'; ?>> <?php echo $LDYes; 
?></label>    
+    <label><input type="radio" name="multilang" value="1" 
+       <?php if($GLOBALCONFIG['language_single']) echo 'checked'; ?>> <?php 
echo $LDNo; ?></label>
         </td>
   </tr>
   <tr>

Modified: care2x/branches/gettext/modules/system_admin/admin_system_timeout.php
===================================================================
--- care2x/branches/gettext/modules/system_admin/admin_system_timeout.php       
2010-07-21 11:34:42 UTC (rev 6582)
+++ care2x/branches/gettext/modules/system_admin/admin_system_timeout.php       
2010-07-21 11:35:21 UTC (rev 6583)
@@ -1,157 +1,157 @@
-<?php
-error_reporting(E_COMPILE_ERROR|E_ERROR|E_CORE_ERROR);
-require('./roots.php');
-require($root_path.'include/helpers/inc_environment_global.php');
-/**
-* CARE2X Integrated Hospital Information System Deployment 2.1 - 2004-10-02
-* GNU General Public License
-* Copyright 2002,2003,2004,2005 Elpidio Latorilla
-* elpi...@care2x.org, 
-*
-* See the file "copy_notice.txt" for the licence notice
-*/
-
-# Default maximum values for the time out time
-$def_max_hours=0; 
-$def_max_mins=15; # 15 minutes
-$def_max_secs=59; # 59 seconds
-
-$lang_tables[]='startframe.php';
-$lang_tables[]='date_time.php';
-define('LANG_FILE','edp.php');
-$local_user='ck_admin_user';
-require_once($root_path.'include/helpers/inc_front_chain_lang.php');
-
-$breakfile='admin_system-admi-welcome.php'.URL_APPEND;
-$thisfile=basename(__FILE__);
-
-$GLOBAL_CONFIG=array();
-require_once($root_path.'include/core/class_globalconfig.php');
-# Create object linking our global config array to the object
-$glob_obj=new GlobalConfig($GLOBAL_CONFIG);
-
-# Save data if save mode
-if(isset($mode)&&$mode=='save'){
-
-       # Validate time values
-       if(!is_numeric($_POST['thours'])||$_POST['thours']>24) 
$_POST['thours']=0;
-       if(!is_numeric($_POST['tmins'])||$_POST['tmins']>59||$_POST['tmins']<1) 
$_POST['tmins']=$def_max_mins;
-       if(!is_numeric($_POST['tsecs'])||$_POST['tsecs']>59) 
$_POST['tsecs']=$def_max_tsecs;
-       
-       # combine the values to final format HoursMinsSecs
-       
//$_POST['timeout_time']=$_POST['thours'].$_POST['tmins'].$_POST['tsecs'];
-       
$_POST['timeout_time']=date('His',mktime($_POST['thours'],$_POST['tmins'],$_POST['tsecs'],1,1,1971));
-       
-       $filter='timeout_'; # The index filter
-
-       $numeric=FALSE; # Values are not strictly numeric
-       $addslash=FALSE; # Slashes should be added to the stored values
-
-       # Save the configuration
-       $glob_obj->saveConfigArray($_POST,$filter,$numeric,'',$addslash);
-
-       # Loop back to self to get the newly stored values
-       header("location:$thisfile".URL_REDIRECT_APPEND."&save_ok=1");
-       exit;
-# Else get current global data
-}else{ 
-       $glob_obj->getConfig('timeout_%');
-       # Parse the time value to hours mins and secs
-       $buffer='000000'.$GLOBAL_CONFIG['timeout_time'];
-       $thours=substr($buffer,-6,2);
-       $tmins=substr($buffer,-4,2);
-       $tsecs=substr($buffer,-2);
-}
-
-# Start Smarty templating here
- /**
- * LOAD Smarty
- */
- # Note: it is advisable to load this after the inc_front_chain_lang.php so
- # that the smarty script can use the user configured template theme
-
- require_once($root_path.'gui/smarty_template/smarty_care.class.php');
- $smarty = new smarty_care('system_admin');
-
-# Title in toolbar
- $smarty->assign('sToolbarTitle',$LDTimeOut);
-$smarty->assign('LDBack', $LDBack);
- $smarty->assign('LDHelp', $LDHelp);
- $smarty->assign('LDClose', $LDClose);
-# href for help button
- $smarty->assign('pbHelp',"javascript:gethelp('timeout.php')");
-
- # href for close button
- $smarty->assign('breakfile',$breakfile);
-
- # Window bar title
- $smarty->assign('sWindowTitle',$LDTimeOut);
-
- # Buffer page output
-
- ob_start();
-?>
-
-
-<ul>
-<FONT class="prompt">
-<p>
-<?php
-
-if(isset($save_ok)&&$save_ok) echo '<img 
'.createMascot($root_path,'mascot1_r.gif','0','absmiddle').'>'.$LDDataSaved.'<p>';
-
-echo $LDEnterInfo;
-
-?>
-</font>
-<p>
-
-<form action="<?php echo $thisfile ?>" method="post" name="quickinfo">
-<table border=0 cellspacing=1 cellpadding=5>  
-<tr valign=top>
-       <td class="wardlisttitlerow" align="right"><FONT  
color="#0000cc"><b><nobr><?php echo $LDTimeOutActive ?></nobr></b> </FONT></td>
-       <td class="wardlistrow1">
-               <input type="radio" name="timeout_inactive" value="0" <?php 
if(!$GLOBAL_CONFIG['timeout_inactive']) echo 'checked' ?>> <nobr><?php echo 
$LDYes ?>&nbsp;&nbsp;&nbsp;
-               <input type="radio" name="timeout_inactive" value="1" <?php 
if($GLOBAL_CONFIG['timeout_inactive']) echo 'checked' ?>> <?php echo $LDNo 
?></nobr>
-       </td>  
-       <td class="wardlistrow2"><?php echo $LDTimeOutTxt ?></td>
-       </tr>
-<tr valign=top>
-       <td  class="wardlisttitlerow"  align="right"><FONT  
color="#0000cc"><b><nobr><?php echo $LDTimeOutTime ?></nobr></b> </FONT></td>
-       <td class="wardlistrow1"><nobr>
-       <input type="text" name="thours" size=2 maxlength=2 value=<?php echo 
$thours ?>> <?php echo $LDHours ?>&nbsp;
-       <input type="text" name="tmins" size=2 maxlength=2 value=<?php echo 
$tmins ?>> <?php echo $LDMinutes ?>&nbsp;
-       <input type="text" name="tsecs" size=2 maxlength=2 value=<?php echo 
$tsecs ?>> <?php echo $LDSeconds ?></nobr>
-
-       </td>  
-       <td class="wardlistrow2"><?php echo $LDTimeOutTimeTxt ?></td>
-       </tr>
-</table>
-<p>
-<?php if($item_no) $save_button='update.gif'; else 
$save_button='savedisc.gif'; ?>
-<input type="image" <?php echo createLDImgSrc($root_path,$save_button,'0') 
?>>&nbsp;&nbsp;&nbsp;&nbsp;
-<a href="<?php echo $breakfile ?>"><img <?php echo 
createLDImgSrc($root_path,'cancel.gif','0') ?>></a>
-<?php if($item_no) : ?>
-<a href="<?php echo $thisfile.''.URL_APPEND.'&from='.$from ?>"><img <?php echo 
createLDImgSrc($root_path,'newcurrency.gif','0') ?>></a>
-<?php endif ?>
-<input type="hidden" name="sid" value="<?php echo $sid;?>">
-<input type="hidden" name="lang" value="<?php echo $lang; ?>">
-<input type="hidden" name="mode" value="save">
-</form>
-<p>
-</ul>
-
-<?php
-
-$sTemp = ob_get_contents();
-ob_end_clean();
-
-# Assign page output to the mainframe template
-
-$smarty->assign('sMainFrameBlockData',$sTemp);
- /**
- * show Template
- */
- $smarty->display('common/mainframe.tpl');
-
-?>
+<?php
+error_reporting(E_COMPILE_ERROR|E_ERROR|E_CORE_ERROR);
+require('./roots.php');
+require($root_path.'include/helpers/inc_environment_global.php');
+/**
+* CARE2X Integrated Hospital Information System Deployment 2.1 - 2004-10-02
+* GNU General Public License
+* Copyright 2002,2003,2004,2005 Elpidio Latorilla
+* elpi...@care2x.org, 
+*
+* See the file "copy_notice.txt" for the licence notice
+*/
+
+# Default maximum values for the time out time
+$def_max_hours=0; 
+$def_max_mins=15; # 15 minutes
+$def_max_secs=59; # 59 seconds
+
+$lang_tables[]='startframe.php';
+$lang_tables[]='date_time.php';
+define('LANG_FILE','edp.php');
+$local_user='ck_admin_user';
+require_once($root_path.'include/helpers/inc_front_chain_lang.php');
+
+$breakfile='admin_system-admi-welcome.php'.URL_APPEND;
+$thisfile=basename(__FILE__);
+
+$GLOBAL_CONFIG=array();
+require_once($root_path.'include/core/class_globalconfig.php');
+# Create object linking our global config array to the object
+$glob_obj=new GlobalConfig($GLOBAL_CONFIG);
+
+# Save data if save mode
+if(isset($mode)&&$mode=='save'){
+
+       # Validate time values
+       if(!is_numeric($_POST['thours'])||$_POST['thours']>24) 
$_POST['thours']=0;
+       if(!is_numeric($_POST['tmins'])||$_POST['tmins']>59||$_POST['tmins']<1) 
$_POST['tmins']=$def_max_mins;
+       if(!is_numeric($_POST['tsecs'])||$_POST['tsecs']>59) 
$_POST['tsecs']=$def_max_tsecs;
+       
+       # combine the values to final format HoursMinsSecs
+       
//$_POST['timeout_time']=$_POST['thours'].$_POST['tmins'].$_POST['tsecs'];
+       
$_POST['timeout_time']=date('His',mktime($_POST['thours'],$_POST['tmins'],$_POST['tsecs'],1,1,1971));
+       
+       $filter='timeout_'; # The index filter
+
+       $numeric=FALSE; # Values are not strictly numeric
+       $addslash=FALSE; # Slashes should be added to the stored values
+
+       # Save the configuration
+       $glob_obj->saveConfigArray($_POST,$filter,$numeric,'',$addslash);
+
+       # Loop back to self to get the newly stored values
+       header("location:$thisfile".URL_REDIRECT_APPEND."&save_ok=1");
+       exit;
+# Else get current global data
+}else{ 
+       $glob_obj->getConfig('timeout_%');
+       # Parse the time value to hours mins and secs
+       $buffer='000000'.$GLOBAL_CONFIG['timeout_time'];
+       $thours=substr($buffer,-6,2);
+       $tmins=substr($buffer,-4,2);
+       $tsecs=substr($buffer,-2);
+}
+
+# Start Smarty templating here
+ /**
+ * LOAD Smarty
+ */
+ # Note: it is advisable to load this after the inc_front_chain_lang.php so
+ # that the smarty script can use the user configured template theme
+
+ require_once($root_path.'gui/smarty_template/smarty_care.class.php');
+ $smarty = new smarty_care('system_admin');
+
+# Title in toolbar
+ $smarty->assign('sToolbarTitle',$LDTimeOut);
+$smarty->assign('LDBack', $LDBack);
+ $smarty->assign('LDHelp', $LDHelp);
+ $smarty->assign('LDClose', $LDClose);
+# href for help button
+ $smarty->assign('pbHelp',"javascript:gethelp('timeout.php')");
+
+ # href for close button
+ $smarty->assign('breakfile',$breakfile);
+
+ # Window bar title
+ $smarty->assign('sWindowTitle',$LDTimeOut);
+
+ # Buffer page output
+
+ ob_start();
+?>
+
+
+<ul>
+<FONT class="prompt">
+<p>
+<?php
+
+if(isset($save_ok)&&$save_ok) echo '<img 
'.createMascot($root_path,'mascot1_r.gif','0','absmiddle').'>'.$LDDataSaved.'<p>';
+
+echo $LDEnterInfo;
+
+?>
+</font>
+<p>
+
+<form action="<?php echo $thisfile ?>" method="post" name="quickinfo">
+<table border=0 cellspacing=1 cellpadding=5>  
+<tr valign=top>
+       <td class="wardlisttitlerow" align="right"><FONT  
color="#0000cc"><b><nobr><?php echo $LDTimeOutActive ?></nobr></b> </FONT></td>
+       <td class="wardlistrow1">
+               <label><input type="radio" name="timeout_inactive" value="0" 
<?php if(!$GLOBAL_CONFIG['timeout_inactive']) echo 'checked' ?>> <nobr><?php 
echo $LDYes ?></label>&nbsp;&nbsp;&nbsp;
+               <label><input type="radio" name="timeout_inactive" value="1" 
<?php if($GLOBAL_CONFIG['timeout_inactive']) echo 'checked' ?>> <?php echo 
$LDNo ?></label>
+       </td>  
+       <td class="wardlistrow2"><?php echo $LDTimeOutTxt ?></td>
+       </tr>
+<tr valign=top>
+       <td  class="wardlisttitlerow"  align="right"><FONT  
color="#0000cc"><b><nobr><?php echo $LDTimeOutTime ?></nobr></b> </FONT></td>
+       <td class="wardlistrow1"><nobr>
+       <input type="text" name="thours" size=2 maxlength=2 value=<?php echo 
$thours ?>> <?php echo $LDHours ?>&nbsp;
+       <input type="text" name="tmins" size=2 maxlength=2 value=<?php echo 
$tmins ?>> <?php echo $LDMinutes ?>&nbsp;
+       <input type="text" name="tsecs" size=2 maxlength=2 value=<?php echo 
$tsecs ?>> <?php echo $LDSeconds ?></nobr>
+
+       </td>  
+       <td class="wardlistrow2"><?php echo $LDTimeOutTimeTxt ?></td>
+       </tr>
+</table>
+<p>
+<?php if($item_no) $save_button='update.gif'; else 
$save_button='savedisc.gif'; ?>
+<input type="image" <?php echo createLDImgSrc($root_path,$save_button,'0') 
?>>&nbsp;&nbsp;&nbsp;&nbsp;
+<a href="<?php echo $breakfile ?>"><img <?php echo 
createLDImgSrc($root_path,'cancel.gif','0') ?>></a>
+<?php if($item_no) : ?>
+<a href="<?php echo $thisfile.''.URL_APPEND.'&from='.$from ?>"><img <?php echo 
createLDImgSrc($root_path,'newcurrency.gif','0') ?>></a>
+<?php endif ?>
+<input type="hidden" name="sid" value="<?php echo $sid;?>">
+<input type="hidden" name="lang" value="<?php echo $lang; ?>">
+<input type="hidden" name="mode" value="save">
+</form>
+<p>
+</ul>
+
+<?php
+
+$sTemp = ob_get_contents();
+ob_end_clean();
+
+# Assign page output to the mainframe template
+
+$smarty->assign('sMainFrameBlockData',$sTemp);
+ /**
+ * show Template
+ */
+ $smarty->display('common/mainframe.tpl');
+
+?>


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Care2002-developers mailing list
Care2002-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/care2002-developers

Reply via email to