events_pretty_event

one of the documented procedures in this installation of the ACS
Usage:
events_pretty_event   db   event_id
What it does:
Returns a pretty description of the event. Returns an empty string if event_id is not valid
Defined in: /web/philip/tcl/events-defs.tcl

Source code:


    set selection [ns_db 0or1row $db "
    select a.short_name, e.start_time, e.end_time,
    v.city,
    decode(v.iso, 'us', v.usps_abbrev, cc.country_name) as big_location
    from events_events e, events_activities a, events_venues v,
    country_codes cc
    where e.event_id = $event_id
    and a.activity_id = e.activity_id
    and cc.iso = v.iso
    and v.venue_id = e.venue_id
    "]

    if {[empty_string_p $selection]} {
	return ""
    }

    set_variables_after_query

    set start [util_AnsiDatetoPrettyDate $start_time]
    set end [util_AnsiDatetoPrettyDate $end_time]

    if {$start == $end} {
	set time_str "on $start"
    } else {
	set time_str "from $start to $end"
    }

    set_variables_after_query
    return "$short_name in 
    $city, $big_location
    $time_str
    "


philg@mit.edu