active desktop calendar

Discussion in 'Windows Desktop Systems' started by madmax1345, Oct 29, 2002.

  1. madmax1345

    madmax1345 Guest

    Would like to know the code for putting the calendar on the desktop of winxp?
     
  2. SPeedY_B

    SPeedY_B I may actually be insane.

    Messages:
    15,800
    Location:
    Midlands, England
    I use a PHP calender...
    PHP:
    <?php
        
        $today 
    getdate(time());    //get today's date
        
    for($i=0;$i<37;$i++){        //initialize calendar array
            
    $days[$i] = "";          //5 rows of 7, 1 row of 2
        
    }
        
    $timestamp mktime(12,0,0,$today["mon"],1,$today["year"]); //1st day of month
        
    $temp getdate($timestamp);
        
    $i $temp['wday']; //first day of week in calendar - SUN == 0
        
    while(TRUE){    //fill-in days for calendar
            
    $cday getdate($timestamp);
            if(
    $cday['mon'] != $today['mon'])
                break;        
    //break on new month
            
    $days[$i] = $cday['mday']; //assign date
            
    $timestamp += 86400;  //add one day
            
    $i++; //increment array index
        
    }
        
    //start building calendar
        
    echo "

    <font face='Verdana' color=#000080 size='2' color=#67D9FF align=center><b>
    {$today['month']} {$today['year']}</b></font>
    <table bgcolor='#679BE9' border='3' cellpadding='1' cellspacing='1' style='border-collapse: collapse'  bordercolor='#000080' width=300>
            <tr bgcolor=#679BE9 align='center' bgcolor='silver' valign='bottom'>
                <td width=42><font face='Verdana' color=#000080 size='2'>Sun</font></td>
                <td width=43><font face='Verdana' color=#000080 size='2'>Mon</font></td>
                <td width=42><font face='Verdana' color=#000080 size='2'>Tues</font></td>
                <td width=43><font face='Verdana' color=#000080 size='2'>Wed</font></td>
                <td width=42><font face='Verdana' color=#000080 size='2'>Thur</font></td>
                <td width=43><font face='Verdana' color=#000080 size='2'>Fri</font></td>
                <td width=45><font face='Verdana' color=#000080 size='2'>Sat</font></td>
            </tr>
            <tr valign=middle align='center' bgcolor=#679BE9>"
    ;
        
    //first row of days
        
    for($i=0;$i<7;$i++){
            if(
    $today['mday'] == $days[$i]) //highlight today in red
                
    echo "<td bgcolor=#7BA9ED height=25><font face='Verdana' color=#0000ff size='1'>{$days[$i]}</font></td>";
            else
                echo 
    "<td height=25><font face='Verdana' color=#000080 size='1'>{$days[$i]}</font></td>";
        }
            echo 
    "</tr><tr valign=middle align='center' bgcolor=#679BE9>";
        for(
    $i=7;$i<14;$i++){
            if(
    $today['mday'] == $days[$i])
                echo 
    "<td bgcolor=#7BA9ED height=25><font face='Verdana' color=#0000ff size='1'>{$days[$i]}</font></td>";
            else
                echo 
    "<td height=25><font face='Verdana' color=#000080 size='1'>{$days[$i]}</font></td>";
        }
            echo 
    "</tr><tr valign=middle align='center' bgcolor=#679BE9>";
        for(
    $i=14;$i<21;$i++){
            if(
    $today['mday'] == $days[$i])
                echo 
    "<td bgcolor=#7BA9ED height=25><font face='Verdana' color=#0000ff size='1'>{$days[$i]}</font></td>";
            else
                echo 
    "<td height=25><font face='Verdana' color=#000080 size='1'>{$days[$i]}</font></td>";
        }
            echo 
    "</tr><tr valign=middle align='center' bgcolor=#679BE9>";
        for(
    $i=21;$i<28;$i++){
            if(
    $today['mday'] == $days[$i])
                echo 
    "<td bgcolor=#7BA9ED height=25><font face='Verdana' color=#0000ff size='1'>{$days[$i]}</font></td>";
            else
                echo 
    "<td height=25><font face='Verdana' color=#000080 size='1'>{$days[$i]}</font></td>";
        }
            echo 
    "</tr><tr valign=middle align='center' bgcolor=#679BE9>";
        for(
    $i=28;$i<35;$i++){
            if(
    $today['mday'] == $days[$i])
                echo 
    "<td bgcolor=#7BA9ED height=25><font face='Verdana' color=#0000ff size='1'>{$days[$i]}</font></td>";
            else
                echo 
    "<td height=25><font face='Verdana' color=#000080 size='1'>{$days[$i]}</font></td>";
        }
            echo 
    "</tr><tr valign=middle align='center' bgcolor=#679BE9>";
        for(
    $i=35;$i<37;$i++){
            if(
    $today['mday'] == $days[$i])
                echo 
    "<td bgcolor=#7BA9ED height=25><font face='Verdana' color=#0000ff size='1'>{$days[$i]}</font></td>";
            else
                echo 
    "<td height=25><font face='Verdana' color=#000080 size='1'>{$days[$i]}</font></td>";
        }
            echo 
    "</tr>
                  </table></center>"
    ;
    ?>
    But without a PHP web server this is no use, im sure other people use an app, i think its call rainlender or some wierd name like that.....
     
  3. LazyJames

    LazyJames OSNN Addict

    Messages:
    77
    you got it Speedy Rainlender is the name of the program. Its small and skinnable so it should work fine for you mad max
     
  4. SPeedY_B

    SPeedY_B I may actually be insane.

    Messages:
    15,800
    Location:
    Midlands, England
    Ahar, my memory served me well :D
    i knew i'd heard some name threw around the October desktop thread :)
     
  5. madmax1345

    madmax1345 Guest

    Hey, thanks for the info I went with the Rainlender for now until I have time to write in the php code.
     
  6. madmatt

    madmatt Bow Down to the King Political User

    Messages:
    13,312
    Location:
    New York
    I will be releasing a JavaScript written calendar with my next tutorial (a few days off). Stay tuned.
     
  7. SPeedY_B

    SPeedY_B I may actually be insane.

    Messages:
    15,800
    Location:
    Midlands, England
    woo-hoo, calenders, tutz, and inevetably cake (for me at least \o/)
    /me jiggy wigglz
     
  8. madmatt

    madmatt Bow Down to the King Political User

    Messages:
    13,312
    Location:
    New York
    I like cake =\
     
  9. SPeedY_B

    SPeedY_B I may actually be insane.

    Messages:
    15,800
    Location:
    Midlands, England
    You can have cake too :D
     
  10. O_o

    O_o Guest

    Come on madmatt, rush rush rush, and bring that tutorial!
     
  11. SPeedY_B

    SPeedY_B I may actually be insane.

    Messages:
    15,800
    Location:
    Midlands, England
    Perfection is worth waiting for :)
     
  12. madmatt

    madmatt Bow Down to the King Political User

    Messages:
    13,312
    Location:
    New York
    yeah! wait, err. nevermind.
     
  13. SPeedY_B

    SPeedY_B I may actually be insane.

    Messages:
    15,800
    Location:
    Midlands, England
    Need your morning coffee matt ? :p
     
  14. madmax1345

    madmax1345 Guest

    Ah, the morning Java! You gotta love it.
     
  15. O_o

    O_o Guest

    /me send madmatt extra coffee thinking it may get the tutorial out faster.