'.$d[title]."
@ ".$d[place]."
\n"; } } } //echo $sql." "; //echo count($data); // function function show_cal($days,$firstday,$cd){ $num = ceil( ($firstday+$days)/7 ); $null=" "; $d=0; $flag=false; //$bg_idle = 'bgcolor="#2B240B"'; $bg_idle = ''; $bg_default = 'bgcolor=""'; $bg_active = 'bgcolor=""'; echo "\n"; echo ''."\n"; echo " \n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo " \n"; for($j=0;$j<$num;$j++){ echo " \n"; unset($dt); unset($ev); $bgcl=$bg_idle;//default if((!$flag)&&($firstday==0)){ $flag=1; $dt=$d+=1; $bgcl=$bg_default; }else{ if(($d)&&($days>$d)){ $dt=$d+=1; $bgcl=$bg_default; } } if($cd[$d]){ $ev=''.$cd[$d].''; unset($cd[$d]); $bgcl=$bg_active; } echo ' \n"; unset($dt); unset($ev); $bgcl=$bg_idle;//default if((!$flag)&&($firstday==1)){ $flag=1; $dt=$d+=1; $bgcl=$bg_default; }else{ if(($d)&&($days>$d)){ $dt=$d+=1; $bgcl=$bg_default; } } if($cd[$d]){ $ev=''.$cd[$d].''; unset($cd[$d]); $bgcl=$bg_active; } echo ' \n"; unset($dt); unset($ev); $bgcl=$bg_idle;//default if((!$flag)&&($firstday==2)){ $flag=1; $dt=$d+=1; $bgcl=$bg_default; }else{ if(($d)&&($days>$d)){ $dt=$d+=1; $bgcl=$bg_default; } } if($cd[$d]){ $ev=''.$cd[$d].''; unset($cd[$d]); $bgcl=$bg_active; } echo ' \n"; unset($dt); unset($ev); $bgcl=$bg_idle;//default if((!$flag)&&($firstday==3)){ $flag=1; $dt=$d+=1; $bgcl=$bg_default; }else{ if(($d)&&($days>$d)){ $dt=$d+=1; $bgcl=$bg_default; } } if($cd[$d]){ $ev=''.$cd[$d].''; unset($cd[$d]); $bgcl=$bg_active; } echo ' \n"; unset($dt); unset($ev); $bgcl=$bg_idle;//default if((!$flag)&&($firstday==4)){ $flag=1; $dt=$d+=1; $bgcl=$bg_default; }else{ if(($d)&&($days>$d)){ $dt=$d+=1; $bgcl=$bg_default; } } if($cd[$d]){ $ev=''.$cd[$d].''; unset($cd[$d]); $bgcl=$bg_active; } echo ' \n"; unset($dt); unset($ev); $bgcl=$bg_idle;//default if((!$flag)&&($firstday==5)){ $flag=1; $dt=$d+=1; $bgcl=$bg_default; }else{ if(($d)&&($days>$d)){ $dt=$d+=1; $bgcl=$bg_default; } } if($cd[$d]){ $ev=''.$cd[$d].''; unset($cd[$d]); $bgcl=$bg_active; } echo ' \n"; unset($dt); unset($ev); $bgcl=$bg_idle;//default if((!$flag)&&($firstday==6)){ $flag=1; $dt=$d+=1; $bgcl=$bg_default; }else{ if(($d)&&($days>$d)){ $dt=$d+=1; $bgcl=$bg_default; } } if($cd[$d]){ $ev=''.$cd[$d].''; unset($cd[$d]); $bgcl=$bg_active; } echo ' \n"; echo " \n"; } echo "
SUNMONTUEWEDTHUFRISAT
'."$dt
$ev $null
'."$dt
$ev $null
'."$dt
$ev $null
'."$dt
$ev $null
'."$dt
$ev $null
'."$dt
$ev $null
'."$dt
$ev $null
\n"; } // year link $cyear = date("Y"); /* for($i=$cyear; $i>=2006; $i--){ $ylink_str .= " $i  "; } */ for($i=2006; $i<=$cyear; $i++){ $ylink_str .= " $i  "; } // last month if($cal_m == 1){ $last_m = 12; $last_y = $cal_y - 1; }else{ $last_m = $cal_m - 1; $last_y = $cal_y; } // next month if($cal_m == 12){ $next_m = 1; $next_y = $cal_y + 1; }else{ $next_m = $cal_m + 1; $next_y = $cal_y; } ?> N X S