3 * Report to view the Direct Message log.
5 * Copyright (C) 2013 Brady Miller <brady@sparmy.com>
7 * LICENSE: This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 2
10 * of the License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://opensource.org/licenses/gpl-license.php>;.
19 * @author Brady Miller <brady@sparmy.com>
20 * @link http://www.open-emr.org
23 //SANITIZE ALL ESCAPES
24 $sanitize_all_escapes=true;
27 //STOP FAKE REGISTER GLOBALS
28 $fake_register_globals=false;
31 require_once("../globals.php");
37 <?php
html_header_show();?
>
39 <link rel
="stylesheet" href
="<?php echo $css_header;?>" type
="text/css">
41 <title
><?php
echo xlt('Direct Message Log'); ?
></title
>
43 <script type
="text/javascript" src
="../../library/js/jquery-1.7.2.min.js"></script
>
45 <style type
="text/css">
47 /* specifically include & exclude from printing */
53 #report_parameters_daterange {
57 #report_results table {
62 /* specifically exclude some from the screen */
64 #report_parameters_daterange {
73 <body
class="body_top">
75 <span
class='title'><?php
echo xlt('Direct Message Log'); ?
></span
>
77 <form method
='post' name
='theform' id
='theform' action
='direct_message_log.php' onsubmit
='return top.restoreSession()'>
79 <div id
="report_parameters">
83 <div style
='float:left'>
86 <div style
='margin-left:15px'>
87 <a id
='refresh_button' href
='#' class='css_button' onclick
='top.restoreSession(); $("#theform").submit()'>
89 <?php
echo xlt('Refresh'); ?
>
97 </div
> <!-- end of search parameters
-->
103 <div id
="report_results">
109 <?php
echo xlt('ID'); ?
>
113 <?php
echo xlt('Type'); ?
>
117 <?php
echo xlt('Date Created'); ?
>
121 <?php
echo xlt('Sender'); ?
>
125 <?php
echo xlt('Recipient'); ?
>
129 <?php
echo xlt('Status'); ?
>
133 <?php
echo xlt('Date of Status Change'); ?
>
137 <tbody
> <!-- added
for better
print-ability
-->
140 $res = sqlStatement("SELECT * FROM `direct_message_log` ORDER BY `create_ts` DESC");
141 while ($row = sqlFetchArray($res)) {
144 <td align
='center'><?php
echo text($row['id']); ?
></td
>
146 <?php
if ($row['msg_type'] == "R") { ?
>
147 <td align
='center'><?php
echo xlt("Received") ?
></td
>
148 <?php
} else if ($row['msg_type'] == "S") { ?
>
149 <td align
='center'><?php
echo xlt("Sent") ?
></td
>
151 <td align
='center'> 
;</td
>
154 <td align
='center'><?php
echo text($row['create_ts']); ?
></td
>
155 <td align
='center'><?php
echo text($row['sender']); ?
></td
>
156 <td align
='center'><?php
echo text($row['recipient']); ?
></td
>
158 <?php
if ($row['status'] == "Q") { ?
>
159 <td align
='center'><?php
echo xlt("Queued") ?
></td
>
160 <?php
} else if ($row['status'] == "S") { ?
>
161 <td align
='center'><?php
echo xlt("Sent, but delivery not yet confirmed.") ?
></td
>
162 <?php
} else if ($row['status'] == "D") { ?
>
163 <td align
='center'><?php
echo xlt("Delivery Confirmed") ?
></td
>
164 <?php
} else if ($row['status'] == "R") { ?
>
165 <td align
='center'><?php
echo xlt("Received") ?
></td
>
166 <?php
} else if ($row['status'] == "F") { ?
>
167 <td align
='center'><?php
echo xlt("Failed") ?
></td
>
169 <td align
='center'> 
;</td
>
172 <td align
='center'><?php
echo text($row['status_ts']); ?
></td
>
176 } // $row = sqlFetchArray($res) while
180 </div
> <!-- end of search results
-->