<div class="animated fadeInDown2">

<div class="box-body">
<div class="padd-lr10">

<div class='clearX infoboxline'></div>

<?PHP 
echo "
<div class='ph10'></div>
";

$handle=opendir("./../".$SYSD."/messages-out");
if($handle)
$mailsSum=0;
while($file=readdir($handle))
{$mailsSum++;}
$mailsSum=$mailsSum-2;
$mailsSum=$mailsSum / 2;

echo "
<div class='tdu font20'>".$messagedata1e." (".$mailsSum.")</div>
";

$mailsNew=opendir ("./../".$SYSD."/messages-out");
while ($pMails=readdir ($mailsNew)){
$pMailsArray[] = $pMails;
}
closedir($mailsNew);
arsort ($pMailsArray);
foreach($pMailsArray as $mailsX)
if($mailsX != '.' && $mailsX != '..'){

$mails1=str_replace(".inc.php","",$mailsX);
$mails2=substr($mails1, 15, 1);

if($mails2 != "t"){
include("./../".$SYSD."/messages-out/".$mails1.".inc.php");
$sendsubjectX=substr($sendsubject, 0, 25)."...";

echo "
<div>
<a href='".$alink."?showMail=".$mails1."'>
<span class='font18'><i class='fa fa-envelope-open-o font18 padd-right5 resB'></i>
</a>
<a href='".$dlink."?DeleteMail=".$mails1."'>
<span class='font18'><i class='fa fa-trash-o font18 padd-right5 resF'></i>
</a>
".$senddate." - ".$sendsubjectX." | ".$sendto."
</div>
<div class='ph5'></div>
";
}

}
echo "
<div class='ph15'></div>
<div class='clearX infoboxline'></div>
";
?>

</div><!-- padd -->
</div><!-- End box-body -->

<div class="clearX box-footer"></div>

</div><!-- End animated -->
