Moved recent v5.0.0 statement fix to current master.
[openemr.git] / interface / main / main_info.php
blob76a36eb949cc42f7ae1d6c897f25f6bc8486383a
1 <?php
2 /**
3 * Main info frame.
5 * LICENSE: This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version 2
8 * of the License, or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://opensource.org/licenses/gpl-license.php>;.
16 * @package OpenEMR
17 * @author Brady Miller <brady.g.miller@gmail.com>
18 * @link http://www.open-emr.org
24 require_once("../globals.php");
26 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
27 <HTML>
28 <HEAD>
29 <TITLE><?php echo xlt('Calendar'); ?></TITLE>
30 <!-- (CHEMED) -->
31 <!-- The DOCTYPE is set above to XHTML to put IE into Sttrict Mode so we can get a viewport width -->
32 <script type='text/javascript' language='JavaScript'>
33 function GetInnerX () {
34 var x;
35 if (self.innerHeight) // all except Explorer
37 x = self.innerWidth;
39 else if (document.documentElement && document.documentElement.clientHeight)
40 // Explorer 6 Strict Mode
42 x = document.documentElement.clientWidth;
44 else if (document.body) // other Explorers
46 x = document.body.clientWidth;
48 return x;
51 var x = GetInnerX();
52 var framesrc = '<frame ';
54 <?php
56 // this allows us to keep our viewtype between screens -- JRM calendar_view_type
57 $viewtype = $GLOBALS['calendar_view_type'];
58 if (isset($_SESSION['viewtype'])) {
59 $viewtype = $_SESSION['viewtype'];
62 // this allows us to keep our selected providers between screens -- JRM
63 $pcuStr = "pc_username=".$_SESSION['authUser'];
64 if (isset($_SESSION['pc_username'])) {
65 $pcuStr = "";
66 if (count($_SESSION['pc_username']) > 1) {
67 // loop over the array of values in pc_username to build
68 // a list of pc_username HTTP vars
69 foreach ($_SESSION['pc_username'] as $pcu) {
70 $pcuStr .= "&pc_username[]=".$pcu;
72 } else {
73 // two possibilities here
74 // 1) pc_username is an array with a single element
75 // 2) pc_username is just a string, not an array
76 if (is_string($_SESSION['pc_username'])) {
77 $pcuStr .= "&pc_username[]=".$_SESSION['pc_username'];
78 } else {
79 $pcuStr .= "&pc_username[]=".$_SESSION['pc_username'][0];
84 // different frame source page depending on session vars
85 if ($_SESSION['userauthorized'] && $GLOBALS['docs_see_entire_calendar']) {
86 $framesrc = "calendar/index.php?module=PostCalendar&viewtype=".$viewtype."&func=view";
87 } else if ($_SESSION['userauthorized']) {
88 $framesrc = "calendar/index.php?module=PostCalendar&viewtype=".$viewtype."&func=view&".$pcuStr;
89 } else {
90 $framesrc = "calendar/index.php?module=PostCalendar&func=view&viewtype=".$viewtype;
94 framesrc += ' src="<?php echo $framesrc; ?>';
95 framesrc += '&framewidth='+x+'" name="Calendar" scrolling="auto" frameborder="YES">';
97 </script>
98 <!-- END (CHEMED) -->
99 </HEAD>
101 <!-- (CHEMED) -->
102 <script type='text/javascript' language='JavaScript'>
103 document.write('<frameset rows="*" cols="*" name="Main" frameborder="NO" border="0" framespacing="0" >');
104 document.write(framesrc);
105 document.write('</frameset>');
106 document.close();
108 </script>
109 <!-- END (CHEMED) -->
112 <noframes><body bgcolor="#FFFFFF">
113 <?php echo xlt('Frame support required'); ?>
114 </body></noframes>
116 </HTML>