= $current || event_end_date >= $current) AND (group1_id = 15 || group2_id = 15)) order by event_date ASC") or die("SELECT Error: ".mysql_error()); if (mysql_num_rows($result) == 0) { echo "
No Upcoming Events
"; } //display the data while ($newArray = mysql_fetch_array($result)) { $event_type = $newArray['event_type']; $event_date = $newArray['event_date']; $event_time = $newArray['event_time']; $event_time_ap = $newArray['event_time_ap']; $event_end_date = $newArray['event_end_date']; $event_location = $newArray['event_location']; $event_title = $newArray['event_title']; $event_speaker = $newArray['event_speaker']; $speaker_afil = $newArray['speaker_afil']; $related_url = $newArray['related_url']; $abstract_name = $newArray['abstract_name']; $event_description = $newArray['event_description']; //echo the results on screen echo "";
if ($related_url != "") {
echo " $event_title";
} else {
echo "$event_title";
}
if ($event_description) {
echo "
$event_description
";
}
else echo "
";
if (strlen($event_date) == 8) {
$yearstart = substr($event_date, 0, 4);
$monthstart = substr($event_date, 4, 2);
$daystart = substr($event_date, 6, 2);
}
echo "$monthstart.$daystart.$yearstart";
if (strlen($event_end_date) == 8) {
$yearend = substr($event_end_date, 0, 4);
$monthend = substr($event_end_date, 4, 2);
$dayend = substr($event_end_date, 6, 2);
}
if ($event_type != "announcement") {
echo " to $monthend.$dayend.$yearend";
}
if ($event_location) {
echo "
Location: $event_location";
}
} echo "