} list($year, $month, $day) = explode('/', $Date); if (!CheckDate($month, $day, $year)) { $DateMessage = 'date adjusted to something realistic'; $Date = date('Y/m/d'); } else { $Date = date('Y/m/d', strtotime($Date)); } if (isset($_REQUEST['branch'])) { $BranchName = htmlspecialchars($_REQUEST['branch']); } else { $BranchName = BRANCH_HEAD; } $commits = new Commits($db, $BranchName); $last_modified = $commits->LastModified($Date); $NumCommits = $commits->Count($Date); freshports_ConditionalGet($last_modified); freshports_Start($FreshPortsSlogan, $FreshPortsName . ' - new ports, applications', 'FreeBSD, index, applications, ports'); $Debug = 0; $ArchiveBaseDirectory = $_SERVER['DOCUMENT_ROOT'] . '/archives'; function ArchiveFileName($Date) { $File = $ArchiveBaseDirectory . '/' . $Date . '.daily'; } function ArchiveDirectoryCreate($Date) { $SubDir = date('Y/m', strtotime($Date)); $DirToCreate = $ArchiveBaseDirectory . '/' . $SubDir; system("mkdir -p {$DirToCreate}"); return $DirToCreate; }