plus2net Calendar
0)){
$month =date("m"); // Current month as default month
}
if(!($year <=$end_year and $year >=$start_year)){
$year =date("Y"); // Set current year as default year
}
$d= 2; // To Finds today's date
//$no_of_days = date('t',mktime(0,0,0,$month,1,$year)); //This is to calculate number of days in a month
$no_of_days = cal_days_in_month(CAL_GREGORIAN, $month, $year);//calculate number of days in a month
$j= date('w',mktime(0,0,0,$month,1,$year)); // This will calculate the week day of the first day of the month
//echo $j;
$adj=str_repeat("
*
",$j); // Blank starting cells of the calendar
$blank_at_end=42-$j-$no_of_days; // Days left after the last day of the month
if($blank_at_end >= 7){$blank_at_end = $blank_at_end - 7 ;}
$adj2=str_repeat("
*
",$blank_at_end); // Blank ending cells of the calendar
/// Starting of top line showing year and month to select ///////////////
echo "
";
////// End of the top line showing name of the days of the week//////////
//////// Starting of the days//////////
for($i=1;$i<=$no_of_days;$i++){
$pv="'$month'".","."'$i'".","."'$year'";
echo $adj."
$i"; // This will display the date inside the calendar cell
echo "
";
$adj='';
$j ++;
if($j==7){echo "
"; // start a new row
$j=0;}
}
echo $adj2; // Blank the balance cell of calendar at the end
echo "
ou Can Add Images, Colored Text and more To Your Comment.
ReplyDeleteImage: [im]Image URL Here[/im]
Colors: [co="red"]Comment Text Here[/co]
Marquee: [ma]Comment Text[/ma]
and more..
[img]https://s-media-cache-ak0.pinimg.com/236x/03/56/39/035639a2cb011b5d6f3e6c4264238974.jpg[/img]
ReplyDelete