$days; $z--){
if ($z==0)
$postfix_db=date("Y-m-d");
else
$postfix_db=date("Y-m-d",strtotime("$z day",$curr_time));
if (file_exists($postfix_dir.'/'.$postfix_db.".db")){
#noqueue
if (@filesize($postfix_dir.'/'.$postfix_db.".db")< $size){
$stm="select count(*) as total from mail_noqueue";
$row_noqueue = postfix_read_db($stm,$postfix_db.".db");
//queue
$stm="select mail_status.info as status,count(*) as total from mail_to,mail_status where mail_to.status=mail_status.id group by status order by mail_status.info";
$result = postfix_read_db($stm,$postfix_db.".db");
$reader="";
$count="";
$reject=0;
foreach($result as $i => $row){
if (is_array($row)){
if (preg_match("/\w+/",$row['status'])){
$reader.="
".ucfirst($row['status'])." | \n";
if ($row['status']=="reject"){
$row['total']=+$row_noqueue[0]['total'];
$reject++;
}
$count.="".number_format($row['total'],0,"",".")." | \n";
}
}
}
if(count($result) > 0){
open_table();
print "$postfix_db | ";
close_table();
open_table();
if ($reject==0){
$reader.="Reject | \n";
$count.="".number_format($row_noqueue[0]['total'],0,"",".")." | \n";
}
print "".$reader."
";
print "".$count."
";
close_table();
echo "
";
}
}
else{
print "File size is too large. | ";
close_table();
echo "
";
}
}
}
echo" ";
echo"";
?>