<div class="animated fadeInDown2">

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

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

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

$mailProjects=opendir ("./../".$SYSI."/dataA");
while ($pFiles=readdir ($mailProjects)){
$pFilesArray[] = $pFiles;
}
closedir($mailProjects);
natcasesort ($pFilesArray);
foreach($pFilesArray as $valueM)
if($valueM != '.' && $valueM != '..'){

$pFileA=substr($valueM, 0, 9);
$pFileB=substr($valueM, 10, 6);
$pFileC=substr($valueM, 0, -4);
$pFileD=substr($valueM, 0, 16);
$pFileP=file_get_contents("../".$SYSI."/dataA/".$valueM);
}

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

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

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

$mails1=substr($mailsX, 16, 10);
$mails2=substr($mailsX, 27, 8);
$mails2=str_replace("-",":",$mails2);
$mails3a=substr($mailsX, 0, 36);
$mails3b=substr($mailsX, 0, -8);
$mails4=str_replace($mails3a,"",$mailsX);
$mails4=substr($mails4, 0, -8);
include("./../configure/".$mails4."-project.inc.php");
echo "
<div>
<a href='$elink?mailopen=$mailsX'>
<span><i class='fa fa-envelope font18 padd-right5 resB'></i>
</a>
<span>".$mails1." ".$mails2." </span>
<span class='wbx'></span>
<span> ".$messagedata3." ".$project1." </span>
</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 -->
