if(!isset($_GET['Y']) || !isset($_GET['D'])) {
die('Date not correctly set.');
}
if($_GET['Y']>gmdate('Y')) {
die('This year has yet to occur');
} elseif($_GET['Y']=gmdate('Y')) {
if($_GET['D']>gmdate('d')) {
die('This panel has yet to open.');
}}
include('panels/'.$_GET['Y'].'/advent_config.php');
echo('
Full poem:
(The topic was "'.$conf_topic[$_GET['D']].'")
'.str_replace("\n",' ',$conf_poem[$_GET['D']]).' By: '.$conf_poem_author[$_GET['D']].'
Christmas song of the day:
');
$file = fopen('visitlog.txt',"a+");
fwrite($file,gmdate('H:i:s d\/m\/Y',gmmktime()).': '.$_SERVER['REMOTE_ADDR'].' visited the panel for day '.$_GET['D'].' in year '.$_GET['Y'].'.'."\n");
fclose($file);
?>