#!/mod/bin/jimsh
package require cgi
source /mod/webif/lib/setup
require epg.class
source include/epgcell.jim
cgi_input
set sid [cgi_get sid 0]
mheader
set records [epg dbfetch dump -service $sid -after [clock seconds]]
set tr [lindex $records 0]
$tr get_channel_info
set day 0
puts "
[$tr channel_icon 40]
[$tr get channel_num] - [$tr get channel_name]
"
foreach e $records {
$e copy_channel_info $tr
set st [$e get start]
set nday [clock format $st -format "%F"]
if {$day ne $nday} {
set day $nday
puts "-
[clock format $st -format "%a %d %b %Y"]
"
}
epgcell $e 1
}
puts "
"
mfooter