#!/usr/bin/perl use CGI; use Mysql; require('config.pl'); $query = new CGI; get_params(); $dbh = Mysql->connect("$db_host","$db","$db_user","$db_password"); print $query->header; get_colors(); $select_query = "SELECT *, WEEKDAY(datee) as dow FROM 3zco order by datee, id"; $sth = $dbh->query($select_query); print <

Three's Company

EOP while (%info = $sth->fetchhash){ $date1 = `/bin/date --date="$info{datee}" +"%B %e, %Y"`; $today = `/bin/date +%Y%m%d`-1; chomp($today); $info{datee} =~ /(\d\d\d\d)-(\d\d)-(\d\d)/; $date = $info{'datee'} ; $month = substr($date,5,2); $day = substr($date,8,2); $year = substr($date,0,4); $today = `/bin/date +%Y-%m-%d`; chomp($today); if ($month eq "01" ){ $month = "January"; }; if ($month eq "02" ){ $month = "February"; }; if ($month eq "03" ){ $month = "March"; }; if ($month eq "04" ){ $month = "April"; }; if ($month eq "05" ){ $month = "May"; }; if ($month eq "06" ){ $month = "June"; }; if ($month eq "07" ){ $month = "July"; }; if ($month eq "08" ){ $month = "August"; }; if ($month eq "09" ){ $month = "September"; }; if ($month eq "10" ){ $month = "October"; }; if ($month eq "11" ){ $month = "November"; }; if ($month eq "12" ){ $month = "December"; }; if (substr($day,0,1) eq "0" ){ $day = substr($day,1,1); }; $dow=""; if ($info{'dow'} eq "1" ){ $dow = "Tuesday"; }; if ($info{'dow'} eq "2" ){ $dow = "Wednesday"; }; if ($info{'dow'} eq "3" ){ $dow = "Thursday"; }; if ($info{'dow'} eq "4" ){ $dow = "Friday"; }; if ($info{'dow'} eq "5" ){ $dow = "Saturday"; }; if ($info{'dow'} eq "6" ){ $dow = "Sunday"; }; if ($info{'dow'} eq "7" ){ $dow = "Monday"; }; $today = `/bin/date +%Y%m%d`-1; chomp($today); $info{datee} =~ /(\d\d\d\d)-(\d\d)-(\d\d)/; $date = $1.$2.$3; $dateee = $info{datee}; if ($date > $today ){ print "

$dow, $month $day

$info{'wheree'}

$info{'timee'}
$info{'other'}

$info{'directions'}
"; }; } print <

links.gif (1290 bytes)     bulletins.gif (1346 bytes)          back_bar.jpg (2461 bytes)

EOP