I have scoured the script at least a dozen times and the following are all I can find relating to AddDate... Unfortunately I wouldn't be able to tell if something is wrong with them or not.
Searching for problem as suggested, error added towards end
In Settings:$Ltarget = array("Day", "Week", "Month", "Year");
In Script:if ($mode == 1) {
$ndate = AddDate($mo, $da, $yr, -1);
echo '<td class="nobr noprint"><!-- a href="' . $_SERVER['PHP_SELF'] . '?ID=' . $WUID . '&month=' . $ndate['mon'] . '&day=' . $ndate['mday'] . '&year=' . $ndate['year'] . '&units=' . $units . '&mode=' . $mode . '">« ' . $Lprev . ' ' . $Ltarget[0] . '</a --></td>';
} elseif ($mode == 2) {
$ndate = AddDate($mo, $da, $yr, -7);
echo '<td class="nobr noprint"><!-- a href="' . $_SERVER['PHP_SELF'] . '?ID=' . $WUID . '&month=' . $ndate['mon'] . '&day=' . $ndate['mday'] . '&year=' . $ndate['year'] . '&units=' . $units . '&mode=' . $mode . '">« ' . $Lprev . ' ' . $Ltarget[1] . '</a --></td>';
} elseif ($mode == 3) {
$ndate = AddDate($mo, $da, $yr, -30);
echo '<td class="nobr noprint"><!-- a href="' . $_SERVER['PHP_SELF'] . '?ID=' . $WUID . '&month=' . $ndate['mon'] . '&day=' . $ndate['mday'] . '&year=' . $ndate['year'] . '&units=' . $units . '&mode=' . $mode . '">« ' . $Lprev . ' ' . $Ltarget[2] . '</a --></td>';
} elseif ($mode == 4) {
$ndate = AddDate($mo, $da, $yr, -365);
echo '<td class="nobr noprint"><!-- a href="' . $_SERVER['PHP_SELF'] . '?ID=' . $WUID . '&month=' . $ndate['mon'] . '&day=' . $ndate['mday'] . '&year=' . $ndate['year'] . '&units=' . $units . '&mode=' . $mode . '">« ' . $Lprev . ' ' . $Ltarget[3] . '</a --></td>';
}
if ($mode == 1) {
$ndate = AddDate($mo, $da, $yr, +1);
echo '<td class="nobr noprint"><!-- a href="' . $_SERVER['PHP_SELF'] . '?ID=' . $WUID . '&month=' . $ndate['mon'] . '&day=' . $ndate['mday'] . '&year=' . $ndate['year'] . '&units=' . $units . '&mode=' . $mode . '">' . $Lnext . ' ' . $Ltarget[0] . ' »</a --></td>';
} elseif ($mode == 2) {
$ndate = AddDate($mo, $da, $yr, +7);
echo '<td class="nobr noprint"><!-- a href="' . $_SERVER['PHP_SELF'] . '?ID=' . $WUID . '&month=' . $ndate['mon'] . '&day=' . $ndate['mday'] . '&year=' . $ndate['year'] . '&units=' . $units . '&mode=' . $mode . '">' . $Lnext . ' ' . $Ltarget[1] . ' »</a --></td>';
} elseif ($mode == 3) {
$ndate = AddDate($mo, $da, $yr, +30);
echo '<td class="nobr noprint"><!-- a href="' . $_SERVER['PHP_SELF'] . '?ID=' . $WUID . '&month=' . $ndate['mon'] . '&day=' . $ndate['mday'] . '&year=' . $ndate['year'] . '&units=' . $units . '&mode=' . $mode . '">' . $Lnext . ' ' . $Ltarget[2] . ' »</a --></td>';
} elseif ($mode == 4) {
$ndate = AddDate($mo, $da, $yr, +365);
echo '<td class="nobr noprint"><!-- a href="' . $_SERVER['PHP_SELF'] . '?ID=' . $WUID . '&month=' . $ndate['mon'] . '&day=' . $ndate['mday'] . '&year=' . $ndate['year'] . '&units=' . $units . '&mode=' . $mode . '">' . $Lnext . ' ' . $Ltarget[3] . ' »</a --></td>';
}
// End of the script all functions follow
Function with errorfunction AddDate ( $month, $day, $year, $numdays) {
$nday = $day + $numdays;
$newdate = mktime (0,0,0,$month,$nday,$year); (line 1431 in error list shown above)
return getdate($newdate);
}
/* Returns Array (
[seconds] => 40
[minutes] => 58
[hours] => 21
[mday] => 17
[wday] => 2
[mon] => 6
[year] => 2003
[yday] => 167
[weekday] => Tuesday
[month] => June