$filelist = glob("admin/text/news/*.*");
foreach ($filelist as $filename)
{
$ext = pathinfo($filename, PATHINFO_EXTENSION);
if ($ext == 'dat'){$datfile = file_get_contents($filename, FILE_USE_INCLUDE_PATH);}
if ($ext == 'bmp'){$imgfile=$filename;}
echo "
<table class=\"table1\" border=1>
<tr>
<td class=\"td17\">{$imgfile}</td>
<td class=\"td18\">{$datfile}</td>
</tr></table>";
}