Add optional tiny icons to the UI (#207)
[openemr.git] / interface / main / main_title.php
bloba97edbf819e6714abf37c7b2bd3ac61e78bc70d1
1 <?php
2 /**
3 * main_title.php - The main titlebar, at the top of the 'concurrent' layout.
4 */
6 include_once('../globals.php');
7 ?>
8 <html>
9 <head>
11 <link rel="stylesheet" href="<?php echo $css_header;?>" type="text/css">
12 <style type="text/css">
13 .hidden {
14 display:none;
16 .visible{
17 display:block;
19 </style>
21 <script type="text/javascript" language="javascript">
22 function toencounter(rawdata) {
23 //This is called in the on change event of the Encounter list.
24 //It opens the corresponding pages.
25 document.getElementById('EncounterHistory').selectedIndex=0;
26 if(rawdata=='')
28 return false;
30 else if(rawdata=='New Encounter')
32 top.window.parent.left_nav.loadFrame2('nen1','RBot','forms/newpatient/new.php?autoloaded=1&calenc=')
33 return true;
35 else if(rawdata=='Past Encounter List')
37 top.window.parent.left_nav.loadFrame2('pel1','RBot','patient_file/history/encounters.php')
38 return true;
40 var parts = rawdata.split("~");
41 var enc = parts[0];
42 var datestr = parts[1];
43 var f = top.window.parent.left_nav.document.forms[0];
44 frame = 'RBot';
45 if (!f.cb_bot.checked) frame = 'RTop'; else if (!f.cb_top.checked) frame = 'RBot';
47 top.restoreSession();
48 <?php if ($GLOBALS['concurrent_layout']) { ?>
49 parent.left_nav.setEncounter(datestr, enc, frame);
50 parent.left_nav.setRadio(frame, 'enc');
51 top.frames[frame].location.href = '../patient_file/encounter/encounter_top.php?set_encounter=' + enc;
52 <?php } else { ?>
53 top.Title.location.href = '../patient_file/encounter/encounter_title.php?set_encounter=' + enc;
54 top.Main.location.href = '../patient_file/encounter/patient_encounter.php?set_encounter=' + enc;
55 <?php } ?>
58 function bpopup() {
59 top.restoreSession();
60 window.open('../main/about_page.php','_blank', 'width=350,height=250,resizable=1');
61 return false;
64 function showhideMenu() {
65 var m = parent.document.getElementById("fsbody");
66 var targetWidth = '<?php echo $_SESSION['language_direction'] == 'ltr' ? '0,*' : '*,0'; ?>';
67 if (m.cols == targetWidth) {
68 m.cols = '<?php echo $_SESSION['language_direction'] == 'ltr' ? $GLOBALS['gbl_nav_area_width'] .',*' : '*,' . $GLOBALS['gbl_nav_area_width'] ?>';
69 document.getElementById("showMenuLink").innerHTML = '<?php echo htmlspecialchars( xl('Hide Menu'), ENT_QUOTES); ?>';
70 } else {
71 m.cols = targetWidth;
72 document.getElementById("showMenuLink").innerHTML = '<?php echo htmlspecialchars( xl('Show Menu'), ENT_QUOTES); ?>';
75 </script>
76 </head>
77 <body class="body_title">
78 <?php
79 $res = sqlQuery("select * from users where username='".$_SESSION{"authUser"}."'");
82 <table id="main-title" cellspacing="0" cellpadding="0" width="100%" height="100%">
83 <tr>
84 <td align="left">
85 <?php if ($GLOBALS['concurrent_layout']) { ?>
86 <table cellspacing="0" cellpadding="1" style="margin:0px 0px 0px 3px;">
88 <?php if (acl_check('patients','demo','',array('write','addonly') )) { ?>
89 <tr><td style="vertical-align:text-bottom;">
90 <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')">
91 <span><?php echo htmlspecialchars( xl('NEW PATIENT'), ENT_QUOTES); ?></span></a>
92 </td>
93 <td style="vertical-align:text-bottom;">
94 <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;">
95 <span><?php echo htmlspecialchars( xl('CLEAR ACTIVE PATIENT'), ENT_QUOTES); ?></span></a>
96 </td>
97 </tr>
98 <?php } //end of acl_check('patients','demo','',array('write','addonly') if ?>
100 <tr><td valign="baseline"><B>
101 <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>
102 </td></tr></table>
103 <?php } else { ?>
104 &nbsp;
105 <?php } ?>
106 </td>
107 <td style="margin:3px 0px 3px 0px;vertical-align:middle;">
108 <div style='margin-left:10px; float:left; display:none' id="current_patient_block">
109 <span class='text'><?php xl('Patient','e'); ?>:&nbsp;</span><span class='title_bar_top' id="current_patient"><b><?php xl('None','e'); ?></b></span>
110 </div>
111 </td>
112 <td style="margin:3px 0px 3px 0px;vertical-align:middle;" align="left">
113 <table cellspacing="0" cellpadding="1" ><tr><td>
114 <div style='margin-left:5px; float:left; display:none' id="past_encounter_block">
115 <span class='title_bar_top' id="past_encounter"><b><?php echo htmlspecialchars( xl('None'), ENT_QUOTES) ?></b></span>
116 </div></td></tr>
117 <tr><td valign="baseline" align="center">
118 <div style='display:none' class='text' id="current_encounter_block" >
119 <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>
120 </div></td></tr></table>
121 </td>
123 <td align="right">
124 <table cellspacing="0" cellpadding="1" style="margin:0px 3px 0px 0px;"><tr>
125 <td align="right" class="text" style="vertical-align:text-bottom;"><a href='main_title.php' onclick="javascript:parent.left_nav.goHome();return false;" ><?php xl('Home','e'); ?></a>
126 &nbsp;|&nbsp;
127 <a href="" onclick="return bpopup()" ><?php echo xlt('About'); ?></a>&nbsp;
128 <td id='tinylogocontainer' class='tinylogocontainer'><span><?php if ($GLOBALS['tiny_logo_1']) {echo $tinylogocode1;} if ($GLOBALS['tiny_logo_2']) {echo $tinylogocode2;} ?></span></td>
129 <td align="right" style="vertical-align:top;"><a href="../logout.php" target="_top" class="css_button_small" style='float:right;' id="logout_link" onclick="top.restoreSession()" >
130 <span><?php echo htmlspecialchars( xl('Logout'), ENT_QUOTES) ?></span></a></td>
131 </tr><tr>
132 <td colspan='2' valign="baseline" align='right'><B>
133 <span class="text title_bar_top" title="<?php echo htmlspecialchars( xl('Authorization group') .': '.$_SESSION['authGroup'], ENT_QUOTES); ?>"><?php echo htmlspecialchars($res{"fname"}.' '.$res{"lname"},ENT_NOQUOTES); ?></span></span></td>
134 </tr></table>
135 </td>
136 </tr>
137 </table>
139 <script type="text/javascript" language="javascript">
140 parent.loadedFrameCount += 1;
141 </script>
143 </body>
144 </html>