";
$record3.= " | S | M | T | W | T | F | S | ";
//This counts the days in the week, up to 7
$day_count = 1;
$record3.="";
//first we take care of those blank days
while ($blank > 0 )
{
$record3.= " | ";
$blank = $blank-1;
$day_count++;
}
//sets the first day of the month to 1
$day_num = 1;
//count up the days, untill we've done all of them in the month
while ( $day_num <= $days_in_month )
{
$today = mktime(0,0,0,date("m"),date("d"),date("Y"));
$tamilsearchdate = explode("-",$tamildate);
//print_r($tamilsearchdate);
$year1 = $tamilsearchdate[0];
$month1 = $tamilsearchdate[1];
$dy1 = $tamilsearchdate[2];
$tamilday = mktime(0,0,0,$month1,$dy1,$year1);
//echo $tamilday." ";
$caltoday = mktime(0,0,0,$month,$day_num,$year);
//echo $caltoday." ";
$h = $year."-".$month."-".$day_num;
//echo $h;
$dateshow = explode("-",$specialdate);
$yr = $dateshow[0];
$mh = $dateshow[1];
$dy = $dateshow[2];
if($_GET[month] !=''&& $_GET[year] !='' && $_GET[pandate] !='')
{
$cyear = $_GET[year];
$cmonth = $_GET[month];
$cdate = $_GET[pandate];
}
$speicalday = mktime(0,0,0,$mh,$dy,$yr);
//echo $tamildate;
$selecteddate = mktime(0,0,0,$cmonth,$cdate,$cyear);
$tamilsearcheddate = mktime(0,0,0,$tmh,$tdy,$tyr);
//echo $tamilsearcheddate;
if($today==$caltoday)
{
$style='style=background-color:#EFEC15';
}
elseif($speicalday==$caltoday)
{
$style='style=background-color:#E3E3F4';
}
/*elseif('2012-09-01'==$tamildate)
{
$style='style=background-color:#E3E3F4';
}*/
elseif($selecteddate==$caltoday)
{
$style='style=background-color:#E3E3F4';
}
else
$style='style=color:#FFFFFF';
$record3.= "" ." ".$day_num." | ";
$day_num++;
$day_count++;
//Make sure we start a new row every week
if ($day_count > 7)
{
$record3.= " ";
$day_count = 1;
}
}
//Finaly we finish out the table with some blank details if needed
while ( $day_count >1 && $day_count <=7 )
{
$record3.= " | ";
$day_count++;
}
$record3.= " ";
return $record3;
}
?>
|