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 <!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
18 <TITLE
><?php
echo xlt('Calendar'); ?
></TITLE
>
20 <!-- The DOCTYPE is set above to XHTML to put IE into Sttrict Mode so we can get a viewport width
-->
21 <script type
='text/javascript' language
='JavaScript'>
22 function GetInnerX () {
24 if (self
.innerHeight
) // all except Explorer
28 else if (document
.documentElement
&& document
.documentElement
.clientHeight
)
29 // Explorer 6 Strict Mode
31 x
= document
.documentElement
.clientWidth
;
33 else if (document
.body
) // other Explorers
35 x
= document
.body
.clientWidth
;
41 var framesrc
= '<frame ';
45 // this allows us to keep our viewtype between screens -- JRM calendar_view_type
46 $viewtype = $GLOBALS['calendar_view_type'];
47 if (isset($_SESSION['viewtype'])) {
48 $viewtype = $_SESSION['viewtype'];
51 // this allows us to keep our selected providers between screens -- JRM
52 $pcuStr = "pc_username=" . attr_url($_SESSION['authUser']);
53 if (isset($_SESSION['pc_username'])) {
55 if (!empty($_SESSION['pc_username']) && is_array($_SESSION['pc_username']) && count($_SESSION['pc_username']) > 1) {
56 // loop over the array of values in pc_username to build
57 // a list of pc_username HTTP vars
58 foreach ($_SESSION['pc_username'] as $pcu) {
59 $pcuStr .= "&pc_username[]=" . attr_url($pcu);
62 // two possibilities here
63 // 1) pc_username is an array with a single element
64 // 2) pc_username is just a string, not an array
65 if (is_string($_SESSION['pc_username'])) {
66 $pcuStr .= "&pc_username[]=" . attr_url($_SESSION['pc_username']);
68 $pcuStr .= "&pc_username[]=" . attr_url($_SESSION['pc_username'][0]);
73 // different frame source page depending on session vars
74 if ($_SESSION['userauthorized'] && $GLOBALS['docs_see_entire_calendar']) {
75 $framesrc = "calendar/index.php?module=PostCalendar&viewtype=" . attr_url($viewtype) . "&func=view";
76 } else if ($_SESSION['userauthorized']) {
77 $framesrc = "calendar/index.php?module=PostCalendar&viewtype=" . attr_url($viewtype) . "&func=view&" . $pcuStr;
79 $framesrc = "calendar/index.php?module=PostCalendar&func=view&viewtype=" . attr_url($viewtype);
83 framesrc +
= ' src="<?php echo $framesrc; ?>';
84 framesrc +
= '&framewidth=' +
encodeURIComponent(x
) +
'" name="Calendar" scrolling="auto" frameborder="YES">';
91 <script type
='text/javascript' language
='JavaScript'>
92 document
.write('<frameset rows="*" cols="*" name="Main" frameborder="NO" border="0" framespacing="0" >');
93 document
.write(framesrc
);
94 document
.write('</frameset>');
101 <noframes
><body bgcolor
="#FFFFFF">
102 <?php
echo xlt('Frame support required'); ?
>