webif/var/mongoose/html/m/channel.jim
hummypkg 0a2c7966b5 checkpoint
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@1182 2a923420-c742-0410-a762-8d5b09965624
2012-10-30 18:58:54 +00:00

48 lines
805 B
Plaintext
Executable File

#!/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 "
<div class=va style=\"font-size: 1.2em; padding: 0 0 1em 0\">
[$tr channel_icon 40]
<span class=va>
[$tr get channel_num] - [$tr get channel_name]
</span>
</div>
<ul data-role=listview data-filter=true>
"
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 "<li class=stick data-role=list-divider>
[clock format $st -format "%a %d %b %Y"]
</li>"
}
epgcell $e 1
}
puts "</ul>"
mfooter