Click on any highlighted day for a message about lessons on that day.
Use the previous (<) and next (>) arrows to change months.
'; print $prev_month_link; print ' | '; print strftime('%B %Y',mktime(0,0,0,$month,1,$year)); print ' | '; print $next_month_link; print ' | ||||
$v | "; } print "\n||||||
'; } } $yesterday = time() - 86400; $zmonth = str_pad($month, 2, '0', STR_PAD_LEFT); // print out the days for ($day=1; $day <= $totaldays; $day++) { $zday = str_pad($day, 2, '0', STR_PAD_LEFT); $day_secs = mktime(0,0,0,$month,$day,$year); $class = ''; $script = ''; $title = ''; if ($day_offset == 0) { $class = 'sunday'; $script='nosunlesson()'; $title = ' Sunday - No lesson '; } else { $zdate = "$year-$zmonth-$zday"; if ($holidays[$zdate]) { $title = $holidays[$zdate]; $script = "alert('$title')"; if ( preg_match('/no lesson/i',$title) ) { $class = 'nolesson'; } else { $class = 'special'; } } } /* if ($day_secs >= $yesterday) { if ($day_highlight && ($day == $this_day)) { $class .= ' today'; } } */ if ($script) { print sprintf(' | %d | ',$class,$script,$title,$day); } else { print sprintf('%d | ',$class,$day); } print "\n"; $day_offset++; // start a new row each week if ($day_offset == 7) { $day_offset = 0; if ($day < $totaldays) { print "||||
'; } } print ' |