Added option for a "tall" navigation frame.
[openemr.git] / interface / main / main_screen.php
blob1f6e0d1c324a11959ce16c868d90966a329d98dc
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 <?php if (empty($GLOBALS['gbl_tall_nav_area'])) { // not tall nav area ?>
71 <!-- border (mozilla) and framespacing (ie) are the same thing. -->
72 <!-- frameborder specifies a 3d look, not whether there are borders. -->
73 <frameset rows='<?php echo $GLOBALS['titleBarHeight'] + 5 ?>,*' frameborder='1' border='1' framespacing='1' onunload='imclosing()'>
74 <frame src='main_title.php' name='Title' scrolling='no' frameborder='1' noresize />
75 <frameset cols='<?php echo $nav_area_width; ?>,*' id='fsbody' frameborder='1' border='4' framespacing='4'>
76 <frameset rows='*,0' frameborder='0' border='0' framespacing='0'>
77 <frame src='left_nav.php' name='left_nav' />
78 <frame src='daemon_frame.php' name='Daemon' scrolling='no' frameborder='0'
79 border='0' framespacing='0' />
80 </frameset>
81 <?php if (empty($GLOBALS['athletic_team'])) { ?>
82 <frameset rows='60%,*' id='fsright' bordercolor='#999999' frameborder='1'>
83 <?php } else { ?>
84 <frameset rows='100%,*' id='fsright' bordercolor='#999999' frameborder='1'>
85 <?php } ?>
86 <frame src='<?php echo $frame1url ?>' name='RTop' scrolling='auto' />
87 <frame src='messages/messages.php' name='RBot' scrolling='auto' />
88 </frameset>
89 </frameset>
90 </frameset>
92 <?php } else { // use tall nav area ?>
94 <frameset cols='<?php echo $nav_area_width; ?>,*' id='fsbody' frameborder='1' border='4' framespacing='4' onunload='imclosing()'>
95 <frameset rows='*,0' frameborder='0' border='0' framespacing='0'>
96 <frame src='left_nav.php' name='left_nav' />
97 <frame src='daemon_frame.php' name='Daemon' scrolling='no' frameborder='0'
98 border='0' framespacing='0' />
99 </frameset>
100 <frameset rows='<?php echo $GLOBALS['titleBarHeight'] + 5 ?>,*' frameborder='1' border='1' framespacing='1'>
101 <frame src='main_title.php' name='Title' scrolling='no' frameborder='1' />
102 <?php if (empty($GLOBALS['athletic_team'])) { ?>
103 <frameset rows='60%,*' id='fsright' bordercolor='#999999' frameborder='1' border='4' framespacing='4'>
104 <?php } else { ?>
105 <frameset rows='100%,*' id='fsright' bordercolor='#999999' frameborder='1' border='4' framespacing='4'>
106 <?php } ?>
107 <frame src='<?php echo $frame1url ?>' name='RTop' scrolling='auto' />
108 <frame src='messages/messages.php' name='RBot' scrolling='auto' />
109 </frameset>
110 </frameset>
111 </frameset>
113 <?php } // end tall nav area ?>
115 <?php } else { // start old layout ?>
117 </head>
118 <frameset rows="<?php echo "$GLOBALS[navBarHeight],$GLOBALS[titleBarHeight]" ?>,*"
119 cols="*" frameborder="no" border="0" framespacing="0"
120 onunload="imclosing()">
121 <frame src="main_navigation.php" name="Navigation" scrolling="no" noresize frameborder="no">
122 <frame src="main_title.php" name="Title" scrolling="no" noresize frameborder="no">
123 <frame src='<?php echo $frame1url ?>' name='Main' scrolling='auto' noresize frameborder='no'>
124 </frameset>
125 <noframes><body bgcolor="#FFFFFF">
126 Frame support required
127 </body></noframes>
129 <?php } // end old layout ?>
131 </html>