Ryan, with a bit of tweaking you can edit that script to what you want. heres an example
================================================================= <?php function calendar($date) { //If no parameter is passed use the current date. if($date == null) $date = getDate(); $day = $date["mday"]; $month = $date["mon"]; $month_name = $date["month"]; $year = $date["year"]; $this_month = getDate(mktime(0, 0, 0, $month, 1, $year)); $next_month = getDate(mktime(0, 0, 0, $month + 1, 1, $year)); //Find out when this month starts and ends. $first_week_day = $this_month["wday"]; $days_in_this_month = floor(($next_month[0] - $this_month[0]) / (60 * 60 * 24)); $calendar_html = "<table style=\"background-color:666699; color:ffffff;\">"; $calendar_html .= "<tr><td colspan=\"7\" align=\"center\" style=\"background-color:9999cc; color:000000;\">" . $month_name . " " . $year . "</td></tr>"; $calendar_html .= "<tr>"; $calendar_html .= "<td>S</td>"; $calendar_html .= "<td>M</td>"; $calendar_html .= "<td>T</td>"; $calendar_html .= "<td>W</td>"; $calendar_html .= "<td>T</td>"; $calendar_html .= "<td>F</td>"; $calendar_html .= "<td>S</td>"; $calendar_html .= "</tr>"; $calendar_html .= "<tr>"; //Fill the first week of the month with the appropriate number of blanks. for($week_day = 0; $week_day < $first_week_day; $week_day++) { $calendar_html .= "<td style=\"background-color:9999cc; color:000000;\"> </td>"; } $week_day = $first_week_day; for($day_counter = 1; $day_counter <= $days_in_this_month; $day_counter++) { $week_day %= 7; if($week_day == 0) $calendar_html .= "</tr><tr>"; $dispDate = $day_counter . " " . $month_name . " " . $year; //Do something different for the current day. if($day == $day_counter) $calendar_html .= "<td bgcolor=\"#FFFFFF\" align=\"center\"><b><a href=\"show.php?date=" . urlencode($dispDate) . "&isToday=1\">" . $day_counter . "</a></b></td>"; else $calendar_html .= "<td align=\"center\" style=\"background-color:9999cc; color:000000;\"><a href=\"show.php?date=" . urlencode($dispDate) . "&isToday=0\">" . $day_counter . "</a></td>"; $week_day++; } $calendar_html .= "</tr>"; $calendar_html .= "</table>"; return($calendar_html); } echo calendar(NULL); ?> ================================================================= "Ryan A" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hey, > > been looking at a lot of calenders most of them are either too big for my > use (whole page), not free, in javascript or too complicated. > > I require a calender that is simple, loads fast,small and not javascript, > the closest I found is at: > http://scripts.franciscocharrua.com/calendar.php > > just two problems with it, > 1. It does not have the days on top (eg: s,m,t,w,t,f,s - sunday, > monday....etc) > 2. (not required but would be nice if it would) allow me to link from the > days of the calender to some page/s > > I guess I could modify the above calender as it pretty good + open > source...but if anybody is using a calender already which is like the above > + the 1 or two points I wrote....your response would be appreciated. ;-) > > Thanks, > -Ryan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php