function kav4proxy() { include_once "ressources/class.kav4proxy.inc"; $kav = new kav4proxy(); $hash = $kav->BuildStatistics(); if ($_GET["kav4proxy"] == 'viruses') { $textes[] = 'title'; $donnees[] = ''; $donnees[] = $hash["total_requests"]; $textes[] = "Total uris ({$hash["total_requests"]})"; $donnees[] = $hash["infected_requests"]; $textes[] = "infected uris ({$hash["infected_requests"]})"; $donnees[] = $hash["protected_requests"]; $textes[] = "protected uris ({$hash["protected_requests"]})"; $donnees[] = $hash["error_requests"]; $textes[] = "errors uris ({$hash["error_requests"]})"; BuildPieChart(array($textes, $donnees), array(), -5); exit; } if ($_GET["kav4proxy"] == 'perf') { $textes[] = 'title'; $donnees[] = ''; $donnees[] = $hash["processed_traffic"]; $textes[] = "Processed traffic ({$hash["processed_traffic"]})"; $donnees[] = $hash["clean_traffic"]; $textes[] = "Clean traffic ({$hash["clean_traffic"]})"; $donnees[] = $hash["infected_traffic"]; $textes[] = "infected traffic ({$hash["infected_traffic"]})"; BuildPieChart(array($textes, $donnees), array(), -5); exit; } }
function main_stats() { include_once 'ressources/charts.php'; $page = CurrentPageName(); $users = new usersMenus(); $kav = new kav4proxy(); $hash = $kav->BuildStatistics(); $tpl = new templates(); $graph1 = InsertChart('js/charts.swf', "js/charts_library", "listener.graphs.php?kav4proxy=viruses", 300, 250, "", true, $users->ChartLicence); $graph2 = InsertChart('js/charts.swf', "js/charts_library", "listener.graphs.php?kav4proxy=perf", 300, 250, "", true, $users->ChartLicence); $html = main_tabs() . "<br>\n\t<form name='ffm1'>\n\t<H5>{statistics}</H5>\n\t<table style='width:100%'>\n\t<tr>\n\t<td colspan=2>\n\t\t<table style='width:100%'>\n\t\t<tr>\n\t\t\t<td>{requests_per_min}</td>\n\t\t\t<td><strong>{$hash["requests_per_min"]}</td>\n\t\t\t<td>{traffic_per_min}</td>\n\t\t\t<td><strong>{$hash["traffic_per_min"]}</td>\t\t\t\n\t\t\t<td>{total_connections}</td>\n\t\t\t<td><strong>{$hash["total_connections"]}</td>\t\t\t\t\n\t\t\t<td>{total_processes}</td>\n\t\t\t<td><strong>{$hash["total_processes"]}</td>\t\t\t\t\n\t\t\t<td>{idle_processes}</td>\n\t\t\t<td><strong>{$hash["idle_processes"]}</td>\n\t\t</tr>\n\t\t</table>\t\t\t\n\t\t\t\n\t\t</tr>\n\t\t\n\t\n\t<td valign='top'><h5>Uris</H5>\t{$graph1}</td>\n\t<td valign='top'><h5>{flow}</H5>\t{$graph2}</td>\n\t</tr>\n\t</table>"; echo $tpl->_ENGINE_parse_body($html, 'milter.index.php'); }