#!/mod/bin/jimsh source /mod/var/mongoose/lib/setup require altrow rsv.class progressbar puts {
} proc eventheader {{table TBL_RESERVATION}} { puts { } if {$table eq "pending" } { puts "" } puts { } } proc eventrow {event {table TBL_RESERVATION}} { set name [$event name] altrow 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 {$RKIcon ne ""} { set RKIcon " } if {$table eq "pending"} { if {[$event get action] == 0} { set icon "add" } else { set icon "close" } 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] if { $n > $e } { puts "" puts "" puts "" if {[$event get aulEventToRecordInfo] != ""} { puts "" } else { puts "" } puts "" } proc eventfooter {} { puts "
Action  Channel Programme Start Time Duration Mode
[$event get ulslot] [$event get usLcn]
[$event channel_name]
 

  $name " } else { puts "" } puts "[clock format $s -format "%a %d %b %Y"]
[clock format $s -format "%H:%M %Z"]" if {$d > 0 && $n > $s && $n < $e} { puts "
" set perc [expr [expr $n - $s] * 100 / $d] puts "" puts [progressbar $perc] } puts "
[clock format [$event get nduration] -format %T]$rsvicon $RKIcon\"Accepted 
" } set events [rsv list pending] if {[llength $events] > 0} { puts "

Pending Schedule Events

" eventheader pending foreach event $events {eventrow $event pending} eventfooter puts { } } puts "

Scheduled Events

" set events [rsv list] eventheader foreach event $events {eventrow $event} eventfooter puts { }