added copyright infos, uses getEffectiveSettings for imagepath and toggle countdown now
Dieser Commit ist enthalten in:
Ursprung
ec2b78729d
Commit
88067d2286
1 geänderte Dateien mit 27 neuen und 16 gelöschten Zeilen
43
output.php
43
output.php
|
@ -14,7 +14,9 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$cfgMod = array(
|
$cfgMod = array(
|
||||||
'debug' => false
|
'debug' => true,
|
||||||
|
'eak_imgset' => 'Extra/',
|
||||||
|
'show_countdown' => true
|
||||||
);
|
);
|
||||||
|
|
||||||
// init db-object
|
// init db-object
|
||||||
|
@ -59,7 +61,8 @@ $oFourthAdvent = clone $oThirdAdvent;
|
||||||
$oFourthAdvent->modify("+7 days");
|
$oFourthAdvent->modify("+7 days");
|
||||||
|
|
||||||
if($oToday <= $oXmasMondayDate && $oToday >= $oFirstAdventDate) {
|
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) {
|
if($oToday >= $oFirstAdventDate && $oToday < $oSecondAdvent) {
|
||||||
$sImgPath .= "advent1.gif";
|
$sImgPath .= "advent1.gif";
|
||||||
|
@ -71,21 +74,29 @@ if($oToday <= $oXmasMondayDate && $oToday >= $oFirstAdventDate) {
|
||||||
$sImgPath .= "advent4.gif";
|
$sImgPath .= "advent4.gif";
|
||||||
}
|
}
|
||||||
|
|
||||||
echo '<div id="adventskranz" style="width: 200px; margin: auto; text-align: center;">';
|
echo '<div id="adventskranz" style="position: relative; width: 200px; margin: auto; text-align: center;">'."\n";
|
||||||
echo '<img src="'.$sImgPath.'" alt="'.mi18n("Der ewige Adventskranz").'" />';
|
echo '<!-- Der Ewige Adventskranz 1.0 fuer Contenido, (c)2011 PHP-Backoffice <www.php-backoffice.de> -->'."\n";
|
||||||
echo '<p class="eak_countdown">';
|
echo '<img src="'.$sImgPath.'" alt="'.mi18n("Der ewige Adventskranz").'" />'."\n";
|
||||||
// countdown till xmas
|
|
||||||
$iDaysTillmas = (int) daysdiff( $oXmasDate->format("Y-m-d"), $oToday->format("Y-m-d"));
|
if($bShowCountDown) {
|
||||||
if($iDaysTillmas > 1) {
|
echo '<p class="eak_countdown">'."\n";
|
||||||
printf(mi18n("Noch %s Tage bis Weihnachten"), $iDaysTillmas);
|
// countdown till xmas
|
||||||
} else if($iDaysTillmas == 1) {
|
$iDaysTillmas = (int) daysdiff( $oXmasDate->format("Y-m-d"), $oToday->format("Y-m-d"));
|
||||||
printf(mi18n("Noch %s Tag bis Weihnachten"), $iDaysTillmas);
|
if($iDaysTillmas > 1) {
|
||||||
} else if($iDaysTillmas === 0) {
|
printf(mi18n("Noch %s Tage bis Weihnachten"), $iDaysTillmas);
|
||||||
echo mi18n("Frohe Weihnacht!<br/>(Heiliger Abend)");
|
} else if($iDaysTillmas == 1) {
|
||||||
} else {
|
printf(mi18n("Noch %s Tag bis Weihnachten"), $iDaysTillmas);
|
||||||
echo mi18n("Frohe Weihnacht!");
|
} 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">©</a></div>';
|
||||||
|
echo "</div>"."\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
// show debug & cleanup
|
// show debug & cleanup
|
||||||
|
|
Laden …
In neuem Issue referenzieren