noalyss  Version-6.7.2
 All Data Structures Namespaces Files Functions Variables Enumerations
audit_log.php
Go to the documentation of this file.
00001 <?php
00002 /*
00003  *   This file is part of NOALYSS.
00004  *
00005  *   NOALYSS is free software; you can redistribute it and/or modify
00006  *   it under the terms of the GNU General Public License as published by
00007  *   the Free Software Foundation; either version 2 of the License, or
00008  *   (at your option) any later version.
00009  *
00010  *   NOALYSS is distributed in the hope that it will be useful,
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  *   GNU General Public License for more details.
00014  *
00015  *   You should have received a copy of the GNU General Public License
00016  *   along with NOALYSS; if not, write to the Free Software
00017  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00018 */
00019 
00020 // Copyright Author Dany De Bontridder danydb@aevalys.eu
00021 
00022 /*!\file
00023  * \brief let you see the list of the connexion
00024  */
00025 if ( !defined ('ALLOWED')) die('Forbidden');
00026 ?>
00027 <DIV class="content" style="width:80%;margin-left:10%">
00028 <span class="notice">Liste limitée aux 100 dernières connexions</span>
00029 <?php
00030 
00031     $cn=new Database();
00032     $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 ");
00033 ?>
00034 <TABLE CLASS="result" style="border-collapse:separate;border-spacing:2">
00035 <tr>
00036 <th><?php echo _("Utilisateur");?> </th>
00037 <th><?php echo _("Date");?> </th>
00038 <th><?php echo _("Adresse");?> </th>
00039 <th><?php echo _("Module");?></th>
00040 <th><?php echo _("Résultat");?></th>
00041 </tr>
00042 <TR>
00043   <?php
00044   $max=$cn->count();
00045   for ($i=0;$i < $max ;$i++):
00046     $r=$cn->fetch($i);
00047 ?>
00048 <td>
00049     <?php echo h($r['ac_user']);?>
00050 </td>
00051 
00052 <td>
00053 <?php echo $r['fmt_date'];?>
00054 </td>
00055 
00056 <td>
00057 <?php echo $r['ac_ip'];?>
00058 </td>
00059 
00060 <td>
00061 <?php echo $r['ac_module'];?>
00062 </td>
00063 
00064 
00065 <?php 
00066 switch ( $r['ac_state'] )
00067   {
00068   case 'FAIL';
00069   echo '<td style="background-color:red;color:white">';
00070   break;
00071   case 'SUCCESS';
00072   echo '<td style="background-color:green;color:white">';
00073   break;
00074   default:
00075           echo '<td>';
00076   }
00077 ?>
00078 <?php echo $r['ac_state']?>
00079 </td>
00080 
00081 </TR>
00082 <?php 
00083   endfor;
00084 ?>
00085 
00086 </DIV>
 All Data Structures Namespaces Files Functions Variables Enumerations