Log in

View Full Version : Calendar!!



pavmoxo
06-07-2006, 04:28 PM
Hello!!

I need a free calendar showing the days events in a month, like that that I find in http://www.isec.pt, for pages in PHP with a mysql DB

Any ideia where I can find out one??

djr33
06-07-2006, 09:42 PM
for pages in PHP with a mysql DB
TOTALLY irrelevant, unless you require integration with php/mysql. If you do, then it may be hard to get working, and especially to find a pre-written script.

There are some calendar scripts here on DD.

Not sure about other places.

Just google it.

wizkidweb16
07-11-2006, 06:14 PM
is there a pre-written script very similar to the one on http://www.isec.pt?

pavmoxo
07-12-2006, 09:57 AM
Try Calendarix - search in google

NXArmada
07-14-2006, 11:46 AM
Heres a Calendar script that I put together real fast thats close to what they are using on that site.



<?php
$now = getdate(time());
$time = mktime(0,0,0, $now['mon'], 1, $now['year']);
$date = getdate($time);
$dayTotal = cal_days_in_month(0, $date['mon'], $date['year']);
//Print the calendar header with the month name.
print '<table style="font-size:xx-small"><tr><td colspan="7"><strong><center>' . $date['month'] . '</center></strong></td></tr>';
print '<tr><td>Sun</td><td>Mon</td><td>Tue</td><td>Wed</td><td>Thu</td><td>Fri</td><td>Sat</td></tr>';
for ($i = 0; $i < 6; $i++) {
print '<tr>';
for ($j = 1; $j <= 7; $j++) {
$dayNum = $j + $i*7 - $date['wday'];
//Print a cell with the day number in it. If it is today, highlight it.
print '<td align="center"';
if ($dayNum > 0 && $dayNum <= $dayTotal) {
print ($dayNum == $now['mday']) ? ' style="background: #ccc;">' : '>';
print $dayNum;
}
else {
//Print a blank cell if no date falls on that day, but the row is unfinished.
print '>';
}
print '</td>';
}
print '</tr>';
if ($dayNum >= $dayTotal && $i != 6)
break;
}
print '</table>';
?>


Its the same as what they have minus the colors.