Initial commit
This commit is contained in:
commit
529efd53a1
140 changed files with 10310 additions and 0 deletions
62
mail-stat.php
Normal file
62
mail-stat.php
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
<?php
|
||||
|
||||
include_once("./include/cfg-petar.php");
|
||||
include_once("./include/layout.php");
|
||||
include_once("./include/users.php");
|
||||
include_once("./include/db.php");
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<!-- ------------------------------------------------------------------------ -->
|
||||
|
||||
<?php require 'include/inc-header.php';?>
|
||||
|
||||
<!-- ------------------------------------------------------------------------ -->
|
||||
|
||||
<?php require 'include/inc-top.php';?>
|
||||
|
||||
<!-- ------------------------------------------------------------------------ -->
|
||||
|
||||
<tr bgcolor=navy align=center>
|
||||
<td colspan=2><font color=yellow><b>Statistiche Email</b></font></td>
|
||||
|
||||
<?php
|
||||
|
||||
if ($mail_mode == "full") {
|
||||
$table = "MAILUSER";
|
||||
} else {
|
||||
$table = "FWDUSER";
|
||||
}
|
||||
|
||||
$sql="select count(email) as count, domain from ".$table." group by domain order by count desc";
|
||||
|
||||
$result=$dbh->query($sql);
|
||||
$rows=$result->fetchAll();
|
||||
|
||||
if ( count($rows) > 0 ) {
|
||||
foreach($rows as $row){
|
||||
if ($row["count"] == 1) { $bgcolor="#3fffcc";};
|
||||
if ($row["count"] > 1 && $row["count"] <= 5) { $bgcolor="#3dff77";};
|
||||
if ($row["count"] > 5 && $row["count"] <= 15) { $bgcolor="#b2ff37";};
|
||||
if ($row["count"] > 15 && $row["count"] <= 20) { $bgcolor="#ffa931";};
|
||||
if ($row["count"] > 20 && $row["count"] <= 100) { $bgcolor="#ff662f";};
|
||||
if ($row["count"] > 100) { $bgcolor="#ff2b2b";};
|
||||
echo "<tr bgcolor=$bgcolor><td>".$row["domain"]."<td>".$row["count"]."<br>";
|
||||
}
|
||||
|
||||
echo "<tr bgcolor=yellow><td align=right>Totale domini: <td>".count($rows);
|
||||
|
||||
} else {
|
||||
|
||||
echo "<tr bgcolor=yellow><td align=right>Email trovate<td>0";
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<!-- ------------------------------------------------------------------------ -->
|
||||
|
||||
<?php require 'include/inc-footer.php';?>
|
||||
|
||||
<!-- ------------------------------------------------------------------------ -->
|
||||
Loading…
Add table
Add a link
Reference in a new issue