Compare commits
20 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3b8720c6d4 | ||
|
|
2fb26975e2 | ||
|
|
93f1b67ba1 | ||
|
|
6daa4e28f5 | ||
|
|
9a72e40c03 | ||
|
|
9b2f138fd9 | ||
|
|
22db1fbbd6 | ||
|
|
a9f4bd4f0b | ||
|
|
31688eaa1c | ||
|
|
926a49737a | ||
|
|
fbb64a2e9f | ||
|
|
ff322fdc39 | ||
|
|
d29ed50f7f | ||
|
|
7113208940 | ||
|
|
0b566bca72 | ||
|
|
f235b05026 | ||
|
|
af87e1a66e | ||
|
|
ed225ca751 | ||
|
|
cfb12b7da6 | ||
|
|
1d44efdcdc |
@@ -1,10 +1,10 @@
|
||||
Package: webif
|
||||
Priority: optional
|
||||
Section: web
|
||||
Version: 0.6.8-3
|
||||
Version: 0.7.2
|
||||
Architecture: mipsel
|
||||
Maintainer: af123@hummypkg.org.uk
|
||||
Depends: mongoose(>=3.0-2),jim(>=0.71-1),jim-sqlite3(>=0.71-1),jim-cgi(>=0.4),jim-oo,jim-pack,service-control,busybox(>=1.18.3-1),lsof,epg(>=1.0.3),hmt(>=1.0.6),ssmtp
|
||||
Depends: mongoose(>=3.0-2),jim(>=0.71-1),jim-sqlite3(>=0.71-1),jim-cgi(>=0.4),jim-oo,jim-pack,service-control,busybox(>=1.18.3-1),lsof,epg(>=1.0.4),hmt(>=1.0.6),ssmtp
|
||||
Replaces: af123-webif
|
||||
Conflicts: af123-webif
|
||||
Suggests: ffmpeg,webif-iphone
|
||||
|
||||
43
etc/init.d/S60parseepg
Executable file
@@ -0,0 +1,43 @@
|
||||
#!/bin/sh
|
||||
|
||||
export PATH=/mod/bin:/mod/usr/bin:/mod/bin/busybox:/bin:/sbin
|
||||
export LD_LIBRARY_PATH=/mod/lib:/lib:/usr/lib
|
||||
export TZ=GMT+0BST,M3.5.0/1,M10.5.0/2
|
||||
|
||||
if [ -f /mnt/hd1/dvbepg/epg.dat ]; then
|
||||
epg=/mnt/hd1/dvbepg/epg.dat
|
||||
epgdb=/mnt/hd1/epg.db
|
||||
else
|
||||
epg=/media/drive1/epgsavedata
|
||||
epgdb=/media/drive1/epg.db
|
||||
fi
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
(
|
||||
while [ 1 ]; do
|
||||
if [ -f $epgdb ]; then
|
||||
touch $epgdb.stamp
|
||||
now=`stat -c %Z $epgdb.stamp`
|
||||
dbstamp=`stat -c %Z $epgdb`
|
||||
age=`expr $now - $dbstamp`
|
||||
else
|
||||
age=99999
|
||||
fi
|
||||
echo "EPG Database age: $age"
|
||||
if [ $age -gt 28800 ]; then
|
||||
sleep 120
|
||||
echo "Generating EPG database..."
|
||||
/mod/bin/epg -f $epg sqlitedump $epgdb
|
||||
fi
|
||||
sleep 3712
|
||||
done
|
||||
) &
|
||||
;;
|
||||
stop)
|
||||
;;
|
||||
*)
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -27,7 +27,7 @@ $(document).ready(function() {
|
||||
});
|
||||
});
|
||||
$('#delete_button').click(function() {
|
||||
var backup = $('input.restore').val();
|
||||
var backup = $('input.restore:checked').val();
|
||||
if (confirm('Confirm deletion of ' + backup))
|
||||
{
|
||||
$('#results').load('/cgi-bin/backup/delete.jim?' +
|
||||
@@ -39,7 +39,7 @@ $(document).ready(function() {
|
||||
}
|
||||
});
|
||||
$('#restore_button').click(function() {
|
||||
var backup = $('input.restore').val();
|
||||
var backup = $('input.restore:checked').val();
|
||||
if (confirm('!!!!!!!!!!!!!!!!!!!!!!!!! PLEASE CONFIRM !!!!!!!!!!!!!!!!!!!!!!!!!\n\nAre you sure you wish to erase all scheduled recordings and favourite channels and then restore them from\n' + backup + '?'))
|
||||
{
|
||||
$('#restore_working').slideDown();
|
||||
|
||||
@@ -29,11 +29,11 @@ if {![file exists $ffile]} {
|
||||
}
|
||||
|
||||
if {[catch { set fd [open $ffile r] } msg]} {
|
||||
puts "Error opening backup file. - $msg"
|
||||
puts "Error opening <i>$file</i> - $msg"
|
||||
exit
|
||||
}
|
||||
|
||||
puts "Restoring scheduled events..."
|
||||
puts "Restoring scheduled events from <i>$file</i>..."
|
||||
|
||||
$rsvdb query {begin transaction;}
|
||||
$rsvdb query {delete from TBL_RESERVATION;}
|
||||
@@ -76,7 +76,11 @@ foreach line $data {
|
||||
}
|
||||
}
|
||||
|
||||
if {!$bad} { $rsv insert }
|
||||
if {!$bad} {
|
||||
if {[catch {$rsv insert pending 1} msg]} {
|
||||
puts " Error inserting event, $msg"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$rsvdb query {commit transaction;}
|
||||
|
||||
134
var/mongoose/cgi-bin/channel.jim
Executable file
@@ -0,0 +1,134 @@
|
||||
#!/mod/bin/jimsh
|
||||
|
||||
package require cgi
|
||||
package require sqlite3
|
||||
source /mod/var/mongoose/lib/setup
|
||||
require altrow progressbar epg.class
|
||||
|
||||
puts "Content-Type: text/html"
|
||||
puts ""
|
||||
|
||||
header
|
||||
|
||||
cgi_input
|
||||
|
||||
proc f2c {frequency} {
|
||||
set ch int($((($frequency / 1000) - 303.25) / 8))
|
||||
return [expr int($ch)]
|
||||
}
|
||||
|
||||
if {[catch {set db [sqlite3.open /var/lib/humaxtv/channel.db]} msg]} {
|
||||
puts "Error opening channel database: $msg"
|
||||
exit
|
||||
}
|
||||
|
||||
puts "
|
||||
<button id=expandall>Expand All</button>
|
||||
<button id=collapseall>Collapse All</button>
|
||||
<br><br>
|
||||
<table class=borders>
|
||||
<tr>
|
||||
<th>Channel</th>
|
||||
<th>Frequency</th>
|
||||
<th>Signal Strength</th>
|
||||
<th>Signal Quality</th>
|
||||
<th>Mux</th>
|
||||
<th>Channels</th>
|
||||
<th>>799</th>
|
||||
</tr>
|
||||
"
|
||||
foreach tw [$db query {
|
||||
select tsIdx, usTsID, ulFrequency, ucLevel, ucQuality
|
||||
from TBL_TS
|
||||
order by ulFrequency
|
||||
}] {
|
||||
lassign $tw x tsIdx x usTsID x ulFrequency x ucLevel x ucQuality
|
||||
|
||||
altrow
|
||||
puts "
|
||||
<td>[f2c $ulFrequency]</td>
|
||||
<td>[expr $ulFrequency / 1000.0] MHz</td>
|
||||
"
|
||||
puts "<td>[progressbar $ucLevel]</td>"
|
||||
puts "<td>[progressbar $ucQuality]</td>"
|
||||
|
||||
set channels [$db query {
|
||||
select usLcn, szSvcName, szPrvName, aucDefaultAuthority
|
||||
from TBL_SVC left join TBL_PRV using (prvIdx)
|
||||
where tsIdx = %s
|
||||
order by usLcn
|
||||
} $tsIdx]
|
||||
|
||||
set mux "???"
|
||||
set ehs 0
|
||||
foreach chan $channels {
|
||||
lassign $chan x lcn x name
|
||||
set name [string range $name 1 end]
|
||||
if {$lcn >= 800} { incr ehs }
|
||||
switch $name {
|
||||
"BBC ONE" { set mux "PSB1/BBC A" }
|
||||
"ITV1" { set mux "PSB2/D3&4" }
|
||||
"BBC One HD" { set mux "PSB3/BBC B (HD)" }
|
||||
"ITV3" { set mux "COM4/SDN" }
|
||||
"Dave" { set mux "COM5/ARQ A" }
|
||||
"Film4" { set mux "COM6/ARQ B" }
|
||||
}
|
||||
}
|
||||
puts "<td>$mux</td>"
|
||||
|
||||
puts "<td>[llength $channels]
|
||||
<a class=mchan ts=$tsIdx href=#>
|
||||
<img border=0 height=14
|
||||
src=/images/421_1_00_CH_Title_2R_Arrow.png>
|
||||
view
|
||||
</a></td>"
|
||||
puts "<td>$ehs</th>"
|
||||
puts "</tr>"
|
||||
puts "<tr id=mchan_$tsIdx class=mchan style=\"display: none\">
|
||||
<td colspan=5>"
|
||||
puts "<table style=\"margin-left: 5em\">"
|
||||
puts "<tr>
|
||||
<th colspan=3>Channel</th>
|
||||
<th>Provider</th>
|
||||
<th>Authority</th>
|
||||
</tr>"
|
||||
foreach chan $channels {
|
||||
lassign $chan x lcn x name x prv x auth
|
||||
set name [string range $name 1 end]
|
||||
set prv [string range $prv 3 end]
|
||||
altrow
|
||||
puts "<td class=va>"
|
||||
puts "[epg channelicon $name 50]</td>
|
||||
<td>$lcn</td><td>$name</td>"
|
||||
puts "</td><td>"
|
||||
puts $prv
|
||||
puts "</td><td>"
|
||||
puts $auth
|
||||
puts "</td>"
|
||||
puts "</tr>"
|
||||
}
|
||||
puts "</table>"
|
||||
puts "</td></tr>"
|
||||
}
|
||||
|
||||
puts "</table>"
|
||||
|
||||
puts {
|
||||
<script type=text/javascript>
|
||||
|
||||
$(document).ready(function() {
|
||||
$('a.mchan').click(function(e) {
|
||||
e.preventDefault();
|
||||
$('#mchan_' + $(this).attr('ts')).slideToggle('slow');
|
||||
});
|
||||
$('#expandall').button().click(function() {
|
||||
$('tr.mchan').slideDown('slow');
|
||||
});
|
||||
$('#collapseall').button().click(function() {
|
||||
$('tr.mchan').slideUp('slow');
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
}
|
||||
|
||||
@@ -8,6 +8,14 @@ require altrow
|
||||
puts "Content-Type: text/html"
|
||||
puts ""
|
||||
|
||||
set databases {
|
||||
/var/lib/humaxtv/rsvp.db
|
||||
/var/lib/humaxtv/rsv.db
|
||||
/var/lib/humaxtv/setup.db
|
||||
/var/lib/humaxtv/channel.db
|
||||
/mnt/hd2/dms_cds.db
|
||||
}
|
||||
|
||||
header
|
||||
|
||||
cgi_input
|
||||
@@ -62,11 +70,16 @@ proc db_info {db_file} {
|
||||
$db close
|
||||
}
|
||||
|
||||
db_info /var/lib/humaxtv/rsvp.db
|
||||
db_info /var/lib/humaxtv/rsv.db
|
||||
db_info /var/lib/humaxtv/setup.db
|
||||
db_info /var/lib/humaxtv/channel.db
|
||||
db_info /mnt/hd2/dms_cds.db
|
||||
if {$fdb == 0} {
|
||||
puts "Please choose database to view:<ul>"
|
||||
foreach db $databases {
|
||||
puts "<li><a href=$::env(REQUEST_URI)?db=[file tail $db]>
|
||||
$db</a></li>"
|
||||
}
|
||||
puts "</ul>"
|
||||
} else {
|
||||
foreach db $databases { db_info $db }
|
||||
}
|
||||
|
||||
footer
|
||||
|
||||
|
||||
@@ -10,10 +10,6 @@ puts ""
|
||||
cgi_input
|
||||
#cgi_dump
|
||||
|
||||
#set _cgi(service) 4170
|
||||
#set _cgi(event) 38584
|
||||
#set _cgi(type) 2
|
||||
|
||||
if {![dict exists $_cgi service] || ![dict exists $_cgi event]} {
|
||||
puts "Error, insufficient parameters passed."
|
||||
exit
|
||||
@@ -35,47 +31,11 @@ if {[$event percent] > 0} {
|
||||
exit
|
||||
}
|
||||
|
||||
$event get_channel_info
|
||||
|
||||
set args {}
|
||||
|
||||
set args(ersvtype) 3
|
||||
set args(hsvc) [$event get channel_hsvc]
|
||||
set args(nsttime) [$event get start]
|
||||
set args(nduration) [$event get duration]
|
||||
set args(usevtid) [$event get event_id]
|
||||
set args(szevtname) "\025[$event get name]"
|
||||
set args(eReady) 30
|
||||
|
||||
set ccrid [$event get channel_crid]
|
||||
|
||||
if {$type == 1} {
|
||||
# Event
|
||||
set args(ucCRIDType) 49
|
||||
set args(ucRecKind) 1
|
||||
set args(szCRID) "$ccrid[$event get event_crid]"
|
||||
set args(szEventToRecord) "1$args(szCRID)|"
|
||||
set r [rsv construct $event $type]
|
||||
if {[catch {$r insert} msg]} {
|
||||
puts "Error encountered while scheduling: <i>$msg</i>"
|
||||
} else {
|
||||
# Series
|
||||
set args(ucCRIDType) 50
|
||||
set args(ucRecKind) 4
|
||||
set args(szCRID) "$ccrid[$event get series_crid]"
|
||||
set args(szFPBRecPath) "$args(szevtname)"
|
||||
set progs [lmap i [epg fetch dump -scrid [$event get series_crid]] {
|
||||
if {[set ecrid [$i get event_crid]] eq ""} { continue }
|
||||
list "1$::ccrid$ecrid"
|
||||
}]
|
||||
set args(szEventToRecord) "[join $progs "|"]|"
|
||||
}
|
||||
|
||||
#puts $args
|
||||
|
||||
set msg ""
|
||||
#if {![file exists /mod/.schedule.testing]} { set msg "Disabled during testing" }
|
||||
if {$msg ne "" || [catch {[rsv new $args] insert} msg]} {
|
||||
puts "Error encountered while scheduling the recording: <i>$msg</i>"
|
||||
} else {
|
||||
puts "Successfully scheduled recording of <i>[$event get name]</i>"
|
||||
puts "Successfully scheduled <i>[$event get name]</i>"
|
||||
system restartpending
|
||||
}
|
||||
|
||||
|
||||
@@ -9,6 +9,8 @@ puts ""
|
||||
|
||||
header
|
||||
|
||||
require totop
|
||||
|
||||
puts "<script type=text/javascript src=/js/jquery.highlight.js></script>"
|
||||
|
||||
cgi_input
|
||||
|
||||
@@ -9,6 +9,8 @@ puts ""
|
||||
|
||||
header
|
||||
|
||||
require totop
|
||||
|
||||
[spinner new {
|
||||
text "Loading EPG Data..."
|
||||
size "1.2em"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
package require cgi
|
||||
source /mod/var/mongoose/lib/setup
|
||||
require rsv.class
|
||||
require rsv.class system.class
|
||||
|
||||
puts "Content-Type: text/html"
|
||||
puts ""
|
||||
@@ -24,3 +24,5 @@ $event clear_ulslot
|
||||
$event set_delete
|
||||
$event insert
|
||||
|
||||
system restartpending
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
package require cgi
|
||||
source /mod/var/mongoose/lib/setup
|
||||
require rsv.class
|
||||
require rsv.class progressbar
|
||||
|
||||
puts "Content-Type: text/html"
|
||||
puts ""
|
||||
|
||||
@@ -16,6 +16,7 @@ set settings [settings new]
|
||||
set hostname [$settings hostname]
|
||||
set smtp_server [$settings smtp_server]
|
||||
set channel_group [$settings channel_group]
|
||||
set epg_style [$settings epg_style]
|
||||
set pkgdev [$settings pkgdev]
|
||||
|
||||
# Handle updates
|
||||
@@ -51,6 +52,7 @@ proc handle_str_update {var old {text "Value"}} {
|
||||
handle_str_update hostname $hostname Hostname
|
||||
_handle_update ascii smtp_server $smtp_server "SMTP Server"
|
||||
handle_int_update channel_group $channel_group "Channel Group"
|
||||
handle_str_update epg_style $epg_style "EPG Type"
|
||||
if {[dict exists $_cgi pkgdevoff] && ![dict exists $_cgi pkgdev]} {
|
||||
set _cgi(pkgdev) 0
|
||||
}
|
||||
@@ -107,13 +109,36 @@ puts "
|
||||
</tr>
|
||||
"
|
||||
|
||||
puts "
|
||||
<tr>
|
||||
<form class=auto id=epg_style method=get action=$env(REQUEST_URI)>
|
||||
<th class=key>Default Now/Next style</th>
|
||||
<td><select id=epg_style name=epg_style
|
||||
class=\"text ui-widget-content ui-corner-all\">
|
||||
"
|
||||
puts "<option value=standard"
|
||||
if {$epg_style ne "grid"} { puts " selected" }
|
||||
puts ">Standard\n"
|
||||
puts "<option value=grid"
|
||||
if {$epg_style eq "grid"} { puts " selected" }
|
||||
puts ">Grid\n"
|
||||
puts "
|
||||
</select>
|
||||
<small>
|
||||
<input name=epg_style value=\"set\" type=submit>
|
||||
</small>
|
||||
<div id=epg_style_output></div>
|
||||
</td>
|
||||
</form>
|
||||
</tr>
|
||||
"
|
||||
|
||||
puts "
|
||||
<tr>
|
||||
<form class=auto id=channel_group method=get action=$env(REQUEST_URI)>
|
||||
<th class=key>Channel Group for EPG</th>
|
||||
<td><select id=channel_group name=channel_group
|
||||
class=\"text ui-widget-content ui-corner-all\"
|
||||
value=[$settings channel_group]>
|
||||
class=\"text ui-widget-content ui-corner-all\">
|
||||
"
|
||||
|
||||
set i 0
|
||||
|
||||
226
var/mongoose/cgi-bin/xepg.jim
Executable file
@@ -0,0 +1,226 @@
|
||||
#!/mod/bin/jimsh
|
||||
|
||||
package require cgi
|
||||
source /mod/var/mongoose/lib/setup
|
||||
|
||||
puts "Content-Type: text/html"
|
||||
puts ""
|
||||
header
|
||||
|
||||
require epg.class spinner.class altrow epg_search totop
|
||||
|
||||
cgi_input
|
||||
|
||||
puts {<link type="text/css" href="/css/xepg.css" rel="Stylesheet" />}
|
||||
|
||||
[spinner new {
|
||||
text "Loading Now/Next Information..."
|
||||
size "1.2em"
|
||||
style "margin: 1em;"
|
||||
}] start
|
||||
|
||||
require epg_popup
|
||||
|
||||
set stt [cgi_get stt [clock seconds]]
|
||||
if {$stt <= [clock seconds]} {
|
||||
set stt [clock seconds]
|
||||
set current 1
|
||||
} else {
|
||||
set current 0
|
||||
}
|
||||
|
||||
set favlist [epg favlist]
|
||||
|
||||
set hours 4.0
|
||||
set seconds $($hours * 3600)
|
||||
|
||||
set ostt $stt
|
||||
set stt [expr int($stt / 1800.0) * 1800]
|
||||
|
||||
set ett $(int($stt + $seconds))
|
||||
set offset $(($ostt - $stt) / 1800.0)
|
||||
|
||||
set chanpx 120
|
||||
set eventpx 780
|
||||
set totalpx $($chanpx + $eventpx)
|
||||
|
||||
set hourpx $($eventpx / $hours)
|
||||
set minpx $($hourpx / 60.0)
|
||||
set secpx $($minpx / 60.0)
|
||||
|
||||
set start [clock milliseconds]
|
||||
if {$::qepg} {
|
||||
set records [epg dbfetch dump -trange "$stt:$ett"]
|
||||
} else {
|
||||
require channelsort
|
||||
set records [channelsort [epg fetch dump -trange "$stt:$ett"]]
|
||||
}
|
||||
set got [clock milliseconds]
|
||||
|
||||
puts "<div id=buttons style=\"width: $eventpx; margin-left: ${chanpx}px;\">"
|
||||
if {$stt > [clock seconds]} {
|
||||
puts "<button id=earlier><<< Earlier</button>"
|
||||
}
|
||||
puts "<button id=later>Later >>></button>"
|
||||
puts "</div>"
|
||||
|
||||
puts "
|
||||
<div id=xepg> <div id=xepgnow></div>
|
||||
<div id=xegrid>
|
||||
"
|
||||
|
||||
puts "<div id=epgdate style=\"width: ${eventpx}px; margin-left: ${chanpx}px;\">"
|
||||
puts [clock format $stt -format {%a %D}]
|
||||
puts "</div>"
|
||||
|
||||
puts "<div class=xechan style=\"width: ${chanpx}px;\"> </div>"
|
||||
for {set i 0} {$i < $hours * 2} {incr i} {
|
||||
puts "<div class=xetime id=xe$i
|
||||
style=\"width: [expr $minpx * 30]px\">"
|
||||
puts "[clock format $($stt + 1800 * $i) -format "%H:%M"]</div>"
|
||||
}
|
||||
|
||||
set lim 0
|
||||
set lcn 0
|
||||
set bg "odd"
|
||||
|
||||
foreach e $records {
|
||||
if {$favlist != "" && [$e get service_id] ni $favlist} {
|
||||
continue
|
||||
}
|
||||
set chnum [$e get channel_num]
|
||||
if {$chnum == 0} { continue }
|
||||
|
||||
if {$chnum != $lcn} {
|
||||
puts "<div class=xechan style=\"width: ${chanpx}px;\">"
|
||||
|
||||
puts "[$e channel_icon 30] "
|
||||
puts "$chnum
|
||||
<a href=/cgi-bin/epg_service.jim?service=[$e get service_id]>
|
||||
[$e get channel_name]
|
||||
</a></div>"
|
||||
|
||||
set lcn $chnum
|
||||
set le 0
|
||||
set pos 0
|
||||
if {$bg eq "odd"} { set bg "even" } else { set bg "odd" }
|
||||
}
|
||||
|
||||
set es [$e get start]
|
||||
set ee [expr $es + [$e get duration]]
|
||||
|
||||
if {$es < $le} continue
|
||||
|
||||
if {$es < $stt} { set es $stt }
|
||||
if {$ee > $ett} { set ee $ett }
|
||||
set le $ee
|
||||
|
||||
set left [expr int(($es - $stt) * $secpx)]
|
||||
set right [expr int(($ee - $stt - 1) * $secpx)]
|
||||
set px $($right - $left)
|
||||
if {$pos < $left} {
|
||||
set px $($px + $left - $pos - 1)
|
||||
} elseif {$pos > $left} {
|
||||
set px $($px - ($pos - $left - 1))
|
||||
}
|
||||
incr pos $px
|
||||
|
||||
$e process_sched
|
||||
|
||||
set recopts 1
|
||||
if {[$e get series_crid] ne ""} { set recopts 2 }
|
||||
|
||||
set perc [$e percent]
|
||||
set showing 0
|
||||
if {$perc > 0 && $perc < 100} { set showing 1 }
|
||||
|
||||
set txt "[cgi_quote_html [$e get name]] <span>([\
|
||||
clock format $es -format "%H:%M"] - [\
|
||||
clock format $ee -format "%H:%M"])"
|
||||
if {$showing} { append txt " ($perc%)" }
|
||||
append txt "</span>"
|
||||
|
||||
set htxt "[cgi_quote_html [$e get name]] ([\
|
||||
clock format $es -format "%H:%M"] - [\
|
||||
clock format $ee -format "%H:%M"])"
|
||||
if {$showing} { append hxt " ($perc%)" }
|
||||
|
||||
puts "<div class=\"xeprog $bg\"
|
||||
style=\"width: [expr $px - 4]px;\" title=\"$htxt\">
|
||||
<a class=event href=# xs=[$e get service_id]
|
||||
xe=[$e get event_id] sch=[$e get sched_type]
|
||||
rec=$recopts>"
|
||||
puts $txt
|
||||
puts "</a>"
|
||||
puts "</div>"
|
||||
}
|
||||
puts "<div id=keypos style=\"float: left; clear: left;\"></div>"
|
||||
puts "</div>"
|
||||
puts "</div>"
|
||||
|
||||
set earlier $($stt - 3600 * 4)
|
||||
|
||||
puts "
|
||||
|
||||
<div style=\"clear: both;\">
|
||||
<small><button id=epgswitch>
|
||||
Switch to standard now/next display.
|
||||
</button></small>
|
||||
</div>
|
||||
|
||||
<script type=text/javascript>
|
||||
\$(document).ready(function() {
|
||||
|
||||
\$('#epgswitch').button().click(function() {
|
||||
window.location = '/epg.shtml';
|
||||
});
|
||||
\$('#earlier').button().click(function() {
|
||||
window.location = '/cgi-bin/xepg.jim?stt=$earlier';
|
||||
});
|
||||
\$('#later').button().click(function() {
|
||||
window.location = '/cgi-bin/xepg.jim?stt=$ett';
|
||||
});
|
||||
"
|
||||
|
||||
if {$current} {
|
||||
puts {
|
||||
|
||||
var kt = $('#xe0');
|
||||
var ktpos = kt.position();
|
||||
|
||||
var height = $('#keypos').position().top - ktpos.top;
|
||||
|
||||
}
|
||||
puts "var nowpos = ktpos.left + (kt.width() * $offset);"
|
||||
puts {
|
||||
if (window.console)
|
||||
console.log('NOWPOS: %d', nowpos);
|
||||
$('#xepgnow')
|
||||
.css('left', nowpos + 'px')
|
||||
.css('top', ktpos.top)
|
||||
.height(height)
|
||||
.show('slow');
|
||||
}
|
||||
}
|
||||
|
||||
puts "
|
||||
});
|
||||
</script>
|
||||
"
|
||||
|
||||
puts "
|
||||
<a href=/cgi-bin/settings.jim>
|
||||
<img border=0 height=14 src=/images/421_1_00_CH_Title_2R_Arrow.png>
|
||||
Visit settings to change EPG options.
|
||||
</a><br>
|
||||
"
|
||||
|
||||
set end [clock milliseconds]
|
||||
puts "<font class=footnote>
|
||||
Retrieved in: [expr [expr $got - $start] / 1000.0] seconds.
|
||||
</font>"
|
||||
|
||||
epg cleanup
|
||||
|
||||
footer
|
||||
|
||||
@@ -70,13 +70,13 @@ table.borders, table.borders td, table.borders th
|
||||
empty-cells: show;
|
||||
}
|
||||
|
||||
table tr.odd, table td.odd, table th.odd
|
||||
.odd
|
||||
{
|
||||
background: #ccff99;
|
||||
color: black;
|
||||
}
|
||||
|
||||
table tr.even, table td.even, table th.even
|
||||
.even
|
||||
{
|
||||
background: #ffffcc;
|
||||
color: black;
|
||||
|
||||
30
var/mongoose/html/css/ui.totop.css
Normal file
@@ -0,0 +1,30 @@
|
||||
|
||||
#toTop {
|
||||
background: url("/img//ui.totop.png") no-repeat scroll left top transparent;
|
||||
border: medium none;
|
||||
bottom: 110px;
|
||||
display: none;
|
||||
height: 51px;
|
||||
margin-left: 50px;
|
||||
overflow: hidden;
|
||||
position: fixed;
|
||||
text-decoration: none;
|
||||
text-indent: -999px;
|
||||
width: 77px;
|
||||
z-index: 2000;
|
||||
}
|
||||
|
||||
#toTopHover {
|
||||
background: url("/img/ui.totop.png") no-repeat scroll left -51px transparent;
|
||||
display: block;
|
||||
float: left;
|
||||
height: 51px;
|
||||
opacity: 0;
|
||||
overflow: hidden;
|
||||
width: 77px;
|
||||
}
|
||||
|
||||
#toTop:active, #toTop:focus {
|
||||
outline: medium none;
|
||||
}
|
||||
|
||||
113
var/mongoose/html/css/xepg.css
Normal file
@@ -0,0 +1,113 @@
|
||||
div#xepg
|
||||
{
|
||||
position: relative;
|
||||
}
|
||||
|
||||
div#xepgnow
|
||||
{
|
||||
display: none;
|
||||
position: absolute;
|
||||
width: 2px;
|
||||
height: 100%;
|
||||
background: yellow;
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
z-index: 9999;
|
||||
box-shadow: 2px 2px 11px #666;
|
||||
-moz-box-shadow: 2px 2px 11px #666;
|
||||
-webkit-box-shadow: 2px 2px 11px #666;
|
||||
opacity:0.7;
|
||||
/*filter:alpha(opacity=70);*/
|
||||
}
|
||||
|
||||
div.xetick
|
||||
{
|
||||
display: none;
|
||||
position: absolute;
|
||||
width: 1px;
|
||||
height: 100%;
|
||||
background: #ccc;
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
/*
|
||||
z-index: 9999;
|
||||
box-shadow: 2px 2px 11px #666;
|
||||
-moz-box-shadow: 2px 2px 11px #666;
|
||||
-webkit-box-shadow: 2px 2px 11px #666;
|
||||
opacity:0.7;
|
||||
*/
|
||||
/*filter:alpha(opacity=70);*/
|
||||
}
|
||||
|
||||
div#epgdate
|
||||
{
|
||||
border-left: 1px solid #669933;
|
||||
border-right: 1px solid #669933;
|
||||
border-top: 1px solid #669933;
|
||||
clear: left;
|
||||
float: left;
|
||||
}
|
||||
|
||||
/*
|
||||
div#xegrid
|
||||
{
|
||||
}
|
||||
*/
|
||||
|
||||
div.xerow
|
||||
{
|
||||
}
|
||||
|
||||
div.xechan
|
||||
{
|
||||
vertical-align: middle;
|
||||
float: left;
|
||||
clear: left;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
height: 25px;
|
||||
padding: 3px 0;
|
||||
margin: 3px 0;
|
||||
}
|
||||
|
||||
div.xechan img
|
||||
{
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
div.xetime
|
||||
{
|
||||
float: left;
|
||||
border-left: 1px solid #669933;
|
||||
}
|
||||
|
||||
div.xeprog
|
||||
{
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
float: left;
|
||||
vertical-align: middle;
|
||||
height: 25px;
|
||||
padding: 4px 0 3px 2px;
|
||||
margin: 3px 0 3px 2px;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 10px;
|
||||
-moz-border-radius: 10px;
|
||||
}
|
||||
|
||||
div.xeprog span
|
||||
{
|
||||
font-style: italic;
|
||||
font-size: 0.7em;
|
||||
}
|
||||
|
||||
div#buttons
|
||||
{
|
||||
padding: 0.5em;
|
||||
}
|
||||
|
||||
button#later
|
||||
{
|
||||
margin-left: 2em;
|
||||
}
|
||||
|
||||
1
var/mongoose/html/img/channels/1-2-1 Dating.png
Symbolic link
@@ -0,0 +1 @@
|
||||
blank.png
|
||||
|
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 5.4 KiB |
BIN
var/mongoose/html/img/channels/5_.png
Normal file
|
After Width: | Height: | Size: 5.4 KiB |
BIN
var/mongoose/html/img/channels/ADULT Babestn2.png
Normal file
|
After Width: | Height: | Size: 8.4 KiB |
BIN
var/mongoose/html/img/channels/ADULT Blue.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
var/mongoose/html/img/channels/ADULT Filth.png
Normal file
|
After Width: | Height: | Size: 5.3 KiB |
BIN
var/mongoose/html/img/channels/ADULT PARTY.png
Normal file
|
After Width: | Height: | Size: 4.5 KiB |
BIN
var/mongoose/html/img/channels/ADULT redhotTV.png
Normal file
|
After Width: | Height: | Size: 5.0 KiB |
BIN
var/mongoose/html/img/channels/BBC Radio Cymru.png
Normal file
|
After Width: | Height: | Size: 6.2 KiB |
BIN
var/mongoose/html/img/channels/BBC Radio Wales.png
Normal file
|
After Width: | Height: | Size: 6.3 KiB |
1
var/mongoose/html/img/channels/CONNECT.png
Symbolic link
@@ -0,0 +1 @@
|
||||
blank.png
|
||||
BIN
var/mongoose/html/img/channels/Capital FM.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 4.0 KiB |
|
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 6.7 KiB |
BIN
var/mongoose/html/img/channels/Really.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
1
var/mongoose/html/img/channels/S4/C.png
Symbolic link
@@ -0,0 +1 @@
|
||||
../S4C.png
|
||||
BIN
var/mongoose/html/img/channels/S4C Clirlun.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
1
var/mongoose/html/img/channels/STREAM.png
Symbolic link
@@ -0,0 +1 @@
|
||||
blank.png
|
||||
1
var/mongoose/html/img/channels/Sky Text.png
Symbolic link
@@ -0,0 +1 @@
|
||||
blank.png
|
||||
1
var/mongoose/html/img/channels/The Jewellery Channel.png
Symbolic link
@@ -0,0 +1 @@
|
||||
blank.png
|
||||
1
var/mongoose/html/img/channels/VISION.png
Symbolic link
@@ -0,0 +1 @@
|
||||
blank.png
|
||||
|
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 6.0 KiB |
BIN
var/mongoose/html/img/channels/blank.png
Normal file
|
After Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 6.8 KiB |
BIN
var/mongoose/html/img/ui.totop.png
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
@@ -48,11 +48,11 @@ $(document).ready(function() {
|
||||
</div>
|
||||
<div style="float: left">
|
||||
<center>
|
||||
<a href=/epg.shtml>
|
||||
<a href=<!--#exec cmd="/mod/var/mongoose/include/epgloc.jim" -->>
|
||||
<img src=/images/328_1_26_Menu_TV_Guide.png border=0 width=217 height=228>
|
||||
</a>
|
||||
<br>
|
||||
<a href=/epg.shtml>
|
||||
<a href=<!--#exec cmd="/mod/var/mongoose/include/epgloc.jim" -->>
|
||||
<b>EPG</b>
|
||||
</a>
|
||||
<br>
|
||||
@@ -111,6 +111,8 @@ $(document).ready(function() {
|
||||
<div class=footer>
|
||||
<ul>
|
||||
<li>
|
||||
<a href=/cgi-bin/channel.jim>Channel Information</a>
|
||||
</li><li>
|
||||
<a href=/cgi-bin/db.jim target=_blank>SQLite3 Database Dump</a>
|
||||
</li><li>
|
||||
<a href=/jim/ref.html target=_blank>Jim Reference Manual</a> |
|
||||
@@ -118,6 +120,7 @@ $(document).ready(function() {
|
||||
<a href=/jim/sqlite.html target=_blank>Sqlite</a>
|
||||
</li>
|
||||
</ul>
|
||||
<!--#exec cmd="/mod/var/mongoose/include/modversion.jim" -->
|
||||
</div>
|
||||
|
||||
<!--#include virtual="/lib/footer.shtml" -->
|
||||
|
||||
142
var/mongoose/html/js/easing.js
Normal file
@@ -0,0 +1,142 @@
|
||||
|
||||
/*
|
||||
* jQuery EasIng v1.1.2 - http://gsgd.co.uk/sandbox/jquery.easIng.php
|
||||
*
|
||||
* Uses the built In easIng capabilities added In jQuery 1.1
|
||||
* to offer multiple easIng options
|
||||
*
|
||||
* Copyright (c) 2007 George Smith
|
||||
* Licensed under the MIT License:
|
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
*/
|
||||
|
||||
// t: current time, b: begInnIng value, c: change In value, d: duration
|
||||
|
||||
jQuery.extend( jQuery.easing,
|
||||
{
|
||||
easeInQuad: function (x, t, b, c, d) {
|
||||
return c*(t/=d)*t + b;
|
||||
},
|
||||
easeOutQuad: function (x, t, b, c, d) {
|
||||
return -c *(t/=d)*(t-2) + b;
|
||||
},
|
||||
easeInOutQuad: function (x, t, b, c, d) {
|
||||
if ((t/=d/2) < 1) return c/2*t*t + b;
|
||||
return -c/2 * ((--t)*(t-2) - 1) + b;
|
||||
},
|
||||
easeInCubic: function (x, t, b, c, d) {
|
||||
return c*(t/=d)*t*t + b;
|
||||
},
|
||||
easeOutCubic: function (x, t, b, c, d) {
|
||||
return c*((t=t/d-1)*t*t + 1) + b;
|
||||
},
|
||||
easeInOutCubic: function (x, t, b, c, d) {
|
||||
if ((t/=d/2) < 1) return c/2*t*t*t + b;
|
||||
return c/2*((t-=2)*t*t + 2) + b;
|
||||
},
|
||||
easeInQuart: function (x, t, b, c, d) {
|
||||
return c*(t/=d)*t*t*t + b;
|
||||
},
|
||||
easeOutQuart: function (x, t, b, c, d) {
|
||||
return -c * ((t=t/d-1)*t*t*t - 1) + b;
|
||||
},
|
||||
easeInOutQuart: function (x, t, b, c, d) {
|
||||
if ((t/=d/2) < 1) return c/2*t*t*t*t + b;
|
||||
return -c/2 * ((t-=2)*t*t*t - 2) + b;
|
||||
},
|
||||
easeInQuint: function (x, t, b, c, d) {
|
||||
return c*(t/=d)*t*t*t*t + b;
|
||||
},
|
||||
easeOutQuint: function (x, t, b, c, d) {
|
||||
return c*((t=t/d-1)*t*t*t*t + 1) + b;
|
||||
},
|
||||
easeInOutQuint: function (x, t, b, c, d) {
|
||||
if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b;
|
||||
return c/2*((t-=2)*t*t*t*t + 2) + b;
|
||||
},
|
||||
easeInSine: function (x, t, b, c, d) {
|
||||
return -c * Math.cos(t/d * (Math.PI/2)) + c + b;
|
||||
},
|
||||
easeOutSine: function (x, t, b, c, d) {
|
||||
return c * Math.sin(t/d * (Math.PI/2)) + b;
|
||||
},
|
||||
easeInOutSine: function (x, t, b, c, d) {
|
||||
return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b;
|
||||
},
|
||||
easeInExpo: function (x, t, b, c, d) {
|
||||
return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b;
|
||||
},
|
||||
easeOutExpo: function (x, t, b, c, d) {
|
||||
return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
|
||||
},
|
||||
easeInOutExpo: function (x, t, b, c, d) {
|
||||
if (t==0) return b;
|
||||
if (t==d) return b+c;
|
||||
if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;
|
||||
return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;
|
||||
},
|
||||
easeInCirc: function (x, t, b, c, d) {
|
||||
return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b;
|
||||
},
|
||||
easeOutCirc: function (x, t, b, c, d) {
|
||||
return c * Math.sqrt(1 - (t=t/d-1)*t) + b;
|
||||
},
|
||||
easeInOutCirc: function (x, t, b, c, d) {
|
||||
if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b;
|
||||
return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b;
|
||||
},
|
||||
easeInElastic: function (x, t, b, c, d) {
|
||||
var s=1.70158;var p=0;var a=c;
|
||||
if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;
|
||||
if (a < Math.abs(c)) { a=c; var s=p/4; }
|
||||
else var s = p/(2*Math.PI) * Math.asin (c/a);
|
||||
return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
|
||||
},
|
||||
easeOutElastic: function (x, t, b, c, d) {
|
||||
var s=1.70158;var p=0;var a=c;
|
||||
if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;
|
||||
if (a < Math.abs(c)) { a=c; var s=p/4; }
|
||||
else var s = p/(2*Math.PI) * Math.asin (c/a);
|
||||
return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;
|
||||
},
|
||||
easeInOutElastic: function (x, t, b, c, d) {
|
||||
var s=1.70158;var p=0;var a=c;
|
||||
if (t==0) return b; if ((t/=d/2)==2) return b+c; if (!p) p=d*(.3*1.5);
|
||||
if (a < Math.abs(c)) { a=c; var s=p/4; }
|
||||
else var s = p/(2*Math.PI) * Math.asin (c/a);
|
||||
if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
|
||||
return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b;
|
||||
},
|
||||
easeInBack: function (x, t, b, c, d, s) {
|
||||
if (s == undefined) s = 1.70158;
|
||||
return c*(t/=d)*t*((s+1)*t - s) + b;
|
||||
},
|
||||
easeOutBack: function (x, t, b, c, d, s) {
|
||||
if (s == undefined) s = 1.70158;
|
||||
return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
|
||||
},
|
||||
easeInOutBack: function (x, t, b, c, d, s) {
|
||||
if (s == undefined) s = 1.70158;
|
||||
if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
|
||||
return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
|
||||
},
|
||||
easeInBounce: function (x, t, b, c, d) {
|
||||
return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b;
|
||||
},
|
||||
easeOutBounce: function (x, t, b, c, d) {
|
||||
if ((t/=d) < (1/2.75)) {
|
||||
return c*(7.5625*t*t) + b;
|
||||
} else if (t < (2/2.75)) {
|
||||
return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
|
||||
} else if (t < (2.5/2.75)) {
|
||||
return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
|
||||
} else {
|
||||
return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
|
||||
}
|
||||
},
|
||||
easeInOutBounce: function (x, t, b, c, d) {
|
||||
if (t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b;
|
||||
return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b;
|
||||
}
|
||||
});
|
||||
|
||||
@@ -33,7 +33,8 @@ jQuery.ajaxPrefilter(function(options, _, jqXHR) {
|
||||
}
|
||||
}
|
||||
} catch(e) {
|
||||
alert(e);
|
||||
if (window.console)
|
||||
console.log(e);
|
||||
}
|
||||
}, options.progressInterval);
|
||||
|
||||
|
||||
60
var/mongoose/html/js/jquery.ui.totop.js
vendored
Normal file
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| UItoTop jQuery Plugin 1.1
|
||||
| http://www.mattvarone.com/web-design/uitotop-jquery-plugin/
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
(function($){
|
||||
$.fn.UItoTop = function(options) {
|
||||
|
||||
var defaults = {
|
||||
text: 'To Top',
|
||||
min: 400,
|
||||
|
||||
inDelay:600,
|
||||
outDelay:300,
|
||||
containerID: 'toTop',
|
||||
containerHoverID: 'toTopHover',
|
||||
scrollSpeed: 1000,
|
||||
easingType: 'linear'
|
||||
};
|
||||
|
||||
var settings = $.extend(defaults, options);
|
||||
var containerIDhash = '#' + settings.containerID;
|
||||
var containerHoverIDHash = '#'+settings.containerHoverID;
|
||||
|
||||
$('body').append('<a href="#" id="'+settings.containerID+'">'+settings.text+'</a>');
|
||||
$(containerIDhash).hide().click(function(){
|
||||
$('html, body').animate({scrollTop:0}, settings.scrollSpeed, settings.easingType);
|
||||
$('#'+settings.containerHoverID, this).stop().animate({'opacity': 0 }, settings.inDelay, settings.easingType);
|
||||
return false;
|
||||
})
|
||||
.prepend('<span id="'+settings.containerHoverID+'"></span>')
|
||||
.hover(function() {
|
||||
$(containerHoverIDHash, this).stop().animate({
|
||||
'opacity': 1
|
||||
}, 300, 'linear');
|
||||
}, function() {
|
||||
$(containerHoverIDHash, this).stop().animate({
|
||||
'opacity': 0
|
||||
}, 600, 'linear');
|
||||
});
|
||||
|
||||
$(window).scroll(function() {
|
||||
var sd = $(window).scrollTop();
|
||||
if(typeof document.body.style.maxHeight === "undefined") {
|
||||
$(containerIDhash).css({
|
||||
'position': 'absolute',
|
||||
'left': 20,
|
||||
'top': $(window).scrollTop() + $(window).height() - 50
|
||||
});
|
||||
}
|
||||
if ( sd > settings.min )
|
||||
$(containerIDhash).fadeIn(settings.inDelay);
|
||||
else
|
||||
$(containerIDhash).fadeOut(settings.Outdelay);
|
||||
});
|
||||
|
||||
};
|
||||
})(jQuery);
|
||||
@@ -1,4 +1,5 @@
|
||||
puts {
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<title>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<title><!--#exec cmd="/mod/var/mongoose/include/model.jim" --></title>
|
||||
|
||||
@@ -42,7 +42,7 @@ Update package list from Internet
|
||||
<div id=dspinner><img border=0 src=/img/loading.gif>Processing request...</div>
|
||||
</div>
|
||||
|
||||
<script type=text/javascript src=/js/iajax.js></script>
|
||||
<!-- <script type=text/javascript src=/js/iajax.js></script> -->
|
||||
<script type=text/javascript>
|
||||
|
||||
var opkg = '/cgi-bin/opkg.jim?cmd=';
|
||||
@@ -71,35 +71,38 @@ $(document).ready(function() {
|
||||
close: function(e,u) { window.location.reload(true); }
|
||||
});
|
||||
|
||||
jQuery.ajaxSetup({progressInterval: 1});
|
||||
|
||||
function loaddata(data, isfinal)
|
||||
{
|
||||
console.log('loaddata called, final=' + isfinal);
|
||||
console.log('Data: ' + data);
|
||||
$('#dresults').append(data);
|
||||
if (isfinal)
|
||||
$('#dspinner').hide('slow');
|
||||
}
|
||||
// jQuery.ajaxSetup({progressInterval: 1});
|
||||
//
|
||||
// function loaddata(data, isfinal)
|
||||
// {
|
||||
// console.log('loaddata called, final=' + isfinal);
|
||||
// console.log('Data: ' + data);
|
||||
// $('#dresults').append(data);
|
||||
// if (isfinal)
|
||||
// $('#dspinner').hide('slow');
|
||||
// }
|
||||
|
||||
function execopkg(arg)
|
||||
{
|
||||
$('#dspinner').show();
|
||||
$dialog.dialog('open');
|
||||
$('#dresults').empty();
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: opkg + arg,
|
||||
progress: loaddata,
|
||||
success: function(data) {
|
||||
console.log("ajax success");
|
||||
loaddata(data, true);
|
||||
},
|
||||
error: function(_, _, e) {
|
||||
console.log("ajax error");
|
||||
alert(e);
|
||||
}
|
||||
$('#dresults').load(opkg + arg, function() {
|
||||
$('#dspinner').hide('slow');
|
||||
});
|
||||
// $('#dresults').empty();
|
||||
// $.ajax({
|
||||
// type: "GET",
|
||||
// url: opkg + arg,
|
||||
// progress: loaddata,
|
||||
// success: function(data) {
|
||||
// console.log("ajax success");
|
||||
// loaddata(data, true);
|
||||
// },
|
||||
// error: function(_, _, e) {
|
||||
// console.log("ajax error");
|
||||
// alert(e);
|
||||
// }
|
||||
// });
|
||||
}
|
||||
|
||||
function setup_buttons()
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
package require cgi
|
||||
source /mod/var/mongoose/lib/setup
|
||||
require epg.class spinner.class altrow epg_search
|
||||
require epg.class spinner.class altrow epg_search totop
|
||||
|
||||
[spinner new {
|
||||
text "Loading Now/Next Information..."
|
||||
@@ -13,51 +13,60 @@ require epg.class spinner.class altrow epg_search
|
||||
require epg_popup
|
||||
|
||||
set start [clock milliseconds]
|
||||
set records [epg fetch dump -time [clock seconds]]
|
||||
set now [clock seconds]
|
||||
set then $($now + 14400)
|
||||
if {$::qepg} {
|
||||
set records [epg dbfetch dump -trange "$now:$then"]
|
||||
} else {
|
||||
require channelsort
|
||||
set records [channelsort [epg fetch dump -trange "$now:$then"]]
|
||||
}
|
||||
set got [clock milliseconds]
|
||||
|
||||
set favlist [epg favlist]
|
||||
|
||||
puts {
|
||||
<small><button id=switch>Switch to grid-style Now/Next</button></small>
|
||||
<script type=text/javascript>
|
||||
$('#switch').button().click(function() {
|
||||
window.location = '/cgi-bin/xepg.jim'; });
|
||||
</script>
|
||||
<table class=borders>
|
||||
<tr>
|
||||
<th colspan=3>Channel</th>
|
||||
<th>On Now</th>
|
||||
<th>On Next</th>
|
||||
<th>On Later</th>
|
||||
</tr>
|
||||
}
|
||||
|
||||
proc rsort {v1 v2} {
|
||||
set v1s [$v1 get channel_num]
|
||||
set v2s [$v2 get channel_num]
|
||||
|
||||
if {$v1s == $v2s} { return 0 }
|
||||
if {$v1s > $v2s } { return 1 }
|
||||
return -1
|
||||
}
|
||||
|
||||
set lcn 0
|
||||
set num 0
|
||||
foreach record $records {
|
||||
$record get_channel_info
|
||||
}
|
||||
|
||||
foreach record [lsort -command rsort $records] {
|
||||
if {$favlist != "" && [$record get service_id] ni $favlist} {
|
||||
continue
|
||||
}
|
||||
altrow
|
||||
set num [$record get channel_num]
|
||||
puts "<td>$num</td>"
|
||||
puts "<td>[$record channel_icon 50]</td>
|
||||
<td>
|
||||
set chnum [$record get channel_num]
|
||||
if {$chnum == 0} { continue }
|
||||
|
||||
if {$chnum != $lcn} {
|
||||
if {$lcn > 0} { puts "</tr>" }
|
||||
altrow
|
||||
puts "<td>$chnum</td>"
|
||||
puts "<td>[$record channel_icon 50]</td>
|
||||
<td>
|
||||
<a href=/cgi-bin/epg_service.jim?service=[$record get service_id]>
|
||||
[$record get channel_name]
|
||||
</a></td>"
|
||||
catch {
|
||||
puts [$record cell]
|
||||
puts [[$record next] cell]
|
||||
[$record get channel_name]
|
||||
</a></td>"
|
||||
set lcn $chnum
|
||||
set num 0
|
||||
}
|
||||
incr num
|
||||
if {$num < 4} {
|
||||
catch { puts [$record cell] }
|
||||
}
|
||||
puts "</tr>"
|
||||
}
|
||||
if {$lcn > 0} { puts "</tr>" }
|
||||
puts "</table>"
|
||||
|
||||
puts "
|
||||
|
||||
11
var/mongoose/include/epgloc.jim
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/mod/bin/jimsh
|
||||
|
||||
source /mod/var/mongoose/lib/setup
|
||||
require settings.class
|
||||
|
||||
if {[[settings] epg_style] eq "grid"} {
|
||||
puts -nonewline "/cgi-bin/xepg.jim"
|
||||
} else {
|
||||
puts -nonewline "/epg.shtml"
|
||||
}
|
||||
|
||||
10
var/mongoose/include/modversion.jim
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/mod/bin/jimsh
|
||||
|
||||
source /mod/var/mongoose/lib/setup
|
||||
require system.class
|
||||
|
||||
puts "<font class=blood style=\"font-size: 0.9em; float: right; clear: right\">
|
||||
Web interface version: [system pkgver webif]<br>
|
||||
Custom firmware version: [system modversion]
|
||||
</font>"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/mod/bin/jimsh
|
||||
|
||||
source /mod/var/mongoose/lib/setup
|
||||
require altrow rsv.class progressbar
|
||||
require altrow rsv.class progressbar epg.class
|
||||
|
||||
puts {
|
||||
<div id=dialogue></div>
|
||||
@@ -154,8 +154,7 @@ proc eventrow {event {table TBL_RESERVATION}} {
|
||||
if {[$event get usLcn] ne ""} {
|
||||
puts "
|
||||
<td>
|
||||
<img src=\"/img/channels/[$event channel_name].png\"
|
||||
width=50>
|
||||
[epg channelicon [$event channel_name] 50]
|
||||
</td>
|
||||
<td nowrap>[$event get usLcn]<br>
|
||||
[$event channel_name]</td>
|
||||
@@ -174,25 +173,29 @@ proc eventrow {event {table TBL_RESERVATION}} {
|
||||
set e $($s + $d)
|
||||
set n [clock seconds]
|
||||
|
||||
if { $n > $e } {
|
||||
puts "<td class=blood nowrap class=va>"
|
||||
} else {
|
||||
puts "<td nowrap class=va>"
|
||||
}
|
||||
puts "[clock format $s -format "%a %d %b %Y"]<br>
|
||||
set ds "[clock format $s -format "%a %d %b %Y"]<br>
|
||||
[clock format $s -format "%H:%M %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]
|
||||
if { $n > $e && [$event get ersvtype] <= 3} {
|
||||
puts "<td nowrap class=va
|
||||
alt=\"$ds\" title=\"$ds\">
|
||||
--- -- --- ----<br>--:--"
|
||||
puts "</td><td>--:--:--</td>"
|
||||
} else {
|
||||
puts "<td nowrap class=\"va"
|
||||
if {$n > $e} { puts " blood" }
|
||||
puts "\">$ds"
|
||||
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]
|
||||
}
|
||||
puts "</td><td>"
|
||||
puts "[clock format [$event get nduration] -format %T]</td>"
|
||||
}
|
||||
|
||||
puts "</td>"
|
||||
|
||||
puts "<td>[clock format [$event get nduration] -format %T]</td>"
|
||||
|
||||
puts "<td nowrap>$rsvicon $RKIcon</td>"
|
||||
if {[$event get aulEventToRecordInfo] != ""} {
|
||||
puts "<td><img src=/img/lightning.png
|
||||
|
||||
22
var/mongoose/lib/channelsort
Normal file
@@ -0,0 +1,22 @@
|
||||
proc _channelsort {v1 v2} {
|
||||
set v1s [$v1 get channel_num]
|
||||
set v2s [$v2 get channel_num]
|
||||
|
||||
if {$v1s > $v2s } { return 1 }
|
||||
if {$v1s == $v2s} {
|
||||
set v1t [$v1 get start]
|
||||
set v2t [$v2 get start]
|
||||
if {$v1t > $v2t} { return 1 }
|
||||
if {$v1t == $v2t} { return 0 }
|
||||
return -1
|
||||
}
|
||||
return -1
|
||||
}
|
||||
|
||||
proc channelsort {records} {
|
||||
foreach record $records {
|
||||
$record get_channel_info
|
||||
}
|
||||
return [lsort -command _channelsort $records]
|
||||
}
|
||||
|
||||
@@ -5,13 +5,21 @@ if {![exists -proc sqlite3.open ]} { package require sqlite3 }
|
||||
|
||||
require settings.class progressbar rsv.class
|
||||
|
||||
set ::channeldb 0
|
||||
catch { set ::channeldb [sqlite3.open /var/lib/humaxtv/channel.db] }
|
||||
|
||||
set ::epgpath /mnt/hd1/dvbepg/epg.dat
|
||||
set ::epgdbpath /mnt/hd1/epg.db
|
||||
set ::hdepgpath /media/drive1/epgsavedata
|
||||
if {![file exists $::epgpath] && [file exists $::hdepgpath]} {
|
||||
set ::epgpath $::hdepgpath
|
||||
set ::epgdbpath /media/drive1/epg.db
|
||||
}
|
||||
|
||||
set ::channeldb 0
|
||||
set ::qepg 0
|
||||
catch { set ::channeldb [sqlite3.open /var/lib/humaxtv/channel.db] }
|
||||
if {[file exists $::epgdbpath]} {
|
||||
$::channeldb query {attach database '%s' as epg} $::epgdbpath
|
||||
set ::qepg 1
|
||||
}
|
||||
|
||||
set ::rsvlookup [rsv lookuptab]
|
||||
@@ -197,13 +205,18 @@ epg method icon_set {{height 0}} {
|
||||
"<img src=/images/178_1_26_Icon_Recommend.png $height>"
|
||||
}
|
||||
|
||||
if {[string match {/*#?} $event_crid]} {
|
||||
lappend set \
|
||||
"<img src=/images/178_1_26_Icon_Split.png $height>"
|
||||
}
|
||||
|
||||
return $set
|
||||
}
|
||||
|
||||
epg method cell {} {
|
||||
set percent [$self percent]
|
||||
|
||||
puts "<td nowrap valign=top title=\"$text\">"
|
||||
puts "<td nowrap valign=top>"
|
||||
|
||||
puts [join [$self icon_set 14] ""]
|
||||
|
||||
@@ -291,6 +304,7 @@ proc {epg exec} {mode args} {
|
||||
-service { lappend cmd -S $args($arg) }
|
||||
-event { lappend cmd -E $args($arg) }
|
||||
-time { lappend cmd -@ $args($arg) }
|
||||
-trange { lappend cmd -= $args($arg) }
|
||||
-day { lappend cmd -/ $args($arg) }
|
||||
-extra { set extra $args($arg) }
|
||||
default { error "Invalid option, $arg" }
|
||||
@@ -306,6 +320,56 @@ proc {epg exec} {mode args} {
|
||||
return [exec {*}$cmd]
|
||||
}
|
||||
|
||||
proc {epg dbfetch} {mode args} {
|
||||
set records {}
|
||||
set extra ""
|
||||
set q "select distinct *,
|
||||
usLcn as channel_num,
|
||||
substr(szSvcName, 2) as channel_name,
|
||||
aucDefaultAuthority as channel_crid,
|
||||
hSvc as channel_hsvc
|
||||
from epg.epg e join TBL_SVC c
|
||||
on e.service_id = c.usSvcId where 1 "
|
||||
foreach arg $args {
|
||||
if {[string first "-" $arg] == 0} {
|
||||
set v $args($arg)
|
||||
switch -- $arg {
|
||||
-crid { append q \
|
||||
"and e.event_crid = '$v' " }
|
||||
-scrid { append q \
|
||||
"and e.series_crid = '$v' " }
|
||||
-type { append q \
|
||||
"and e.content_type = $v " }
|
||||
-service { append q \
|
||||
"and e.service_id = $v " }
|
||||
-event { append q \
|
||||
"and e.event_id = $v " }
|
||||
-time { append q \
|
||||
"and e.start < $v and e.end > $v " }
|
||||
-trange {
|
||||
lassign [split $v :] stt ett
|
||||
append q "and (
|
||||
(e.start > $stt and e.start < $ett) or
|
||||
(e.end > $stt and e.end < $ett) or
|
||||
(e.start < $stt and e.end > $stt)
|
||||
) "
|
||||
}
|
||||
|
||||
default { error "Invalid option, $arg" }
|
||||
}
|
||||
}
|
||||
}
|
||||
append q "order by channel_num, start"
|
||||
|
||||
#puts "QUERY -$q-"
|
||||
|
||||
set records {}
|
||||
foreach rec [$::channeldb query $q] {
|
||||
lappend records [epg new $rec]
|
||||
}
|
||||
return $records
|
||||
}
|
||||
|
||||
proc {epg fetch} {mode args} {
|
||||
set records ""
|
||||
foreach line [split [epg exec $mode {*}$args] "\n"] {
|
||||
|
||||
@@ -14,6 +14,7 @@ $(document).ready(function() {
|
||||
.load('/cgi-bin/restartblock.jim');
|
||||
});
|
||||
$(":button:contains('Record')").fadeOut('slow');
|
||||
$(":button:contains('Reminder')").fadeOut('slow');
|
||||
}
|
||||
|
||||
var $buttons1 = {
|
||||
@@ -21,6 +22,7 @@ $(document).ready(function() {
|
||||
};
|
||||
var $buttons2 = $.extend(
|
||||
{"Record Programme": function() { doschedule(1) }},
|
||||
{"Set Reminder": function() { doschedule(3) }},
|
||||
$buttons1);
|
||||
var $buttons3 = $.extend(
|
||||
{"Record Series": function() { doschedule(2) }},
|
||||
|
||||
@@ -55,7 +55,14 @@ cts 9 "Education" "Education/Science/Factual"
|
||||
puts "</td><td>"
|
||||
cts 10 "Leisure" "Leisure"
|
||||
|
||||
puts "</td><td><a href=/epg.shtml>Now/Next</a>"
|
||||
puts "</td><td>"
|
||||
|
||||
if {[[settings] epg_style] eq "grid"} {
|
||||
puts "<a href=/cgi-bin/xepg.jim>"
|
||||
} else {
|
||||
puts "<a href=/epg.shtml>"
|
||||
}
|
||||
puts "Now/Next</a>"
|
||||
|
||||
puts "</td></tr><tr><td>"
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ source /mod/var/mongoose/lib/setup
|
||||
|
||||
if {![exists -proc class ]} { package require oo }
|
||||
if {![exists -proc sqlite3.open ]} { package require sqlite3 }
|
||||
if {![exists -proc settings ]} { require settings.class }
|
||||
require settings.class system.class
|
||||
|
||||
set rsvdb [sqlite3.open /var/lib/humaxtv/rsv.db]
|
||||
$rsvdb query {attach database '/var/lib/humaxtv/channel.db' as channel}
|
||||
@@ -76,6 +76,14 @@ rsv method name {} {
|
||||
return $name
|
||||
}
|
||||
|
||||
rsv method padded {} {
|
||||
if {$ulPreOffset > 0 || $ulPostOffset > 0} {
|
||||
return 1
|
||||
} else {
|
||||
return 0
|
||||
}
|
||||
}
|
||||
|
||||
rsv method channel_name {} {
|
||||
return [string range $szSvcName 1 end]
|
||||
}
|
||||
@@ -137,9 +145,23 @@ rsv method fix_hsvc {} {
|
||||
return $hsvc
|
||||
}
|
||||
|
||||
rsv method insert {{table pending}} {
|
||||
rsv method insert {{table pending} {force 0}} {
|
||||
global rsvdb
|
||||
|
||||
# Duplicate check - all tables
|
||||
if {!$force && $szCRID ne "" && $action == 0} {
|
||||
foreach tab {pending TBL_RESERVATION} {
|
||||
set rec [$rsvdb query "
|
||||
select ulslot from $tab
|
||||
where szCRID = '%s'
|
||||
" $szCRID]
|
||||
if {[llength $rec] > 0} {
|
||||
throw 20 "Duplicate reservation."
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Find a spare slot.
|
||||
if {$ulslot < 0} {
|
||||
set slotlist [$rsvdb query "
|
||||
@@ -193,11 +215,13 @@ proc {rsv list} {{table tbl_reservation}} {
|
||||
set res [$::rsvdb query "
|
||||
select $table.*,
|
||||
channel.TBL_SVC.szSvcName, channel.TBL_SVC.usLcn,
|
||||
case when ersvtype > 3 then 1 else 0 end as sort
|
||||
case when ersvtype > 3 then 1 else 0 end as sort1,
|
||||
case when nsttime + nduration < [clock seconds]
|
||||
then 0 else 1 end as sort2
|
||||
from $table
|
||||
left join channel.TBL_SVC
|
||||
on $table.hSvc = channel.TBL_SVC.hSvc
|
||||
order by sort, nsttime
|
||||
order by sort1, sort2 desc, nsttime
|
||||
"]
|
||||
|
||||
set records {}
|
||||
@@ -286,10 +310,68 @@ proc {rsv commit} {} {
|
||||
foreach rec [rsv list pending] {
|
||||
if {[$rec get action] == 0} {
|
||||
$rec clear_ulslot
|
||||
$rec insert TBL_RESERVATION
|
||||
$rec insert TBL_RESERVATION 1
|
||||
}
|
||||
}
|
||||
$::rsvdb query {delete from pending}
|
||||
$::rsvdb query {commit transaction}
|
||||
}
|
||||
|
||||
proc {rsv construct} {event type} {
|
||||
global ccrid
|
||||
|
||||
$event get_channel_info
|
||||
|
||||
set args {}
|
||||
|
||||
set args(ersvtype) 3
|
||||
set args(hsvc) [$event get channel_hsvc]
|
||||
set args(nsttime) [$event get start]
|
||||
set args(nduration) [$event get duration]
|
||||
set args(usevtid) [$event get event_id]
|
||||
set args(szevtname) "\025[$event get name]"
|
||||
set args(eReady) 30
|
||||
lassign [system padding] args(ulPreOffset) args(ulPostOffset)
|
||||
|
||||
set ccrid [$event get channel_crid]
|
||||
|
||||
if {$type == 1} {
|
||||
# Event
|
||||
set args(ucCRIDType) 49
|
||||
set args(ucRecKind) 1
|
||||
set ecrid [$event get event_crid]
|
||||
if {$ecrid ne ""} {
|
||||
set args(szCRID) "$ccrid$ecrid"
|
||||
set args(szEventToRecord) "1$args(szCRID)|"
|
||||
# Handle split events
|
||||
if {[string match {*#?} $args(szCRID)]} {
|
||||
set args(ucRecKind) 2
|
||||
set args(szCRID) [
|
||||
string range $args(szCRID) 0 end-2]
|
||||
# TODO - check to see how many parts there
|
||||
# are...
|
||||
append args(szEventToRecord) \
|
||||
$args(szEventToRecord)
|
||||
}
|
||||
}
|
||||
} elseif {$type == 3} {
|
||||
# Reminder
|
||||
set args(ersvtype) 2
|
||||
set args(szsttime) [clock format $args(nsttime) \
|
||||
-format {%Y%m%d%H%M%S}]
|
||||
} else {
|
||||
# Series
|
||||
set args(ucCRIDType) 50
|
||||
set args(ucRecKind) 4
|
||||
set args(szCRID) "$ccrid[$event get series_crid]"
|
||||
set args(szFPBRecPath) "$args(szevtname)"
|
||||
set progs [lmap i [epg fetch dump -scrid [$event get series_crid]] {
|
||||
if {[set ecrid [$i get event_crid]] eq ""} { continue }
|
||||
list "1$::ccrid$ecrid"
|
||||
}]
|
||||
set args(szEventToRecord) "[join $progs "|"]|"
|
||||
}
|
||||
|
||||
return [rsv new $args]
|
||||
}
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@ if {![file exists /mod/etc/webif.db]} {
|
||||
class settings {
|
||||
hostname ""
|
||||
channel_group 0
|
||||
epg_style "standard"
|
||||
smtp_server ""
|
||||
pkgdev 0
|
||||
}
|
||||
@@ -99,6 +100,18 @@ settings method channel_group {{group -1}} {
|
||||
return [$self _nval_setting channel_group $group]
|
||||
}
|
||||
|
||||
settings method epg_style {{style -1}} {
|
||||
if {$style != -1} {
|
||||
if {$style eq "grid"} { set style 1 } else { set style 0}
|
||||
return [$self _nval_setting epg_style $style]
|
||||
}
|
||||
set val [$self _nval_setting epg_style]
|
||||
if {$val == 1} {
|
||||
return "grid"
|
||||
}
|
||||
return "standard"
|
||||
}
|
||||
|
||||
settings method pkgdev {{val -1}} {
|
||||
return [$self _nval_setting pkgdev $val]
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
|
||||
if {![exists -proc class ]} { package require oo }
|
||||
if {![exists -proc sqlite3.open ]} { package require sqlite3 }
|
||||
|
||||
class system {}
|
||||
|
||||
@@ -20,6 +21,21 @@ proc {system hostname} {} {
|
||||
return $hostname
|
||||
}
|
||||
|
||||
proc {system modversion} {} {
|
||||
if {[catch {set fp [open /etc/modversion r]}]} {
|
||||
set modver "1.02"
|
||||
} else {
|
||||
set modver [string trim [read $fp]]
|
||||
close $fp
|
||||
}
|
||||
lassign [split $modver ""] a b c
|
||||
return [format "%d.%d%d" $a $b $c]
|
||||
}
|
||||
|
||||
proc {system pkgver} {{pkg webif}} {
|
||||
return [lrange [split [exec opkg list-installed $pkg] " "] 2 end]
|
||||
}
|
||||
|
||||
proc {system diskspace} {} {
|
||||
switch [system model] {
|
||||
HDR { set part /mnt/hd2 }
|
||||
@@ -44,11 +60,12 @@ proc {system diskspace} {} {
|
||||
}
|
||||
|
||||
proc {system busy} {} {
|
||||
# Is humaxtv doing anything?
|
||||
# Is humaxtv doing anything important?
|
||||
set pid [exec /mod/bin/busybox/pgrep humaxtv]
|
||||
set c 0
|
||||
catch { set c [exec /mod/bin/lsof -p $pid | grep Video | fgrep .ts | wc -l] }
|
||||
|
||||
foreach line [split [exec /mod/bin/lsof -p $pid] "\n"] {
|
||||
if {[string match {*Video*.ts} $line]} { incr c }
|
||||
}
|
||||
if {$c > 0} { return 1 }
|
||||
return 0
|
||||
}
|
||||
@@ -62,3 +79,24 @@ proc {system restartpending} {} {
|
||||
close [open /tmp/.restartpending w]
|
||||
}
|
||||
|
||||
proc {system padding} {} {
|
||||
set start 0
|
||||
set stop 0
|
||||
if {[catch {set db [sqlite3.open /var/lib/humaxtv/setup.db]} msg]} {
|
||||
return {0 0}
|
||||
}
|
||||
foreach l [$db query "
|
||||
select itemName, itemValue
|
||||
from TBL_MENUCONFIG
|
||||
where itemName in ('START_PADDING_TIME', 'STOP_PADDING_TIME')
|
||||
"] {
|
||||
lassign $l x name x val
|
||||
switch $name {
|
||||
"START_PADDING_TIME" { set start $val }
|
||||
"STOP_PADDING_TIME" { set stop $val }
|
||||
}
|
||||
}
|
||||
$db close
|
||||
return [list $start $stop]
|
||||
}
|
||||
|
||||
|
||||
13
var/mongoose/lib/totop
Normal file
@@ -0,0 +1,13 @@
|
||||
puts {
|
||||
<script type="text/javascript" src="/js/jquery.ui.totop.js"></script>
|
||||
<script type="text/javascript" src="/js/easing.js"></script>
|
||||
<link href=/css/ui.totop.css rel=stylesheet type=text/css />
|
||||
<script type=text/javascript>
|
||||
$(document).ready(function() {
|
||||
$().UItoTop({easingType: 'easeOutQuart'});
|
||||
$('.backtotop').click(function() {
|
||||
$('html, body').animate({scrollTop: 0}, 500);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
}
|
||||