0) && ($found == false)) { if ( file_exists($_SERVER['DOCUMENT_ROOT'] . "/programs/oregonterritory/episodes/" . sprintf("%04d/%02d%02d", $friday['year'], $friday['mon'], $friday['mday']) . "/episode.inc")) { $found = true; $next_episode = $friday; } else { $friday = getdate(mktime(0,0,0,$friday['mon'],$friday['mday']-7,$friday['year'])); } $cnt--; } if ($cnt > 0) { $year = $next_episode['year']; $month = $next_episode['mon']; $day = $next_episode['mday']; $include_path = "/programs/oregonterritory/episodes/" . sprintf("%04d/%02d%02d", $year, $month, $day); virtual($include_path . "/index.php"); } ?>