1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | | PHP-Quelltext <?php
/////// Konfiguration
$hour = 16; // Stunden 0 ... 24
$minute = 0; // Minuten 0 ... 60
$second = 0; // Sekunden 0 ... 60
$month = 01; // Monate 1 ... 12
$day = 02; // Tage 1 ... 28/29/30/31
$year = 2007; // Jahr (vierstellig)
/////// Ab hier nichts mehr verändern
$secdiff = mktime($hour,$minute,$second,$month,$day,$year) - time();
$a = floor ($secdiff/86400);
$b = floor ($secdiff%86400/3600);
$c = floor ($secdiff%86400%3600/60);
$d = floor ($secdiff%86400%3600%60);
$text1 = "Noch "; $text2 = "Tage "; $text3 = "Stunden ";
$text4 = "Minuten "; $text5 = "und "; $text6 = "Sekunden "; $text7 = "bis zum Countdown Ende!";
if ($a < 2) $text2 = " Tag ";
if ($a < 1) $a = " " . $text2 = " ";
if ($b < 2) $text3 = " Stunde ";
if ($b < 1) $b = " " . $text3 = " ";
if ($c < 2) $text4 = " Minute ";
if ($c < 1) $c = " " . $text4 = " ";
if ($d < 2) $text6 = " Sekunde ";
if ($d < 1) $d = " " . $text6 = " ";
if ($d == 0) $text5 = " ";
if ($secdiff > 0)
eval ("\$site_body.= \"".getTemplate("countdown/countdown")."\";");
else
eval ("\$site_body.= \"".getTemplate("countdown/countdownend")."\";");
?> |