#!/mod/bin/jimsh package require cgi source /mod/var/mongoose/lib/epg.class source /mod/var/mongoose/lib/spinner.class source /mod/var/mongoose/lib/altrow puts "Content-Type: text/html" puts "" source /mod/var/mongoose/html/lib/header.jim puts "" cgi_input #cgi_dump source /mod/var/mongoose/lib/epg_search [spinner new { text "Searching EPG..." size "1.2em" style "margin: 1em;" }] start source /mod/var/mongoose/lib/epg_popup #set _cgi [dict create term "doctor who"] #set env(REQUEST_URI) "test" set cmd "search" if {$searchfull} { set cmd "searchall" } set ct 0 catch { set ct [dict get $_cgi ct] } set crid "" catch { set crid [dict get $_cgi crid] } set scrid "" catch { set scrid [dict get $_cgi scrid] } if {$ct > 0 } { set records [epg fetch dump -type $ct] } elseif {$crid ne ""} { set records [epg fetch dump -crid $crid] } elseif {$scrid ne ""} { set records [epg fetch dump -scrid $scrid] } elseif {$searchterm ne ""} { set records [epg fetch $cmd -extra $searchterm] } else { set records {} } set favlist [epg favlist] if {[llength $records] > 0} { puts {
Date | Channel | Programme | Synopsis |
[clock format [$record get start] -format "%a %d %b %Y"] [clock format [$record get start] -format "%H:%M %Z"] | "
puts "[$record get channel_num] | " puts "[$record channel_icon 50] | " puts "[$record get channel_name] | " puts [$record cell] puts "[$record get text] | [$record get warning] | " puts "" flush stdout } puts "
---|