hi
i was making calendar for my website some how using different tutorials i made it but i want to makes some changes but cant figer out can some one plz help me ...
i am also comparing emp date of leave if thats true then it will change the color of that date as well ..
i want calendar in this form
jan 1 2 3 4 ..... 30
fab 1 2 3 4 ..... 30
mar 1 2 3 4 ..... 30
dec 1 2 3 4 ..... 30
and sat, sun show as weekend with different color
plz plz help me
$month = 1;
$year = $_REQUEST["year"];
$day = date("j");
$currentTimeStamp = strtotime("$year-$month-$day");
$monthName = date("F", $currentTimeStamp);
$numDays = date("t", $currentTimeStamp);
$counter = 0;
/*$numEventsThisMonth = 0;
$hasEvent = false;
$todaysEvents = "";*/
?>
<div class="outerbox" style="width:490px;float:left;">
<div class="mainHeading" ><h2><?php echo $lang_Leave_Select_Employee_Title;?></h2></div>
<table width='175' border='0' cellspacing='0' cellpadding='0' class="body">
<tr>
<td width='125' align="center" colspan='5'>
<span class='title'><?php echo $monthName . " " . $year; ?></span><br>
</td>
</tr>
<?php for($month; $month <=12;$month++) { ?>
<tr>
<td class='head' align="center" width='25'>Su</td>
<td class='head' align="center" width='25'>Mo</td>
<td class='head' align="center" width='25'>Tu</td>
<td class='head' align="center" width='25'>We</td>
<td class='head' align="center" width='25'>Th</td>
<td class='head' align="center" width='25'>Fr</td>
<td class='head' align="center" width='25'>Su</td>
</tr>
<tr>
<?php
// Get values from query string
//$day = $_REQUEST["day"];
//echo $day;
for($i = 1; $i < $numDays+1; $i++, $counter++)
{ //echo $counter.'-<br/>';
$timeStamp = strtotime("$year-$month-$i");
//echo $timeStamp.'-<br/>';
if($i == 1)
{
// Workout when the first day of the month is
$firstDay = date("w", $timeStamp);
for($j = 0; $j < $firstDay; $j++, $counter++)
echo "<td> </td>";
}
if($counter % 7 == 0)
echo "</tr><tr>";
if(date("w", $timeStamp) == 0)
$class = "class='weekend'";
else
if($i == date("d") && $month == date("m") && $year == date("Y"))
$class = "class='today'";
else
$class = "class='normal'";
echo $i.'--';
echo "<td class='tr' bgcolor='#ffffff' align='center' width='25'><font $class>$i</font></td>";
//echo '<br/>';
}
}
?>
</tr>
</table>