<?php
function monat() {
$Timestamp = mktime (0, 0, 0, $_GET['Month12'], 1, $_GET['Year']);
$MonthName = date("F", $Timestamp);
$YearName = date("Y", $Timestamp);
switch ($MonthName) {
case "January" : $MonthName = "Januar"; break;
case "February" : $MonthName = "Februar"; break;
case "March" : $MonthName = "März"; break;
case "May" : $MonthName = "Mai"; break;
case "June" : $MonthName = "Juni"; break;
case "July" : $MonthName = "Juli"; break;
case "October" : $MonthName = "Oktober"; break;
case "December" : $MonthName = "Dezember"; break;
}
print ("<td><table><tr><td>");
print ("<table border=0 cellpadding=3 cellspacing=0 align=center><tr><td>");
$MonthStart = date("w", $Timestamp);
if ($MonthStart == 0) { $MonthStart = 7; }
$LastDay = date("d", mktime (0, 0, 0, $_GET['Month12']+1, 0, $_GET['Year']));
$StartDate = 1 - $MonthStart;
for ($k = 1; $k <= 6; $k++) { // 6 Zeilen
print ("<tr bgcolor=white>");
for ($i = 1; $i <= 7; $i++) { // 7 Spalten
$StartDate++;
if (($StartDate <= 0) || ($StartDate > $LastDay)) {
print ("<td class=tr3> </td>");
} elseif (($StartDate >= 1) && ($StartDate <= $LastDay)) {
$monthlink = $_GET[Month12];
if (($StartDate == $_GET[Day]) && (date("m", $Timestamp) == $_GET[Month]) && (date("Y", $Timestamp) == $_GET[Year])) {
print ("<td align=center><b>$StartDate</b>");
} ELSE {
while ($monthlink > 12) {
$monthlink = $monthlink - 12;
}
print ("<td align=center><a href=\"http://xyz.de/DEINEformularseite?Tag=$StartDate&Monat=$monthlink&Jahr=$YearName\">$StartDate</a>");
}
print ("</td>");
}
}
print ("</tr>\n");
}
print ("</table>\n");
print ("</td></tr></table>");
print ("</td></tr></table></td>");
}
// Ende Funktion monat