2011-06-07 13:26:45 +00:00
|
|
|
#!/mod/bin/jimsh
|
|
|
|
|
|
|
|
package require cgi
|
2011-07-01 22:56:53 +00:00
|
|
|
source /mod/var/mongoose/lib/setup
|
|
|
|
require epg.class spinner.class altrow
|
2011-06-07 13:26:45 +00:00
|
|
|
|
|
|
|
puts "Content-Type: text/html"
|
|
|
|
puts ""
|
|
|
|
|
2011-07-01 22:56:53 +00:00
|
|
|
header
|
2011-06-07 13:26:45 +00:00
|
|
|
|
2011-09-14 22:38:22 +00:00
|
|
|
require totop
|
|
|
|
|
2011-06-08 23:33:35 +00:00
|
|
|
[spinner new {
|
|
|
|
text "Loading EPG Data..."
|
|
|
|
size "1.2em"
|
|
|
|
style "margin: 1em;"
|
|
|
|
}] start
|
|
|
|
|
2011-06-07 13:26:45 +00:00
|
|
|
cgi_input
|
|
|
|
#cgi_dump
|
|
|
|
|
2011-07-01 22:56:53 +00:00
|
|
|
require epg_popup
|
2011-06-09 00:42:26 +00:00
|
|
|
|
2011-07-18 19:26:58 +00:00
|
|
|
set service [cgi_get service 4351]
|
2011-06-07 13:26:45 +00:00
|
|
|
set records [epg fetch dump -service $service]
|
|
|
|
|
2011-06-09 21:16:30 +00:00
|
|
|
set tr [lindex $records 0]
|
2011-06-14 11:48:55 +00:00
|
|
|
$tr get_channel_info
|
2011-06-09 21:16:30 +00:00
|
|
|
set channel_num [$tr get channel_num]
|
|
|
|
set channel_name [$tr get channel_name]
|
2011-06-07 13:26:45 +00:00
|
|
|
|
2011-06-09 21:16:30 +00:00
|
|
|
puts "
|
|
|
|
<div style=\"margin: 0 1em 1em 1em\">
|
2011-06-14 11:48:55 +00:00
|
|
|
[$tr channel_icon 80 {vertical-align:middle}]
|
2011-06-09 21:16:30 +00:00
|
|
|
<span style=\"vertical-align: middle\">
|
|
|
|
$channel_num - $channel_name
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
"
|
2011-06-07 13:26:45 +00:00
|
|
|
|
|
|
|
puts {
|
|
|
|
<table class=borders>
|
|
|
|
<tr>
|
|
|
|
<th></th>
|
|
|
|
<th>Date</th>
|
|
|
|
<th>Time</th>
|
|
|
|
<th>Programme</th>
|
|
|
|
<th>Synopsis</th>
|
|
|
|
</tr>
|
|
|
|
}
|
|
|
|
|
|
|
|
set i 0
|
|
|
|
foreach record $records {
|
|
|
|
altrow
|
2011-07-11 23:29:21 +00:00
|
|
|
$record get_channel_info
|
2011-07-18 19:26:58 +00:00
|
|
|
set ended [$record ended]
|
2011-06-07 13:26:45 +00:00
|
|
|
if {[$record showing]} {
|
|
|
|
puts "<td><img src=/images/111_1_00_Cursor_2R_Arrow.png></td>"
|
|
|
|
} else { puts "<td></td>" }
|
2011-07-18 19:26:58 +00:00
|
|
|
if $ended { puts "<td nowrap class=blood>" } else { puts "<td nowrap>" }
|
|
|
|
puts "[clock format [$record get start] -format "%a %d %b %Y"]</td>"
|
|
|
|
if $ended { puts "<td nowrap class=blood>" } else { puts "<td nowrap>" }
|
|
|
|
puts "[clock format [$record get start] -format "%H:%M"]</td>"
|
2011-06-07 13:26:45 +00:00
|
|
|
puts [$record cell]
|
|
|
|
puts "<td>[$record get text]</td>"
|
|
|
|
puts "<td>[$record get warning]</td>"
|
|
|
|
puts "</tr>"
|
|
|
|
}
|
|
|
|
puts "</table>"
|
|
|
|
|
|
|
|
epg cleanup
|
2011-07-01 22:56:53 +00:00
|
|
|
footer
|
2011-06-07 13:26:45 +00:00
|
|
|
|