1
0
Fork 0

added copyright infos, uses getEffectiveSettings for imagepath and toggle countdown now

Dieser Commit ist enthalten in:
Oldperl 2011-11-16 17:41:04 +00:00
Ursprung ec2b78729d
Commit 88067d2286
1 geänderte Dateien mit 27 neuen und 16 gelöschten Zeilen

Datei anzeigen

@ -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 '<div id="adventskranz" style="width: 200px; margin: auto; text-align: center;">';
echo '<img src="'.$sImgPath.'" alt="'.mi18n("Der ewige Adventskranz").'" />';
echo '<p class="eak_countdown">';
// 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!<br/>(Heiliger Abend)");
} else {
echo mi18n("Frohe Weihnacht!");
echo '<div id="adventskranz" style="position: relative; width: 200px; margin: auto; text-align: center;">'."\n";
echo '<!-- Der Ewige Adventskranz 1.0 fuer Contenido, (c)2011 PHP-Backoffice <www.php-backoffice.de> -->'."\n";
echo '<img src="'.$sImgPath.'" alt="'.mi18n("Der ewige Adventskranz").'" />'."\n";
if($bShowCountDown) {
echo '<p class="eak_countdown">'."\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!<br/>(Heiliger Abend)");
} else {
echo mi18n("Frohe Weihnacht!");
}
echo "</p>"."\n";
}
echo "</p></div>";
echo '<div style="position: absolute; width:20px; height:20px; top:0; right: 0;">
<a href="http://www.php-backoffice.de" style="color: #aaa; textdecoration: none; cursor: pointer;"
title="Der Ewige Adventskranz 1.0 fuer Contenido (c)2011 PHP-Backoffice">&copy;</a></div>';
echo "</div>"."\n";
}
// show debug & cleanup