displaying multiple months
I want to display small calendars for last month, this month, and next month all in one row. Then have navigation under them so they will go forward or backward one month at a time. You can see an example where that is being done at: http://nashvilleexcursions.com/events.php
Searching the forum I found how to display the 3 months in a row here: http://www.easyphpcalendar.com/forum...ead.php?t=3375 and used the code presented there:
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Calendar</title>
<?php $CSS=1; require("calendar/calendar.php"); ?>
</head>
<body>
<?php $OL=1; require("calendar/calendar.php"); ?>
<?php
import_request_variables("gp");
if (!isset($yr)) $yr=date("Y");
if (!isset($mo)) $mo=date("n");
$lastMonth = $mo - 1;
$lastYear = $yr;
if ($lastMonth == 0) { $lastMonth = 12; $lastYear--; }
$curMonth = $mo;
$curYear = $yr;
$nextMonth = $mo + 1;
$nextYear = $yr;
if ($nextMonth == 13) { $nextMonth = 1; $nextYear++; }
echo "<table cellspacing='0' cellpadding='35'><tr>";
$noNav = 1;
echo "<td align=\"center\">";
$mo = $lastMonth;
$yr = $lastYear;
require("calendar/calendar.php");
echo "</td>";
echo "<td align=\"center\">";
$mo = $curMonth;
$yr = $curYear;
require("calendar/calendar.php");
echo "</td>";
echo "<td align=\"center\">";
$mo = $nextMonth;
$yr = $nextYear;
require("calendar/calendar.php");
echo "</td>";
echo "</tr></table>";
?>
</body>
</html>
Then it goes on to say: "Also, note the use of $noNav = 1;. You will need to use that to turn off the navigation beneath each calendar. Pretty messy if you don't."
I understand so far.
Question #1 now is how do I add back in navigation under the whole row of 3 calendars so they advance as in the example I linked you to above?
Question #2 is how do I make the event listing under the row of calendars, display the list of events for all three months represented by the 3 calendars showing.
Here: http://americanheritagesocietyofgeor.../calendar3.php
you can see where I am at so far. I want to get in the above two features before I start styling the colors and spacing.
Please go easy on me.... I only have a very small grasp of PHP and since this is called "EASY PHP CALENDAR", I am hoping it will indeed prove to be "easy" .... with your help, of course which I very much appreciate. I hate to admit it, but I need very specific instructions, please.
|