title = "Lectionary Calendar"; $page->description = "The lectionary calendar."; $page->content = <<text('Enter Year','year',$year); $form->submit('submit','Search'); $form->reset('Clear'); $page->content .= $form->render(); require_once("Lectionary.class"); if ( $year && $month && $day ) { $lectionary = new Lectionary($year); $l = $lectionary->get_calendar_day(gmmktime(0,0,0,$month,$day,$year)); foreach ( $l as $key => $val) { $page->content .= '

'.$lectionary->get_title($key,$val).' (Year: '.$lectionary->get_cycle($key).")

\n"; $page->content .= "

\n"; $page->content .= 'Date: '.$lectionary->get_long_date($key)."
\n"; $page->content .= 'Old Testament: '. $lectionary->get_scripture($key,$val,'old') . "
\n"; $page->content .= 'Psalms: '. $lectionary->get_scripture($key,$val,'psalms') . "
\n"; $page->content .= 'Epistle: '. $lectionary->get_scripture($key,$val,'new') . "
\n"; $page->content .= 'Gospel: '. $lectionary->get_scripture($key,$val,'gospel') . "
\n"; $page->content .= "

\n"; } } else { require_once("Calendar.class"); $c = new Calendar(); $lectionary = new Lectionary($year); $l = $lectionary->get_calendar(); foreach ( $l as $key => $val) { $year = gmstrftime('%Y',$key); $month = gmstrftime('%m',$key); $day = gmstrftime('%d',$key); $c->set_appt($year,$month,$day,'?year='.$year.'&month='.$month.'&day='.$day); } $page->content .= $c->render($year); } $page->display(); ?>