<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
<meta name="Generator" content="PhotoImpact">
<title>Adventskalender</title>
</head>
<body>
<img src="advm.jpg" width="600" height="400" border="0" alt="Adventskalender" usemap="#kalender">
<?php
$time = time();
$TodayMonth = date("m", $time);
$TodayDay = date("d", $time);
$startMonth = "10";
if ($TodayMonth != $startMonth)
{
die("Der Kalender startet pünktlich am 1.12. um 0:00 Uhr");
}
$dayHrefs = array(
"1" => array("1.zip","11,10,59,29"),
"2" => array("0.zip","0,0,0,0"),
"3" => array("0.zip","0,0,0,0"),
"4" => array("0.zip","0,0,0,0"),
"5" => array("0.zip","0,0,0,0"),
"6" => array("0.zip","0,0,0,0"),
"7" => array("0.zip","0,0,0,0"),
"8" => array("0.zip","0,0,0,0"),
"9" => array("0.zip","0,0,0,0"),
"10" => array("0.zip","0,0,0,0"),
"11" => array("0.zip","0,0,0,0"),
"12" => array("0.zip","0,0,0,0"),
"13" => array("0.zip","0,0,0,0"),
"14" => array("0.zip","0,0,0,0"),
"15" => array("0.zip","0,0,0,0"),
"16" => array("0.zip","0,0,0,0"),
"17" => array("0.zip","0,0,0,0"),
"18" => array("0.zip","0,0,0,0"),
"19" => array("0.zip","0,0,0,0"),
"20" => array("0.zip","0,0,0,0"),
"21" => array("0.zip","0,0,0,0"),
"22" => array("0.zip","0,0,0,0"),
"23" => array("0.zip","0,0,0,0"),
"24" => array("0.zip","0,0,0,0")
);
?>
<map name="kalender">
<?php
foreach($dayHrefs as $eventDay => $eventInfo)
{
if($eventDay == $TodayDay)
{
echo '<area shape="rect" coords="'.$eventInfo[1].'" href="'.$eventInfo[0].'" alt="" title="Tag '.$eventDay.'">';
}
else
{
echo '<area shape="rect" coords="'.$eventInfo[1].'" href="#" alt="" title="Tag '.$eventDay.'">';
}
}
?>
</map>
Alles anzeigen
Musst dich natürlich jetzt noch hinsetzen die Hrefs ändern und die Koords zusammen finden