<?php
$where = glob('mbase/*.txt');
for($a = 0, $b = sizeof($where); $a < $b; ++$a)
{
$who = basename($where[$a]);
$rename = str_replace($who, 'База - #' . ($a + 1) . ' (' . $who . ')', $who);
$bs = count(file('mbase/' . $who));
echo '<div class="menu">' . $rename . ': ' . $bs . ' адресов</br></div>';
}
$alls = count(file('logfile.txt'));
echo '<div class="menu">Отправленно писем: ' . $alls . '</div>';
?>