translation patches from Dr. Bosman and his crew
[openemr.git] / interface / logview / logview.php
blob866d39d640425c522bed2f6513c6bec0d95d0f63
1 <?php
2 include_once("../globals.php");
3 include_once("$srcdir/log.inc");
5 ?>
7 <html>
8 <head>
11 <link rel=stylesheet href="<?php echo $css_header;?>" type="text/css">
14 </head>
15 <body <?php echo $top_bg_line;?> topmargin=0 rightmargin=0 leftmargin=2 bottommargin=0 marginwidth=2 marginheight=0>
16 <font class=title><?php xl('Logs Viewer','e'); ?></font>
17 <br>
19 <?php
21 $res = sqlStatement("select distinct LEFT(date,10) as date from log order by date desc limit 30");
23 for($iter=0;$row=sqlFetchArray($res);$iter++) {
24 $ret[$iter] = $row;
28 <br>
29 <FORM METHOD="GET" name=the_form>
30 <span class=text><?php xl('Date','e'); ?>: </span>
31 <SELECT NAME="date">
32 <?php
34 if ($_GET["date"])
35 $getdate = $_GET["date"];
36 else
37 $getdate = date("Y-m-d");
40 $found = 0;
41 foreach ($ret as $iter) {
42 echo "<option value='{$iter["date"]}'";
43 if (!$found && substr($iter["date"],0,10) == $getdate) {
44 echo " selected";
45 $found++;
47 echo ">{$iter["date"]}</option>\n";
49 if (!$found) {
50 echo "<option value='$getdate'";
51 echo " selected";
52 echo ">$getdate</option>\n";
56 </SELECT>
58 <?php
59 $res = sqlStatement("select distinct event from log order by event ASC");
61 $found = 0;
62 echo "&nbsp;<span class=text>";
63 for($iter=0;$row=sqlFetchArray($res);$iter++) {
65 <input type="radio" name="event" value="<?php echo $row["event"];?>"<?php
66 if ($row["event"] == $_GET["event"]) {
67 echo " checked";
68 $found++;
70 ?>><?echo $row["event"]?>&nbsp;&nbsp;
71 <?php
72 $ret[$iter] = $row;
76 <input type="radio" name="event" value="*"<?php if (!$found) echo " checked";?>><?php xl('All','e'); ?>
77 </span>&nbsp;
78 <a href="javascript:document.the_form.submit();" class=link_submit>[<?php xl('Refresh','e'); ?>]</a>
79 </FORM>
80 <TABLE BORDER=1 CELLPADDING=4>
81 <TR><TD><span class=bold><?php xl('Date'); ?></span></TD><TD><span class=bold><?php xl('Event','e'); ?></span></TD><TD><span class=bold><?php xl('User','e'); ?></span></TD><TD><span class=bold><?php xl('Group','e'); ?></span></TD><TD><span class=bold><?php xl('Comments','e'); ?></span></TD>
82 <?php
84 if ($ret = getEventByDate($getdate) ) {
86 /*echo "<pre>";
87 print_r($ret);
88 echo "</pre>";
90 if (!$_GET["event"])
91 $gev = "*";
92 else
93 $gev = $_GET["event"];
94 foreach ($ret as $iter) {
95 if (($gev == "*") || ($gev == $iter["event"])) {
97 <TR><TD><span class=text><?php echo $iter["date"]?></span></TD><TD><span class=text><?php echo $iter["event"]?></span></TD><TD><span class=text><?php echo $iter["user"]?></span></TD><TD><span class=text><?php echo $iter["groupname"]?></span></TD><TD><span class=text><?php echo $iter["comments"]?></span></TD></TR>
99 <?php
104 </table>
105 <br><br>
107 </body>
108 </html>