$modified_time['agenda_script']) { $ok = `touch {$_SERVER['SCRIPT_FILENAME']}`; } // // Legal values for mode are: 'future', 'all' // if (isset($_GET['mode'])) { $mode = $_GET['mode']; } if (!isset($mode)) $mode = 'future'; $page_meta = array( 'title' => 'Schedule of Upcoming Go Events', 'author' => 'Jan van der Steen', 'editor' => 'editor@gobase.org', 'flag' => 'nn', 'section_path' => array( 'General Information', 'Schedule of Upcoming Go Events', ), 'references' => array( 'home' => array( 'url' => "/", ), 'prev' => array( 'txt' => "What's new", 'url' => "../whatsnew/", ), 'index' => array( 'url' => "../", ), 'next' => array( 'txt' => "Registration", 'url' => "../account/", ), ), 'path' => array( array( 'txt' => 'home', 'url' => '/', ), array( 'txt' => 'general information', 'url' => '/information/', ), array( 'txt' => 'Schedule of Upcoming Go Events', ), ), ); $page_meta['STYLE'] = <<<__EOF TD.past , TD.past A.index { background-color: #dddbd3; color: black; } TD.today , TD.today A.index { background-color: #999a6a; color: white; } TD.future , TD.future A.index { background-color: #e4e0cc; color: black; } TH.knockout , TH.cknockout , TD.knockout , TD.cknockout { font-size: 8pt; padding-left: 4px; padding-right: 4px; padding-top: 2px; padding-bottom: 2px; } __EOF; function sec_agenda() // // Emit all events on the agenda // { global $upcoming; global $mode; global $modified_time; $max_items = 999; $today = '2004-03-08'; $today = strftime('%Y-%m-%d', time()); $colors = true; print "

\n"; print "The schedule was last updated: "; print date('Y-m-d H:i:s', $modified_time['agenda_data']); print "

\n"; print "\n"; print "\n"; print "date\n"; print "scene\n"; print "event\n"; print "rnd\n"; print "place\n"; print "\n"; $n = 0; foreach ($upcoming as $k => $v) { if ($n++ >= $max_items) break; $class = 'knockout'; if ($v['date'] < $today) { if ($mode != 'all') continue; if ($colors) { $class = 'knockout past'; } } else if ($v['date'] == $today) { $class = 'knockout today'; } else { if ($colors) { $class = 'knockout future'; } } print "\n"; print ""; print substr($v['date'], 5, 5); print "\n"; print ""; flag_emit($v['flag']); print "\n"; print ""; print ""; print str_replace(' ', ' ', $v['ev']); print ""; print "\n"; print ""; print str_replace(' ', ' ', $v['rnd']); if ($v['part'] > 0) { print ", {$v['part']}"; } print "\n"; print ""; if ($v['stat'] == 'void') { print 'not played (match decided)'; } else { print $v['place']; if (!empty($v['time'])) { print " ({$v['time']})"; } } print "\n"; print "\n"; } print "\n"; print "
\n"; print "

\n"; if ($mode == 'future') { print "(show past events as well)\n"; } else { print "(only show future events)\n"; } } emit_page_open($page_meta); page_section('Schedule', 'sec_agenda', 'balanced'); emit_page_close($page_meta); ?>