updated acknowledgments
[openemr.git] / interface / main / onotes / office_comments.php
blobfcffe3cc94a86a076c06b2e12581cf778e24cacd
1 <?php
2 /**
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>;.
16 * @package OpenEMR
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");
23 include_once("$srcdir/formatting.inc.php");
25 //display all of the notes for the day, as well as others that are active from previous dates, up to a certain number, $N
26 $N = 10;
29 <html>
30 <head>
32 <link rel="stylesheet" href="<?php echo $css_header;?>" type="text/css">
34 </head>
35 <body class="body_top">
37 <div id="officenotes_list">
38 <a href="office_comments_full.php" onclick='top.restoreSession()'>
39 <font class="title"><?php echo xlt('Office Notes'); ?></font>
40 <font class="more"><?php echo text($tmore);?></font></a>
42 <br>
44 <table border=0 width=100%>
46 <?php
48 //retrieve all active notes
49 if($result = getOnoteByDate("", 1, "date,body,user","all",0)) {
51 $notes_count = 0;//number of notes so far displayed
52 foreach ($result as $iter) {
53 if ($notes_count >= $N) {
54 //we have more active notes to print, but we've reached our display maximum (defined at top of this file)
55 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";
56 break;
59 $date=date( "Y-m-d" ,strtotime($iter{"date"}));
60 $date=oeFormatShortDate($date);
62 if (getdate() == strtotime($iter{"date"})) {
63 $date_string = xl("Today") . ", " . $date;
64 } else {
65 $date_string = $date;
68 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";
71 $notes_count++;
77 </table>
78 </div>
80 </body>
81 </html>