2011-06-07 13:26:45 +00:00
|
|
|
#!/mod/bin/jimsh
|
|
|
|
|
2011-07-01 22:56:53 +00:00
|
|
|
source /mod/var/mongoose/lib/setup
|
2011-07-05 00:19:02 +00:00
|
|
|
require altrow rsv.class progressbar
|
|
|
|
|
|
|
|
set events [rsv list]
|
|
|
|
|
|
|
|
puts {
|
|
|
|
<table class=borders>
|
|
|
|
<tr>
|
|
|
|
<th colspan=3>Channel</th>
|
|
|
|
<th>Programme</th>
|
|
|
|
<th>Start Time</th>
|
|
|
|
<th>Duration</th>
|
|
|
|
<th>Mode</th>
|
|
|
|
<th>Event/Series ID</th>
|
|
|
|
<th>Events</th>
|
|
|
|
</tr>
|
|
|
|
}
|
|
|
|
|
|
|
|
foreach event $events {
|
|
|
|
$event cleanstrings
|
|
|
|
|
|
|
|
set name [$event get szevtname]
|
2011-06-07 13:26:45 +00:00
|
|
|
|
|
|
|
altrow
|
|
|
|
|
|
|
|
set rsvicon ""
|
|
|
|
set alta ""
|
2011-07-05 00:19:02 +00:00
|
|
|
switch [$event get ersvtype] {
|
2011-06-07 13:26:45 +00:00
|
|
|
1 { set rsvicon "175_1_00_Reservation_Watch.png" }
|
|
|
|
2 { set rsvicon "175_1_00_Reservation_Watch.png" }
|
|
|
|
3 { set rsvicon "175_1_11_Reservation_Record.png" }
|
|
|
|
5 { set rsvicon "745_1_10_Video_2Live.png"; set alta "Wake-up" }
|
|
|
|
6 { set rsvicon "745_1_11_Video_1REC.png"; set alta "Sleep" }
|
|
|
|
7 { set rsvicon "345_6_08_ST_Ad_Hoc.png"
|
2011-06-09 21:16:30 +00:00
|
|
|
set alta "Auto Update" }
|
2011-07-05 00:19:02 +00:00
|
|
|
default { set alta "Unknown type [$event get ersvtype]" }
|
2011-06-07 13:26:45 +00:00
|
|
|
}
|
|
|
|
if {$name == ""} { set name "-- $alta --" }
|
|
|
|
|
2011-06-09 21:16:30 +00:00
|
|
|
set series 0
|
2011-07-05 00:19:02 +00:00
|
|
|
if {[$event get ucRecKind] == 4} {
|
2011-06-07 13:26:45 +00:00
|
|
|
set RKIcon "175_1_11_Series_Record.png"
|
2011-06-09 21:16:30 +00:00
|
|
|
set series 1
|
2011-06-07 13:26:45 +00:00
|
|
|
} else {
|
2011-07-05 00:19:02 +00:00
|
|
|
switch [$event get erepeat] {
|
2011-06-07 13:26:45 +00:00
|
|
|
1 {set RKIcon "521_1_00_RP_Daily_C.png"}
|
|
|
|
2 {set RKIcon "521_1_00_RP_Weekly_C.png"}
|
|
|
|
3 {set RKIcon "521_1_00_RP_Weekdays_C.png"}
|
|
|
|
4 {set RKIcon "521_1_00_RP_Weekend_C.png"}
|
|
|
|
default {set RKIcon ""}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if {$rsvicon ne ""} {
|
2011-07-05 00:19:02 +00:00
|
|
|
set rsvicon "<img src='images/$rsvicon' height=20>
|
2011-06-07 13:26:45 +00:00
|
|
|
}
|
|
|
|
if {$RKIcon ne ""} {
|
2011-07-05 00:19:02 +00:00
|
|
|
set RKIcon "<img src='images/$RKIcon' height=20>
|
|
|
|
}
|
|
|
|
|
|
|
|
if {[$event get usLcn] ne ""} {
|
|
|
|
puts "
|
|
|
|
<td>[$event get usLcn]</td>
|
|
|
|
<td>
|
|
|
|
<img src=\"/img/channels/[$event get szSvcName].png\"
|
|
|
|
width=50>
|
|
|
|
</td>
|
|
|
|
<td nowrap>[$event get szSvcName]</td>
|
|
|
|
"
|
|
|
|
} else {
|
|
|
|
puts "<td colspan=3> <br><br></td>"
|
2011-06-07 13:26:45 +00:00
|
|
|
}
|
|
|
|
|
2011-07-05 00:19:02 +00:00
|
|
|
puts "<td nowrap>$name</td>"
|
|
|
|
|
|
|
|
set s [$event get nsttime]
|
|
|
|
set d [$event get nduration]
|
|
|
|
set e $($s + $d)
|
|
|
|
set n [clock seconds]
|
|
|
|
|
|
|
|
if { $n > $e } {
|
|
|
|
puts "<td class=blood nowrap class=va>"
|
2011-06-09 21:16:30 +00:00
|
|
|
} else {
|
2011-07-05 00:19:02 +00:00
|
|
|
puts "<td nowrap class=va>"
|
|
|
|
}
|
|
|
|
puts "[clock format $s -format {%c %Z}]"
|
|
|
|
|
|
|
|
if {$d > 0 && $n > $s && $n < $e} {
|
|
|
|
puts "<br>"
|
|
|
|
set perc [expr [expr $n - $s] * 100 / $d]
|
|
|
|
puts "<img class=va src=/images/745_1_11_Video_1REC.png>"
|
|
|
|
puts [progressbar $perc]
|
2011-06-09 21:16:30 +00:00
|
|
|
}
|
2011-07-05 00:19:02 +00:00
|
|
|
|
|
|
|
puts "</td>"
|
|
|
|
|
|
|
|
puts "<td>[clock format [$event get nduration] -format %T]</td>"
|
|
|
|
|
|
|
|
puts "<td nowrap>$rsvicon $RKIcon</td>"
|
|
|
|
puts "<td nowrap>"
|
|
|
|
set crid [join [lrange [split [$event get szCRID] /] 1 end]]
|
2011-06-09 21:16:30 +00:00
|
|
|
if {$crid != ""} {
|
|
|
|
puts -nonewline "<a href=/cgi-bin/epg_search.jim?"
|
|
|
|
if $series { puts -nonewline "s" }
|
|
|
|
puts "crid=/$crid>
|
|
|
|
<img border=0 src=/images/421_1_00_CH_Title_2R_Arrow.png
|
|
|
|
height=14>
|
2011-07-05 00:19:02 +00:00
|
|
|
[$event get szCRID]"
|
|
|
|
puts "</a>"
|
|
|
|
}
|
|
|
|
puts "</td>"
|
|
|
|
puts "<td nowrap>"
|
|
|
|
set flag 0
|
|
|
|
foreach ev [split [$event get szEventToRecord] "|"] {
|
|
|
|
if {$ev eq ""} { continue }
|
|
|
|
set ev [string range $ev 1 end]
|
|
|
|
if {$flag} { puts "<br>" }
|
|
|
|
incr flag
|
|
|
|
set crid [join [lrange [split $ev /] 1 end]]
|
|
|
|
puts -nonewline "<a href=/cgi-bin/epg_search.jim?"
|
|
|
|
puts "crid=/$crid>
|
|
|
|
<img border=0 src=/images/421_1_00_CH_Title_2R_Arrow.png
|
|
|
|
height=14>
|
|
|
|
$ev"
|
|
|
|
puts "</a>"
|
2011-06-09 21:16:30 +00:00
|
|
|
}
|
|
|
|
puts "</td>"
|
2011-06-07 13:26:45 +00:00
|
|
|
puts "</tr>"
|
|
|
|
}
|
|
|
|
puts "</table>"
|
2011-06-09 21:16:30 +00:00
|
|
|
puts "<font class=footnote>Click on the CRID to view episodes.</font>"
|
2011-06-07 13:26:45 +00:00
|
|
|
|