noalyss Version-9
audit_log.php
Go to the documentation of this file.
1<?php
2/*
3 * This file is part of NOALYSS.
4 *
5 * NOALYSS is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * NOALYSS is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with NOALYSS; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18*/
19
20// Copyright Author Dany De Bontridder danydb@noalyss.eu
21
22/*!\file
23 * \brief let you see the list of the connexion
24 */
25if ( !defined ('ALLOWED')) die('Forbidden');
27?>
28<DIV class="content">
29<span class="notice"><?=_("100 dernières connexions")?></span>
30<?php
31
33 $cn->exec_sql("select ac_user,ac_ip,to_char(ac_date,'DD.MM.YYYY HH24:MI') as fmt_date,ac_state,ac_module from audit_connect order by ac_date desc limit 100 ");
34?>
35<TABLE CLASS="result" style="border-collapse:separate;border-spacing:2">
36<tr>
37<th><?php echo _("Utilisateur");?> </th>
38<th><?php echo _("Date");?> </th>
39<th><?php echo _("Adresse");?> </th>
40<th><?php echo _("Module");?></th>
41<th><?php echo _("Résultat");?></th>
42</tr>
43<TR>
44 <?php
45 $max=$cn->count();
46 for ($i=0;$i < $max ;$i++):
47 $r=$cn->fetch($i);
48?>
49<td>
50 <?php echo h($r['ac_user']);?>
51</td>
52
53<td>
54<?php echo $r['fmt_date'];?>
55</td>
56
57<td>
58<?php echo $r['ac_ip'];?>
59</td>
60
61<td>
62<?php echo $r['ac_module'];?>
63</td>
64
65
66<?php
67switch ( $r['ac_state'] )
68 {
69 case 'FAIL';
70 echo '<td style="background-color:red;color:white">';
71 break;
72 case 'SUCCESS';
73 echo '<td style="background-color:green;color:white">';
74 break;
75 default:
76 echo '<td>';
77 }
78?>
79<?php echo $r['ac_state']?>
80</td>
81
82</TR>
83<?php
84 endfor;
85?>
86
87</DIV>
th($p_string, $p_extra='', $raw='')
Definition: ac_common.php:58
span($p_string, $p_extra='')
Definition: ac_common.php:43
tr($p_string, $p_extra='')
Definition: ac_common.php:88
td($p_string='', $p_extra='')
surround the string with td
Definition: ac_common.php:83
catch(Exception $exc) if(! $g_user->can_write_action($ag_id)) $r
h( $row[ 'oa_description'])
$opd_description style
$cn
Definition: audit_log.php:32
$max
Definition: audit_log.php:45
contains the class for connecting to Noalyss
static echo_file($msg, $print=true)
display the file
Definition: dbg.php:88
endfor