#!/mod/bin/jimsh

package require cgi
source /mod/webif/lib/setup
require epg.class

header

set service [cgi_get service]
set event [cgi_get event]
set raw [cgi_get raw]

puts "<pre>"
if { $raw == 0 } {
	puts [epg exec dump -raw 1 -service $service -event $event]
	puts "<a href=$env(SCRIPT_NAME)?$env(QUERY_STRING)&raw=1>
		Click here for extended dump</a>"
} else {
	puts [epg exec dumpraw -raw 1 -service $service -event $event]
}

puts "</pre>"

epg cleanup

footer

