So passt es:
Code:
// Dateien nach Jahren gruppiert ausgeben
$group_year = 0;
$group_month = 0;
foreach ($files as $file)
{
$file = $dir . $file;
$file_year = date('Y', filemtime($file));
$file_month = date('m', filemtime($file));
if ($file_year <> $group_year)
{
if ($group_year > 0)
{
echo "
\n";
}
echo "[/list]\n";
echo "<h4>$file_year</h4>\n";
echo "<img src=\"/pics/divider.jpg\">\n";
$group_year = $file_year;
}
if (($file_month <> $group_month) || ($file_year <> $group_year))
{
if ($group_month > 0)
{
/*echo "[/list]\n";*/
}
echo "[/list]\n";
echo "<h5>".date("M", filemtime($file))."</h5>\n";
echo "<ul>\n";
$group_month = $file_month;
}
$title = GetTitleFromHTML($file);
echo "[*]<a title=\"$title\" href=\"$file\">$title</a></br>\n";
}
echo "[/list]\n";
Und jetzt nur noch die Monate vollausgeschrieben.