diff --git a/output.php b/output.php index e63d2de..acd7e1e 100644 --- a/output.php +++ b/output.php @@ -14,7 +14,9 @@ */ $cfgMod = array( - 'debug' => false + 'debug' => true, + 'eak_imgset' => 'Extra/', + 'show_countdown' => true ); // init db-object @@ -59,7 +61,8 @@ $oFourthAdvent = clone $oThirdAdvent; $oFourthAdvent->modify("+7 days"); if($oToday <= $oXmasMondayDate && $oToday >= $oFirstAdventDate) { - $sImgPath = $cfgClient[$client]['images']."adventskranz/Extra/"; + $sImgPath = $cfgClient[$client]['path']['htmlpath'].getEffectiveSetting('adventskranz', 'imghtmlpath', "images/adventskranz/".$cfgMod['eak_imgset']); + $bShowCountDown = getEffectiveSetting('adventskranz', 'show_countdown', $cfgMod['show_countdown']); if($oToday >= $oFirstAdventDate && $oToday < $oSecondAdvent) { $sImgPath .= "advent1.gif"; @@ -71,21 +74,29 @@ if($oToday <= $oXmasMondayDate && $oToday >= $oFirstAdventDate) { $sImgPath .= "advent4.gif"; } - echo '
'; - echo ''.mi18n('; - echo '

'; - // countdown till xmas - $iDaysTillmas = (int) daysdiff( $oXmasDate->format("Y-m-d"), $oToday->format("Y-m-d")); - if($iDaysTillmas > 1) { - printf(mi18n("Noch %s Tage bis Weihnachten"), $iDaysTillmas); - } else if($iDaysTillmas == 1) { - printf(mi18n("Noch %s Tag bis Weihnachten"), $iDaysTillmas); - } else if($iDaysTillmas === 0) { - echo mi18n("Frohe Weihnacht!
(Heiliger Abend)"); - } else { - echo mi18n("Frohe Weihnacht!"); + echo '

'."\n"; + echo ''."\n"; + echo ''.mi18n('."\n"; + + if($bShowCountDown) { + echo '

'."\n"; + // countdown till xmas + $iDaysTillmas = (int) daysdiff( $oXmasDate->format("Y-m-d"), $oToday->format("Y-m-d")); + if($iDaysTillmas > 1) { + printf(mi18n("Noch %s Tage bis Weihnachten"), $iDaysTillmas); + } else if($iDaysTillmas == 1) { + printf(mi18n("Noch %s Tag bis Weihnachten"), $iDaysTillmas); + } else if($iDaysTillmas === 0) { + echo mi18n("Frohe Weihnacht!
(Heiliger Abend)"); + } else { + echo mi18n("Frohe Weihnacht!"); + } + echo "

"."\n"; } - echo "

"; + echo '
+ ©
'; + echo "
"."\n"; } // show debug & cleanup