#!/mod/bin/jimsh package require cgi source /mod/var/mongoose/lib/setup require altrow rsv.class progressbar epg.class system.class puts "Content-Type: text/html" puts "" header puts {
} proc eventheader {{table TBL_RESERVATION} note} { puts {
} puts "

$note

" puts {
} if {$table eq "pending" } { puts "" } puts { } } proc eventrow {event {table TBL_RESERVATION}} { set name [$event name] set attrs "table=$table sid=[$event get ulslot] \ reckind=[$event get ucRecKind] rsvtype=[$event get ersvtype] \ ar=[expr ! [$event padded]]" altrow $attrs set rsvicon [$event icon] set RKIcon [$event RKIcon] if {[$event get ucRecKind] == 4} { set series 1 } else { set series 0 } if {$rsvicon ne ""} { set rsvicon "" if {[$event get ersvtype] == 3} { if {[$event padded]} { set padding "<- [expr [$event get ulPreOffset] / 60], [expr [$event get ulPostOffset] / 60] ->" append rsvicon \ "\"$padding\"" } else { append rsvicon \ "" } } } if {$RKIcon ne ""} { set RKIcon "" } if {$table eq "pending"} { switch [$event get action] { 0 { set icon "add" } 1 { set icon "close" } 2 { set icon "ar" } 3 { set icon "pad" } 4 { set icon "folder" } } puts "" } puts "" if {[$event get usLcn] ne ""} { puts " " } else { puts "" } puts "" set s [$event get nsttime] set d [$event get nduration] set e $($s + $d) set n [clock seconds] set ds "[clock format $s -format "%a %d %b %Y"]
[clock format $s -format "%H:%M %Z"]" if { $n > $e && [$event get ersvtype] <= 3} { puts "" } else { puts "" } puts "" puts "" puts "" } proc eventfooter {} { puts "
Action  Channel Programme Start Time Duration Mode
[$event get ulslot] [epg channelicon [$event channel_name] 50] [$event get usLcn]
[$event channel_name]
 

  $name" if { ([$event get ucRecKind] == 4 && $name ne [$event folder]) || ([$event get ucRecKind] == 1 && [$event folder] ne "") } { puts "
 (Folder: [$event folder])" } puts "
--- -- --- ----
--:--" puts "
--:--:-- $e} { puts " blood" } puts "\">$ds" if {$d > 0 && $n > $s && $n < $e} { puts "
" set perc [expr [expr $n - $s] * 100 / $d] puts "" puts [progressbar $perc] } puts "
" puts "[clock format [$event get nduration] -format %T]$rsvicon $RKIcon
" } set events [rsv list pending] if {[llength $events] > 0} { eventheader pending "Pending Scheduled Events" foreach event $events {eventrow $event pending} eventfooter puts { } } set events [rsv list] eventheader "live" "Scheduled Events" foreach event $events {eventrow $event} eventfooter puts {
} source assets.jim footer