Details
'),'') as 'event_details_link' FROM events,CODE_venues, CODE_event_types WHERE events.venue_code_nuigalway=CODE_venues.venue_code_nuigalway AND events.ready_to_publish_now='Yes' AND events.event_type_code=CODE_event_types.code_event_type"; } switch ($type_chosen) { case "": $query .= " "; $navigation="


[All events]
[Brown bag seminar series] [Economics seminar series] [Conferences, workshops, other]
[Recent] [Archive]


"; $type_header=""; break; case "brown_bag": $query .= " AND events.event_type_code='brown_bag'"; $navigation="


[All events]
[Brown bag seminar series] [Economics seminar series] [Conferences, workshops, other]
[Recent] [Archive]


"; $type_header="Brown bag seminar series"; break; case "seminar": $query .= " AND events.event_type_code='economics_seminar'"; $navigation="


[All events]
[Brown bag seminar series] [Economics seminar series] [Conferences, workshops, other]
[Recent] [Archive]


"; $type_header="Economics seminar series"; break; case "other": $query .= " AND events.event_type_code NOT IN('economics_seminar','brown_bag')"; $navigation="


[All events]
[Brown bag seminar series] [Economics seminar series] [Conferences, workshops, other]
[Recent] [Archive]


"; $type_header="Conferences, workshops, and other events"; break; } switch ($category_chosen) { case "": ## default category of future events $query .= " AND ( ## for one day events: (is_it_a_multi_day_event='No' #AND #events.date <= DATE_ADD(CURRENT_DATE, INTERVAL $days_ahead_interval DAY) # (start_date < some day ahead -- uncomment to apply restriction AND events.date >= CURRENT_DATE) # start date today or later OR ## for multi-day events: (this keeps them on forthcoming until the last day of the event (is_it_a_multi_day_event='Yes' #AND #date_end_only_if_it_is_multiday <= DATE_ADD(CURRENT_DATE, INTERVAL $days_ahead_interval DAY) # end date < some time ahead -- uncomment to apply restriction AND date_end_only_if_it_is_multiday >= CURRENT_DATE) # end date is today or later )"; $query .= " ORDER BY events.date ASC, events.time ASC "; $query .=" "; $category_header="Forthcoming: "; break; case "recent": $query .= " AND ( ## for one day events: (is_it_a_multi_day_event='No' AND events.date < CURRENT_DATE) OR ## for multi-day events: (this keeps them on forthcoming until the last day of the event (is_it_a_multi_day_event='Yes' AND date_end_only_if_it_is_multiday < CURRENT_DATE) )"; $query .= " ORDER BY events.date DESC, events.time DESC "; $query .=" LIMIT 30"; $category_header="Recent: "; $navigation="


[All events]
[Brown bag seminar series] [Economics seminar series] [Conferences, workshops, other]
[Recent] [Archive]


"; break; } ##echo "

$query

"; if($category_chosen=='archive') { # start of if archive condition $result = mysql_query($query) or die ("Sorry, there was an error in executing the MySQL query 1"); ### Process result of query while( $row = mysql_fetch_array($result)) { $r = $r + 1; $year_in_which_valid_events[$r]=$row['year_in_which_valid_events']; $count_events[$r]=$row['count_events']; } $total_event_years = $r; $navigation="


[All events]
[Brown bag seminar series] [Economics seminar series] [Conferences, workshops, other]
[Recent] Archive


"; ### HTML listing if($total_event_years>0) { echo"
$navigation

Archive

"; echo"
"; echo ""; echo"
"; } else { echo "

Sorry, no items.

"; } } # end of if archive condition else { $result = mysql_query($query) or die ("Sorry, there was an error in executing MySQL query 1"); ### Process result of query while( $row = mysql_fetch_array($result)) { # general form $=$row['event_id']; $r = $r + 1; $id=$row['event_id']; $event_type_series=cleanup($row['event_type_series']); $event_type_item=cleanup($row['event_type_item']); $event_date_formatted=$row['event_date_formatted']; $event_time_formatted=$row['event_time_formatted']; $is_it_a_multi_day_event=$row['is_it_a_multi_day_event']; $day_multi_day_event_formatted=$row['day_multi_day_event_formatted']; $date_end_only_if_it_is_multiday=$row['date_end_only_if_it_is_multiday']; $title_of_event=cleanup($row['title_of_event']); $speakers_names=cleanup($row['speakers_names']); $speakers_affiliations=cleanup($row['speakers_affiliations']); $venue_short_title=cleanup($row['venue_short_title']); $venue_location=cleanup($row['venue_location']); $venue_if_no_code=cleanup($row['venue_if_no_code']); $event_note=cleanup($row['event_note']); $event_details_link=$row['event_details_link']; # template for short listing $event_item_short .= "


$event_date_formatted $day_multi_day_event_formatted
$event_time_formatted $venue_short_title$venue_location $venue_if_no_code
$event_type_item
$title_of_event

$speakers_names $speakers_affiliations
$event_details_link"; } $total = $r; ### HTML echo "
$navigation"; echo"

$category_header $type_header


"; if($total>0) # so long as there is at least one event ... { echo ""; echo "$event_item_short"; echo "
"; } # end of if at least one event condition else ## if no items { echo "

Sorry, no items.

"; } } # end of if then else statement i.e. not archive ?>

Head of Economics

Prof Alan Ahearne

Contact Economics

t:+353 91 492501/492177

e: economics@nuigalway.ie