gary,
let me explain what the issue is.
1. when you select a date in the next month using the arrow link in the calendar, the page refreshes because of the link.
2. so when this happens variable $listing is not present in the link that minicalendar generates.
3. so you can pass it where you call the function
$calendar = new miniCalendar('schedule.php',$d,$m,$y);
like this
$calendar = new miniCalendar('schedule.php?listing='.$listing,$d,$m,$y);
but this will screw up the link generated inside minicalender php page cause the calendar link is of this form
/schedule.php?hc=%230080ff&bc=%23eeeeee&sc=orange&d=28&m=6&y=2003
so the url then will become
/schedule.php?listing=whatever?hc=%230080ff&bc=%23eeeeee&sc=orange&d=28&m=6&y=2003
so you will have two ? in the url which will be wrong.
so u need to check if ? is present in the link and make changes to the minicalendar code.
STEP 1 :
$extra_link ="?listing=<?php print($listing);?>";
$extra_link = urlencode($extra_link);
$link = "schedule.php".$extra_link;
include("miniCalendarClass.php");
$calendar = new miniCalendar($link,$d,$m,$y);
STEP 2 :
BACK UP minicalendar.php
in miniCalendar.php after this line
$currenttime = mktime(0,0,0,$this->month, $this->day, $this->year);
$output = "<table border='0' cellpadding='2' cellspacing='0' width='$width' height='$height'>";
replace
$output .= "<tr height='20' valign='center'><td align='center'><a href='".$this->link."?hc=".urlencode($headerColor)."&bc=".urlencode($bgColor)."&sc=".urlencode($selectedDayColor)."&d=$pday&m=$pmonth&y=$pyear' class='navi'><img src='images/left_black.gif' border='0'></a></td><td align='center' valign='middle' class='title'>".date("M Y",$currenttime)."</td><td align='center' class='navi'><a href='".$this->link."?hc=".urlencode($headerColor)."&bc=".urlencode($bgColor)."&sc=".urlencode($selectedDayColor)."&d=$nday&m=$nmonth&y=$nyear'><img src='images/right_black.gif' border='0'></a></td></tr><tr><td colspan='3' bgcolor='$bgColor'><table border='0' cellpadding='2' cellspacing='2' width='100%' bgcolor='$bgColor' height='100%'>";
with
$output .= "<tr height='20' valign='center'><td align='center'>";
if(strstr($this->link,"?")){
$output .="<a href='".$this->link."&hc=".urlencode($headerColor)."&bc=".urlencode($bgColor)."&sc=".urlencode($selectedDayColor)."&d=$pday&m=$pmonth&y=$pyear' class='navi'>";
}else{
$output .="<a href='".$this->link."?hc=".urlencode($headerColor)."&bc=".urlencode($bgColor)."&sc=".urlencode($selectedDayColor)."&d=$pday&m=$pmonth&y=$pyear' class='navi'>";
}
$output .="<img src='images/left_black.gif' border='0'></a></td><td align='center' valign='middle' class='title'>".date("M Y",$currenttime)."</td><td align='center' class='navi'>";
if(strstr($this->link,"?")){
$output .="<a href='".$this->link."&hc=".urlencode($headerColor)."&bc=".urlencode($bgColor)."&sc=".urlencode($selectedDayColor)."&d=$nday&m=$nmonth&y=$nyear'>";
}else{
$output .="<a href='".$this->link."?hc=".urlencode($headerColor)."&bc=".urlencode($bgColor)."&sc=".urlencode($selectedDayColor)."&d=$nday&m=$nmonth&y=$nyear'>";
}
$output .="<img src='images/right_black.gif' border='0'></a></td></tr><tr><td colspan='3' bgcolor='$bgColor'><table border='0' cellpadding='2' cellspacing='2' width='100%' bgcolor='$bgColor' height='100%'>";
u might get syntax errors cause i havent checked the code but that shouldnt be a problem to solve.
reg
kevin