icon_id_to_img_html

one of the documented procedures in this installation of the ACS
Usage:
icon_id_to_img_html   icon_id
What it does:
Returns IMG HTML for displaying icon from icon_id
Defined in: /web/philip/tcl/bboard-unified.tcl

Source code:


    set db [ns_db gethandle subquery]

    set selection [ns_db select $db "
    SELECT icon_file, icon_name, icon_width, icon_height
    FROM bboard_icons
    WHERE icon_id = $icon_id"]

    set return_img ""

    if { [ns_db getrow $db $selection] } {
	set_variables_after_query

	set icon_dir [ad_parameter IconSrc bboard/unified "/bboard/unified/icons"]
	set return_img "<img alt=\"$icon_name\" width=$icon_width height=$icon_height src=\"$icon_dir/$icon_file\">"
    } 

    ns_db releasehandle $db
    return $return_img


philg@mit.edu