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>;.
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">
29 <TITLE
><?php
echo xlt('Calendar'); ?
></TITLE
>
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 () {
35 if (self
.innerHeight
) // all except Explorer
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
;
52 var framesrc
= '<frame ';
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'])) {
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;
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'];
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;
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">';
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>');
109 <!-- END (CHEMED
) -->
112 <noframes
><body bgcolor
="#FFFFFF">
113 <?php
echo xlt('Frame support required'); ?
>