Merge pull request #2131 from sjpadgett/portal-tables
[openemr.git] / interface / main / main_title.php
blob7ab79387c1181c112494ea955ddb257bed64534b
1 <?php
2 /**
3 * main_title.php - The main titlebar, at the top of the 'concurrent' layout.
5 * @package OpenEMR
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;
18 <!DOCTYPE html>
19 <html>
20 <head>
22 <?php Header::setupHeader();?>
23 <style type="text/css">
24 .hidden {
25 display:none;
27 .visible{
28 display:block;
30 a, a:hover, a:visited{
31 color: black;
32 text-decoration: none;
34 </style>
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;
41 if(rawdata=='')
43 return false;
45 else if(rawdata=='New Encounter')
47 if( parent.left_nav.active_gid == 0){
48 // for patient
49 top.window.parent.left_nav.loadFrame2('nen1','RBot','forms/newpatient/new.php?autoloaded=1&calenc=');
50 } else {
51 //for therapy group
52 top.window.parent.left_nav.loadFrame2('nen1','RBot','forms/newGroupEncounter/new.php?autoloaded=1&calenc=');
54 return true;
56 else if(rawdata=='Past Encounter List')
58 top.window.parent.left_nav.loadFrame2('pel1','RBot','patient_file/history/encounters.php')
59 return true;
61 var parts = rawdata.split("~");
62 var enc = parts[0];
63 var datestr = parts[1];
64 var f = top.window.parent.left_nav.document.forms[0];
65 frame = 'RBot';
66 if (!f.cb_bot.checked) frame = 'RTop'; else if (!f.cb_top.checked) frame = 'RBot';
68 top.restoreSession();
69 parent.left_nav.setEncounter(datestr, enc, frame);
70 top.frames[frame].location.href = '../patient_file/encounter/encounter_top.php?set_encounter=' + encodeURIComponent(enc);
73 function bpopup() {
74 top.restoreSession();
75 window.open('../main/about_page.php','_blank', 'width=420,height=350,resizable=1');
76 return false;
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'); ?>';
85 } else {
86 m.cols = targetWidth;
87 document.getElementById("showMenuLink").innerHTML = '<?php echo xla('Show Menu'); ?>';
91 </script>
92 </head>
93 <body class="body_title">
94 <?php
95 $res = sqlQuery("select * from users where username=?", array($_SESSION{"authUser"}));
97 <table id="main-title" cellspacing="0" cellpadding="0" width="100%" height="100%">
98 <tr>
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";
104 } ?>
105 <td align="left" style="width:<?php echo attr($width_column) ?>">
106 <div class="tinylogocontainer"><span><?php if ($GLOBALS['tiny_logo_1']) {
107 echo $tinylogocode1;
108 } if ($GLOBALS['tiny_logo_2']) {
109 echo $tinylogocode2;
110 } ?></span></div>
111 </td>
112 <?php } ?>
114 <td align="left">
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>
121 </td>
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>
125 </td>
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>
129 </td>
130 </tr>
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>
135 </td></tr></table>
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";
144 </td>
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'); ?>:&nbsp;</span><span class='title_bar_top' id="current_patient"><b><?php echo xlt('None'); ?></b></span>
148 </div>
149 </td>
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>
154 </div></td></tr>
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'); ?>:&nbsp;</span><span class='title_bar_top' id="current_encounter"><b><?php echo xlt('None'); ?></b></span>
158 </div></td></tr></table>
159 </td>
161 <td align="right">
162 <table cellspacing="0" cellpadding="1" style="margin:0px 3px 0px 0px;">
163 <tr>
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="https://<?php echo attr($url); ?>" rel="noopener" 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>
171 </td>
172 </tr>
173 <tr>
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>
176 </td>
177 </tr>
178 </table>
179 </td>
180 </tr>
181 </table>
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';
198 </script>
200 </body>
201 </html>