I have the following array that sets up my calendar. I am using the CLASS=CALENDAR to display the attributes of the table fields. What I would like to do is flag "today" as CLASS=CURRENTDAY instead...thus being able to highlight it a separate color. Here is the code I am messing with:
echo "<TBODY>\n";
for($i = 1; $i <= $num_of_rows; $i++) {
echo "<TR>\n";
for ($j = 0; $j < 7; $j++) {
if(($i == 1 && $this->first_day_of_month <= $j) || ($i > 1 && $day <= $this->days_in_month)) {
echo "<TD VALIGN=\"top\" ALIGN=\"left\" WIDTH=\"14%\" class=\"calendar\">";
echo "<a href=\"calendar.php?display=day&stamp=" . $this->stamp . "&day=" . $day ."\">" . $day . "</a><BR>\n";
$query = "SELECT id, name FROM ltw_events WHERE (date = \"" . $this->year . "-" . $this->month . "-" . $day . "\" AND recurring = 0) OR (date <= \"" . $this->year . "-" . $this->month . "-" . $day . "\" AND recurring = 1 AND dayofweek = " . $this->_dayOfWeek(mktime(12,12,12,$this->month,$day,$this->year)) . ") ORDER BY start_time";
$result = $this->db->db_query($query);
while($row = $this->db->db_fetch_array($result)) {
echo "<a href=\"calendar.php?display=event&id=" . $row["id"] . "&date=" . $this->year . "-" . $this->month . "-" . $day . "\"><FONT COLOR=\"" . $this->table_cell_event_font_color . "\" SIZE=\"" . $this->table_cell_event_font_size . "\">" . $row["name"] . "</FONT></a><BR>\n";
}
$day++;
} else {
echo "<TD VALIGN=\"top\" ALIGN=\"left\" WIDTH=\"14%\" class=\"menubar\">";
}
echo "</TD>\n";
}
echo "</TR>\n";
}
echo "</TBODY>\n";
Thanks in advance for any suggestions.