If you had access to a database this would be MUCH easier.
Try this:
<?php
$Today = date("Ymd");
$EndDay = date("Ymd", mktime(0,0,0,date("m"),date("d")+7,date("Y")));
$handle=opendir('events');
while (($file = readdir($handle))!==false) {
if (($file >= $Today) && ($file <= $EndDay)) {
include("events/$file");
}
}
closedir($handle);
?>
Should work. Let me know if there's an issue.
mktime() is a killer function when used with date(). Brush up in the manual: http://us4.php.net/manual/en/function.date.php
Look at Example 3.
Peace,
Tom 🙂