1
0

more dynamic header

This commit is contained in:
2020-01-20 21:13:26 +01:00
parent cf6c496b34
commit 6f90fb912b
13 changed files with 107 additions and 12 deletions

View File

@@ -0,0 +1,21 @@
<?php
require_once (__DIR__ . '/../internals/website.php');
/** @var PageFrameOptions $FRAME_OPTIONS */ global $FRAME_OPTIONS;
/** @var URLRoute $ROUTE */ global $ROUTE;
/** @var Website $SITE */ global $SITE;
?>
<?php
$year = intval($ROUTE->parameter['year']);
$day = intval($ROUTE->parameter['day']);
if ($SITE->modules->AdventOfCode()->getSingleDay($year, $day) === null)
{
$FRAME_OPTIONS->setForced404('Advent of Code not found');
return;
}
$FRAME_OPTIONS->setForcedRedirect($SITE->modules->AdventOfCode()->getSingleDay($year, $day)['url']);
?>