\n"; passthru("$connstr $eximstr -Mrm ".$_GET['del']); echo "\n"; exit; } if ($_GET['read']) { echo "
";
	passthru("$connstr $eximstr -Mvl ".$_GET['read']."; $eximstr -Mvh ".$_GET['read']);
	echo "
\n"; exit; } if ($_POST['toclear']) { echo "Are you sure you want to delete these messages?

\n"; exec ("$connstr '$mailqstr'", $output); $grab = 1; $flag = 0; echo "\n"; for ($i = 0; $i < count($output); $i++) { $buf = $output[$i]; switch ($grab) { case 1: $header = preg_split ("/[\s]+/", $buf); if (substr($buf, 0, 1) == " ") { $id = $header[3]; $from = $header[4]; } else { $id = $header[2]; $from = $header[3]; } $grab = 2; break; case 2: if (strlen($buf) > 3) { if (strpos(substr($buf, 9), $_POST['toclear'])) { $flag = 1; } } else { if ($flag == 1) echo "\n"; $grab = 1; $flag = 0; } break; } } echo "
Message idFrom address
$id".htmlspecialchars($from)."
"; exit; } if ($_GET['toclearyes']) { exec ("$connstr '$mailqstr'", $output); $grab = 1; $flag = 0; $str = "$connstr '$eximstr -Mrm "; for ($i = 0; $i < count($output); $i++) { $buf = $output[$i]; switch ($grab) { case 1: $header = preg_split ("/[\s]+/", $buf); if (substr($buf, 0, 1) == " ") $id = $header[3]; else $id = $header[2]; $grab = 2; break; case 2: if (strlen($buf) > 3) { if (strpos(substr($buf, 9), $_GET['toclearyes'])) { $flag = 1; } } else { if ($flag == 1) $str .= $id." "; $grab = 1; $flag = 0; } break; } } passthru($str."'"); } if ($_POST['clear']) { $out = array(); exec("$connstr '$mailqstr | grep ".str_replace(">","\>",str_replace("<","\<",$_POST['clear']))."'", $out); echo "Are you sure you want to delete these messages?

\n"; for ($i = 0; $i < count($out); $i++) echo htmlspecialchars($out[$i])."
\n"; exit; } if ($_GET['clearyes']) { exec("$connstr '$mailqstr | grep ".str_replace(">","\>",str_replace("<","\<",$_GET['clearyes']))." | cut -c 11-27'", $out); $str = implode(" ", $out); passthru ("$connstr '$eximstr -Mrm $str'"); } ?>
From address to clear:
To address to clear:
1) { $fpart = htmlspecialchars(trim(substr($out[$i], 0, 10))); $spart = explode(" ",htmlspecialchars(trim(substr($out[$i], 10)))); if ($fpart[0]) { $id = $spart[0]; $from = $spart[1]; $date = substr($fpart, 0, 4); $size = substr($fpart, 4); } else { $recipient = $spart[0]; array_push ($mail, array($from,$recipient,$size,$date,$error,$id)); $from = ""; } } } for ($i = 0; $i < count($mail); $i++) { $m = $mail[$i]; echo "\n"; } ?>
From: (Click to delete)To: (Click to read)Size:Time:
".substr($m[0],0,50)."".substr($m[1],0,50)."".$m[2]."".$m[3]."