require_once $root_path . 'include/care_api_classes/class_department.php';
$dept_obj = new Department();
$dept =& $dept_obj->getPhoneInfo($dept_nr);
require_once $root_path . 'include/care_api_classes/class_globalconfig.php';
$glob_obj = new GlobalConfig($GLOBAL_CONFIG);
$glob_obj->getConfig('person_%');
/* Check whether config foto path exists, else use default path */
$default_photo_path = 'fotos/registration';
$photo_filename = $person['photo_filename'];
$photo_path = is_dir($root_path . $GLOBAL_CONFIG['person_foto_path']) ? $GLOBAL_CONFIG['person_foto_path'] : $default_photo_path;
require_once $root_path . 'include/inc_photo_filename_resolve.php';
html_rtl($lang);
?>
<HEAD>
<?php 
echo setCharSet();
?>
<TITLE><?php 
echo $LDInfo4Duty;
?>
</TITLE>

<script language="javascript">

function closethis()
{
	window.opener.focus();
	window.close();
}

</script>
    case 'blood':
        $formtitle = $LDBloodBank;
        $bgc1 = '#99ffcc';
        break;
    case 'patho':
        $formtitle = $LDPathology;
        $bgc1 = '#cde1ec';
        break;
    default:
        $bgc1 = '#ffffff';
}
# Start the smarty templating
/**
 * HEAD META definition
 */
$smarty->assign('setCharSet', setCharSet());
/**
 * Toolbar
 */
if (!isset($edit) || empty($edit)) {
    $smarty->assign('edit', FALSE);
}
# Set it to be purely printout
$smarty->assign('printmode', TRUE);
# Added for the html tag direction
$smarty->assign('HTMLtag', html_ret_rtl($lang));
# Set colors
$smarty->assign('top_txtcolor', $cfg['top_txtcolor']);
$smarty->assign('top_bgcolor', $cfg['top_bgcolor']);
$smarty->assign('body_bgcolor', $cfg['body_bgcolor']);
$smarty->assign('body_txtcolor', $cfg['body_txtcolor']);
 function InitializeGUI()
 {
     global $root_path, $lang, $cfg;
     if (empty($root_path)) {
         $root_path = $this->root_path;
     }
     if (empty($lang)) {
         $lang = $this->lang;
     }
     # HEAD META definition
     $this->assign('setCharSet', setCharSet());
     # collect JavaScript for Smarty. By default collect the help javascript and css stylesheets
     if ($this->bLoadJS) {
         ob_start();
         include $this->root_path . 'include/inc_js_gethelp.php';
         include $this->root_path . 'include/inc_css_a_hilitebu.php';
         $sTemp = ob_get_contents();
         ob_end_clean();
     }
     $this->assign('JavaScript', $sTemp);
     # Added for the html tag direction
     $this->assign('HTMLtag', html_ret_rtl($this->lang));
     # Set colors
     $this->assign('top_txtcolor', $this->cfg['top_txtcolor']);
     $this->assign('top_bgcolor', $this->cfg['top_bgcolor']);
     $this->assign('body_bgcolor', $this->cfg['body_bgcolor']);
     $this->assign('body_txtcolor', $this->cfg['body_txtcolor']);
     $this->assign('bot_bgcolor', $this->cfg['bot_bgcolor']);
     # Set title bar buttons
     $this->assign('gifBack2', createLDImgSrc($this->root_path, 'back2.gif', '0'));
     $this->assign('gifHilfeR', createLDImgSrc($this->root_path, 'hilfe-r.gif', '0'));
     $this->assign('gifClose2', createLDImgSrc($this->root_path, 'close2.gif', '0'));
     $this->assign('LDCloseAlt', $this->LDCloseAlt);
     # Set default href of the title bar buttons
     # By default, the back button uses the javascript
     $this->assign('pbBack', 'javascript:window.history.back()');
     # By default the help button points to the main help window
     $this->assign('pbHelp', "javascript:gethelp()");
     # By default the break/close button points to the main startframe
     $this->assign('breakfile', $this->root_path . 'main/startframe.php' . URL_APPEND);
     # By default the toolbar title is empty
     //$this->assign('sToolbarTitle','');
     # By default the window title is Care2x
     $this->assign('title', 'Care2x');
     # For the dhtml effects
     if ($this->cfg['dhtml']) {
         # Overload css  document body attributes
         $this->assign('bgcolor', 'bgcolor=' . $this->cfg['body_bgcolor']);
         $this->assign('dhtml', 'style="filter:alpha(opacity=70)" onMouseover="hilite(this,1)" onMouseOut="hilite(this,0)"');
         $this->assign('sLinkColors', 'link=' . $this->cfg['idx_txtcolor'] . ' alink=' . $this->cfg['body_alink'] . ' vlink=' . $this->cfg['idx_txtcolor']);
     }
     # Show Copyright
     if ($this->bShowCopyright) {
         $this->assign('sCopyright', $this->Copyright());
         $this->assign('sPageTime', $this->Pagetime());
     }
 }
<html>
<head>
<?php 
echo setCharSet($lang);
?>
<title></title>
</head>
<body>
&nbsp;<p>
<table border=0 bgcolor="#006600" width=100%>
  <tr>
    <td>
	<table border=0 bgcolor="#ffffff" width=100%>
   <tr>
     <td align=center><font size=6 color=#800000 face="verdana,arial,helvetica"><?php 
echo $LDWarning;
?>
</font></td>
   </tr>
 </table>
 
	</td>
  </tr>
</table>

<font size=6 color=#ff0000 face="verdana,arial,helvetica">&nbsp;</font>


	 <table border=0 bgcolor="#006600" width=100%>
  <tr>
    <td>
Exemple #5
0
* We check again the language variable lang. If table file not available use default (lang = "en")
*/
if (!isset($lang) || empty($lang)) {
    include $root_path . 'chklang.php';
}
/* Load the language table */
if (file_exists($root_path . 'language/' . $lang . '/lang_' . $lang . '_indexframe.php')) {
    include $root_path . 'language/' . $lang . '/lang_' . $lang . '_indexframe.php';
} else {
    include $root_path . 'language/en/lang_en_indexframe.php';
    $lang = 'en';
    // last desperate effort to settle the language
}
// echo $_COOKIE['ck_config']; // for debugging only
if ($mask == 2 && !$nonewmask) {
    header("location: indexframe2.php?sid=" . $sid . "&lang=" . $lang . "&boot=" . $boot . "&cookie=" . $cookie);
    exit;
}
# Get the global config for language usage
require_once $root_path . 'include/care_api_classes/class_globalconfig.php';
$GLOBALCONFIG = array();
$gc = new GlobalConfig($GLOBALCONFIG);
$gc->getConfig('language_%');
# Prepare additional data for the gui template
$charset = setCharSet();
# Load dept & ward classes
require_once $root_path . 'include/care_api_classes/class_department.php';
require_once $root_path . 'include/care_api_classes/class_ward.php';
$dept = new Department();
$ward = new Ward();
require './gui_bridge/gui_indexframe.php';
<?php

error_reporting(E_COMPILE_ERROR | E_ERROR | E_CORE_ERROR);
require './roots.php';
require $root_path . 'include/inc_environment_global.php';
define('LANG_FILE', '');
//define('LANG_FILE','aufnahme.php');
$local_user = '******';
require_once $root_path . 'include/inc_front_chain_lang.php';
require_once $root_path . 'include/inc_date_format_functions.php';
# Create the notes object
require_once $root_path . 'include/care_api_classes/class_notes.php';
$obj = new Notes();
# Load the notes
if ($n_obj =& $obj->getEncounterNotes($nr)) {
    $notes = $n_obj->FetchRow();
}
# Prepare variables for template
$bd = @formatDate2Local($bd, $date_format);
$TP_CHARSET = setCharSet();
$TP_DATE = @formatDate2Local($notes['date'], $date_format);
$TP_TIME = @convertTimeToLocal($notes['time']);
$TP_DOC = $notes['personell_name'];
$TP_USR = $notes['modify_id'];
$TP_NOTES = nl2br($notes['notes']);
$TP_CLOSE = '<a href="javascript:window.close()"><img ' . createLDImgSrc($root_path, 'close2.gif', '0') . '></a>';
# Load the template
$tp_notes = $TP_obj->load('registration_admission/tp_show_notes_details.htm');
eval("echo {$tp_notes};");