\n\n"; echo "\n<\n
" . date('F') . "
\n>\n\n"; for($n = $prevMonthsDays - ($firstDayInMonth + $previousDays -1); $n <= $prevMonthsDays; $n++) { $targetDate = $currentYear . "-" . $prevMonth . "-" . str_pad($n, 2, '0', STR_PAD_LEFT); echo "$n\n"; if(date('w', time() - ($prevMonthsDays - $n + $today) * $secsaday) == 0) echo "\n\n"; } for($n = 1; $n <= $currentMonthsDays; $n++) { $targetDate = $currentYear . "-" . $currentMonth . "-" . str_pad($n, 2, '0', STR_PAD_LEFT); echo "$n\n"; if(date('w', time() - ($today - $n) * 24 * 60 * 60) == 0) echo "\n\n"; } for($n = 1; $n <= ($futureDays + (7 - $lastDayInMonth)); $n++) { $targetDate = $currentYear . "-" . $nextMonth . "-" . str_pad($n, 2, '0', STR_PAD_LEFT); echo "$n\n"; if(date('w', time() + ($currentMonthsDays - $today + $n) * $secsaday) == 0) echo "\n\n"; } echo "\n"; } function showInputMode() { PHP?>
År:
Månad:
Datum:
Rubrik:
Ingress:
Text:
Länk 1:
Länk 2:
Bild 1:
Bild 2:
Bild 3:
Banner:
0) while($line = @mysql_fetch_array($result)) { echo "$line[rubrik]
$line[ingress]
$line[date]
$line[kropp]
"; $links = explode(';', $line[links]); foreach($links as $link) { if($link != '') echo "$link
\n"; } $images = explode(';', $line[images]); foreach($images as $image) { if($image != '') echo "
\n"; } echo "


\n"; } else showNoSchedule(); } elseif(strlen($_GET[viewDate]) == 7) { // set a session variable to keep track of what month we are looking at $_SESSION[showDate] = $_GET[viewDate]; } else { showInputMode(); } showCalendar(); PHP?>