[ Index ] |
PHP Cross Reference of Unnamed Project |
[Summary view] [Print] [Text view]
1 <?php 2 3 /** 4 5 * Page clamv 6 * @Version $Id: clamav-log.php 8567 2015-03-15 14:27:22Z plouf $ 7 8 * @Projet LCS / SambaEdu 9 10 * @auteurs 11 12 * @Licence Distribue selon les termes de la licence GPL 13 14 * @note 15 16 */ 17 18 /** 19 20 * @Repertoire: /se3-clamav 21 * file: clamav-log.php 22 */ 23 24 25 26 require("entete.inc.php"); 27 require ("ihm.inc.php"); 28 29 30 31 $directory=$_POST[directory]; 32 $scan_start=$_POST[scan_start]; 33 34 if ( is_admin("se3_is_admin",$login)!="Y") die (gettext("Vous n'avez pas les droits suffisants pour acc�der � cette fonction" 35 )."</BODY></HTML>"); 36 37 38 echo "<h1> Solution antivirus serveur</h1>\n"; 39 if (isset($directory)) { 40 print "<h2> Log des scans du répertoire".$directory."</h2>\n"; 41 if (! isset($scan_start)) $scan_start=0; 42 $query=" SELECT * FROM clamav_scan WHERE directory='".$directory."'"; 43 $query .=" ORDER BY id desc "; 44 $query .="LIMIT $scan_start,1"; 45 46 $result = mysql_query($query); 47 48 if (($result)) { 49 echo "<TABLE width='100%'><TR><TD WIDTH='50%' align=\"left\">"; 50 if ($scan_start!=0) { 51 echo "<form action='".$_SERVER['PHP_SELF']."' method='post'>\n"; 52 $previous_scan_start=$scan_start-1; 53 echo "<input type=\"hidden\" name=\"scan_start\" value=\"$previous_scan_start\"/>"; 54 print "<input type=\"hidden\" name=\"directory\" value=\"".$directory."\">\n"; 55 print "<input type=\"submit\" value=\"".gettext("Afficher les logs précédents.")."\">\n"; 56 print "</form>\n"; 57 } 58 echo"</td>\n"; 59 if (mysql_num_rows($result)==0) { 60 echo "<td></td></tr></table>\n"; 61 echo gettext("fin des logs de scan"); 62 } else { 63 echo "<td width=\"50%\" align=\"right\">"; 64 echo "<form action='".$_SERVER['PHP_SELF']."' method='post'>\n"; 65 $next_scan_start=$scan_start+1; 66 echo "<input type=\"hidden\" name=\"scan_start\" value=\"$next_scan_start\"/>"; 67 print "<input type=\"hidden\" name=\"directory\" value=\"".$directory."\">\n"; 68 print "<input type=\"submit\" value=\"".gettext("Afficher les logs suivants.")."\">\n"; 69 print "</form>\n"; 70 echo "</td></tr></table>\n"; 71 // affichage de la table connexions 72 echo "<TABLE align='center' border='1'>\n"; 73 echo "<TR><TH> Log du scan par clamav</TH></TR>\n"; 74 $r=mysql_fetch_array($result); 75 // SUMMARY 76 echo "<TR><TD class=\"menuheader\">\n"; 77 echo "résumé"; 78 echo "</TD></TR>"; 79 echo "<TR><TD><pre>\n"; 80 echo $r["summary"]; 81 echo "</pre></TD></TR>"; 82 //SCAN RESULT 83 echo "<TR><TD class=\"menuheader\">\n"; 84 echo "Résultat du scan"; 85 echo "</TD></TR>"; 86 echo "<TR><TD><pre>\n"; 87 echo $r["result"]; 88 echo "</pre></TD></TR></TABLE>\n"; 89 } 90 } 91 } else { 92 $query="SELECT DISTINCT directory FROM clamav_scan"; 93 $result = mysql_query($query); 94 95 print "<form action='".$_SERVER['PHP_SELF']."' method='post'>\n"; 96 while ($r=mysql_fetch_array($result)) { 97 print "<input type=\"radio\" name=\"directory\" value=\"".$r["directory"]."\">\n"; 98 print gettext("Log des scans du répertoire ".$r["directory"]); 99 print "<br/>\n"; 100 } 101 print "<input type=\"submit\" value=\"".gettext("Afficher les logs.")."\">\n"; 102 print "</form>\n"; 103 } 104 105 require ("pdp.inc.php"); 106 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Tue Mar 17 22:47:18 2015 | Cross-referenced by PHPXref 0.7.1 |