#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2000
    Posts
    6
    Rep Power
    0
    Hi all,
    I'm interested in creating an Intranet-based calendar which will contain company information such as holidays, special events, etc. I was wondering how this could be done.
    I was originally thinking of using an ActiveX control of some sort but would rather use DHTML w/ Perl/PHP instead.

    Any suggestions?

    Thanks,
    Rod Biagtan
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 1999
    Location
    London
    Posts
    110
    Rep Power
    0
    your best is probably MySQL and php is probably the easiest way as you'll need to store the info somewhere for the calender.
    There are a load of scripts about that do this in varying forms, check out the links section on http://www.php.net



    ------------------
    cheers
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 1999
    Location
    UK
    Posts
    50
    Rep Power
    16
    I just found this, I hope it helps.
    http://www.phpwizard.net/phpMisc/

    Its about half way down.

    Falcon
  6. #4
  7. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2000
    Posts
    6
    Rep Power
    0
    Thanks for the replies, guys. It looks like the way to go is to use mySQL as the backend database to store the calendar data and to use PHP to dynamically create the HTML pages.

    The question I have now is does anyone know the code to dynamically create a table resembling a calendar month? I'm sure there's some mathematical formula which can be used to determine how many days there are in a month and what days they fall on but I'm not sure what it is.

    This is turning out to be quite a fun project and I'd be more then willing to post all of my code once I'm done with this project.

    Thanks,
    Rod
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 1999
    Location
    London
    Posts
    110
    Rep Power
    0
    this will generate the days of the year for change the year bit to whatever year you want or use mktime to stick it in. If you create another page called day.php3 and pull the contents for it from a db using the day and month that are in the URL, it should do the trick for you (needs a bit of work tho ).

    <style type="text/css">
    <!--
    th { font-size:12pt;
    line-height:14pt;
    font-family:Helvetica,Arial;
    }
    //-->
    </style>
    <?
    $year=2000;
    print("<table border='0' width='200'>n");
    for($month=1;$month<13;$month++) {
    printf("<tr>n<th colspan='7'>%s</th></tr>n",date("F",mktime(0,0,0,$month,1,$year)));

    printf("<tr><th>Su</th><th>Mo</th><th>Tu</th><th>We</th><th>Th</th><th>Fr</th><th>Sa</th>& lt;/tr>");

    $fdom=date("w",mktime(0,0,0,$month,1,$year));
    $ct=0;
    for($row=1;$row<7;$row++)
    {
    print("n<tr>");
    for($week=1;$week<8;$week++)
    {
    $ct++;
    $value=mktime(0,0,0,$month,$ct-$fdom,$year);
    if (date("m",$value)==$month)
    {
    printf ("<th><a href="day.php3?Date=".date("d",$value)."&Month=$month">%s</a></th>",date("d",$value));
    }
    else { print("<td></td>"); }
    }
    print("</tr>n");
    }
    print("<tr><td colspan='7'><br><br></td></tr>");
    }
    print("</table>");
    ?>

    I can't remember who originally wrote the date thingy (I seem to have lost the rest of the code whilst faffing around with it), so sorry to whomever it is, there is also a lot more date/calenders here
    http://px.sklar.com/section.html?section_id=8

    hope that helps

    ------------------
    cheers
  10. #6
  11. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2000
    Posts
    6
    Rep Power
    0
    Timbo,
    You-da-Man! Thanks for the info and the quick reply!

    I picked up "Professianl PHP Programming" over the weekend and am already up to Chapter 12. Although my background is Microsoft-oriented, I'm really impressed by PHP.

Similar Threads

  1. cannot resolve symbol
    By soelo in forum Java Help
    Replies: 3
    Last Post: April 1st, 2004, 05:14 AM
  2. Need a web based contact form based in SMTP
    By SojanJacob in forum Project Help Wanted
    Replies: 0
    Last Post: February 5th, 2004, 05:39 AM
  3. Slow intranet
    By wch_80 in forum Apache Development
    Replies: 1
    Last Post: September 10th, 2003, 11:05 AM
  4. JS/DHTML Pop calendar problems - HELP
    By StevenC in forum JavaScript Development
    Replies: 1
    Last Post: August 7th, 2003, 04:07 PM
  5. Share calendar between Outlook 2000 and Outlook XP
    By toxalia in forum Dev Shed Lounge
    Replies: 2
    Last Post: August 7th, 2003, 09:07 AM

IMN logo majestic logo threadwatch logo seochat tools logo