3 * main_title.php - The main titlebar, at the top of the 'concurrent' layout.
6 * @link http://www.open-emr.org
7 * @author Brady Miller <brady.g.miller@gmail.com>
8 * @copyright Copyright (c) 2018 Brady Miller <brady.g.miller@gmail.com>
9 * @license https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3
13 require_once('../globals.php');
15 use OpenEMR\Core\Header
;
22 <?php Header
::setupHeader();?
>
23 <style type
="text/css">
30 a
, a
:hover
, a
:visited
{
32 text
-decoration
: none
;
36 <script type
="text/javascript" language
="javascript">
37 function toencounter(rawdata
, isTherapyGroup
) {
38 //This is called in the on change event of the Encounter list.
39 //It opens the corresponding pages.
40 document
.getElementById('EncounterHistory').selectedIndex
=0;
45 else if(rawdata
=='New Encounter')
47 if( parent
.left_nav
.active_gid
== 0){
49 top
.window
.parent
.left_nav
.loadFrame2('nen1','RBot','forms/newpatient/new.php?autoloaded=1&calenc=');
52 top
.window
.parent
.left_nav
.loadFrame2('nen1','RBot','forms/newGroupEncounter/new.php?autoloaded=1&calenc=');
56 else if(rawdata
=='Past Encounter List')
58 top
.window
.parent
.left_nav
.loadFrame2('pel1','RBot','patient_file/history/encounters.php')
61 var parts
= rawdata
.split("~");
63 var datestr
= parts
[1];
64 var f
= top
.window
.parent
.left_nav
.document
.forms
[0];
66 if (!f
.cb_bot
.checked
) frame
= 'RTop'; else if (!f
.cb_top
.checked
) frame
= 'RBot';
69 parent
.left_nav
.setEncounter(datestr
, enc
, frame
);
70 top
.frames
[frame
].location
.href
= '../patient_file/encounter/encounter_top.php?set_encounter=' +
encodeURIComponent(enc
);
75 window
.open('../main/about_page.php','_blank', 'width=420,height=350,resizable=1');
79 function showhideMenu() {
80 var m
= parent
.document
.getElementById("fsbody");
81 var targetWidth
= '<?php echo $_SESSION['language_direction
'] == 'ltr
' ? '0,*' : '*,0'; ?>';
82 if (m
.cols
== targetWidth
) {
83 m
.cols
= '<?php echo $_SESSION['language_direction
'] == 'ltr
' ? attr($GLOBALS['gbl_nav_area_width
']) .',*' : '*,' . attr($GLOBALS['gbl_nav_area_width
']) ?>';
84 document
.getElementById("showMenuLink").innerHTML
= '<?php echo xla('Hide Menu
'); ?>';
87 document
.getElementById("showMenuLink").innerHTML
= '<?php echo xla('Show Menu
'); ?>';
93 <body
class="body_title">
95 $res = sqlQuery("select * from users where username=?", array($_SESSION{"authUser"}));
97 <table id
="main-title" cellspacing
="0" cellpadding
="0" width
="100%" height
="100%">
100 <?php
if ($GLOBALS['tiny_logo_1'] ||
$GLOBALS['tiny_logo_2']) {
101 $width_column = "100px";
102 if (!$GLOBALS['tiny_logo_1'] ||
!$GLOBALS['tiny_logo_2']) {
103 $width_column = "50px";
105 <td align
="left" style
="width:<?php echo attr($width_column) ?>">
106 <div
class="tinylogocontainer"><span
><?php
if ($GLOBALS['tiny_logo_1']) {
108 } if ($GLOBALS['tiny_logo_2']) {
115 <table cellspacing
="0" cellpadding
="1" style
="margin:0px 0px 0px 3px;">
117 <?php
if (acl_check('patients', 'demo', '', array('write','addonly'))) { ?
>
118 <tr
><td style
="vertical-align:text-bottom;">
119 <a href
='' class="css_button_small" style
="margin:0px;vertical-align:top;" id
='new0' onClick
=" return top.window.parent.left_nav.loadFrame2('new0','RTop','new/new.php')">
120 <span
><?php
echo xlt('NEW PATIENT'); ?
></span
></a
>
122 <td style
="vertical-align:text-bottom;">
123 <a href
='' class="css_button_small" style
="margin:0px;vertical-align:top;display:none;" id
='clear_active' onClick
="javascript:parent.left_nav.clearactive();return false;">
124 <span
><?php
echo xlt('CLEAR ACTIVE PATIENT'); ?
></span
></a
>
126 <td style
="vertical-align:text-bottom;">
127 <a href
='' class="css_button_small" style
="margin:0px;vertical-align:top;display:none;" id
='clear_active_group' onClick
="javascript:parent.left_nav.clearactive();return false;">
128 <span
><?php
echo xlt('CLEAR ACTIVE THERAPY GROUP'); ?
></span
></a
>
131 <?php
} //end of acl_check('patients','demo','',array('write','addonly') if ?>
133 <tr
><td valign
="baseline"><B
>
134 <a
class="text" style
='vertical-align:text-bottom;' href
="main_title.php" id
='showMenuLink' onclick
='javascript:showhideMenu();return false;'><?php
echo xlt('Hide Menu'); ?
></a
></B
>
138 <?php
//RP_MODIFIED 2016-05-06
140 $open_emr_ver = "$v_major.$v_minor.$v_patch";
141 $url = "open-emr.org/wiki/index.php/OpenEMR_".$open_emr_ver."_Users_Guide";
145 <td style
="margin:3px 0px 3px 0px;vertical-align:middle;">
146 <div style
='margin-left:10px; float:left; display:none' id
="current_patient_block">
147 <span
class='text'><?php
echo xlt('Patient'); ?
>: 
;</span
><span
class='title_bar_top' id
="current_patient"><b
><?php
echo xlt('None'); ?
></b
></span
>
150 <td style
="margin:3px 0px 3px 0px;vertical-align:middle;" align
="left">
151 <table cellspacing
="0" cellpadding
="1" ><tr
><td
>
152 <div style
='margin-left:5px; float:left; display:none' id
="past_encounter_block">
153 <span
class='title_bar_top' id
="past_encounter"><b
><?php
echo xlt('None'); ?
></b
></span
>
155 <tr
><td valign
="baseline" align
="center">
156 <div style
='display:none' class='text' id
="current_encounter_block" >
157 <span
class='text'><?php
echo xlt('Selected Encounter'); ?
>: 
;</span
><span
class='title_bar_top' id
="current_encounter"><b
><?php
echo xlt('None'); ?
></b
></span
>
158 </div
></td
></tr
></table
>
162 <table cellspacing
="0" cellpadding
="1" style
="margin:0px 3px 0px 0px;">
164 <td align
="right" class="text" style
="vertical-align:text-bottom;">
165 <a href
='main_title.php' onclick
="javascript:parent.left_nav.goHome();return false;" title
= "<?php echo xla('Home'); ?>"><i
class='fa fa-home fa-2x top-nav-icons' aria
-hidden
='true'></i
></a
>
166 <a href
="http://<?php echo attr($url); ?>" target
="_blank" id
="help_link" title
= "<?php echo xla('Manual'); ?>"><i
class='fa fa-question fa-2x top-nav-icons' aria
-hidden
='true'></i
></a
>
167 <a href
="" onclick
="return bpopup()" title
="<?php echo xla('About'); ?>"><i
class='fa fa-info fa-2x top-nav-icons' aria
-hidden
='true'></i
></a
>
168 <a href
="" id
="user_settings" onclick
="userPreference(); return false;" title
="<?php echo xla('User Settings')?>"><i
class="fa fa-cog fa-2x top-nav-icons" aria
-hidden
="true"></i
></a
>
169 <a href
="" id
="user_password" onclick
="changePassword(); return false;" title
="<?php echo xla('User Password')?>"><i
class="fa fa-unlock-alt fa-2x top-nav-icons" aria
-hidden
="true"></i
></a
>
170 <a href
="../logout.php" target
="_top" id
="logout_link" onclick
="top.restoreSession()" title
= "<?php echo xla('Logout') ?>"><i
class="fa fa-sign-out fa-2x top-nav-icons" aria
-hidden
="true"></i
></a
>
174 <td colspan
='2' valign
="baseline" align
='right'>
175 <span
class="text title_bar_top" title
="<?php echo attr(xl('Authorization group').': '.$_SESSION['authGroup']); ?>"><a href
='main_title.php' onclick
="<?php echo $javascript;?>" title
=""><?php
echo text($res{"fname"}.' '.$res{"lname"}); ?
></a
></span
>
183 <script type
="text/javascript" language
="javascript">
184 parent
.loadedFrameCount +
= 1;
187 function userPreference() {
188 top
.restoreSession();
189 top
.frames
['RTop'].location
='../super/edit_globals.php?mode=user';
190 top
.frames
['RBot'].location
='../main/messages/messages.php?form_active=1';
192 function changePassword() {
193 top
.restoreSession();
194 top
.frames
['RTop'].location
='../usergroup/user_info.php';
195 top
.frames
['RBot'].location
='messages/messages.php?form_active=1';