<?PHP 
include("./../".$SYSD."/newsboard-".$tlanguage.".inc.php");
echo "
<div id='news' class='box boxStyle1 boxRed1 collapsed-box startBox1 margin-b30'>
<div class='box-header with-border'>
<div class='ribbon2'><span>".$newsInfo1."</span></div>
<div class='padd-lr50'><span class='font24 fwb'>".$newsTitle." </span><span class='font13 fwb'>".$newsSub."</span>";
if($newsInfo != ""){echo "<br><span class='padd-left10 font16'>".$newsInfo;}
echo "</div>
<div class='box-tools pull-right'>
<button class='btn btn-box-tool' data-widget='collapse' data-toggle='tooltip' title='$openX'><i class='fa fa-plus font16'></i></button>
</div>
</div>
";

$i=0;
$folderIB="./../".$SYSD."/newsboard-".$tlanguage."/";

$fileIB=opendir($folderIB);
while ($dataIB=readdir ($fileIB)){
$arrIB[] = $dataIB;
}
closedir($fileIB);
rsort ($arrIB);
foreach($arrIB as $resultIB)
if($resultIB != '.' && $resultIB != '..')
{
$resultIBx=$folderIB.$resultIB;
$resultIB=str_replace(".inc.txt","",$resultIB);

$dateIB1=substr($resultIB,6,2);
$dateIB2=substr($resultIB,4,2);
$dateIB3=substr($resultIB,0,4);
$timeIB1=substr($resultIB,9,2);
$timeIB2=substr($resultIB,11,2);
$dateIBx=$dateIB1.".".$dateIB2.".".$dateIB3.", ".$timeIB1.":".$timeIB2;

$fopen=@fopen($resultIBx,"r");
if($fopen){
$file=file($resultIBx);
foreach($file as $text){
}

$i++;
if($i == 1 || $i == 2){
echo "<div class='box-header with-border'><span class='font12 padd-right5'><i class='fa fa-clock-o'></i> ".$dateIBx." ".$tdatasend14."</span> ".$text."</div>";
}else{
echo "<div class='box-body box-header with-border'><span class='font12 padd-right5'><i class='fa fa-clock-o'></i> ".$dateIBx." ".$tdatasend14."</span> ".$text."</div>";
}

}

}
echo "<div class='box-footer'>".$newsInfo2."</div>";
echo "
</div>
";
?>