pod_cal.php (called from index)

Raids for $date

"; $blogQuery = "SELECT title, content FROM calendar_raids WHERE raidDate = '$date'"; $blogResult = mysql_query($blogQuery); if (mysql_numrows($blogResult) > 0) { while (list($title,$content) = mysql_fetch_row($blogResult)) { echo border('syellow','start',$title); echo ' '; echo ''; echo ''; echo ''; echo ''; echo '
'.$content.'
'; echo border('syellow','end'); echo "
"; } } else { echo "No Raids available"; } echo "

"; ?> ---------------------------------------------------- ---------------------------------------------------- ---------------------------------------------------- ---------------------------------------------------- ---------------------------------------------------- ---------------------------------------------------- ---------------------------------------------------- ---------------------------------------------------- ---------------------------------------------------- ---------------------------------------------------- calendar.php (included in pod_cal.php) <  $monthName $year  > "; foreach($daysOfWeek as $day) { // Create the calendar headers $calendar .= "$day"; } // Initiate the day counter, starting with the 1st. $currentDay = 1; $calendar .= ""; // The variable $dayOfWeek is used to // ensure that the calendar // display consists of exactly 7 columns. if ($dayOfWeek > 0) { $calendar .= " "; } while ($currentDay <= $numberDays) {// Seventh column (Saturday) reached. Start a new row. if ($dayOfWeek == 7) { $dayOfWeek = 0; $calendar .= ""; } // Is the $currentDay a member of $dateArray? If so, // the day should be linked. if($currentDay < 10) { $currentDay = '0'.$currentDay; } /*if($month < 10) {NOT SURE WHY THIS MESSES UP THE SCRIPT $month = '0'.$month; }*/ $date = "$year-$month-$currentDay"; if (!empty($dateArray) && in_array($date,$dateArray)) { $calendar .= " $currentDay "; } else {// $currentDay is not a member of $dateArray. $calendar .= "$currentDay"; } $currentDay++; $dayOfWeek++; } if ($dayOfWeek != 7) { // Complete the row of the last week in month, if necessary $remainingDays = 7 - $dayOfWeek; $calendar .= " "; } $calendar .= ""; $calendar .= border('syellow','end'); return $calendar; } ?>