Fix the size of the calendar add/edit popup to fit the fields displayed
[openemr.git] / interface / main / main_screen.php
blob18fbbef9ca4dee057d0439f7c8cb80e2c589de71
1 <?php
2 include_once("../globals.php");
3 require_once("$srcdir/formdata.inc.php");
4 $_SESSION["encounter"] = "";
6 // Fetching the password expiration date
7 if($GLOBALS['password_expiration_days'] != 0){
8 $is_expired = false;
9 $q=formData('authUser','P');
10 $result = sqlStatement("select pwd_expiration_date from users where username = '".$q."'");
11 $current_date = date("Y-m-d");
12 $pwd_expires_date = $current_date;
13 if($row = sqlFetchArray($result)) {
14 $pwd_expires_date = $row['pwd_expiration_date'];
17 // Displaying the password expiration message (starting from 7 days before the password gets expired)
18 $pwd_alert_date = date("Y-m-d", strtotime($pwd_expires_date . "-7 days"));
20 if (strtotime($pwd_alert_date) != "" && strtotime($current_date) >= strtotime($pwd_alert_date) &&
21 (!isset($_SESSION['expiration_msg']) or $_SESSION['expiration_msg'] == 0)) {
23 $is_expired = true;
24 $_SESSION['expiration_msg'] = 1; // only show the expired message once
27 if ($GLOBALS['athletic_team']) {
28 $frame1url = "../reports/players_report.php?embed=1";
29 } else {
30 if ($is_expired) {
31 $frame1url = "pwd_expires_alert.php"; //php file which display's password expiration message.
33 elseif (isset($_GET['mode']) && $_GET['mode'] == "loadcalendar") {
34 $frame1url = "calendar/index.php?pid=" . $_GET['pid'];
35 if (isset($_GET['date'])) $frame1url .= "&date=" . $_GET['date'];
36 } else {
37 if ($GLOBALS['concurrent_layout']) {
38 // new layout
39 if ($GLOBALS['default_top_pane']) {
40 $frame1url=$GLOBALS['default_top_pane'];
41 } else {
42 $frame1url = "main_info.php";
45 else
46 // old layout
47 $frame1url = "main.php?mode=" . $_GET['mode'];
51 $nav_area_width = $GLOBALS['athletic_team'] ? '230' : '130';
52 if (!empty($GLOBALS['gbl_nav_area_width'])) $nav_area_width = $GLOBALS['gbl_nav_area_width'];
54 <html>
55 <head>
56 <title>
57 <?php echo $openemr_name ?>
58 </title>
59 <script type="text/javascript" src="../../library/topdialog.js"></script>
61 <script language='JavaScript'>
62 <?php require($GLOBALS['srcdir'] . "/restoreSession.php"); ?>
63 </script>
65 </head>
67 <?php if ($GLOBALS['concurrent_layout']) { // start new layout ?>
69 <!-- border (mozilla) and framespacing (ie) are the same thing. -->
70 <!-- frameborder specifies a 3d look, not whether there are borders. -->
71 <frameset rows='<?php echo $GLOBALS['titleBarHeight'] + 5 ?>,*' frameborder='1' border='1' framespacing='1' onunload='imclosing()'>
72 <frame src='main_title.php' name='Title' scrolling='no' frameborder='1' noresize />
73 <frameset cols='<?php echo $nav_area_width; ?>,*' id='fsbody' frameborder='1' border='4' framespacing='4'>
74 <frameset rows='*,0' frameborder='0' border='0' framespacing='0'>
75 <frame src='left_nav.php' name='left_nav' />
76 <frame src='daemon_frame.php' name='Daemon' scrolling='no' frameborder='0'
77 border='0' framespacing='0' />
78 </frameset>
79 <?php if (empty($GLOBALS['athletic_team'])) { ?>
80 <frameset rows='60%,*' id='fsright' bordercolor='#999999' frameborder='1'>
81 <?php } else { ?>
82 <frameset rows='100%,*' id='fsright' bordercolor='#999999' frameborder='1'>
83 <?php } ?>
84 <frame src='<?php echo $frame1url ?>' name='RTop' scrolling='auto' />
85 <frame src='messages/messages.php' name='RBot' scrolling='auto' />
86 </frameset>
87 </frameset>
88 </frameset>
90 <?php } else { // start old layout ?>
92 </head>
93 <frameset rows="<?php echo "$GLOBALS[navBarHeight],$GLOBALS[titleBarHeight]" ?>,*"
94 cols="*" frameborder="no" border="0" framespacing="0"
95 onunload="imclosing()">
96 <frame src="main_navigation.php" name="Navigation" scrolling="no" noresize frameborder="no">
97 <frame src="main_title.php" name="Title" scrolling="no" noresize frameborder="no">
98 <frame src='<?php echo $frame1url ?>' name='Main' scrolling='auto' noresize frameborder='no'>
99 </frameset>
100 <noframes><body bgcolor="#FFFFFF">
101 Frame support required
102 </body></noframes>
104 <?php } // end old layout ?>
106 </html>