Results 1 to 5 of 5

Thread: Calendar!!

  1. #1
    Join Date
    Apr 2006
    Posts
    107
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Smile Calendar!!

    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??

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    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.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  3. #3
    Join Date
    Jul 2005
    Location
    New Jersey
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    is there a pre-written script very similar to the one on http://www.isec.pt?

  4. #4
    Join Date
    Apr 2006
    Posts
    107
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Try Calendarix - search in google

  5. #5
    Join Date
    Apr 2006
    Posts
    190
    Thanks
    3
    Thanked 7 Times in 7 Posts

    Default

    Heres a Calendar script that I put together real fast thats close to what they are using on that site.

    Code:
    <?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.
    Ryan
    Sevierville, TN

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •