-3; $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")){
$dbhandle = sqlite_open($postfix_dir.'/'.$postfix_db.".db", 0666, $error);
#noqueue
open_table();
print "
$postfix_db | ";
close_table();
open_table();
$stm="select count(*) as total from mail_noqueue";
$result = sqlite_query($dbhandle, $stm);
$row_noqueue = sqlite_fetch_array($result, SQLITE_ASSOC);
#queue
$result = sqlite_query($dbhandle, $stm);
$stm="select status,count(*) as total from mail_queue group by status order by status";
$result = sqlite_query($dbhandle, $stm);
$reader="";
$count="";
for ($i = 1; $i <= 15; $i++) {
$row = sqlite_fetch_array($result, SQLITE_ASSOC);
if (is_array($row)){
if (preg_match("/\w+/",$row['status'])){
$reader.="".ucfirst($row['status'])." | \n";
if ($row['status']=="reject")
$row['total']=+$row_noqueue['total'];
$count.="".$row['total']." | \n";
}
}
}
print "".$reader."
";
print "".$count."
";
close_table();
echo "
";
$result = sqlite_query($dbhandle, $stm);
sqlite_close($dbhandle);
}
}
echo" ";
echo"";
?>