<?
# light yellow for underlying currently happening events
#
- $nowcolor = "fffec9";
+ $nowcolor = 2;
$event_month = array ("","Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
$event_cols = "oid,name,start,start+delta,city,country,cancelled";
- $event_table_start = '<table class="font height border" width=100% border=0 cellspacing=0 cellpadding=0>'
- .'<tr bgcolor="#<colh>">'
+ $event_table_start = '<table class="smallfont border" width=100% cellspacing=1 cellpadding=0>'
+ .'<tr class="head">'
.'<th width=65%>Event</th>'
.'<th width=25%>City (Country)</th>'
.'<th width=10%>Date</th></tr>';
$event_table_end = '</table>';
- $event_row = '<tr bgcolor="%s">'
+ $event_row = '<tr class="t%d">'
.'<td class="leftcol"><a href="show.php?id=%d">%s</a>%s</td>'
.'<td align="left">%s (%s)</td>'
.'<td align="center">%s</td></tr>';
if ($year > 0) {
echo ($event_table_end);
}
- $color = "<coln>";
+ $color = 0;
printf ("<h3 class=\"bar\">Events in %s</h3>", $thisyear);
echo ($event_table_start);
$year = $thisyear;
$row['city'] = ereg_replace (" ", " ", $row['city']);
$row['country'] = ereg_replace (" ", " ", $row['country']);
- $color = $color == "<cold>"?"<coln>" : "<cold>";
printf ($event_row, $color, $row['oid'], $row['name'], $row['cancelled'] == 1?" *cancelled*":"",
$row['city'], $row['country'], $date);
+ $color = !$color;
}
}
echo ($event_table_end);
$sth = pg_exec ($dbh, $query) or die("Datenbank-Abfrage!");
$year = 0;
+ $color = $nowcolor;
for ($i=0; $i < pg_NumRows ($sth); $i++) {
$row = pg_fetch_array ($sth, $i);
if ($year > 0) {
echo ($event_table_end);
}
- $color = $nowcolor;
printf ("<h3 class=\"bar\">Upcoming events in %s</h3>", $thisyear);
echo ($event_table_start);
$year = $thisyear;
$sth = pg_exec ($dbh, $query) or die("Datenbank-Abfrage!");
- $color = "<coln>";
+ $color = 0;
for ($i=0; $i < pg_NumRows ($sth); $i++) {
$row = pg_fetch_array ($sth, $i);
if ($year > 0) {
echo ($event_table_end);
}
- $color = "<coln>";
+ $color = 0;
printf ("<h3 class=\"bar\">Upcoming events in %s</h3>", $thisyear);
echo ($event_table_start);
$year = $thisyear;
$row['city'] = ereg_replace (" ", " ", $row['city']);
$row['country'] = ereg_replace (" ", " ", $row['country']);
- $color = $color == "<cold>"?"<coln>" : "<cold>";
printf ($event_row, $color, $row['oid'], $row['name'], $row['cancelled'] == 1?" *cancelled*":"",
$row['city'], $row['country'], $date);
+ $color = !$color;
}
echo ($event_table_end);
?>