Revert "1. add edit event fails when save edited single provider recurring events...
[openemr.git] / interface / main / main_title.php
blob045cf40665787b3ced7be2bf9b26c22864b1deb0
1 <?php
2 /**
3 * main_title.php - The main titlebar, at the top of the 'concurrent' layout.
4 */
6 include_once('../globals.php');
8 use OpenEMR\Core\Header;
11 <!DOCTYPE html>
12 <html>
13 <head>
15 <?php Header::setupHeader();?>
16 <style type="text/css">
17 .hidden {
18 display:none;
20 .visible{
21 display:block;
23 a, a:hover, a:visited{
24 color: black;
25 text-decoration: none;
27 </style>
29 <script type="text/javascript" language="javascript">
30 function toencounter(rawdata, isTherapyGroup) {
31 //This is called in the on change event of the Encounter list.
32 //It opens the corresponding pages.
33 document.getElementById('EncounterHistory').selectedIndex=0;
34 if(rawdata=='')
36 return false;
38 else if(rawdata=='New Encounter')
40 if( parent.left_nav.active_gid == 0){
41 // for patient
42 top.window.parent.left_nav.loadFrame2('nen1','RBot','forms/newpatient/new.php?autoloaded=1&calenc=');
43 } else {
44 //for therapy group
45 top.window.parent.left_nav.loadFrame2('nen1','RBot','forms/newGroupEncounter/new.php?autoloaded=1&calenc=');
47 return true;
49 else if(rawdata=='Past Encounter List')
51 top.window.parent.left_nav.loadFrame2('pel1','RBot','patient_file/history/encounters.php')
52 return true;
54 var parts = rawdata.split("~");
55 var enc = parts[0];
56 var datestr = parts[1];
57 var f = top.window.parent.left_nav.document.forms[0];
58 frame = 'RBot';
59 if (!f.cb_bot.checked) frame = 'RTop'; else if (!f.cb_top.checked) frame = 'RBot';
61 top.restoreSession();
62 parent.left_nav.setEncounter(datestr, enc, frame);
63 top.frames[frame].location.href = '../patient_file/encounter/encounter_top.php?set_encounter=' + enc;
66 function bpopup() {
67 top.restoreSession();
68 window.open('../main/about_page.php','_blank', 'width=420,height=350,resizable=1');
69 return false;
72 function showhideMenu() {
73 var m = parent.document.getElementById("fsbody");
74 var targetWidth = '<?php echo $_SESSION['language_direction'] == 'ltr' ? '0,*' : '*,0'; ?>';
75 if (m.cols == targetWidth) {
76 m.cols = '<?php echo $_SESSION['language_direction'] == 'ltr' ? $GLOBALS['gbl_nav_area_width'] .',*' : '*,' . $GLOBALS['gbl_nav_area_width'] ?>';
77 document.getElementById("showMenuLink").innerHTML = '<?php echo htmlspecialchars(xl('Hide Menu'), ENT_QUOTES); ?>';
78 } else {
79 m.cols = targetWidth;
80 document.getElementById("showMenuLink").innerHTML = '<?php echo htmlspecialchars(xl('Show Menu'), ENT_QUOTES); ?>';
84 </script>
85 </head>
86 <body class="body_title">
87 <?php
88 $res = sqlQuery("select * from users where username='".$_SESSION{"authUser"}."'");
90 <table id="main-title" cellspacing="0" cellpadding="0" width="100%" height="100%">
91 <tr>
93 <?php if ($GLOBALS['tiny_logo_1'] || $GLOBALS['tiny_logo_2']) {
94 $width_column = "100px";
95 if (!$GLOBALS['tiny_logo_1'] || !$GLOBALS['tiny_logo_2']) {
96 $width_column = "50px";
97 } ?>
98 <td align="left" style="width:<?php echo attr($width_column) ?>">
99 <div class="tinylogocontainer"><span><?php if ($GLOBALS['tiny_logo_1']) {
100 echo $tinylogocode1;
101 } if ($GLOBALS['tiny_logo_2']) {
102 echo $tinylogocode2;
103 } ?></span></div>
104 </td>
105 <?php } ?>
107 <td align="left">
108 <table cellspacing="0" cellpadding="1" style="margin:0px 0px 0px 3px;">
110 <?php if (acl_check('patients', 'demo', '', array('write','addonly'))) { ?>
111 <tr><td style="vertical-align:text-bottom;">
112 <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')">
113 <span><?php echo htmlspecialchars(xl('NEW PATIENT'), ENT_QUOTES); ?></span></a>
114 </td>
115 <td style="vertical-align:text-bottom;">
116 <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;">
117 <span><?php echo htmlspecialchars(xl('CLEAR ACTIVE PATIENT'), ENT_QUOTES); ?></span></a>
118 </td>
119 <td style="vertical-align:text-bottom;">
120 <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;">
121 <span><?php echo htmlspecialchars(xl('CLEAR ACTIVE THERAPY GROUP'), ENT_QUOTES); ?></span></a>
122 </td>
123 </tr>
124 <?php } //end of acl_check('patients','demo','',array('write','addonly') if ?>
126 <tr><td valign="baseline"><B>
127 <a class="text" style='vertical-align:text-bottom;' href="main_title.php" id='showMenuLink' onclick='javascript:showhideMenu();return false;'><?php xl('Hide Menu', 'e'); ?></a></B>
128 </td></tr></table>
131 <?php //RP_MODIFIED 2016-05-06
133 $open_emr_ver = "$v_major.$v_minor.$v_patch";
134 $url = "open-emr.org/wiki/index.php/OpenEMR_".$open_emr_ver."_Users_Guide";
137 </td>
138 <td style="margin:3px 0px 3px 0px;vertical-align:middle;">
139 <div style='margin-left:10px; float:left; display:none' id="current_patient_block">
140 <span class='text'><?php xl('Patient', 'e'); ?>:&nbsp;</span><span class='title_bar_top' id="current_patient"><b><?php xl('None', 'e'); ?></b></span>
141 </div>
142 </td>
143 <td style="margin:3px 0px 3px 0px;vertical-align:middle;" align="left">
144 <table cellspacing="0" cellpadding="1" ><tr><td>
145 <div style='margin-left:5px; float:left; display:none' id="past_encounter_block">
146 <span class='title_bar_top' id="past_encounter"><b><?php echo htmlspecialchars(xl('None'), ENT_QUOTES) ?></b></span>
147 </div></td></tr>
148 <tr><td valign="baseline" align="center">
149 <div style='display:none' class='text' id="current_encounter_block" >
150 <span class='text'><?php xl('Selected Encounter', 'e'); ?>:&nbsp;</span><span class='title_bar_top' id="current_encounter"><b><?php xl('None', 'e'); ?></b></span>
151 </div></td></tr></table>
152 </td>
154 <td align="right">
155 <table cellspacing="0" cellpadding="1" style="margin:0px 3px 0px 0px;">
156 <tr>
157 <td align="right" class="text" style="vertical-align:text-bottom;">
158 <a href='main_title.php' onclick="javascript:parent.left_nav.goHome();return false;" title = "<?php xl('Home', 'e'); ?>"><i class='fa fa-home fa-2x top-nav-icons' aria-hidden='true'></i></a>
159 <a href="http://<?php echo $url;?>" target="_blank" id="help_link" title = "<?php xl('Manual', 'e'); ?>"><i class='fa fa-question fa-2x top-nav-icons' aria-hidden='true'></i></a>
160 <a href="" onclick="return bpopup()" title="<?php echo xlt('About'); ?>"><i class='fa fa-info fa-2x top-nav-icons' aria-hidden='true'></i></a>
161 <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>
162 <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>
163 <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>
164 </td>
165 </tr>
166 <tr>
167 <td colspan='2' valign="baseline" align='right'>
168 <span class="text title_bar_top" title="<?php echo htmlspecialchars(xl('Authorization group') .': '.$_SESSION['authGroup'], ENT_QUOTES); ?>"><a href='main_title.php' onclick="<?php echo $javascript;?>" title=""><?php echo htmlspecialchars($res{"fname"}.' '.$res{"lname"}, ENT_NOQUOTES); ?></a></span>
169 </td>
170 </tr>
171 </table>
172 </td>
173 </tr>
174 </table>
176 <script type="text/javascript" language="javascript">
177 parent.loadedFrameCount += 1;
180 function userPreference() {
181 top.restoreSession();
182 top.frames['RTop'].location='../super/edit_globals.php?mode=user';
183 top.frames['RBot'].location='../main/messages/messages.php?form_active=1';
185 function changePassword() {
186 top.restoreSession();
187 top.frames['RTop'].location='../usergroup/user_info.php';
188 top.frames['RBot'].location='messages/messages.php?form_active=1';
191 </script>
193 </body>
194 </html>