3 * Viewing of office notes.
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@sparmy.com>
18 * @link http://www.open-emr.org
21 include_once("../../globals.php");
22 include_once("$srcdir/onotes.inc");
24 //display all of the notes for the day, as well as others that are active from previous dates, up to a certain number, $N
31 <link rel
="stylesheet" href
="<?php echo $css_header;?>" type
="text/css">
34 <body
class="body_top">
36 <div id
="officenotes_list">
37 <a href
="office_comments_full.php" onclick
='top.restoreSession()' <?php
if (!$GLOBALS['concurrent_layout']) echo 'target="Main"'; ?
>>
38 <font
class="title"><?php
echo xlt('Office Notes'); ?
></font
>
39 <font
class="more"><?php
echo text($tmore);?
></font
></a
>
43 <table border
=0 width
=100%
>
47 //retrieve all active notes
48 if($result = getOnoteByDate("", 1, "date,body,user","all",0)) {
50 $notes_count = 0;//number of notes so far displayed
51 foreach ($result as $iter) {
52 if ($notes_count >= $N) {
53 //we have more active notes to print, but we've reached our display maximum (defined at top of this file)
54 print "<tr><td colspan=3 align=center><a target=Main href='office_comments_full.php?active=1' class='alert' onclick='top.restoreSession()'>".xlt("Some office notes were not displayed. Click here to view all.")."</a></td></tr>\n";
59 if (getdate() == strtotime($iter{"date"})) {
60 $date_string = "Today, " . date( "D F dS" ,strtotime($iter{"date"}));
62 $date_string = date( "D F dS" ,strtotime($iter{"date"}));
65 print "<tr><td width=20% valign=top><font class='bold'>".text($date_string)."</font> <font class='bold'>(".text($iter{"user"}).")</font><br>" . "<font class='text'>" . text($iter{"body"}) . "</font></td></tr>\n";