| ');
$count = 0;
for ($i=0; $i < $numrows; $i = $i +1) {
$row = pg_fetch_row($result,$i);
$pretty_date=$row[0];
$event_date=$row[1];
$event_type1=$row[2];
$event_type2=$row[3];
$title1=$row[4];
$title2=$row[5];
$speaker=$row[6];
$speaker_address1=$row[7];
$speaker_address2=$row[8];
$time1=$row[9];
$location1=$row[10];
$time2=$row[11];
$location2=$row[12];
$banquet=$row[13];
if ($banquet !='y') {
// Date and title
printf("$pretty_date: | ");
printf(" $event_type1 |
| ");
if ($event_type2 !="") {
printf(" | $event_type2 |
| ");
}
printf(" | $speaker |
| ");
printf(" | $speaker_address1 |
");
if ($speaker_address2 !="") {
printf(" | $speaker_address2 |
");
}
if ($title1 !="") {
printf("| Title: | $title1 |
");
}
if ($title2 !="") {
printf(" | $title2 |
");
}
printf("| Time and Place: | $time1 $location1 |
| ");
printf(" | $time2 $location2
\n| ");
} else {
if ($count == 0) {
printf(" | ");
} else {
printf(" |
| ");
}
if ($count == 0) {
printf(" $event_type1 |
| ");
if ($event_type2 !="") {
printf(" | $event_type2 |
| ");
}
$count = 1;
}
printf(" | $speaker |
| ");
printf(" | $speaker_address1 |
");
if ($speaker_address2 !="") {
printf(" | $speaker_address2 |
");
}
if ($title1 !="") {
printf("| Title: | $title1 |
");
}
if ($title2 !="") {
printf(" | $title2 |
");
}
if ($i == ($numrows -1)) {
printf("| Time and Place: | $time1 $location1 |
| ");
printf(" | $time2 $location2
|
| ");
} else {
printf(" |
|
");
}
}// if of banquet end
} //for end
printf(" |
");
?>