Wanted : A good active desktop calender.

T

trailstar

Guest
#1
im looking for a new calender to use. ive used rainleader and the one in the tutorial in the Post below. but i want something more visually pleasing.

thanks
 

SPeedY_B

I may actually be insane.
#2
If you've got PHP capabilities you can give this a try
Code:
<?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=#000B9E size='2' color=#67D9FF align=center><b>{$today['month']} {$today['year']}</b></font>
<table bgcolor='#4a9fe0' border='0' cellpadding='1' cellspacing='1' style='border-collapse: collapse'  bordercolor='#000B9E' >
        <tr bgcolor=#4a9fe0 align='center' bgcolor='silver' valign='bottom'>
            <td><font face='Verdana' color=#000B9E size='2'>S</font></td>
            <td><font face='Verdana' color=#000B9E size='2'>M</font></td>
            <td><font face='Verdana' color=#000B9E size='2'>T</font></td>
            <td><font face='Verdana' color=#000B9E size='2'>W</font></td>
            <td><font face='Verdana' color=#000B9E size='2'>T</font></td>
            <td><font face='Verdana' color=#000B9E size='2'>F</font></td>
            <td><font face='Verdana' color=#000B9E size='2'>S</font></td>
        </tr>
        <tr align='center' bgcolor=#4a9fe0>";
    //first row of days
    for($i=0;$i<7;$i++){
        if($today['mday'] == $days[$i]) //highlight today in red
            echo "<td><font face='Verdana' color=#67D9FF size='1'>{$days[$i]}</font></td>";
        else
            echo "<td><font face='Verdana' color=#000B9E size='1'>{$days[$i]}</font></td>";
    }
        echo "</tr><tr align='center' bgcolor=#4a9fe0>";
    for($i=7;$i<14;$i++){
        if($today['mday'] == $days[$i])
            echo "<td><font face='Verdana' color=#67D9FF size='1'>{$days[$i]}</font></td>";
        else
            echo "<td><font face='Verdana' color=#000B9E size='1'>{$days[$i]}</font></td>";
    }
        echo "</tr><tr align='center' bgcolor=#4a9fe0>";
    for($i=14;$i<21;$i++){
        if($today['mday'] == $days[$i])
            echo "<td><font face='Verdana' color=#67D9FF size='1'>{$days[$i]}</font></td>";
        else
            echo "<td><font face='Verdana' color=#000B9E size='1'>{$days[$i]}</font></td>";
    }
        echo "</tr><tr align='center' bgcolor=#4a9fe0>";
    for($i=21;$i<28;$i++){
        if($today['mday'] == $days[$i])
            echo "<td><font face='Verdana' color=#67D9FF size='1'>{$days[$i]}</font></td>";
        else
            echo "<td><font face='Verdana' color=#000B9E size='1'>{$days[$i]}</font></td>";
    }
        echo "</tr><tr align='center' bgcolor=#4a9fe0>";
    for($i=28;$i<35;$i++){
        if($today['mday'] == $days[$i])
            echo "<td><font face='Verdana' color=#67D9FF size='1'>{$days[$i]}</font></td>";
        else
            echo "<td><font face='Verdana' color=#000B9E size='1'>{$days[$i]}</font></td>";
    }
        echo "</tr><tr align='center' bgcolor=#4a9fe0>";
    for($i=35;$i<37;$i++){
        if($today['mday'] == $days[$i])
            echo "<td><font face='Verdana' color=#67D9FF size='1'>{$days[$i]}</font></td>";
        else
            echo "<td><font face='Verdana' color=#000B9E size='1'>{$days[$i]}</font></td>";
    }
        echo "</tr><tr align='center' bgcolor=#4a9fe0>
              </table></center>";
?>
 
T

trailstar

Guest
#5
thanks bman it works well now except the linking of it cause i want it in one active desktop webpage
 

Members online

No members online now.

Latest posts

Latest profile posts

Perris Calderon wrote on Electronic Punk's profile.
Ep, glad to see you come back and tidy up...did want to ask a one day favor, I want to enhance my resume , was hoping you could make me administrator for a day, if so, take me right off since I won't be here to do anything, and don't know the slightest about the board, but it would be nice putting "served administrator osnn", if can do, THANKS

Been running around Quora lately, luv it there https://tinyurl.com/ycpxl
Electronic Punk wrote on Perris Calderon's profile.
All good still mate?
Hello, is there anybody in there? Just nod if you can hear me ...
Xie
What a long strange trip it's been. =)

Forum statistics

Threads
61,970
Messages
673,297
Members
89,016
Latest member
Poseeut