Compare commits
148 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f2e068539d | ||
|
|
c886f6afd2 | ||
|
|
e6d7af1fc4 | ||
|
|
0691577b96 | ||
|
|
876d5b5e8a | ||
|
|
4d895e464d | ||
|
|
252d6bf7f6 | ||
|
|
ea03a67b4a | ||
|
|
3adbeb987a | ||
|
|
23fdc62b81 | ||
|
|
b88691c9e5 | ||
|
|
3c4b907091 | ||
|
|
1c00e63f48 | ||
|
|
59006ff474 | ||
|
|
616c0afff1 | ||
|
|
84899871e1 | ||
|
|
ed042ee230 | ||
|
|
3c44ec33f9 | ||
|
|
02d7bc3f33 | ||
|
|
492b37be41 | ||
|
|
c237f228a8 | ||
|
|
7a523a9ddb | ||
|
|
972366de14 | ||
|
|
aeb96c2c8a | ||
|
|
68f98c8a65 | ||
|
|
61b09db04b | ||
|
|
de2035e1e0 | ||
|
|
b4bd45566e | ||
|
|
692488a11f | ||
|
|
bd27200ba8 | ||
|
|
7e30a4272e | ||
|
|
945007f73d | ||
|
|
fc9c912f99 | ||
|
|
bf67161898 | ||
|
|
f029ab1ce6 | ||
|
|
bfd099a82e | ||
|
|
d9a284994e | ||
|
|
e6df0ae3af | ||
|
|
e14ccce2cc | ||
|
|
60111cd8b1 | ||
|
|
fb81a7e954 | ||
|
|
218221c069 | ||
|
|
a001241c5d | ||
|
|
a8a9f041f0 | ||
|
|
67df756156 | ||
|
|
a73afaf951 | ||
|
|
fe439ec25a | ||
|
|
2fa55d3c90 | ||
|
|
c76e6638a4 | ||
|
|
cd3cbf186c | ||
|
|
38956e2669 | ||
|
|
62a13e18cc | ||
|
|
52d05a7f48 | ||
|
|
612a61a5b1 | ||
|
|
17ba0bb00e | ||
|
|
5f473c9e72 | ||
|
|
e0ac834c78 | ||
|
|
604ac65172 | ||
|
|
dad2a630c7 | ||
|
|
2bf876262f | ||
|
|
972eab191c | ||
|
|
9fd84a8938 | ||
|
|
ceccfd9c1d | ||
|
|
c948926cc2 | ||
|
|
a087581573 | ||
|
|
3416d4e9e2 | ||
|
|
b4af9b62fc | ||
|
|
68fdfcc4d5 | ||
|
|
7c181557a1 | ||
|
|
0f1bbed6b9 | ||
|
|
8c4449ee36 | ||
|
|
23cc31a02a | ||
|
|
98c4182a1f | ||
|
|
1984d7151b | ||
|
|
97289969f1 | ||
|
|
0cfc8f233a | ||
|
|
ea2f231ad8 | ||
|
|
13af77c1e4 | ||
|
|
d08475daaa | ||
|
|
26981ebb2d | ||
|
|
fe7de23c67 | ||
|
|
fbd469ffec | ||
|
|
2c62699f00 | ||
|
|
2a4ec43ef6 | ||
|
|
7080242ff8 | ||
|
|
e2c099668e | ||
|
|
d801e71bf3 | ||
|
|
66a7fcec9c | ||
|
|
8dc232646b | ||
|
|
a505022d39 | ||
|
|
4fc05273e1 | ||
|
|
d81037aa5f | ||
|
|
abc7d0655e | ||
|
|
f7ab52698d | ||
|
|
f5ff9cbf67 | ||
|
|
009eb100b6 | ||
|
|
e6366df3c8 | ||
|
|
7a767e5443 | ||
|
|
0e2bc599a5 | ||
|
|
10e9ef191e | ||
|
|
9b826e8f95 | ||
|
|
8a802e5c1d | ||
|
|
61a8b537e6 | ||
|
|
f7de940e51 | ||
|
|
27c7818da8 | ||
|
|
9fb84443cd | ||
|
|
0ae9a07cce | ||
|
|
ed20eec408 | ||
|
|
c095cc7913 | ||
|
|
b379bb64dc | ||
|
|
e82d303c95 | ||
|
|
84a03f49bf | ||
|
|
e0fea797bb | ||
|
|
102ae13acb | ||
|
|
0bca853384 | ||
|
|
38a079b0ba | ||
|
|
cf0a6b5028 | ||
|
|
93cbf651ba | ||
|
|
26ef83fbff | ||
|
|
a1e45d5e9c | ||
|
|
232546feef | ||
|
|
246112d68f | ||
|
|
b2c7be03a4 | ||
|
|
ccf3cc1888 | ||
|
|
9d3e52edd3 | ||
|
|
612f9f8866 | ||
|
|
d4a4af756d | ||
|
|
070fd7a749 | ||
|
|
2f570f6ea0 | ||
|
|
fa8b6d7e7c | ||
|
|
d466b5cc15 | ||
|
|
dae5f9394b | ||
|
|
22320536ee | ||
|
|
39d7dab2a9 | ||
|
|
8ec75e783d | ||
|
|
909342eb1c | ||
|
|
2ab6f7caa2 | ||
|
|
f116cc5801 | ||
|
|
9d75b810c8 | ||
|
|
d2f61fb70e | ||
|
|
1ff5b8ec0e | ||
|
|
52939392ba | ||
|
|
1964f4dfad | ||
|
|
d649456cfe | ||
|
|
f550931f71 | ||
|
|
a294c084b3 | ||
|
|
7172c7c107 | ||
|
|
f7933beaf8 |
6
CONTROL/conffiles
Normal file
@@ -0,0 +1,6 @@
|
||||
webif/html/css/EXTRA.css
|
||||
webif/html/favicon.ico
|
||||
webif/html/img/fav/57.png
|
||||
webif/html/img/fav/72.png
|
||||
webif/html/img/fav/114.png
|
||||
webif/html/img/fav/144.png
|
||||
@@ -1,9 +1,10 @@
|
||||
Package: webif
|
||||
Priority: optional
|
||||
Section: web
|
||||
Version: 0.10.2
|
||||
Version: 1.0.17
|
||||
Architecture: mipsel
|
||||
Maintainer: af123@hummypkg.org.uk
|
||||
Depends: webif-channelicons(>=1.0.3),mongoose(>=3.0-7),jim(>=0.73-1),jim-oo,jim-sqlite3(>=0.73-1),jim-cgi(>=0.5),jim-binary,service-control(>=1.2),busybox(>=1.20.2-1),lsof,epg(>=1.0.9-1),hmt(>=1.1.8),ssmtp,anacron,trm(>=1.1),openssl-command,nicesplice,id3v2,file,rsvsync(>=1.0.2),webif-charts(>=1.2),stripts(>=1.1.2),smartmontools,tmenu(>=1.04)
|
||||
Suggests: ffmpeg
|
||||
Depends: webif-channelicons(>=1.1.13),lighttpd(>=1.4.35-2),jim(>=0.75-1),jim-oo,jim-sqlite3(>=0.75),jim-cgi(>=0.7),jim-binary(>=0.75),service-control(>=1.2),busybox(>=1.20.2-1),lsof(>=4.87),epg(>=1.0.13),hmt(>=1.1.21),ssmtp,anacron,trm(>=1.1),openssl-command,nicesplice,id3v2,file,rsvsync(>=1.0.2),webif-charts(>=1.2-1),stripts(>=1.2.5-3),smartmontools,tmenu(>=1.08),ffmpeg,id3v2,multienv(>=1.6),mongoose
|
||||
Suggests:
|
||||
Description: An evolving web interface for the Humax.
|
||||
Tags: http://hummy.tv/forum/threads/5031/
|
||||
|
||||
@@ -1,29 +1,55 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Relocate any stray files in /mod/var/mongoose
|
||||
|
||||
if [ -d /mod/var/mongoose -a ! -h /mod/var/mongoose ]; then
|
||||
(
|
||||
cd /mod/var/mongoose
|
||||
find . | cpio -pmud /mod/webif
|
||||
cd /mod/var
|
||||
rm -rf mongoose
|
||||
ln -s ../webif mongoose
|
||||
)
|
||||
fi
|
||||
|
||||
export tmpf=/tmp/cronf.$$
|
||||
|
||||
# Add cron jobs
|
||||
|
||||
crond=$PKG_ROOT/var/spool/cron/crontabs
|
||||
[ -d $crond ] || exit 1
|
||||
|
||||
cronf=$crond/root
|
||||
grep -v webif/lib/bin/auto $cronf > $tmpf
|
||||
(
|
||||
cat $tmpf
|
||||
echo '*/10 * * * * /mod/webif/lib/bin/auto >> /tmp/webif_auto.log 2>&1'
|
||||
) > $cronf
|
||||
crontab=$PKG_ROOT/bin/crontab
|
||||
if [ -x $crontab ]; then
|
||||
$crontab -l | grep -v webif/lib/bin/auto > $tmpf
|
||||
cat $tmpf - << EOM | $crontab -
|
||||
*/10 * * * * /mod/webif/lib/bin/auto >/dev/null 2>&1
|
||||
EOM
|
||||
fi
|
||||
|
||||
# Add anacron jobs
|
||||
|
||||
ana=$PKG_ROOT/etc/anacrontab
|
||||
grep -v 'backup/backup.jim' $ana > $tmpf
|
||||
(
|
||||
cat $tmpf
|
||||
echo "1 8 sched_backup /mod/var/mongoose/cgi-bin/backup/backup.jim"
|
||||
) > $ana
|
||||
egrep -v 'backup/backup.jim|bin/diskattrs' $ana > $tmpf
|
||||
cat $tmpf - << EOM > $ana
|
||||
1 8 sched_backup /mod/webif/html/backup/backup.jim
|
||||
1 5 diskattrs /mod/webif/lib/bin/diskattrs
|
||||
EOM
|
||||
|
||||
$PKG_ROOT/etc/init.d/S02anacron start < /dev/null > /dev/null 2>&1 &
|
||||
|
||||
[ -f /tmp/webif_auto.log ] && rm -f /tmp/webif_auto.log
|
||||
|
||||
if [ ! -f /mod/webif/.strip-updated ]; then
|
||||
echo "*********************************"
|
||||
echo "* Please wait while any shrunk recordings are flagged..."
|
||||
echo "*********************************"
|
||||
/mod/webif/lib/bin/strip-update
|
||||
|
||||
touch /mod/webif/.strip-updated
|
||||
fi
|
||||
|
||||
/mod/webif/lib/bin/diskattrs
|
||||
#/mod/webif/lib/bin/resetnew
|
||||
|
||||
[ -f $tmpf ] && rm -f $tmpf
|
||||
|
||||
exit 0
|
||||
|
||||
|
||||
16
CONTROL/preinst
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Handle moving the legacy /var/mongoose directory to /webif..
|
||||
|
||||
if [ -h /mod/webif -a -d /mod/var/mongoose -a ! -h /mod/var/mongoose ]; then
|
||||
echo "Relocating web interface files..."
|
||||
|
||||
cd /mod
|
||||
rm webif || exit 1
|
||||
mv var/mongoose webif || exit 1
|
||||
cd var
|
||||
ln -s ../webif mongoose
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
||||
@@ -2,16 +2,17 @@
|
||||
|
||||
export tmpf=/tmp/cronf.$$
|
||||
|
||||
cronf=$PKG_ROOT/var/spool/cron/crontabs/root
|
||||
if [ -f $cronf ]; then
|
||||
grep -v webif/lib/bin/auto $cronf > $tmpf
|
||||
cp $tmpf $cronf
|
||||
[ -s $cronf ] || rm -f $cronf
|
||||
crontab=$PKG_ROOT/bin/crontab
|
||||
if [ -x $crontab ]; then
|
||||
$crontab -l | grep -v webif/lib/bin/auto > $tmpf
|
||||
[ -s $tmpf ] && $crontab $tmpf || $crontab -r
|
||||
fi
|
||||
|
||||
ana=/mod/etc/anacrontab
|
||||
grep -v 'backup/backup.jim' $ana > $tmpf
|
||||
egrep -v 'backup/backup.jim|bin/diskattrs' $ana > $tmpf
|
||||
cp $tmpf $ana
|
||||
|
||||
[ -f $tmpf ] && rm -f $tmpf
|
||||
|
||||
exit 0
|
||||
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ -f /mnt/hd1/dvbepg/epg.dat ]; then
|
||||
epg=/mnt/hd1/dvbepg/epg.dat
|
||||
epgdb=/mnt/hd1/epg.db
|
||||
else
|
||||
if [ "`cat /etc/model`" = HD ]; then
|
||||
epg=/media/drive1/epgsavedata
|
||||
epgdb=/media/drive1/epg.db
|
||||
else
|
||||
epg=/mnt/hd1/dvbepg/epg.dat
|
||||
epgdb=/mnt/hd1/epg.db
|
||||
fi
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
/mod/bin/epg -f $epg sqlitedumpd $epgdb > /tmp/epgd.log &
|
||||
/mod/bin/epg -f $epg sqlitedumpd $epgdb > /tmp/epgd.log 2>&1 &
|
||||
;;
|
||||
stop)
|
||||
killall -q epg
|
||||
|
||||
1
var/mongoose
Symbolic link
@@ -0,0 +1 @@
|
||||
../webif
|
||||
@@ -1,87 +0,0 @@
|
||||
#!/mod/bin/jimsh
|
||||
|
||||
package require cgi
|
||||
source /mod/webif/lib/setup
|
||||
|
||||
require rsv.class
|
||||
|
||||
set dir /mod/var/backup
|
||||
|
||||
puts "Content-Type: text/html"
|
||||
puts ""
|
||||
|
||||
cgi_input
|
||||
#cgi_dump
|
||||
|
||||
set now [clock seconds]
|
||||
set file [file tail [cgi_get file \
|
||||
[clock format $now -format "auto-%Y-%b-%d-%H:%M"]]]
|
||||
|
||||
if {[string match {auto-*} $file]} {
|
||||
# Delete any automatic backups over 7 days old.
|
||||
set mt $(15 * 86400)
|
||||
foreach af [glob -nocomplain "$dir/auto-*"] {
|
||||
set aft [file mtime $af]
|
||||
set diff $($now - $aft)
|
||||
if {$diff > $mt} {
|
||||
puts "Removing $af"
|
||||
file delete $af
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
set ffile "/$dir/$file.rbk"
|
||||
|
||||
if {[file exists $ffile]} {
|
||||
puts "Backup file <i>$file</i> already exists."
|
||||
exit
|
||||
}
|
||||
|
||||
if {[catch { set fd [open $ffile w] } msg]} {
|
||||
puts "Error creating backup file. - $msg"
|
||||
exit
|
||||
}
|
||||
|
||||
puts "Backing up scheduled recordings and events..."
|
||||
|
||||
set events [rsv list]
|
||||
|
||||
set fields [lsort [[rsv] vars]]
|
||||
|
||||
#puts $fd "# [join $fields "\t"]"
|
||||
|
||||
foreach event $events {
|
||||
puts " Backing up scheduled event '[$event name]'"
|
||||
puts -nonewline $fd "event\t"
|
||||
|
||||
foreach f $fields {
|
||||
if {$f eq "aulEventToRecordInfo"} { continue }
|
||||
puts -nonewline $fd "[$event get $f]\t"
|
||||
}
|
||||
puts $fd ""
|
||||
}
|
||||
puts "Done."
|
||||
|
||||
puts "Backing up channel favourites..."
|
||||
|
||||
set grp 0
|
||||
foreach res [$rsvdb query {
|
||||
select eFavGroup,
|
||||
TBL_FAV.eSvcType,
|
||||
substr(szSvcName, 2) as szSvcName,
|
||||
favIdx
|
||||
from TBL_FAV join TBL_SVC using (hSvc)
|
||||
order by eFavGroup, favIdx
|
||||
}] {
|
||||
if {$res(eFavGroup) != $grp} {
|
||||
set grp $res(eFavGroup)
|
||||
puts " Group $grp"
|
||||
}
|
||||
puts " $res(szSvcName)"
|
||||
puts $fd "fav\t$res(eFavGroup)\t$res(eSvcType)\t$res(szSvcName)\t$res(favIdx)"
|
||||
}
|
||||
puts "Done."
|
||||
|
||||
close $fd
|
||||
rsv cleanup
|
||||
|
||||
@@ -1,141 +0,0 @@
|
||||
#!/mod/bin/jimsh
|
||||
|
||||
package require cgi
|
||||
source /mod/webif/lib/setup
|
||||
|
||||
require rsv.class findhsvc system.class
|
||||
|
||||
set dir /mod/var/backup
|
||||
|
||||
puts "Content-Type: text/html"
|
||||
puts ""
|
||||
|
||||
cgi_input
|
||||
#cgi_dump
|
||||
|
||||
#set _cgi(restore_file) "backup-2011-Jul-09-20:37"
|
||||
|
||||
if {![dict exists $_cgi restore_file]} {
|
||||
puts "No filename supplied."
|
||||
exit
|
||||
}
|
||||
|
||||
set file [file tail [dict get $_cgi restore_file]]
|
||||
set ffile "/$dir/$file.rbk"
|
||||
|
||||
if {![file exists $ffile]} {
|
||||
puts "Backup file <i>$file</i> does not exist."
|
||||
exit
|
||||
}
|
||||
|
||||
if {[catch { set fd [open $ffile r] } msg]} {
|
||||
puts "Error opening <i>$file</i> - $msg"
|
||||
exit
|
||||
}
|
||||
|
||||
puts "Restoring scheduled events from <i>$file</i>..."
|
||||
|
||||
$rsvdb query {begin transaction;}
|
||||
$rsvdb query {delete from TBL_RESERVATION;}
|
||||
|
||||
set fields [lsort [[rsv] vars]]
|
||||
|
||||
set data [split [read $fd] "\n"]
|
||||
|
||||
foreach line $data {
|
||||
set vals [split $line "\t"]
|
||||
if {[lindex $vals 0] ne "event"} { continue }
|
||||
set vars {}
|
||||
set i 0
|
||||
foreach f $fields {
|
||||
if {$f eq "aulEventToRecordInfo"} { continue }
|
||||
incr i
|
||||
lappend vars $f [lindex $vals $i]
|
||||
}
|
||||
|
||||
# Don't restore DSO events.
|
||||
if {$vars(ersvtype) == 11} { continue }
|
||||
|
||||
set rsv [rsv new $vars]
|
||||
|
||||
# Need to fix up channel and CRID mappings in case something has
|
||||
# changed during a channel scan.
|
||||
|
||||
puts " Restoring [$rsv name]"
|
||||
|
||||
set bad 0
|
||||
# First, the service number
|
||||
set ohsvc [$rsv get hsvc]
|
||||
if {$ohsvc > 0} {
|
||||
set hsvc [$rsv fix_hsvc]
|
||||
if {$hsvc == 0} {
|
||||
puts " Cannot find channel, restore failed."
|
||||
set bad 1
|
||||
} elseif {$hsvc != $ohsvc} {
|
||||
puts -nonewline " Service number has "
|
||||
puts "changed $ohsvc -> $hsvc, fixing."
|
||||
} else {
|
||||
puts " No change in channel service."
|
||||
}
|
||||
}
|
||||
|
||||
if {!$bad} {
|
||||
if {[catch {$rsv insert pending 1} msg]} {
|
||||
puts " Error inserting event, $msg"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$rsvdb query {commit transaction;}
|
||||
|
||||
puts "Restoring favourite channels..."
|
||||
$rsvdb query {begin transaction;}
|
||||
$rsvdb query {delete from channel.TBL_FAV}
|
||||
|
||||
$rsvdb query {drop table if exists pending.fav}
|
||||
$rsvdb query {create table pending.fav (
|
||||
favIdx integer primary key autoincrement unique,
|
||||
hSvc integer(4),
|
||||
eFavGroup integer(4),
|
||||
[eSvcType] integer(4)
|
||||
)}
|
||||
|
||||
set grp 0
|
||||
foreach line $data {
|
||||
set vals [split $line "\t"]
|
||||
if {[lindex $vals 0] ne "fav"} { continue }
|
||||
|
||||
set group [lindex $vals 1]
|
||||
set type [lindex $vals 2]
|
||||
set chan [lindex $vals 3]
|
||||
set idx [lindex $vals 4]
|
||||
if {$idx eq ""} { set idx 0 }
|
||||
set hsvc [get_channel_attr $chan]
|
||||
|
||||
if {$grp != $group} {
|
||||
set grp $group
|
||||
puts " Group $grp"
|
||||
}
|
||||
|
||||
puts " $chan"
|
||||
|
||||
if {$hsvc eq ""} {
|
||||
puts " Cannot map channel name to service."
|
||||
continue
|
||||
}
|
||||
|
||||
set query "
|
||||
insert into pending.fav(favIdx, hSvc, eFavGroup, eSvcType)
|
||||
values($idx, $hsvc, $group, $type);
|
||||
"
|
||||
|
||||
$rsvdb query $query
|
||||
}
|
||||
|
||||
$rsvdb query {commit transaction;}
|
||||
|
||||
system restartpending
|
||||
|
||||
close $fd
|
||||
rsv cleanup
|
||||
|
||||
@@ -1,102 +0,0 @@
|
||||
#!/mod/bin/jimsh
|
||||
|
||||
package require cgi
|
||||
source /mod/webif/lib/setup
|
||||
require ts.class pretty_size system.class tdelete
|
||||
|
||||
puts "Content-Type: text/html\r\n"
|
||||
|
||||
cgi_input
|
||||
#cgi_dump
|
||||
|
||||
set dir [cgi_get dir]
|
||||
|
||||
#puts "DIR: ($dir)"
|
||||
|
||||
if {[system pkginst undelete]} {
|
||||
set dustbin [system dustbin]
|
||||
} else {
|
||||
set dustbin ""
|
||||
}
|
||||
|
||||
proc bindir {file} {
|
||||
global dustbin
|
||||
set dir [file dirname $file]
|
||||
regsub "^[system mediaroot]" $dir $dustbin ndir
|
||||
if {$dir eq $ndir} { set ndir $dustbin }
|
||||
system mkdir_p $ndir
|
||||
return $ndir
|
||||
}
|
||||
|
||||
proc touch {file} {
|
||||
exec /mod/bin/busybox/touch $file
|
||||
}
|
||||
|
||||
puts "<div id=deleting class=blood><img src=/img/loading.gif>Deleting...</div>"
|
||||
puts "<ul style=\"list-style-type: square\">"
|
||||
|
||||
foreach file [cgi_get files] {
|
||||
|
||||
puts -nonewline "<li>\"$file\"..."
|
||||
|
||||
if {[string first "$dir/" $file] != 0} {
|
||||
puts "Error - outside directory."
|
||||
continue
|
||||
}
|
||||
|
||||
if {$dustbin ne "" && [string first $dustbin $file] > -1} {
|
||||
set ldustbin ""
|
||||
} else {
|
||||
set ldustbin $dustbin
|
||||
}
|
||||
|
||||
set done 0
|
||||
if {[file isdirectory $file]} {
|
||||
puts -nonewline "Directory..."
|
||||
if {$ldustbin ne ""} {
|
||||
set ndir "[bindir $file]/[file tail $file]"
|
||||
while {[file isdirectory $ndir]} {
|
||||
append ndir "_"
|
||||
}
|
||||
file rename $file $ndir
|
||||
touch $ndir
|
||||
} else {
|
||||
tdelete $file
|
||||
}
|
||||
puts -nonewline "Done..."
|
||||
set done 1
|
||||
} elseif {[string match {*.ts} $file]} {
|
||||
set ts [ts fetch $file]
|
||||
|
||||
# Check TS validity
|
||||
if {![catch {$ts get file}]} {
|
||||
if {$ldustbin ne ""} {
|
||||
$ts move [bindir $file] 1 1
|
||||
} else {
|
||||
if {[$ts delete]} {
|
||||
puts "Successfully deleted $file."
|
||||
} else {
|
||||
puts "Problem deleting $file, [$ts get error]"
|
||||
}
|
||||
}
|
||||
set done 1
|
||||
}
|
||||
# else treat as normal file.
|
||||
}
|
||||
|
||||
if {!$done} {
|
||||
if {$ldustbin ne ""} {
|
||||
set nfile "[bindir $file]/[file tail $file]"
|
||||
file rename $file $nfile
|
||||
touch $nfile
|
||||
} else {
|
||||
tdelete $file
|
||||
}
|
||||
catch {file delete "[file rootname $file].hmi"}
|
||||
puts -nonewline "Done..."
|
||||
}
|
||||
|
||||
puts "</li>"
|
||||
}
|
||||
puts "</ul>"
|
||||
|
||||
@@ -1,49 +0,0 @@
|
||||
#!/mod/bin/jimsh
|
||||
|
||||
package require cgi
|
||||
package require pack
|
||||
source /mod/webif/lib/setup
|
||||
require ts.class hexdump
|
||||
|
||||
puts "Content-Type: text/html"
|
||||
puts ""
|
||||
|
||||
cgi_input
|
||||
#cgi_dump
|
||||
|
||||
set dir [cgi_get dir]
|
||||
if {![file isdirectory $dir]} { exit }
|
||||
if {![file exists "$dir/.series"]} { exit }
|
||||
|
||||
set tot 0
|
||||
set watched 0
|
||||
foreach file [readdir -nocomplain $dir] {
|
||||
if {![string match {*.ts} $file]} { continue }
|
||||
#puts "FILE: $file"
|
||||
incr tot
|
||||
if {[set ts [ts fetch "$dir/$file"]] != 0} {
|
||||
if {![$ts flag "New"]} { incr watched }
|
||||
}
|
||||
}
|
||||
|
||||
set fd [open "$dir/.series"]
|
||||
set bytes [read $fd]
|
||||
close $fd
|
||||
set recs [unpack $bytes -uintle 0 32]
|
||||
set played [unpack $bytes -uintle 32 32]
|
||||
|
||||
puts "Current: $played/$recs"
|
||||
|
||||
#hexdump $bytes
|
||||
|
||||
puts "Calculated: $watched/$tot"
|
||||
|
||||
pack bytes $tot -intle 32 0
|
||||
pack bytes $watched -intle 32 32
|
||||
|
||||
#hexdump $bytes
|
||||
|
||||
set fd [open "$dir/.series" "w"]
|
||||
puts -nonewline $fd $bytes
|
||||
close $fd
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
#!/mod/bin/jimsh
|
||||
|
||||
package require cgi
|
||||
|
||||
#puts "Content-Type: text/plain"
|
||||
puts "Content-Type: application/json"
|
||||
puts ""
|
||||
|
||||
cgi_input
|
||||
#cgi_dump
|
||||
|
||||
set dir [cgi_get dir "/media/My Video/Children"]
|
||||
|
||||
puts "{"
|
||||
foreach file [readdir -nocomplain $dir] {
|
||||
if {![string match {*.ts} $file]} { continue }
|
||||
|
||||
set xfile [file rootname $file]
|
||||
if {[catch {set eit [exec /mod/bin/stripts -cq "$dir/$xfile"]}]} {
|
||||
continue
|
||||
}
|
||||
|
||||
puts " \"$file\": $eit,"
|
||||
}
|
||||
puts " \"dummy\": 0"
|
||||
puts "}"
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
#!/mod/bin/jimsh
|
||||
|
||||
puts "Content-type: text/plain\n"
|
||||
|
||||
foreach f [dict keys $env] {
|
||||
puts "$f = $env($f)"
|
||||
}
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
#!/mod/bin/jimsh
|
||||
|
||||
package require cgi
|
||||
source /mod/webif/lib/setup
|
||||
require pkg.class chunked
|
||||
|
||||
cgi_input
|
||||
#cgi_dump
|
||||
|
||||
set cmd [cgi_get cmd update]
|
||||
|
||||
proc opkg {cmd} {
|
||||
chunk ">>> opkg $cmd\r\n"
|
||||
set bcmd "|/mod/webif/lib/bin/opkg $cmd"
|
||||
set fd [open $bcmd r]
|
||||
while {[gets $fd line] >= 0} {
|
||||
chunk "$line\r\n"
|
||||
#chunk_pad
|
||||
}
|
||||
close $fd
|
||||
chunk "\r\n"
|
||||
}
|
||||
|
||||
start_chunked
|
||||
|
||||
if {$cmd eq "upgrade"} { opkg update }
|
||||
opkg $cmd
|
||||
|
||||
if {$cmd eq "update" || $cmd eq "upgrade"} {
|
||||
chunk "Updating package meta information\r\n"
|
||||
pkg fetchmeta
|
||||
chunk "Done.\r\n"
|
||||
chunk "Updating diagnostic meta information\r\n"
|
||||
pkg fetchdiagmeta
|
||||
chunk "Done.\r\n"
|
||||
}
|
||||
|
||||
end_chunked
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
#!/mod/bin/jimsh
|
||||
|
||||
package require cgi
|
||||
|
||||
puts "Content-Type: text/html"
|
||||
puts ""
|
||||
|
||||
cgi_input
|
||||
#cgi_dump
|
||||
|
||||
catch { set service [dict get $_cgi service] }
|
||||
catch { set action [dict get $_cgi action] }
|
||||
|
||||
catch { puts [exec /mod/bin/service $action $service] }
|
||||
|
||||
@@ -1,141 +0,0 @@
|
||||
(function($)
|
||||
{
|
||||
$.fn.enable = function()
|
||||
{
|
||||
return this.each(function() {
|
||||
$(this)
|
||||
.removeClass('ui-state-disabled')
|
||||
.removeProp('disabled');
|
||||
});
|
||||
};
|
||||
|
||||
$.fn.disable = function()
|
||||
{
|
||||
return this.each(function() {
|
||||
$(this)
|
||||
.addClass('ui-state-disabled')
|
||||
.prop('disabled', true);
|
||||
});
|
||||
};
|
||||
})(jQuery);
|
||||
|
||||
$(document).ready(function () {
|
||||
$(":submit").button();
|
||||
//$('[type="checkbox"] :not(.yesno)').iphoneStyle();
|
||||
$('[type="checkbox"]').iphoneStyle({
|
||||
checkedLabel: 'YES',
|
||||
uncheckedLabel: 'NO'
|
||||
});
|
||||
$('form.auto').each(function(i, el) {
|
||||
var id = $(this).attr('id');
|
||||
var output = '#' + id + '_output';
|
||||
$(this).ajaxForm({
|
||||
target: output,
|
||||
success: function() {
|
||||
$(output)
|
||||
.css('font-style', 'italic')
|
||||
.show('slow')
|
||||
.delay(2000)
|
||||
.fadeOut('slow');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#pkgdev').change(function() {
|
||||
var arg = '0';
|
||||
if ($(this).attr('checked'))
|
||||
arg = '1';
|
||||
|
||||
$(this).disable();
|
||||
|
||||
$('#pkgdev_output')
|
||||
.empty()
|
||||
.show('slow')
|
||||
.load('/cgi-bin/settings.jim?pkgdev=' + arg,
|
||||
function() {
|
||||
$('#pkgdev').enable();
|
||||
$('#pkgdev_output')
|
||||
.css('font-style', 'italic')
|
||||
.delay(2000).fadeOut('slow');
|
||||
});
|
||||
});
|
||||
|
||||
$('#https_toggle').change(function() {
|
||||
var arg = 'off';
|
||||
if ($(this).attr('checked'))
|
||||
arg = 'on';
|
||||
|
||||
$(this).disable();
|
||||
|
||||
$('#https_output')
|
||||
.empty()
|
||||
.html('<img src=/img/loading.gif>Please Wait...')
|
||||
.show('slow')
|
||||
.load('/cgi-bin/settings.jim?act=https&val=' + arg,
|
||||
function() {
|
||||
$('#https_toggle').enable();
|
||||
$('#https_output')
|
||||
.css('font-style', 'italic')
|
||||
.delay(2000).fadeOut('slow');
|
||||
});
|
||||
});
|
||||
|
||||
$('#xtelnet_toggle').change(function() {
|
||||
var arg = 'off';
|
||||
if ($(this).attr('checked'))
|
||||
arg = 'on';
|
||||
|
||||
$(this).disable();
|
||||
|
||||
$('#xtelnet_output')
|
||||
.empty()
|
||||
.html('<img src=/img/loading.gif>Please Wait...')
|
||||
.show('slow')
|
||||
.load('/cgi-bin/settings.jim?act=xtelnet&val=' + arg,
|
||||
function() {
|
||||
$('#xtelnet_toggle').enable();
|
||||
$('#xtelnet_output')
|
||||
.css('font-style', 'italic')
|
||||
.delay(2000).fadeOut('slow');
|
||||
});
|
||||
});
|
||||
|
||||
$('#toolbar_toggle').change(function() {
|
||||
var arg = '1';
|
||||
if ($(this).attr('checked'))
|
||||
arg = '0';
|
||||
|
||||
$(this).disable();
|
||||
|
||||
$('#toolbar_output')
|
||||
.empty()
|
||||
.show('slow')
|
||||
.load('/cgi-bin/settings.jim?notoolbar=' + arg,
|
||||
function() {
|
||||
$('#toolbar_toggle').enable();
|
||||
$('#toolbar_output')
|
||||
.css('font-style', 'italic')
|
||||
.delay(2000).fadeOut('slow');
|
||||
});
|
||||
});
|
||||
|
||||
$('#mobile_toggle').change(function() {
|
||||
var arg = '1';
|
||||
if ($(this).attr('checked'))
|
||||
arg = '0';
|
||||
|
||||
$(this).disable();
|
||||
|
||||
$('#mobile_output')
|
||||
.empty()
|
||||
.show('slow')
|
||||
.load('/cgi-bin/settings.jim?nomobile=' + arg,
|
||||
function() {
|
||||
$('#mobile_toggle').enable();
|
||||
$('#mobile_output')
|
||||
.css('font-style', 'italic')
|
||||
.delay(2000).fadeOut('slow');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,184 +0,0 @@
|
||||
#!/mod/bin/jimsh
|
||||
|
||||
package require cgi
|
||||
source /mod/webif/lib/setup
|
||||
require system.class findhsvc epg.class rsv.class
|
||||
|
||||
set runmode cli
|
||||
if {[string match {*jim} $argv0]} { set runmode cgi }
|
||||
|
||||
set schedtime 1200
|
||||
case $runmode {
|
||||
cgi {
|
||||
cgi_input
|
||||
set type [cgi_get type "full"]
|
||||
puts "Content-Type: text/html"
|
||||
puts "Pragma: no-cache"
|
||||
puts "Expires: Thu, 01 Jan 1970 00:00:00 GMT"
|
||||
puts ""
|
||||
}
|
||||
cli {
|
||||
set type "full"
|
||||
if {"-X" in $argv} { set schedtime 7200 }
|
||||
}
|
||||
}
|
||||
|
||||
if {[catch {set pid [exec pgrep humaxtv]}]} {
|
||||
puts "Cannot find humaxtv process."
|
||||
exit
|
||||
}
|
||||
|
||||
proc get_data {} {
|
||||
global pid
|
||||
|
||||
set ret {}
|
||||
if {[catch {set data \
|
||||
[exec /mod/bin/lsof -p $pid | grep Video | fgrep .ts]} ]} {
|
||||
set ret {}
|
||||
} else {
|
||||
foreach line [split $data "\n"] {
|
||||
regsub -all -- {[[:space:]]+} $line " " line
|
||||
set name [file rootname [file tail $line]]
|
||||
if {[dict exists $ret $name]} {
|
||||
set ret($name) -1
|
||||
} else {
|
||||
set size [lindex [split $line " "] 6]
|
||||
set ret($name) $size
|
||||
}
|
||||
}
|
||||
}
|
||||
return $ret
|
||||
}
|
||||
|
||||
set play 0
|
||||
set rec 0
|
||||
set seen {}
|
||||
set output {}
|
||||
|
||||
if {$type eq "full"} {
|
||||
set data [get_data]
|
||||
} else {
|
||||
set data {}
|
||||
}
|
||||
|
||||
if {[llength $data]} {
|
||||
sleep 3
|
||||
set ndata [get_data]
|
||||
foreach name [array names ndata] {
|
||||
if {![dict exists $seen $name]} { set seen($name) 0 }
|
||||
if {![dict exists $data $name]} { set data($name) 0 }
|
||||
if {$ndata($name) == -1} {
|
||||
incr rec
|
||||
incr play
|
||||
set mode "Chase Playing"
|
||||
set icon "745_1_11_Video_3REC_Live.png"
|
||||
} elseif {$ndata($name) > $data($name) && $seen($name) < 1} {
|
||||
incr rec
|
||||
set mode "Recording"
|
||||
set icon "745_1_11_Video_1REC.png"
|
||||
} else {
|
||||
incr play
|
||||
set mode "Playing"
|
||||
set icon "745_1_10_Video_2Live.png"
|
||||
}
|
||||
|
||||
incr seen($name)
|
||||
|
||||
if {$runmode eq "cgi"} {
|
||||
lappend output [concat \
|
||||
"<span class=\"va stitem\">\n" \
|
||||
" <img class=va src=/images/$icon>\n" \
|
||||
" <span>$mode <i>$name</i></span>\n" \
|
||||
"</span>\n" \
|
||||
]
|
||||
} else {
|
||||
lappend output "$mode $name"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if {![system instandby] && $play < 1} {
|
||||
set hsvc [system param CUR_SVC Value USERCONFIG]
|
||||
|
||||
set ff [$rsvdb query "
|
||||
select usSvcid as svcid, usLcn as lcn,
|
||||
substr(szSvcName, 2) as name
|
||||
from channel.TBL_SVC
|
||||
where hSvc = $hsvc
|
||||
limit 1
|
||||
"]
|
||||
|
||||
if {[llength $ff] == 1} {
|
||||
lassign [lindex $ff 0] x svcid x lcn x name
|
||||
set epgs [epg dbfetch get \
|
||||
-service $svcid \
|
||||
-time [clock seconds]\
|
||||
]
|
||||
set prog ""
|
||||
if {[llength $epgs] == 1} {
|
||||
lassign $epgs epg
|
||||
set prog "- [$epg get name] ("
|
||||
append prog "[clock format [$epg get start] -format %H:%M] - "
|
||||
append prog "[clock format $([$epg get start] + [$epg get duration]) -format %H:%M]"
|
||||
append prog ") \[[$epg percent]%\]"
|
||||
}
|
||||
|
||||
if {$runmode eq "cgi"} {
|
||||
lappend output [concat \
|
||||
"<span class=\"va stitem\">\n" \
|
||||
" [epg channelicon $name 30 \
|
||||
{vertical-align: middle; padding: 0 4px 0 2px}]\n" \
|
||||
" <span>Watching <i>$lcn: $name $prog</i></span>\n" \
|
||||
"</span>\n" \
|
||||
]
|
||||
} else {
|
||||
lappend output "Watching $lcn: $name $prog"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if {[system instandby]} {
|
||||
if {$runmode eq "cgi"} {
|
||||
lappend output [concat \
|
||||
"<span class=\"va stitem\">\n" \
|
||||
" <img class=va width=28 style=\"padding: 0 4px\"" \
|
||||
"src=/img/standby.png>\n" \
|
||||
" <span>System is in standby.</span>\n" \
|
||||
"</span>" \
|
||||
]
|
||||
} else {
|
||||
lappend output "System is in standby."
|
||||
}
|
||||
}
|
||||
|
||||
set events [rsv list tbl_reservation \
|
||||
" where ersvtype = 3 and nsttime - [clock seconds] < $schedtime
|
||||
and nsttime > [clock seconds] "]
|
||||
foreach event $events {
|
||||
if {$runmode eq "cgi"} {
|
||||
set icon "175_1_11_Reservation_Record.png"
|
||||
lappend output [concat \
|
||||
"<span class=\"va stitem\">\n" \
|
||||
" <img class=va src=/images/$icon width=20>\n" \
|
||||
" <span>Will record <i>[$event name]</i>" \
|
||||
" on [$event channel_name] at"\
|
||||
" [clock format [$event get nsttime] -format {%H:%M}]" \
|
||||
" </span>\n" \
|
||||
"</span>\n" \
|
||||
} else {
|
||||
lappend output [concat \
|
||||
"Will record '[$event name]' " \
|
||||
"on [$event channel_name] at " \
|
||||
"[clock format [$event get nsttime] -format {%H:%M}]" \
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
if {[llength $output]} {
|
||||
if {$runmode eq "cgi"} {
|
||||
puts [join $output "\n<br>\n"]
|
||||
} else {
|
||||
puts [join $output "\n"]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
<!--#include virtual="/lib/header.shtml" -->
|
||||
<!--#exec cmd="/mod/webif/include/backup.jim" -->
|
||||
<!--#include virtual="/lib/footer.shtml" -->
|
||||
|
||||
@@ -1,75 +0,0 @@
|
||||
.iPhoneCheckContainer {
|
||||
position: relative;
|
||||
height: 27px;
|
||||
cursor: pointer;
|
||||
overflow: hidden; }
|
||||
.iPhoneCheckContainer input {
|
||||
position: absolute;
|
||||
top: 5px;
|
||||
left: 30px;
|
||||
opacity: 0;
|
||||
-ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=0);
|
||||
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=0); }
|
||||
.iPhoneCheckContainer label {
|
||||
white-space: nowrap;
|
||||
font-size: 17px;
|
||||
line-height: 17px;
|
||||
font-weight: bold;
|
||||
font-family: "Helvetica Neue", Arial, Helvetica, sans-serif;
|
||||
text-transform: uppercase;
|
||||
cursor: pointer;
|
||||
display: block;
|
||||
height: 27px;
|
||||
position: absolute;
|
||||
width: auto;
|
||||
top: 0;
|
||||
padding-top: 5px;
|
||||
overflow: hidden; }
|
||||
.iPhoneCheckContainer, .iPhoneCheckContainer label {
|
||||
user-select: none;
|
||||
-moz-user-select: none;
|
||||
-khtml-user-select: none; }
|
||||
|
||||
.iPhoneCheckDisabled {
|
||||
opacity: 0.5;
|
||||
-ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=50);
|
||||
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=50); }
|
||||
|
||||
label.iPhoneCheckLabelOn {
|
||||
color: white;
|
||||
background: url('/img/iphone-style-checkboxes/on.png?1282083753') no-repeat;
|
||||
text-shadow: 0px 0px 2px rgba(0, 0, 0, 0.6);
|
||||
left: 0;
|
||||
padding-top: 5px; }
|
||||
label.iPhoneCheckLabelOn span {
|
||||
padding-left: 8px; }
|
||||
label.iPhoneCheckLabelOff {
|
||||
color: #8b8b8b;
|
||||
background: url('/img/iphone-style-checkboxes/off.png?1282083753') no-repeat right 0;
|
||||
text-shadow: 0px 0px 2px rgba(255, 255, 255, 0.6);
|
||||
text-align: right;
|
||||
right: 0; }
|
||||
label.iPhoneCheckLabelOff span {
|
||||
padding-right: 8px; }
|
||||
|
||||
.iPhoneCheckHandle {
|
||||
display: block;
|
||||
height: 27px;
|
||||
cursor: pointer;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 0;
|
||||
background: url('/img/iphone-style-checkboxes/slider_left.png?1282083753') no-repeat;
|
||||
padding-left: 3px; }
|
||||
|
||||
.iPhoneCheckHandleRight {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
padding-right: 3px;
|
||||
background: url('/img/iphone-style-checkboxes/slider_right.png?1282083753') no-repeat right 0; }
|
||||
|
||||
.iPhoneCheckHandleCenter {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
background: url('/img/iphone-style-checkboxes/slider_center.png?1282083753'); }
|
||||
@@ -1,33 +0,0 @@
|
||||
#!/mod/bin/jimsh
|
||||
|
||||
package require cgi
|
||||
source /mod/webif/lib/setup
|
||||
require system.class chunked
|
||||
|
||||
cgi_input
|
||||
#cgi_dump
|
||||
|
||||
set diag [cgi_get diag general]
|
||||
|
||||
start_chunked
|
||||
|
||||
if {[system modversion 1] < 113} {
|
||||
chunk ">>> Diagnostics only available with customised firmware 1.13 or above."
|
||||
end_chunked
|
||||
exit
|
||||
}
|
||||
|
||||
chunk ">>> Beginning diagnostic $diag\r\n"
|
||||
|
||||
set bcmd "|/bin/diag $diag"
|
||||
set fd [open $bcmd r]
|
||||
while {[gets $fd line] >= 0} {
|
||||
chunk "$line\r\n"
|
||||
#chunk_pad
|
||||
}
|
||||
close $fd
|
||||
chunk "\r\n"
|
||||
chunk ">>> Ending diagnostic $diag\r\n"
|
||||
|
||||
end_chunked
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
<!--#include virtual="/lib/header.shtml" -->
|
||||
<!--#exec cmd="/mod/webif/include/epg.jim" -->
|
||||
<!--#include virtual="/lib/footer.shtml" -->
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
|
||||
jQuery.ajaxPrefilter(function(options, _, jqXHR) {
|
||||
|
||||
if (jQuery.isFunction(options.progress)) {
|
||||
|
||||
var xhrFactory = options.xhr,
|
||||
interval;
|
||||
|
||||
options.xhr = function() {
|
||||
|
||||
var xhr = xhrFactory.apply(this, arguments),
|
||||
partial = "",
|
||||
prevcount = 1;
|
||||
|
||||
interval = setInterval(function() {
|
||||
|
||||
var responseText,
|
||||
jQueryPartial;
|
||||
|
||||
try {
|
||||
|
||||
responseText = xhr.responseText;
|
||||
|
||||
if (responseText && (responseText.length > partial.length))
|
||||
{
|
||||
|
||||
partial = responseText;
|
||||
jQueryPartial = $(partial).filter("*")
|
||||
|
||||
if (jQueryPartial.length > prevcount) {
|
||||
prevcount = jQueryPartial.length;
|
||||
options.progress(jQueryPartial.filter("*:not(:last)"));
|
||||
}
|
||||
}
|
||||
} catch(e) {
|
||||
if (window.console)
|
||||
console.log(e);
|
||||
}
|
||||
}, options.progressInterval);
|
||||
|
||||
return xhr;
|
||||
};
|
||||
function stop()
|
||||
{
|
||||
if (interval)
|
||||
clearInterval(interval);
|
||||
}
|
||||
jqXHR.then(stop, stop);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,50 +0,0 @@
|
||||
/*
|
||||
* jQuery Plugin : jConfirmAction
|
||||
*
|
||||
* by Hidayat Sagita
|
||||
* http://www.webstuffshare.com
|
||||
* Licensed Under GPL version 2 license.
|
||||
*
|
||||
*/
|
||||
(function($){
|
||||
|
||||
jQuery.fn.jConfirmAction = function (options, callback) {
|
||||
|
||||
// Some jConfirmAction options (limited to customize language) :
|
||||
// question : a text for your question.
|
||||
// yesAnswer : a text for Yes answer.
|
||||
// cancelAnswer : a text for Cancel/No answer.
|
||||
var theOptions = jQuery.extend ({
|
||||
question: "Are You Sure?",
|
||||
yesAnswer: "Yes",
|
||||
cancelAnswer: "Cancel"
|
||||
}, options);
|
||||
|
||||
return this.each (function () {
|
||||
$(this).click(function(e) {
|
||||
|
||||
e.preventDefault();
|
||||
|
||||
var p = $(this);
|
||||
|
||||
if($(this).next('.question').length <= 0)
|
||||
$(this).after('<div class="jcaquestion">'+theOptions.question+'<br/> <span class="jcayes">'+theOptions.yesAnswer+'</span><span class="jcacancel">'+theOptions.cancelAnswer+'</span></div>');
|
||||
|
||||
$(this).next('.jcaquestion').animate({opacity: 1}, 300);
|
||||
|
||||
$('.jcayes').bind('click', function() {
|
||||
callback(p);
|
||||
});
|
||||
|
||||
$('.jcacancel').bind('click', function(){
|
||||
$(this).parents('.jcaquestion').fadeOut(300, function() {
|
||||
$(this).remove();
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
})(jQuery);
|
||||
2
var/mongoose/html/js/jquery.js
vendored
@@ -1 +0,0 @@
|
||||
<!--#exec cmd="/mod/webif/html/lib/footer.jim" -->
|
||||
@@ -1,35 +0,0 @@
|
||||
#!/mod/bin/jimsh
|
||||
|
||||
puts {
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<title>
|
||||
}
|
||||
source /mod/webif/include/model.jim
|
||||
puts {
|
||||
</title>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE9" />
|
||||
<link rel="shortcut icon" href=/img/favicon.ico />
|
||||
<link type="text/css" href="/lib/jquery.ui/css/custom-theme/jquery-ui.css"
|
||||
rel="Stylesheet" />
|
||||
<link href="/css/style.css" rel="Stylesheet" type="text/css" />
|
||||
<script type="text/javascript" src="/js/jquery.js"></script>
|
||||
<script type="text/javascript" src="/lib/jquery.ui/js/jquery-ui.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
}
|
||||
|
||||
source /mod/webif/html/lib/topbar.jim
|
||||
puts "<div id=restart_block>"
|
||||
source /mod/webif/include/restart.jim
|
||||
puts "</div>"
|
||||
|
||||
puts {
|
||||
<div style="clear: both">
|
||||
|
||||
<!-- end of header -->
|
||||
}
|
||||
|
||||
set renderstart [clock milliseconds]
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
<!--#exec cmd="/mod/webif/html/lib/header.jim" -->
|
||||
|
Before Width: | Height: | Size: 7.6 KiB |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 3.6 KiB |
@@ -1 +0,0 @@
|
||||
jquery.mobile-1.2.0.min.css
|
||||
@@ -1 +0,0 @@
|
||||
jquery.mobile-1.2.0.min.js
|
||||
|
Before Width: | Height: | Size: 199 B |
|
Before Width: | Height: | Size: 180 B |
|
Before Width: | Height: | Size: 180 B |
|
Before Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 150 B |
|
Before Width: | Height: | Size: 100 B |
|
Before Width: | Height: | Size: 4.3 KiB |
|
Before Width: | Height: | Size: 5.2 KiB |
|
Before Width: | Height: | Size: 5.2 KiB |
|
Before Width: | Height: | Size: 4.3 KiB |
|
Before Width: | Height: | Size: 4.3 KiB |
|
Before Width: | Height: | Size: 4.3 KiB |
|
Before Width: | Height: | Size: 4.3 KiB |
@@ -1,563 +0,0 @@
|
||||
/*!
|
||||
* jQuery UI CSS Framework 1.8.24
|
||||
*
|
||||
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Theming/API
|
||||
*/
|
||||
|
||||
/* Layout helpers
|
||||
----------------------------------*/
|
||||
.ui-helper-hidden { display: none; }
|
||||
.ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); }
|
||||
.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
|
||||
.ui-helper-clearfix:before, .ui-helper-clearfix:after { content: ""; display: table; }
|
||||
.ui-helper-clearfix:after { clear: both; }
|
||||
.ui-helper-clearfix { zoom: 1; }
|
||||
.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
|
||||
|
||||
|
||||
/* Interaction Cues
|
||||
----------------------------------*/
|
||||
.ui-state-disabled { cursor: default !important; }
|
||||
|
||||
|
||||
/* Icons
|
||||
----------------------------------*/
|
||||
|
||||
/* states and images */
|
||||
.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
|
||||
|
||||
|
||||
/* Misc visuals
|
||||
----------------------------------*/
|
||||
|
||||
/* Overlays */
|
||||
.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
|
||||
|
||||
|
||||
/*!
|
||||
* jQuery UI CSS Framework 1.8.24
|
||||
*
|
||||
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Theming/API
|
||||
*
|
||||
* To view and modify this theme, visit http://jqueryui.com/themeroller/?ctl=themeroller&ffDefault=Segoe%20UI,%20Arial,%20sans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=8px&bgColorHeader=ccff99&bgTextureHeader=12_gloss_wave.png&bgImgOpacityHeader=45&borderColorHeader=494437&fcHeader=000000&iconColorHeader=554e34&bgColorContent=ffffcc&bgTextureContent=03_highlight_soft.png&bgImgOpacityContent=100&borderColorContent=8e846b&fcContent=383838&iconColorContent=d19405&bgColorDefault=fece2f&bgTextureDefault=12_gloss_wave.png&bgImgOpacityDefault=60&borderColorDefault=d19405&fcDefault=4c3000&iconColorDefault=3d3d3d&bgColorHover=ffdd57&bgTextureHover=12_gloss_wave.png&bgImgOpacityHover=70&borderColorHover=a45b13&fcHover=381f00&iconColorHover=bd7b00&bgColorActive=ffffff&bgTextureActive=05_inset_soft.png&bgImgOpacityActive=30&borderColorActive=655e4e&fcActive=0074c7&iconColorActive=eb990f&bgColorHighlight=fff9e5&bgTextureHighlight=12_gloss_wave.png&bgImgOpacityHighlight=90&borderColorHighlight=eeb420&fcHighlight=1f1f1f&iconColorHighlight=ed9f26&bgColorError=d34d17&bgTextureError=07_diagonals_medium.png&bgImgOpacityError=20&borderColorError=ffb73d&fcError=ffffff&iconColorError=ffe180&bgColorOverlay=5c5c5c&bgTextureOverlay=01_flat.png&bgImgOpacityOverlay=50&opacityOverlay=80&bgColorShadow=cccccc&bgTextureShadow=01_flat.png&bgImgOpacityShadow=30&opacityShadow=60&thicknessShadow=7px&offsetTopShadow=-7px&offsetLeftShadow=-7px&cornerRadiusShadow=8px
|
||||
*/
|
||||
|
||||
|
||||
/* Component containers
|
||||
----------------------------------*/
|
||||
.ui-widget { font-family: Segoe UI, Arial, sans-serif; font-size: 1.1em; }
|
||||
.ui-widget .ui-widget { font-size: 1em; }
|
||||
.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Segoe UI, Arial, sans-serif; font-size: 1em; }
|
||||
.ui-widget-content { border: 1px solid #8e846b; background: #ffffcc url(images/ui-bg_highlight-soft_100_ffffcc_1x100.png) 50% top repeat-x; color: #383838; }
|
||||
.ui-widget-content a { color: #383838; }
|
||||
.ui-widget-header { border: 1px solid #494437; background: #ccff99 url(images/ui-bg_gloss-wave_45_ccff99_500x100.png) 50% 50% repeat-x; color: #000000; font-weight: bold; }
|
||||
.ui-widget-header a { color: #000000; }
|
||||
|
||||
/* Interaction states
|
||||
----------------------------------*/
|
||||
.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #d19405; background: #fece2f url(images/ui-bg_gloss-wave_60_fece2f_500x100.png) 50% 50% repeat-x; font-weight: bold; color: #4c3000; }
|
||||
.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #4c3000; text-decoration: none; }
|
||||
.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #a45b13; background: #ffdd57 url(images/ui-bg_gloss-wave_70_ffdd57_500x100.png) 50% 50% repeat-x; font-weight: bold; color: #381f00; }
|
||||
.ui-state-hover a, .ui-state-hover a:hover { color: #381f00; text-decoration: none; }
|
||||
.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #655e4e; background: #ffffff url(images/ui-bg_inset-soft_30_ffffff_1x100.png) 50% 50% repeat-x; font-weight: bold; color: #0074c7; }
|
||||
.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #0074c7; text-decoration: none; }
|
||||
.ui-widget :active { outline: none; }
|
||||
|
||||
/* Interaction Cues
|
||||
----------------------------------*/
|
||||
.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #eeb420; background: #fff9e5 url(images/ui-bg_gloss-wave_90_fff9e5_500x100.png) 50% top repeat-x; color: #1f1f1f; }
|
||||
.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #1f1f1f; }
|
||||
.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #ffb73d; background: #d34d17 url(images/ui-bg_diagonals-medium_20_d34d17_40x40.png) 50% 50% repeat; color: #ffffff; }
|
||||
.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #ffffff; }
|
||||
.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #ffffff; }
|
||||
.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; }
|
||||
.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
|
||||
.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
|
||||
|
||||
/* Icons
|
||||
----------------------------------*/
|
||||
|
||||
/* states and images */
|
||||
.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_d19405_256x240.png); }
|
||||
.ui-widget-content .ui-icon {background-image: url(images/ui-icons_d19405_256x240.png); }
|
||||
.ui-widget-header .ui-icon {background-image: url(images/ui-icons_554e34_256x240.png); }
|
||||
.ui-state-default .ui-icon { background-image: url(images/ui-icons_3d3d3d_256x240.png); }
|
||||
.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_bd7b00_256x240.png); }
|
||||
.ui-state-active .ui-icon {background-image: url(images/ui-icons_eb990f_256x240.png); }
|
||||
.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_ed9f26_256x240.png); }
|
||||
.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_ffe180_256x240.png); }
|
||||
|
||||
/* positioning */
|
||||
.ui-icon-carat-1-n { background-position: 0 0; }
|
||||
.ui-icon-carat-1-ne { background-position: -16px 0; }
|
||||
.ui-icon-carat-1-e { background-position: -32px 0; }
|
||||
.ui-icon-carat-1-se { background-position: -48px 0; }
|
||||
.ui-icon-carat-1-s { background-position: -64px 0; }
|
||||
.ui-icon-carat-1-sw { background-position: -80px 0; }
|
||||
.ui-icon-carat-1-w { background-position: -96px 0; }
|
||||
.ui-icon-carat-1-nw { background-position: -112px 0; }
|
||||
.ui-icon-carat-2-n-s { background-position: -128px 0; }
|
||||
.ui-icon-carat-2-e-w { background-position: -144px 0; }
|
||||
.ui-icon-triangle-1-n { background-position: 0 -16px; }
|
||||
.ui-icon-triangle-1-ne { background-position: -16px -16px; }
|
||||
.ui-icon-triangle-1-e { background-position: -32px -16px; }
|
||||
.ui-icon-triangle-1-se { background-position: -48px -16px; }
|
||||
.ui-icon-triangle-1-s { background-position: -64px -16px; }
|
||||
.ui-icon-triangle-1-sw { background-position: -80px -16px; }
|
||||
.ui-icon-triangle-1-w { background-position: -96px -16px; }
|
||||
.ui-icon-triangle-1-nw { background-position: -112px -16px; }
|
||||
.ui-icon-triangle-2-n-s { background-position: -128px -16px; }
|
||||
.ui-icon-triangle-2-e-w { background-position: -144px -16px; }
|
||||
.ui-icon-arrow-1-n { background-position: 0 -32px; }
|
||||
.ui-icon-arrow-1-ne { background-position: -16px -32px; }
|
||||
.ui-icon-arrow-1-e { background-position: -32px -32px; }
|
||||
.ui-icon-arrow-1-se { background-position: -48px -32px; }
|
||||
.ui-icon-arrow-1-s { background-position: -64px -32px; }
|
||||
.ui-icon-arrow-1-sw { background-position: -80px -32px; }
|
||||
.ui-icon-arrow-1-w { background-position: -96px -32px; }
|
||||
.ui-icon-arrow-1-nw { background-position: -112px -32px; }
|
||||
.ui-icon-arrow-2-n-s { background-position: -128px -32px; }
|
||||
.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
|
||||
.ui-icon-arrow-2-e-w { background-position: -160px -32px; }
|
||||
.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
|
||||
.ui-icon-arrowstop-1-n { background-position: -192px -32px; }
|
||||
.ui-icon-arrowstop-1-e { background-position: -208px -32px; }
|
||||
.ui-icon-arrowstop-1-s { background-position: -224px -32px; }
|
||||
.ui-icon-arrowstop-1-w { background-position: -240px -32px; }
|
||||
.ui-icon-arrowthick-1-n { background-position: 0 -48px; }
|
||||
.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
|
||||
.ui-icon-arrowthick-1-e { background-position: -32px -48px; }
|
||||
.ui-icon-arrowthick-1-se { background-position: -48px -48px; }
|
||||
.ui-icon-arrowthick-1-s { background-position: -64px -48px; }
|
||||
.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
|
||||
.ui-icon-arrowthick-1-w { background-position: -96px -48px; }
|
||||
.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
|
||||
.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
|
||||
.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
|
||||
.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
|
||||
.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
|
||||
.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
|
||||
.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
|
||||
.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
|
||||
.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
|
||||
.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
|
||||
.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
|
||||
.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
|
||||
.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
|
||||
.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
|
||||
.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
|
||||
.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
|
||||
.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
|
||||
.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
|
||||
.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
|
||||
.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
|
||||
.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
|
||||
.ui-icon-arrow-4 { background-position: 0 -80px; }
|
||||
.ui-icon-arrow-4-diag { background-position: -16px -80px; }
|
||||
.ui-icon-extlink { background-position: -32px -80px; }
|
||||
.ui-icon-newwin { background-position: -48px -80px; }
|
||||
.ui-icon-refresh { background-position: -64px -80px; }
|
||||
.ui-icon-shuffle { background-position: -80px -80px; }
|
||||
.ui-icon-transfer-e-w { background-position: -96px -80px; }
|
||||
.ui-icon-transferthick-e-w { background-position: -112px -80px; }
|
||||
.ui-icon-folder-collapsed { background-position: 0 -96px; }
|
||||
.ui-icon-folder-open { background-position: -16px -96px; }
|
||||
.ui-icon-document { background-position: -32px -96px; }
|
||||
.ui-icon-document-b { background-position: -48px -96px; }
|
||||
.ui-icon-note { background-position: -64px -96px; }
|
||||
.ui-icon-mail-closed { background-position: -80px -96px; }
|
||||
.ui-icon-mail-open { background-position: -96px -96px; }
|
||||
.ui-icon-suitcase { background-position: -112px -96px; }
|
||||
.ui-icon-comment { background-position: -128px -96px; }
|
||||
.ui-icon-person { background-position: -144px -96px; }
|
||||
.ui-icon-print { background-position: -160px -96px; }
|
||||
.ui-icon-trash { background-position: -176px -96px; }
|
||||
.ui-icon-locked { background-position: -192px -96px; }
|
||||
.ui-icon-unlocked { background-position: -208px -96px; }
|
||||
.ui-icon-bookmark { background-position: -224px -96px; }
|
||||
.ui-icon-tag { background-position: -240px -96px; }
|
||||
.ui-icon-home { background-position: 0 -112px; }
|
||||
.ui-icon-flag { background-position: -16px -112px; }
|
||||
.ui-icon-calendar { background-position: -32px -112px; }
|
||||
.ui-icon-cart { background-position: -48px -112px; }
|
||||
.ui-icon-pencil { background-position: -64px -112px; }
|
||||
.ui-icon-clock { background-position: -80px -112px; }
|
||||
.ui-icon-disk { background-position: -96px -112px; }
|
||||
.ui-icon-calculator { background-position: -112px -112px; }
|
||||
.ui-icon-zoomin { background-position: -128px -112px; }
|
||||
.ui-icon-zoomout { background-position: -144px -112px; }
|
||||
.ui-icon-search { background-position: -160px -112px; }
|
||||
.ui-icon-wrench { background-position: -176px -112px; }
|
||||
.ui-icon-gear { background-position: -192px -112px; }
|
||||
.ui-icon-heart { background-position: -208px -112px; }
|
||||
.ui-icon-star { background-position: -224px -112px; }
|
||||
.ui-icon-link { background-position: -240px -112px; }
|
||||
.ui-icon-cancel { background-position: 0 -128px; }
|
||||
.ui-icon-plus { background-position: -16px -128px; }
|
||||
.ui-icon-plusthick { background-position: -32px -128px; }
|
||||
.ui-icon-minus { background-position: -48px -128px; }
|
||||
.ui-icon-minusthick { background-position: -64px -128px; }
|
||||
.ui-icon-close { background-position: -80px -128px; }
|
||||
.ui-icon-closethick { background-position: -96px -128px; }
|
||||
.ui-icon-key { background-position: -112px -128px; }
|
||||
.ui-icon-lightbulb { background-position: -128px -128px; }
|
||||
.ui-icon-scissors { background-position: -144px -128px; }
|
||||
.ui-icon-clipboard { background-position: -160px -128px; }
|
||||
.ui-icon-copy { background-position: -176px -128px; }
|
||||
.ui-icon-contact { background-position: -192px -128px; }
|
||||
.ui-icon-image { background-position: -208px -128px; }
|
||||
.ui-icon-video { background-position: -224px -128px; }
|
||||
.ui-icon-script { background-position: -240px -128px; }
|
||||
.ui-icon-alert { background-position: 0 -144px; }
|
||||
.ui-icon-info { background-position: -16px -144px; }
|
||||
.ui-icon-notice { background-position: -32px -144px; }
|
||||
.ui-icon-help { background-position: -48px -144px; }
|
||||
.ui-icon-check { background-position: -64px -144px; }
|
||||
.ui-icon-bullet { background-position: -80px -144px; }
|
||||
.ui-icon-radio-off { background-position: -96px -144px; }
|
||||
.ui-icon-radio-on { background-position: -112px -144px; }
|
||||
.ui-icon-pin-w { background-position: -128px -144px; }
|
||||
.ui-icon-pin-s { background-position: -144px -144px; }
|
||||
.ui-icon-play { background-position: 0 -160px; }
|
||||
.ui-icon-pause { background-position: -16px -160px; }
|
||||
.ui-icon-seek-next { background-position: -32px -160px; }
|
||||
.ui-icon-seek-prev { background-position: -48px -160px; }
|
||||
.ui-icon-seek-end { background-position: -64px -160px; }
|
||||
.ui-icon-seek-start { background-position: -80px -160px; }
|
||||
/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
|
||||
.ui-icon-seek-first { background-position: -80px -160px; }
|
||||
.ui-icon-stop { background-position: -96px -160px; }
|
||||
.ui-icon-eject { background-position: -112px -160px; }
|
||||
.ui-icon-volume-off { background-position: -128px -160px; }
|
||||
.ui-icon-volume-on { background-position: -144px -160px; }
|
||||
.ui-icon-power { background-position: 0 -176px; }
|
||||
.ui-icon-signal-diag { background-position: -16px -176px; }
|
||||
.ui-icon-signal { background-position: -32px -176px; }
|
||||
.ui-icon-battery-0 { background-position: -48px -176px; }
|
||||
.ui-icon-battery-1 { background-position: -64px -176px; }
|
||||
.ui-icon-battery-2 { background-position: -80px -176px; }
|
||||
.ui-icon-battery-3 { background-position: -96px -176px; }
|
||||
.ui-icon-circle-plus { background-position: 0 -192px; }
|
||||
.ui-icon-circle-minus { background-position: -16px -192px; }
|
||||
.ui-icon-circle-close { background-position: -32px -192px; }
|
||||
.ui-icon-circle-triangle-e { background-position: -48px -192px; }
|
||||
.ui-icon-circle-triangle-s { background-position: -64px -192px; }
|
||||
.ui-icon-circle-triangle-w { background-position: -80px -192px; }
|
||||
.ui-icon-circle-triangle-n { background-position: -96px -192px; }
|
||||
.ui-icon-circle-arrow-e { background-position: -112px -192px; }
|
||||
.ui-icon-circle-arrow-s { background-position: -128px -192px; }
|
||||
.ui-icon-circle-arrow-w { background-position: -144px -192px; }
|
||||
.ui-icon-circle-arrow-n { background-position: -160px -192px; }
|
||||
.ui-icon-circle-zoomin { background-position: -176px -192px; }
|
||||
.ui-icon-circle-zoomout { background-position: -192px -192px; }
|
||||
.ui-icon-circle-check { background-position: -208px -192px; }
|
||||
.ui-icon-circlesmall-plus { background-position: 0 -208px; }
|
||||
.ui-icon-circlesmall-minus { background-position: -16px -208px; }
|
||||
.ui-icon-circlesmall-close { background-position: -32px -208px; }
|
||||
.ui-icon-squaresmall-plus { background-position: -48px -208px; }
|
||||
.ui-icon-squaresmall-minus { background-position: -64px -208px; }
|
||||
.ui-icon-squaresmall-close { background-position: -80px -208px; }
|
||||
.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
|
||||
.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
|
||||
.ui-icon-grip-solid-vertical { background-position: -32px -224px; }
|
||||
.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
|
||||
.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
|
||||
.ui-icon-grip-diagonal-se { background-position: -80px -224px; }
|
||||
|
||||
|
||||
/* Misc visuals
|
||||
----------------------------------*/
|
||||
|
||||
/* Corner radius */
|
||||
.ui-corner-all, .ui-corner-top, .ui-corner-left, .ui-corner-tl { -moz-border-radius-topleft: 8px; -webkit-border-top-left-radius: 8px; -khtml-border-top-left-radius: 8px; border-top-left-radius: 8px; }
|
||||
.ui-corner-all, .ui-corner-top, .ui-corner-right, .ui-corner-tr { -moz-border-radius-topright: 8px; -webkit-border-top-right-radius: 8px; -khtml-border-top-right-radius: 8px; border-top-right-radius: 8px; }
|
||||
.ui-corner-all, .ui-corner-bottom, .ui-corner-left, .ui-corner-bl { -moz-border-radius-bottomleft: 8px; -webkit-border-bottom-left-radius: 8px; -khtml-border-bottom-left-radius: 8px; border-bottom-left-radius: 8px; }
|
||||
.ui-corner-all, .ui-corner-bottom, .ui-corner-right, .ui-corner-br { -moz-border-radius-bottomright: 8px; -webkit-border-bottom-right-radius: 8px; -khtml-border-bottom-right-radius: 8px; border-bottom-right-radius: 8px; }
|
||||
|
||||
/* Overlays */
|
||||
.ui-widget-overlay { background: #5c5c5c url(images/ui-bg_flat_50_5c5c5c_40x100.png) 50% 50% repeat-x; opacity: .80;filter:Alpha(Opacity=80); }
|
||||
.ui-widget-shadow { margin: -7px 0 0 -7px; padding: 7px; background: #cccccc url(images/ui-bg_flat_30_cccccc_40x100.png) 50% 50% repeat-x; opacity: .60;filter:Alpha(Opacity=60); -moz-border-radius: 8px; -khtml-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; }/*!
|
||||
* jQuery UI Resizable 1.8.24
|
||||
*
|
||||
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Resizable#theming
|
||||
*/
|
||||
.ui-resizable { position: relative;}
|
||||
.ui-resizable-handle { position: absolute;font-size: 0.1px; display: block; }
|
||||
.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; }
|
||||
.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; }
|
||||
.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; }
|
||||
.ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; }
|
||||
.ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; }
|
||||
.ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; }
|
||||
.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; }
|
||||
.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; }
|
||||
.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/*!
|
||||
* jQuery UI Selectable 1.8.24
|
||||
*
|
||||
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Selectable#theming
|
||||
*/
|
||||
.ui-selectable-helper { position: absolute; z-index: 100; border:1px dotted black; }
|
||||
/*!
|
||||
* jQuery UI Accordion 1.8.24
|
||||
*
|
||||
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Accordion#theming
|
||||
*/
|
||||
/* IE/Win - Fix animation bug - #4615 */
|
||||
.ui-accordion { width: 100%; }
|
||||
.ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; }
|
||||
.ui-accordion .ui-accordion-li-fix { display: inline; }
|
||||
.ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; }
|
||||
.ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em .7em; }
|
||||
.ui-accordion-icons .ui-accordion-header a { padding-left: 2.2em; }
|
||||
.ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; }
|
||||
.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; }
|
||||
.ui-accordion .ui-accordion-content-active { display: block; }
|
||||
/*!
|
||||
* jQuery UI Autocomplete 1.8.24
|
||||
*
|
||||
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Autocomplete#theming
|
||||
*/
|
||||
.ui-autocomplete { position: absolute; cursor: default; }
|
||||
|
||||
/* workarounds */
|
||||
* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */
|
||||
|
||||
/*
|
||||
* jQuery UI Menu 1.8.24
|
||||
*
|
||||
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Menu#theming
|
||||
*/
|
||||
.ui-menu {
|
||||
list-style:none;
|
||||
padding: 2px;
|
||||
margin: 0;
|
||||
display:block;
|
||||
float: left;
|
||||
}
|
||||
.ui-menu .ui-menu {
|
||||
margin-top: -3px;
|
||||
}
|
||||
.ui-menu .ui-menu-item {
|
||||
margin:0;
|
||||
padding: 0;
|
||||
zoom: 1;
|
||||
float: left;
|
||||
clear: left;
|
||||
width: 100%;
|
||||
}
|
||||
.ui-menu .ui-menu-item a {
|
||||
text-decoration:none;
|
||||
display:block;
|
||||
padding:.2em .4em;
|
||||
line-height:1.5;
|
||||
zoom:1;
|
||||
}
|
||||
.ui-menu .ui-menu-item a.ui-state-hover,
|
||||
.ui-menu .ui-menu-item a.ui-state-active {
|
||||
font-weight: normal;
|
||||
margin: -1px;
|
||||
}
|
||||
/*!
|
||||
* jQuery UI Button 1.8.24
|
||||
*
|
||||
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Button#theming
|
||||
*/
|
||||
.ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; text-decoration: none !important; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */
|
||||
.ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */
|
||||
button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */
|
||||
.ui-button-icons-only { width: 3.4em; }
|
||||
button.ui-button-icons-only { width: 3.7em; }
|
||||
|
||||
/*button text element */
|
||||
.ui-button .ui-button-text { display: block; line-height: 1.4; }
|
||||
.ui-button-text-only .ui-button-text { padding: .4em 1em; }
|
||||
.ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; }
|
||||
.ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; }
|
||||
.ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 2.1em .4em 1em; }
|
||||
.ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; }
|
||||
/* no icon support for input elements, provide padding by default */
|
||||
input.ui-button { padding: .4em 1em; }
|
||||
|
||||
/*button icon element(s) */
|
||||
.ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; }
|
||||
.ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; }
|
||||
.ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; }
|
||||
.ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
|
||||
.ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
|
||||
|
||||
/*button sets*/
|
||||
.ui-buttonset { margin-right: 7px; }
|
||||
.ui-buttonset .ui-button { margin-left: 0; margin-right: -.3em; }
|
||||
|
||||
/* workarounds */
|
||||
button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */
|
||||
/*!
|
||||
* jQuery UI Dialog 1.8.24
|
||||
*
|
||||
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Dialog#theming
|
||||
*/
|
||||
.ui-dialog { position: absolute; padding: .2em; width: 300px; overflow: hidden; }
|
||||
.ui-dialog .ui-dialog-titlebar { padding: .4em 1em; position: relative; }
|
||||
.ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .1em 0; }
|
||||
.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; }
|
||||
.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; }
|
||||
.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; }
|
||||
.ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; }
|
||||
.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; }
|
||||
.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; }
|
||||
.ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; }
|
||||
.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; }
|
||||
.ui-draggable .ui-dialog-titlebar { cursor: move; }
|
||||
/*!
|
||||
* jQuery UI Slider 1.8.24
|
||||
*
|
||||
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Slider#theming
|
||||
*/
|
||||
.ui-slider { position: relative; text-align: left; }
|
||||
.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; }
|
||||
.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; }
|
||||
|
||||
.ui-slider-horizontal { height: .8em; }
|
||||
.ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; }
|
||||
.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
|
||||
.ui-slider-horizontal .ui-slider-range-min { left: 0; }
|
||||
.ui-slider-horizontal .ui-slider-range-max { right: 0; }
|
||||
|
||||
.ui-slider-vertical { width: .8em; height: 100px; }
|
||||
.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; }
|
||||
.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }
|
||||
.ui-slider-vertical .ui-slider-range-min { bottom: 0; }
|
||||
.ui-slider-vertical .ui-slider-range-max { top: 0; }/*!
|
||||
* jQuery UI Tabs 1.8.24
|
||||
*
|
||||
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Tabs#theming
|
||||
*/
|
||||
.ui-tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
|
||||
.ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; }
|
||||
.ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; }
|
||||
.ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; }
|
||||
.ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 1px; }
|
||||
.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; }
|
||||
.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
|
||||
.ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; }
|
||||
.ui-tabs .ui-tabs-hide { display: none !important; }
|
||||
/*!
|
||||
* jQuery UI Datepicker 1.8.24
|
||||
*
|
||||
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Datepicker#theming
|
||||
*/
|
||||
.ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; }
|
||||
.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; }
|
||||
.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; }
|
||||
.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; }
|
||||
.ui-datepicker .ui-datepicker-prev { left:2px; }
|
||||
.ui-datepicker .ui-datepicker-next { right:2px; }
|
||||
.ui-datepicker .ui-datepicker-prev-hover { left:1px; }
|
||||
.ui-datepicker .ui-datepicker-next-hover { right:1px; }
|
||||
.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; }
|
||||
.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; }
|
||||
.ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; }
|
||||
.ui-datepicker select.ui-datepicker-month-year {width: 100%;}
|
||||
.ui-datepicker select.ui-datepicker-month,
|
||||
.ui-datepicker select.ui-datepicker-year { width: 49%;}
|
||||
.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; }
|
||||
.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; }
|
||||
.ui-datepicker td { border: 0; padding: 1px; }
|
||||
.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; }
|
||||
.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; }
|
||||
.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }
|
||||
.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; }
|
||||
|
||||
/* with multiple calendars */
|
||||
.ui-datepicker.ui-datepicker-multi { width:auto; }
|
||||
.ui-datepicker-multi .ui-datepicker-group { float:left; }
|
||||
.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; }
|
||||
.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; }
|
||||
.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; }
|
||||
.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; }
|
||||
.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; }
|
||||
.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; }
|
||||
.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; }
|
||||
.ui-datepicker-row-break { clear:both; width:100%; font-size:0em; }
|
||||
|
||||
/* RTL support */
|
||||
.ui-datepicker-rtl { direction: rtl; }
|
||||
.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; }
|
||||
.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; }
|
||||
.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; }
|
||||
.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; }
|
||||
.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; }
|
||||
.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; }
|
||||
.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; }
|
||||
.ui-datepicker-rtl .ui-datepicker-group { float:right; }
|
||||
.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
|
||||
.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
|
||||
|
||||
/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
|
||||
.ui-datepicker-cover {
|
||||
position: absolute; /*must have*/
|
||||
z-index: -1; /*must have*/
|
||||
filter: mask(); /*must have*/
|
||||
top: -4px; /*must have*/
|
||||
left: -4px; /*must have*/
|
||||
width: 200px; /*must have*/
|
||||
height: 200px; /*must have*/
|
||||
}/*!
|
||||
* jQuery UI Progressbar 1.8.24
|
||||
*
|
||||
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Progressbar#theming
|
||||
*/
|
||||
.ui-progressbar { height:2em; text-align: left; overflow: hidden; }
|
||||
.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; }
|
||||
@@ -1 +0,0 @@
|
||||
jquery-ui-1.8.24.custom.css
|
||||
@@ -1 +0,0 @@
|
||||
jquery-ui-1.8.24.custom.min.js
|
||||
@@ -1,32 +0,0 @@
|
||||
#!/mod/bin/jimsh
|
||||
|
||||
source /mod/webif/lib/setup
|
||||
require system.class
|
||||
|
||||
lassign [system diskspace] size used perc free fperc
|
||||
set file [format "%02d" [expr {$perc * 25 / 100 + 1}]]
|
||||
|
||||
# The HD model only has the USB images which are blue. I prefer the green
|
||||
# one so use those if available.
|
||||
if {[file exists /opt/share/images/blue/345_2_14_ST_HDD_01.png]} {
|
||||
set prefix 345_2_14_ST_HDD
|
||||
} else {
|
||||
set prefix 345_1_27_ST_USB
|
||||
}
|
||||
|
||||
puts "
|
||||
|
||||
<span style=\"float: right;
|
||||
background:url('/images/345_1_27_ST_USB_BG.png')
|
||||
no-repeat\">
|
||||
<img src=/images/${prefix}_$file.png>
|
||||
</span>
|
||||
|
||||
<span style=\"float: right\">
|
||||
<br>
|
||||
Total space: $size<br>
|
||||
Used: $used ($perc%)<br>
|
||||
Free: $free ($fperc%)
|
||||
</span>
|
||||
"
|
||||
|
||||
@@ -1,64 +0,0 @@
|
||||
#!/mod/bin/jimsh
|
||||
|
||||
source /mod/webif/lib/setup
|
||||
require settings.class
|
||||
|
||||
proc menuitem {title icon link {width 217} {height 0} {extra ""}} {{num 0}} {
|
||||
incr num
|
||||
if {$title eq ""} return
|
||||
if {$num > 4} {
|
||||
puts {</div><div style="clear: both; padding-top: 1em">}
|
||||
set num 1
|
||||
}
|
||||
if {$extra ne ""} { append extra " " }
|
||||
puts -nonewline "
|
||||
<div class=left num=$num>
|
||||
<center>
|
||||
<a href=$link>
|
||||
<img src=$icon ${extra}border=0 width=$width"
|
||||
if {$height} { puts -nonewline " height=$height" }
|
||||
puts -nonewline ">
|
||||
</a>
|
||||
<br>
|
||||
<a href=$link>
|
||||
<b>$title</b>
|
||||
</a>
|
||||
<br>
|
||||
</center>
|
||||
</div>
|
||||
"
|
||||
}
|
||||
|
||||
if {[[settings] epg_style] eq "grid"} {
|
||||
set epglink "/cgi-bin/xepg.jim"
|
||||
} else {
|
||||
set epglink "/epg.shtml"
|
||||
}
|
||||
|
||||
puts {<div style="clear: both">}
|
||||
|
||||
menuitem "Browse Media Files" "/images/323_1_10_Menu_Video.png" \
|
||||
/cgi-bin/browse.jim 217 228
|
||||
menuitem "Scheduled Events" "/images/321_1_00_Menu_CHList.png" \
|
||||
/sched/sched.jim 217 228
|
||||
menuitem "EPG" "/images/328_1_26_Menu_TV_Guide.png" \
|
||||
$epglink 217 228
|
||||
|
||||
if {[file exists "/mod/bin/ir"]} {
|
||||
menuitem "Remote" "/img/remote.png" /plugin/ir/remote.jim 217 228
|
||||
}
|
||||
|
||||
if {[[settings] nomobile] eq "0"} {
|
||||
menuitem "Mobile Version" "/img/mobile.png" /m/ 217 228
|
||||
}
|
||||
|
||||
menuitem "Service Management" "/img/spanner.png" \
|
||||
/services.shtml 217 228
|
||||
menuitem "Package Management" "/img/packages.png" \
|
||||
/pkg/index.shtml 217 228
|
||||
menuitem "Settings" "/images/326_1_00_Menu_Settings.png" \
|
||||
/cgi-bin/settings.jim 217 228
|
||||
|
||||
menuitem "Diagnostics" "/img/diagnostics.png" \
|
||||
/diag/diag.jim 217 228
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
#!/mod/bin/jimsh
|
||||
|
||||
source /mod/webif/lib/setup
|
||||
|
||||
puts {
|
||||
<script type=text/javascript src=/js/packages.js></script>
|
||||
|
||||
<style type=text/css>
|
||||
button.install
|
||||
{
|
||||
display: none;
|
||||
background-image: none;
|
||||
background: #ccff99;
|
||||
}
|
||||
button.remove
|
||||
{
|
||||
display: none;
|
||||
background-image: none;
|
||||
background: #ff6666;
|
||||
}
|
||||
button.upgrade
|
||||
{
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id=pkgtabs>
|
||||
<ul>
|
||||
<li>
|
||||
<a href=/cgi-bin/pkg.jim?type=inst>
|
||||
<span>Installed</span>
|
||||
</a>
|
||||
</li><li>
|
||||
<a href=/cgi-bin/pkg.jim?type=upgr>
|
||||
<span>Upgrades</span>
|
||||
</a>
|
||||
</li><li>
|
||||
<a href=/cgi-bin/pkg.jim?type=avail>
|
||||
<span>Available</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
}
|
||||
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
#!/mod/bin/jimsh
|
||||
|
||||
set services [split [exec /mod/bin/service mlist]]
|
||||
|
||||
foreach service $services {
|
||||
lassign [split $service ":"] name installed auto running
|
||||
|
||||
puts "<tr><td class=even>$name</td>"
|
||||
if (!$installed) {
|
||||
puts "<td colspan=3><i>Not installed</i></td></tr>"
|
||||
continue
|
||||
}
|
||||
|
||||
puts -nonewline "<td><input type=checkbox class=auto name=\"$name\""
|
||||
if ($auto) { puts -nonewline " checked" }
|
||||
puts "></td>"
|
||||
|
||||
puts -nonewline "<td><input type=checkbox class=toggle name=\"$name\""
|
||||
if ($running) { puts -nonewline " checked" }
|
||||
puts "></td>"
|
||||
|
||||
puts "</tr>"
|
||||
}
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
|
||||
if {![exists -proc altrow]} {
|
||||
proc altrow {{attrs ""}} {{i 0}} {
|
||||
puts -nonewline "<tr class="
|
||||
if { $i == 0 } {
|
||||
puts -nonewline "odd"
|
||||
} else {
|
||||
puts -nonewline "even"
|
||||
}
|
||||
if {$attrs ne ""} {
|
||||
puts -nonewline " $attrs"
|
||||
}
|
||||
puts ">";
|
||||
set i [expr ! $i]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,228 +0,0 @@
|
||||
#!/mod/bin/jimsh
|
||||
|
||||
source /mod/webif/lib/setup
|
||||
require lock system.class ts.class tdelete
|
||||
|
||||
proc dsc {} {
|
||||
lassign [system diskspace] x x perc
|
||||
if {$perc > 90} {
|
||||
puts "Insufficient disk space, terminating."
|
||||
exit
|
||||
}
|
||||
}
|
||||
|
||||
dsc
|
||||
|
||||
if {![acquire_lock webif_auto]} {
|
||||
puts "Cannot acquire exclusive lock, terminating."
|
||||
exit
|
||||
}
|
||||
|
||||
set tmp "/mod/tmp/webif_auto"
|
||||
if {![file exists $tmp]} {
|
||||
if {[catch {file mkdir $tmp} msg]} {
|
||||
puts "Cannot create temporary directory - $tmp ($msg)"
|
||||
exit
|
||||
}
|
||||
} elseif {![file isdirectory $tmp]} {
|
||||
puts "Cannot create temporary directory - $tmp (file exists)"
|
||||
exit
|
||||
}
|
||||
|
||||
# Clean-up the temporary directory
|
||||
foreach file [readdir -nocomplain $tmp] { tdelete "$tmp/$file" }
|
||||
|
||||
if {[system pkginst undelete]} {
|
||||
set dustbin "[system dustbin]"
|
||||
} else {
|
||||
set dustbin ""
|
||||
}
|
||||
|
||||
proc bindir {file binroot} {
|
||||
set dir [file dirname $file]
|
||||
regsub "^[system mediaroot]" $dir $binroot ndir
|
||||
if {$dir eq $ndir} { set ndir $binroot }
|
||||
system mkdir_p $ndir
|
||||
return $ndir
|
||||
}
|
||||
|
||||
proc dedup {dir} {
|
||||
#puts "DEDUP: \[$dir]"
|
||||
puts [exec /mod/webif/html/dedup/dedup -yes $dir]
|
||||
exec /mod/webif/html/dedup/dedup -yes $dir
|
||||
}
|
||||
|
||||
proc do_shrink {ts} {
|
||||
global tmp dustbin tsgroup
|
||||
|
||||
set file [file rootname [$ts get file]]
|
||||
if {[catch {
|
||||
set perc [exec /mod/bin/stripts -aq $file]
|
||||
} msg]} {
|
||||
puts " Error: $msg"
|
||||
return
|
||||
}
|
||||
if {[string match {*%} $perc]} {
|
||||
set perc [string range $perc 0 end-1]
|
||||
} else {
|
||||
set perc 0
|
||||
}
|
||||
|
||||
if {$perc == 0} {
|
||||
#puts " Already shrunk."
|
||||
return
|
||||
}
|
||||
puts " SHRINK: $file"
|
||||
puts " Estimate $perc% saving."
|
||||
puts " Shrinking..."
|
||||
if {[catch {
|
||||
puts [exec /mod/bin/stripts -q $file $tmp/shrunk]
|
||||
} msg]} {
|
||||
puts "Error during shrink: $msg"
|
||||
return
|
||||
}
|
||||
|
||||
# The following steps are structured to minimise the risk of
|
||||
# things being left in an inconsistent state if the system goes
|
||||
# into standby. Renames within the same filesystem are very
|
||||
# quick so the risk is small, but even so...
|
||||
|
||||
# Move the shrunken version back to the local directory.
|
||||
foreach f [glob "$tmp/shrunk.*"] {
|
||||
set ext [file extension $f]
|
||||
file rename $f "${file}_shrunk${ext}"
|
||||
}
|
||||
|
||||
# Move the old recording to the bin if undelete is installed.
|
||||
if {$dustbin ne ""} {
|
||||
$ts move [bindir $file "$dustbin/webif_autoshrink"] 1 1
|
||||
} else {
|
||||
# Delete otherwise.
|
||||
if {[$ts delete]} {
|
||||
puts "Successfully deleted $file."
|
||||
} else {
|
||||
puts "Problem deleting $file, [$ts get error]"
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
# Finally, rename the shrunken recording again.
|
||||
foreach ext $tsgroup {
|
||||
set f "${file}_shrunk.$ext"
|
||||
if {[file exists $f]} {
|
||||
file rename $f "${file}.$ext"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
proc do_decrypt {ts} {
|
||||
global tmp dustbin
|
||||
|
||||
set file [$ts get file]
|
||||
set rfile [file rootname $file]
|
||||
set bfile [file tail $file]
|
||||
|
||||
if {![$ts flag "ODEncrypted"]} {
|
||||
#puts " Already decrypted."
|
||||
return
|
||||
}
|
||||
|
||||
lassign [$ts dlnaloc] url
|
||||
if {$url eq ""} {
|
||||
#puts " Not yet indexed."
|
||||
return
|
||||
}
|
||||
|
||||
puts " DECRYPT: $rfile"
|
||||
puts " DLNA: $url"
|
||||
exec wget -O "$tmp/$bfile" $url
|
||||
|
||||
if {[file size $file] != [file size "$tmp/$bfile"]} {
|
||||
puts " File size mismatch."
|
||||
return
|
||||
}
|
||||
|
||||
# Move the encrypted file out of the way.
|
||||
file rename $file "$rfile.encrypted"
|
||||
# Move the decrypted copy into place.
|
||||
file rename "$tmp/$bfile" $file
|
||||
# Patch the HMT - quickest way to get back to a playable file.
|
||||
exec /mod/bin/hmt -encrypted "$rfile.hmt"
|
||||
|
||||
puts " Removing/binning old copy."
|
||||
# Move the old recording to the bin if undelete is installed.
|
||||
if {$dustbin ne ""} {
|
||||
set bin [bindir $file "$dustbin/webif_autodecrypt"]
|
||||
set tail [file tail $rfile]
|
||||
file rename "$rfile.encrypted" "$bin/$tail.ts"
|
||||
foreach ext {nts hmt thm} {
|
||||
if {[file exists "$rfile.$ext"]} {
|
||||
file copy $rfile.$ext "$bin/$tail.$ext"
|
||||
if {$ext eq "hmt"} {
|
||||
# Patch the binned HMT back
|
||||
exec /mod/bin/hmt +encrypted \
|
||||
"$bin/$tail.hmt"
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
tdelete "$rfile.encrypted"
|
||||
}
|
||||
puts " Done."
|
||||
}
|
||||
|
||||
proc entries {dir callback} {
|
||||
foreach entry [readdir -nocomplain $dir] {
|
||||
dsc
|
||||
if {![string match {*.ts} $entry} continue
|
||||
if {[catch {set ts [ts fetch "$dir/$entry"]}]} continue
|
||||
if {$ts == 0} continue
|
||||
if {[system inuse [file rootname "$dir/$entry"]]} {
|
||||
puts "$entry - in use\n"
|
||||
continue
|
||||
}
|
||||
$callback $ts
|
||||
}
|
||||
}
|
||||
|
||||
proc shrink {dir} {
|
||||
puts "SHRINK: \[$dir]"
|
||||
entries $dir do_shrink
|
||||
}
|
||||
|
||||
proc decrypt {dir} {
|
||||
puts "DECRYPT: \[$dir]"
|
||||
entries $dir do_decrypt
|
||||
}
|
||||
|
||||
proc scan {dir attr} {{indent 0}} {
|
||||
incr indent 2
|
||||
|
||||
#puts "[string repeat " " $indent]\[$dir]"
|
||||
|
||||
if {[string match {\[*} $dir]} continue
|
||||
|
||||
dsc
|
||||
if {[file exists "$dir/.auto$attr"]} { $attr $dir }
|
||||
|
||||
foreach entry [readdir -nocomplain $dir] {
|
||||
if {[file isdirectory "$dir/$entry"]} {
|
||||
scan "$dir/$entry" $attr
|
||||
}
|
||||
}
|
||||
|
||||
incr indent -2
|
||||
}
|
||||
|
||||
set root [system mediaroot]
|
||||
|
||||
if {[llength $argv] > 0} {
|
||||
foreach arg $argv { scan $root $arg }
|
||||
} else {
|
||||
foreach arg {dedup decrypt shrink} {
|
||||
scan $root $arg
|
||||
}
|
||||
}
|
||||
|
||||
release_lock webif_auto
|
||||
|
||||
@@ -1,54 +0,0 @@
|
||||
|
||||
require system.class
|
||||
|
||||
#if {![exists -proc class]} { package require oo }
|
||||
#class browse {}
|
||||
|
||||
set _flatten [system pkginst flatten]
|
||||
|
||||
proc _addicon {img {hover ""} {class va}} {
|
||||
set icon "<img src=$img class=\"$class\" height=21"
|
||||
if {$hover ne ""} {
|
||||
append icon " alt=\"$hover\" title=\"$hover\""
|
||||
}
|
||||
append icon ">"
|
||||
return $icon
|
||||
}
|
||||
|
||||
proc {dir iconset} {dir} {
|
||||
set icons {}
|
||||
set attrs {}
|
||||
|
||||
set noflat 0
|
||||
if $::_flatten {
|
||||
if {[string match {\[*\]} [file tail $dir]]} { set noflat 1 }
|
||||
if {[file exists "$dir/.noflatten"]} { set noflat 1 }
|
||||
if $noflat { lappend icons \
|
||||
[_addicon "/img/flat-tyre.png" "No-flatten" }
|
||||
lappend attrs "noflat=$noflat"
|
||||
}
|
||||
|
||||
set autoshrink 0
|
||||
if {[file exists "$dir/.autoshrink"]} {
|
||||
set autoshrink 1
|
||||
lappend icons [_addicon "/img/compress.png" "Auto-shrink"]
|
||||
lappend attrs "autoshrink=$autoshrink"
|
||||
}
|
||||
|
||||
set autodedup 0
|
||||
if {[file exists "$dir/.autodedup"]} {
|
||||
set autodedup 1
|
||||
lappend icons [_addicon "/img/dedup.png" "Auto-dedup"]
|
||||
lappend attrs "autodedup=$autodedup"
|
||||
}
|
||||
|
||||
set autodecrypt 0
|
||||
if {[file exists "$dir/.autodecrypt"]} {
|
||||
set autodecrypt 1
|
||||
lappend icons [_addicon "/img/decrypt.png" "Auto-decrypt"]
|
||||
lappend attrs "autodecrypt=$autodecrypt"
|
||||
}
|
||||
|
||||
return [list $icons $attrs]
|
||||
}
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
|
||||
proc {file copy} {{force {}} source target} {
|
||||
try {
|
||||
if {$force ni {{} -force}} {
|
||||
error "bad option \"$force\": should be -force"
|
||||
}
|
||||
|
||||
if {![file exists $source]} {
|
||||
error "source file does not exist."
|
||||
}
|
||||
|
||||
if {$force eq "" && [file exists $target]} {
|
||||
error "error copying \"$source\" to \"$target\": file already exists"
|
||||
}
|
||||
exec /mod/bin/busybox/cp $source $target
|
||||
} on error {msg opts} {
|
||||
incr opts(-level)
|
||||
return {*}$opts $msg
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
package require binary
|
||||
|
||||
proc hexdump {str} {
|
||||
set s ""
|
||||
set addr 0
|
||||
|
||||
append s "[format "%07x" $addr]: "
|
||||
set t ""
|
||||
for {set i 0} {$i < [string length $str]} {incr i} {
|
||||
if {$i > 0 && [expr $i % 16] == 0} {
|
||||
append s " $t\n"
|
||||
append s "[format "%07x" $addr]: "
|
||||
incr addr 16
|
||||
set t ""
|
||||
} elseif {$i > 0 && [expr $i % 2] == 0} {
|
||||
append s " "
|
||||
}
|
||||
|
||||
set char [string index $str $i]
|
||||
binary scan $char H2 cc
|
||||
append s $cc
|
||||
if {[string is print $char]} {
|
||||
append t $char
|
||||
} else {
|
||||
append t "."
|
||||
}
|
||||
}
|
||||
puts $s
|
||||
}
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
|
||||
if {![exists -proc require]} {
|
||||
proc require {args} {{done {}}} {
|
||||
foreach file $args {
|
||||
if {$file ni $done} {
|
||||
uplevel source "/mod/webif/lib/$file"
|
||||
lappend $done $file
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
proc header {} {
|
||||
uplevel source /mod/webif/html/lib/header.jim
|
||||
}
|
||||
|
||||
proc footer {} {
|
||||
uplevel source /mod/webif/html/lib/footer.jim
|
||||
}
|
||||
|
||||
proc mheader {} {
|
||||
uplevel source /mod/webif/html/m/lib/header.jim
|
||||
}
|
||||
|
||||
proc mfooter {} {
|
||||
uplevel source /mod/webif/html/m/lib/footer.jim
|
||||
}
|
||||
|
||||
# Replace the built-in jim {file copy} command with one that is
|
||||
# largefile safe.
|
||||
|
||||
require filecopy
|
||||
}
|
||||
|
||||
@@ -1,207 +0,0 @@
|
||||
|
||||
if {![exists -proc class]} { package require oo }
|
||||
if {![exists -proc sqlite3.open]} { package require sqlite3 }
|
||||
|
||||
class system {}
|
||||
|
||||
proc {system model} {} {
|
||||
if {[catch {set fp [open /etc/model r]}]} {
|
||||
set model {HD[R]}
|
||||
} else {
|
||||
set model [string trim [read $fp]]
|
||||
close $fp
|
||||
}
|
||||
return $model
|
||||
}
|
||||
|
||||
proc {system hostname} {} {
|
||||
if {[catch {set hostname [string trim [exec hostname]]}]} {
|
||||
set hostname "humax"
|
||||
}
|
||||
return $hostname
|
||||
}
|
||||
|
||||
proc {system ip} {} {
|
||||
if {[catch {set fp [open /etc/hosts r]}]} {
|
||||
set ip "127.0.0.1"
|
||||
} else {
|
||||
set ipl [lindex [split [$fp read] "\n"] 1]
|
||||
regsub -- {[[:space:]].*} $ipl "" ip
|
||||
}
|
||||
return $ip
|
||||
}
|
||||
|
||||
proc {system modversion} {{short 0}} {
|
||||
if {[catch {set fp [open /etc/modversion r]}]} {
|
||||
set modver "102"
|
||||
} else {
|
||||
set modver [string trim [read $fp]]
|
||||
close $fp
|
||||
}
|
||||
if {$short} { return $modver }
|
||||
lassign [split $modver ""] a b c
|
||||
return [format "%d.%d%d" $a $b $c]
|
||||
}
|
||||
|
||||
proc {system modbuild} {} {
|
||||
if {[catch {set fp [open /etc/modbuild r]}]} {
|
||||
return 0
|
||||
} else {
|
||||
set modbuild [string trim [read $fp]]
|
||||
close $fp
|
||||
}
|
||||
return $modbuild
|
||||
}
|
||||
|
||||
proc {system fhtcpversion} {} {
|
||||
set file "/etc/fhtcpversion"
|
||||
if {![file exists $file]} { set file "/root/fhtcpversion" }
|
||||
if {[catch {set fp [open $file r]}]} {
|
||||
set ver "?.??.??"
|
||||
} else {
|
||||
set ver [string trim [read $fp]]
|
||||
close $fp
|
||||
}
|
||||
return $ver
|
||||
}
|
||||
|
||||
proc {system pkgver} {{pkg webif}} {
|
||||
return [lrange [split [exec opkg list-installed $pkg] " "] 2 end]
|
||||
}
|
||||
|
||||
proc {system pkginst} {pkg} {
|
||||
if {[exec opkg list-installed $pkg] ne ""} {
|
||||
return 1 } else { return 0 }
|
||||
}
|
||||
|
||||
proc {system mediaroot} {} {
|
||||
switch [system model] {
|
||||
HDR { return "/media/My Video" }
|
||||
HD { return "/media/drive1/Video" }
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
proc {system dustbin} {{short 0}} {
|
||||
set dustbin "\[Deleted Items\]"
|
||||
if {![catch {set fd [open "/mod/boot/dustbin.name" r]}]} {
|
||||
set dustbin [lindex [split [read $fd] "\n"] 0]
|
||||
$fd close
|
||||
}
|
||||
if {$short} { return $dustbin }
|
||||
return "[system mediaroot]/$dustbin"
|
||||
}
|
||||
|
||||
proc {system diskspace} {} {
|
||||
switch [system model] {
|
||||
HDR { set part /mnt/hd2 }
|
||||
HD { set part /media/drive1 }
|
||||
}
|
||||
|
||||
set size 0
|
||||
set used 0
|
||||
set free 0
|
||||
set perc 0
|
||||
set dev 0
|
||||
foreach line [split [exec /mod/bin/busybox/df -h $part 2>>/dev/null] "\n\r"] {
|
||||
if {[string match "/*" $line]} {
|
||||
regsub -all -- {[[:space:]]+} $line " " line
|
||||
set fields [split $line]
|
||||
set dev [lindex $fields 0]
|
||||
set size [lindex $fields 1]
|
||||
set used [lindex $fields 2]
|
||||
set free [lindex $fields 3]
|
||||
set perc [string trimright [lindex $fields 4] "%"]
|
||||
set fperc $(100 - $perc)
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
return [list $size $used $perc $free $fperc $dev]
|
||||
}
|
||||
|
||||
proc {system busy} {} {
|
||||
# Is humaxtv doing anything important?
|
||||
if {[catch {set pid [exec /mod/bin/busybox/pgrep humaxtv]}]} {
|
||||
return 0
|
||||
}
|
||||
set c 0
|
||||
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
|
||||
}
|
||||
|
||||
proc {system inuse} {file} {
|
||||
# Is anything using the file?
|
||||
set file [file rootname [file tail $file]]
|
||||
set c 0
|
||||
foreach line [split [exec /mod/bin/lsof] "\n"] {
|
||||
if {[string first $file $line] >= 0} { incr c }
|
||||
}
|
||||
if {$c > 0} { return 1 }
|
||||
return 0
|
||||
}
|
||||
|
||||
proc {system reboot} {} {
|
||||
exec /etc/init.d/S90settop shut
|
||||
exec /sbin/reboot
|
||||
}
|
||||
|
||||
proc {system restartpending} {} {
|
||||
close [open /tmp/.restartpending w]
|
||||
}
|
||||
|
||||
proc {system param} {param {type Value} {tbl MENUCONFIG}} {
|
||||
if {[catch {set db [sqlite3.open /var/lib/humaxtv/setup.db]} msg]} {
|
||||
return 0
|
||||
}
|
||||
set val 0
|
||||
set ret [$db query "
|
||||
select item$type
|
||||
from TBL_$tbl
|
||||
where itemName = '$param'
|
||||
"]
|
||||
if {[llength $ret] == 1} {
|
||||
lassign [lindex $ret 0] x val
|
||||
}
|
||||
$db close
|
||||
return $val
|
||||
}
|
||||
|
||||
proc {system padding} {} {
|
||||
return [list \
|
||||
[system param START_PADDING_TIME] \
|
||||
[system param STOP_PADDING_TIME] \
|
||||
]
|
||||
}
|
||||
|
||||
proc {system instandby} {} {
|
||||
return [system param LAST_STANDBY Value USERCONFIG]
|
||||
}
|
||||
|
||||
proc {system mkdir_p} {dir} {
|
||||
exec /mod/bin/busybox/mkdir -p $dir
|
||||
}
|
||||
|
||||
proc {system listening} {{mport 0}} {
|
||||
set ret {}
|
||||
foreach line [split [exec /mod/bin/busybox/netstat -lntpw] "\n"] {
|
||||
# Remove repeated spaces
|
||||
regsub -all -- {[[:space:]]+} $line " " line
|
||||
# tcp 0 0 0.0.0.0:9955 0.0.0.0:* LISTEN 169/humaxtv
|
||||
lassign [split $line " "] x x x port x type app
|
||||
if {$type ne "LISTEN"} { continue }
|
||||
lassign [split $port ":"] x port
|
||||
|
||||
if {$mport && $mport != $port} { continue }
|
||||
lappend ret [list $port [split $app "/"]]
|
||||
}
|
||||
return $ret
|
||||
}
|
||||
|
||||
proc {system is_listening} {mport} {
|
||||
return [llength [system listening $mport]]
|
||||
}
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
|
||||
if {![exists -proc tdelete]} {
|
||||
proc tdelete {path} {
|
||||
if {[file isdirectory $path]} {
|
||||
regsub -all {([\\["$])} $path {\\\1} cpath
|
||||
foreach file [glob -nocomplain "${cpath}/*"] {
|
||||
if {[file isdirectory $file]} {
|
||||
tdelete $file
|
||||
} else {
|
||||
exec /mod/bin/trm $file
|
||||
}
|
||||
}
|
||||
exec /mod/bin/busybox/rm -rf $path
|
||||
} else {
|
||||
exec /mod/bin/trm $path
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,251 +0,0 @@
|
||||
|
||||
if {![exists -proc class]} { package require oo }
|
||||
source /mod/webif/lib/setup
|
||||
require tdelete system.class
|
||||
|
||||
set dmsfile /mnt/hd2/dms_cds.db
|
||||
|
||||
set tsgroup {ts nts hmt thm}
|
||||
|
||||
class ts {
|
||||
file ""
|
||||
base ""
|
||||
title ""
|
||||
synopsis ""
|
||||
definition ""
|
||||
channel_num 0
|
||||
channel_name ""
|
||||
start 0
|
||||
end 0
|
||||
flags ""
|
||||
error ""
|
||||
guidance ""
|
||||
bookmarks 0
|
||||
schedstart 0
|
||||
scheddur 0
|
||||
genre 0
|
||||
}
|
||||
|
||||
ts method duration {{raw 0}} {
|
||||
set d [expr $end - $start]
|
||||
if {!$raw} { set d $($d / 60) }
|
||||
return $d
|
||||
}
|
||||
|
||||
ts method size {} {
|
||||
file stat $file st
|
||||
return $st(size)
|
||||
}
|
||||
|
||||
ts method _parse {line} {
|
||||
set vars [split $line "\t"]
|
||||
|
||||
lassign [split $line "\t"] \
|
||||
title synopsis definition channel_num channel_name \
|
||||
start end flags_list guidance bookmarks schedstart scheddur \
|
||||
genre
|
||||
|
||||
set flags [split [string range $flags_list 0 end-1] ,]
|
||||
}
|
||||
|
||||
ts method bookmarks {} {
|
||||
return [exec /mod/bin/hmt -bookmarks $file]
|
||||
}
|
||||
|
||||
ts method flag {f} {
|
||||
if {$f in $flags} {return 1} else {return 0}
|
||||
}
|
||||
|
||||
ts method unlock {} {
|
||||
set cmd [list /mod/bin/hmt -lock $file]
|
||||
exec {*}$cmd
|
||||
return 1
|
||||
}
|
||||
|
||||
ts method lock {} {
|
||||
set cmd [list /mod/bin/hmt +lock $file]
|
||||
exec {*}$cmd
|
||||
return 1
|
||||
}
|
||||
|
||||
ts method unenc {} {
|
||||
set cmd [list /mod/bin/hmt -protect $file]
|
||||
exec {*}$cmd
|
||||
return 1
|
||||
}
|
||||
|
||||
ts method enc {} {
|
||||
set cmd [list /mod/bin/hmt +protect $file]
|
||||
exec {*}$cmd
|
||||
return 1
|
||||
}
|
||||
|
||||
ts method set_new {} {
|
||||
set cmd [list /mod/bin/hmt +new $file]
|
||||
exec {*}$cmd
|
||||
return 1
|
||||
}
|
||||
|
||||
ts method set_watched {} {
|
||||
set cmd [list /mod/bin/hmt -new $file]
|
||||
exec {*}$cmd
|
||||
return 1
|
||||
}
|
||||
|
||||
ts method setfile {f} { set file $f }
|
||||
|
||||
proc {ts parse} {file line} {
|
||||
set e [ts new]
|
||||
$e setfile $file
|
||||
$e _parse $line
|
||||
return $e
|
||||
}
|
||||
|
||||
proc {ts exec} {file} {
|
||||
set raw 0
|
||||
set cmd [list /mod/bin/hmt]
|
||||
lappend cmd "-p"
|
||||
lappend cmd $file
|
||||
|
||||
#puts "CMD -$cmd-"
|
||||
|
||||
return [exec {*}$cmd]
|
||||
}
|
||||
|
||||
ts method fileset {} {
|
||||
global tsgroup
|
||||
|
||||
set root [file rootname $file]
|
||||
set fset {}
|
||||
foreach ext $tsgroup {
|
||||
if {[file exists "$root.$ext"]} {
|
||||
lappend fset "$root.$ext"
|
||||
}
|
||||
}
|
||||
return $fset
|
||||
}
|
||||
|
||||
proc {ts fetch} {file {checked 0}} {
|
||||
# Check that this is a .ts file which has at least one sidecar
|
||||
# file (.nts)
|
||||
if {!$checked} {
|
||||
if {[file extension $file] ne ".ts"} { return 0 }
|
||||
if {![file exists "[file rootname $file].nts"]} { return 0 }
|
||||
}
|
||||
|
||||
return [ts parse $file [ts exec $file]]
|
||||
}
|
||||
|
||||
ts method delete {} {
|
||||
foreach f [$self fileset] {
|
||||
tdelete $f
|
||||
puts "Removed $f<br>"
|
||||
}
|
||||
return 1
|
||||
}
|
||||
|
||||
ts method move {dst {touch 0} {force 0}} {
|
||||
foreach f [$self fileset] {
|
||||
set nf "$dst/[file tail $f]"
|
||||
while {[file exists $nf]} {
|
||||
set nf "$dst/_[file tail $nf]"
|
||||
}
|
||||
file rename $f $nf
|
||||
if {$touch} {
|
||||
exec /mod/bin/busybox/touch $nf
|
||||
}
|
||||
}
|
||||
return 1
|
||||
}
|
||||
|
||||
ts method copy {dst} {
|
||||
foreach f [$self fileset] {
|
||||
file copy $f "$dst/[file tail $f]"
|
||||
}
|
||||
return 1
|
||||
}
|
||||
|
||||
ts method settitle {newtitle} {
|
||||
if {[string length newtitle] > 48} { return }
|
||||
|
||||
exec /mod/bin/hmt "+settitle=${newtitle}" $file
|
||||
}
|
||||
|
||||
ts method setsynopsis {newsynopsis} {
|
||||
if {[string length newsynopsis] > 48} { return }
|
||||
|
||||
exec /mod/bin/hmt "+setsynopsis=${newsynopsis}" $file
|
||||
}
|
||||
|
||||
ts method setguidance {newguidance} {
|
||||
if {[string length newguidance] > 48} { return }
|
||||
|
||||
exec /mod/bin/hmt "+setguidance=${newguidance}" $file
|
||||
}
|
||||
|
||||
ts method setgenre {newgenre} {
|
||||
exec /mod/bin/hmt "+setgenre=-${newgenre}" $file
|
||||
}
|
||||
|
||||
ts method dlnaloc {{urlbase 0}} {
|
||||
set mime "video/ts"
|
||||
if {![file exists $::dmsfile]} { return {} }
|
||||
if {[catch {set db [sqlite3.open $::dmsfile]}]} { return {} }
|
||||
set url ""
|
||||
set rfile [file normalize $file]
|
||||
if {[catch {set muri [$db query "
|
||||
select tblresource.mimetype, contenturi
|
||||
from tblresource join tblmedia using (mediaid)
|
||||
where localurl = '%s'" $rfile]}]} {
|
||||
set muri ""
|
||||
}
|
||||
if {$muri ne ""} {
|
||||
set rec [lindex $muri 0]
|
||||
set xuri [lindex $rec 3]
|
||||
set mime [lindex $rec 1]
|
||||
if {$urlbase ne "0"} {
|
||||
set url "http://$urlbase:9000/web/$xuri"
|
||||
} else {
|
||||
set url "http://[system ip]:9000/web/$xuri"
|
||||
}
|
||||
}
|
||||
$db close
|
||||
|
||||
if {$url ne "" } { return [list $url $mime] } else { return {} }
|
||||
}
|
||||
|
||||
proc {ts renamegroup} {from to} {
|
||||
global tsgroup
|
||||
|
||||
set dir [file dirname $from]
|
||||
set root [file rootname $from]
|
||||
|
||||
# Catch from string without a . character in it
|
||||
if {$root eq $from} { return }
|
||||
|
||||
foreach ext $tsgroup {
|
||||
set f "$root.$ext"
|
||||
if {![file exists $f]} continue
|
||||
file rename $f "${dir}/${to}.${ext}"
|
||||
}
|
||||
|
||||
exec /mod/bin/hmt "+setfilename=$to" "${dir}/${to}.hmt"
|
||||
|
||||
set ndir [file normalize $dir]
|
||||
|
||||
if {![catch {set db [sqlite3.open $::dmsfile]}]} {
|
||||
catch {
|
||||
set x [lindex [$db query {select mediaid from tblMedia
|
||||
where localUrl = '%s'} [file normalize $from]] 0]
|
||||
lassign $x key mediaid
|
||||
if {$mediaid ne ""} {
|
||||
$db query {update tblMedia set localUrl = '%s'
|
||||
where mediaid = %s} "${ndir}/{$to}.ts" $mediaid
|
||||
$db query {update tblMedia set title = '%s'
|
||||
where mediaid = %s} "{$to}.ts" $mediaid
|
||||
}
|
||||
}
|
||||
$db close
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
package require cgi
|
||||
source /mod/webif/lib/setup
|
||||
require system.class chunked pretty_size
|
||||
require system.class pretty_size
|
||||
|
||||
cgi_input
|
||||
#cgi_dump
|
||||
@@ -10,16 +10,14 @@ cgi_input
|
||||
set file [cgi_get file "-"]
|
||||
if {$file eq "-"} { exit }
|
||||
|
||||
start_chunked
|
||||
httpheader "text/plain"
|
||||
|
||||
if {![file exists $file]} {
|
||||
chunk ">>> File $file does not exist.\r\n"
|
||||
puts ">>> File $file does not exist.\r\n"
|
||||
} else {
|
||||
chunk ">>> Contents of $file [pretty_size [file size $file]]\r\n"
|
||||
puts ">>> Contents of $file [pretty_size [file size $file]]\r\n"
|
||||
set fp [open $file r]
|
||||
chunk [read $fp]
|
||||
puts [read $fp]
|
||||
close $fp
|
||||
}
|
||||
|
||||
end_chunked
|
||||
|
||||
@@ -3,15 +3,10 @@
|
||||
package require cgi
|
||||
package require sqlite3
|
||||
source /mod/webif/lib/setup
|
||||
require altrow progressbar epg.class
|
||||
|
||||
puts "Content-Type: text/html"
|
||||
puts ""
|
||||
require altrow progressbar epg.class system.class
|
||||
|
||||
header
|
||||
|
||||
cgi_input
|
||||
|
||||
proc f2c {frequency} {
|
||||
set ch int($((($frequency / 1000) - 303.25) / 8))
|
||||
return [expr int($ch)]
|
||||
@@ -34,26 +29,29 @@ puts "
|
||||
<th>Signal Quality</th>
|
||||
<th>Network</th>
|
||||
<th>Mux</th>
|
||||
<th>Type</th>
|
||||
<th>Channels</th>
|
||||
<th>>799</th>
|
||||
</tr>
|
||||
"
|
||||
foreach tw [$db query {
|
||||
select tsIdx, szNetName, usTsID, ulFrequency, ucLevel, ucQuality
|
||||
select tsIdx, szNetName, usTsID, ulFrequency, ucLevel,
|
||||
ucQuality, eTransMode
|
||||
from TBL_TS join TBL_NET using (netIdx)
|
||||
order by ulFrequency
|
||||
}] {
|
||||
lassign $tw \
|
||||
x tsIdx x netName x usTsID x ulFrequency x ucLevel x ucQuality
|
||||
x tsIdx x netName x usTsID x ulFrequency x ucLevel x ucQuality \
|
||||
x eTransMode
|
||||
|
||||
altrow
|
||||
puts "
|
||||
<tr class=odd>
|
||||
<td>[f2c $ulFrequency]</td>
|
||||
<td>[expr $ulFrequency / 1000.0] MHz</td>
|
||||
"
|
||||
puts "<td>[progressbar $ucLevel]</td>"
|
||||
puts "<td>[progressbar $ucQuality]</td>"
|
||||
puts "<td>[string range $netName 3 end]</td>"
|
||||
puts "<td>[system strip $netName]</td>"
|
||||
|
||||
set channels [$db query {
|
||||
select usLcn, szSvcName, szPrvName, aucDefaultAuthority
|
||||
@@ -69,16 +67,23 @@ foreach tw [$db query {
|
||||
set name [string range $name 1 end]
|
||||
if {$lcn >= 800} { incr ehs }
|
||||
switch $name {
|
||||
"BBC ONE" { set mux "PSB1/BBC A" }
|
||||
"BBC THREE" { set mux "PSB1/BBC A" }
|
||||
"ITV1" { set mux "PSB2/D3&4" }
|
||||
"BBC One HD" { set mux "PSB3/BBC B (HD)" }
|
||||
"ITV" { set mux "PSB2/D3&4" }
|
||||
"BBC ONE HD" { set mux "PSB3/BBC B" }
|
||||
"ITV3" { set mux "COM4/SDN" }
|
||||
"Dave" { set mux "COM5/ARQ A" }
|
||||
"Film4" { set mux "COM6/ARQ B" }
|
||||
"Film4+1" { set mux "COM6/ARQ B" }
|
||||
"BBC NEWS HD" { set mux "COM7/ARQ C" }
|
||||
"Movies4Men" { set mux "Local" }
|
||||
}
|
||||
}
|
||||
puts "<td>$mux</td>"
|
||||
if {$eTransMode == 2} {
|
||||
puts "<td>DVB-T (SD)</td>"
|
||||
} else {
|
||||
puts "<td class=blood>DVB-T2 (HD)</td>"
|
||||
}
|
||||
|
||||
puts "<td>[llength $channels]
|
||||
<a class=mchan ts=$tsIdx href=#>
|
||||
@@ -86,30 +91,29 @@ foreach tw [$db query {
|
||||
src=/images/421_1_00_CH_Title_2R_Arrow.png>
|
||||
view
|
||||
</a></td>"
|
||||
puts "<td>$ehs</th>"
|
||||
puts "<td>$ehs</td>"
|
||||
puts "</tr>"
|
||||
puts "<tr id=mchan_$tsIdx class=mchan style=\"display: none\">
|
||||
<td colspan=5>"
|
||||
<td colspan=9>"
|
||||
puts "<table style=\"margin-left: 5em\">"
|
||||
puts "<tr>
|
||||
<th colspan=3>Channel</th>
|
||||
<th>Provider</th>
|
||||
<th>Authority</th>
|
||||
</tr>"
|
||||
altrow reset
|
||||
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 "
|
||||
<td class=va>[epg channelicon $name 50]</td>
|
||||
<td>$lcn</td><td>$name</td>
|
||||
<td>$prv</td>
|
||||
<td>$auth</td>
|
||||
</tr>
|
||||
"
|
||||
}
|
||||
puts "</table>"
|
||||
puts "</td></tr>"
|
||||
@@ -136,3 +140,5 @@ $(document).ready(function() {
|
||||
</script>
|
||||
}
|
||||
|
||||
footer
|
||||
|
||||
@@ -5,17 +5,12 @@ package require sqlite3
|
||||
source /mod/webif/lib/setup
|
||||
require altrow
|
||||
|
||||
puts "Content-Type: text/html"
|
||||
puts ""
|
||||
|
||||
set databases [glob /var/lib/humaxtv/*.db]
|
||||
lappend databases {*}[glob /mod/etc/*.db]
|
||||
lappend databases "/mnt/hd2/dms_cds.db"
|
||||
|
||||
header
|
||||
|
||||
cgi_input
|
||||
#cgi_dump
|
||||
|
||||
set ftab [cgi_get tab]
|
||||
set fdb [cgi_get db]
|
||||
|
||||
@@ -24,7 +19,7 @@ if {$fdb != 0} {
|
||||
}
|
||||
|
||||
proc db_info {db_file} {
|
||||
global _cgi fdb ftab
|
||||
global fdb ftab
|
||||
|
||||
if {$fdb != 0 && [file tail $db_file] ne $fdb} { return }
|
||||
if {![file exists $db_file]} { return }
|
||||
@@ -68,7 +63,7 @@ proc db_info {db_file} {
|
||||
if {$fdb == 0} {
|
||||
puts "Please choose database to view:<ul>"
|
||||
foreach db $databases {
|
||||
puts "<li><a href=$::env(REQUEST_URI)?db=[file tail $db]>
|
||||
puts "<li><a href=$::env(SCRIPT_NAME)?db=[file tail $db]>
|
||||
$db</a></li>"
|
||||
}
|
||||
puts "</ul>"
|
||||
9
webif/cgi-bin/env.jim
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/mod/bin/jimsh
|
||||
|
||||
source /mod/webif/lib/setup
|
||||
httpheader
|
||||
|
||||
puts "<pre>"
|
||||
parray env
|
||||
puts "</pre>"
|
||||
|
||||
@@ -4,26 +4,16 @@ package require cgi
|
||||
source /mod/webif/lib/setup
|
||||
require epg.class
|
||||
|
||||
puts "Content-Type: text/html"
|
||||
puts ""
|
||||
|
||||
header
|
||||
|
||||
cgi_input
|
||||
#cgi_dump
|
||||
|
||||
set service 0
|
||||
set service 4351
|
||||
catch { set service [dict get $_cgi service] }
|
||||
set event 0
|
||||
catch { set event [dict get $_cgi event] }
|
||||
set raw 0
|
||||
catch { set raw [dict get $_cgi raw] }
|
||||
set service [cgi_get service]
|
||||
set event [cgi_get event]
|
||||
set raw [cgi_get raw]
|
||||
|
||||
puts "<pre>"
|
||||
if { $raw == 0 } {
|
||||
puts [epg exec dump -raw 1 -service $service -event $event]
|
||||
puts "<a href=$env(REQUEST_URI)?$env(QUERY_STRING)&raw=1>
|
||||
puts "<a href=$env(SCRIPT_NAME)?$env(QUERY_STRING)&raw=1>
|
||||
Click here for extended dump</a>"
|
||||
} else {
|
||||
puts [epg exec dumpraw -raw 1 -service $service -event $event]
|
||||
@@ -2,22 +2,27 @@
|
||||
|
||||
package require cgi
|
||||
source /mod/webif/lib/setup
|
||||
require epg.class
|
||||
require epg.class system.class settings.class
|
||||
|
||||
puts "Content-Type: text/html"
|
||||
puts ""
|
||||
set irinst [system pkginst ir]
|
||||
|
||||
cgi_input
|
||||
#cgi_dump
|
||||
httpheader
|
||||
|
||||
set service [cgi_get service 0]
|
||||
set event [cgi_get event 0]
|
||||
if {! [dict exists $_cgi bare]} { header }
|
||||
if {![cgi_exists bare]} header else noheader
|
||||
|
||||
set record [lindex [epg fetch dump -service $service -event $event] 0]
|
||||
$record get_channel_info
|
||||
set others [$record othertimes]
|
||||
|
||||
if {[[settings] chanchangenc]} {
|
||||
puts { <script type=text/javascript src=/js/chanchangenc.js></script> }
|
||||
} else {
|
||||
jqplugin confirmAction
|
||||
puts { <script type=text/javascript src=/js/chanchange.js></script> }
|
||||
}
|
||||
|
||||
puts "
|
||||
<table class=keyval>
|
||||
<tr>
|
||||
@@ -120,7 +125,14 @@ if {[$record get rec_crid] != ""} {
|
||||
puts "
|
||||
<tr>
|
||||
<td colspan=2 valign=top>
|
||||
[$record channel_icon 70]
|
||||
"
|
||||
if {$irinst} {
|
||||
puts "<a class=chanchange chan=[$record get channel_num] href=#>"
|
||||
}
|
||||
puts [$record channel_icon 70]
|
||||
if {$irinst} { puts "</a>" }
|
||||
|
||||
puts "
|
||||
[join [$record icon_set] " "]
|
||||
</td>
|
||||
</tr>
|
||||
@@ -135,5 +147,5 @@ puts "
|
||||
puts "<div id=epginfo_extra class=footnote></div>"
|
||||
|
||||
epg cleanup
|
||||
if {! [dict exists $_cgi bare]} { footer }
|
||||
if {![cgi_exists bare]} footer
|
||||
|
||||
@@ -4,22 +4,17 @@ package require cgi
|
||||
source /mod/webif/lib/setup
|
||||
require epg.class system.class
|
||||
|
||||
puts "Content-Type: text/html"
|
||||
puts ""
|
||||
httpheader
|
||||
|
||||
cgi_input
|
||||
#cgi_dump
|
||||
set service [cgi_get service -]
|
||||
set event [cgi_get event -]
|
||||
set type [cgi_get type 1]
|
||||
|
||||
if {![dict exists $_cgi service] || ![dict exists $_cgi event]} {
|
||||
if {$service eq "-" || $event eq "-"} {
|
||||
puts "Error, insufficient parameters passed."
|
||||
exit
|
||||
}
|
||||
|
||||
set service $_cgi(service)
|
||||
set event $_cgi(event)
|
||||
set type 1
|
||||
if {[dict exists $_cgi type]} { set type $_cgi(type) }
|
||||
|
||||
set event [lindex [epg fetch dump -service $service -event $event] 0]
|
||||
if {$event eq ""} {
|
||||
puts "Error, cannot find event to schedule."
|
||||
@@ -2,29 +2,19 @@
|
||||
|
||||
package require cgi
|
||||
source /mod/webif/lib/setup
|
||||
require epg.class spinner.class altrow
|
||||
|
||||
puts "Content-Type: text/html"
|
||||
puts ""
|
||||
require epg.class spinner.class altrow settings.class
|
||||
|
||||
jqplugin highlight
|
||||
header
|
||||
|
||||
require totop
|
||||
|
||||
puts "<script type=text/javascript src=/js/jquery.highlight.js></script>"
|
||||
set ct [cgi_get ct 0]
|
||||
set crid [cgi_get crid ""]
|
||||
set scrid [cgi_get scrid ""]
|
||||
|
||||
cgi_input
|
||||
#cgi_dump
|
||||
|
||||
set ct 0
|
||||
catch { set ct [dict get $_cgi ct] }
|
||||
set crid ""
|
||||
catch { set crid [dict get $_cgi crid] }
|
||||
set scrid ""
|
||||
catch { set scrid [dict get $_cgi scrid] }
|
||||
|
||||
if {[dict exists $_cgi term]} {
|
||||
set lterm [dict get $_cgi term]
|
||||
if {[cgi_exists term]} {
|
||||
set lterm [cgi_get term]
|
||||
|
||||
if {[string match {CRID:*} $lterm]} {
|
||||
set crid [string range $lterm 5 end]
|
||||
@@ -47,14 +37,13 @@ require epg_search
|
||||
|
||||
require epg_popup
|
||||
|
||||
#set _cgi [dict create term "doctor who"]
|
||||
#set env(REQUEST_URI) "test"
|
||||
|
||||
set cmd "search"
|
||||
if {$searchfull} { set cmd "searchall" }
|
||||
|
||||
set dedup 0
|
||||
if {$ct > 0 } {
|
||||
set records [epg fetch dump -type $ct]
|
||||
if {[[settings] genrededup]} { set dedup 1 }
|
||||
} elseif {$crid ne ""} {
|
||||
set records [epg fetch dump -crid $crid]
|
||||
} elseif {$scrid ne ""} {
|
||||
@@ -66,6 +55,12 @@ if {$ct > 0 } {
|
||||
}
|
||||
|
||||
set favlist [epg favlist]
|
||||
set s [settings]
|
||||
if {[$s service_style] eq "standard"} {
|
||||
set surl xservice
|
||||
} else {
|
||||
set surl service
|
||||
}
|
||||
|
||||
if {[llength $records] > 0} {
|
||||
puts {
|
||||
@@ -75,6 +70,7 @@ if {[llength $records] > 0} {
|
||||
<th colspan=3>Channel</th>
|
||||
<th>Programme</th>
|
||||
<th>Synopsis</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
}
|
||||
} else {
|
||||
@@ -90,8 +86,17 @@ proc rsort {v1 v2} {
|
||||
return -1
|
||||
}
|
||||
|
||||
set seen {}
|
||||
set i 0
|
||||
foreach record [lsort -command rsort $records] {
|
||||
set ename [$record get name]
|
||||
if {$ename eq ""} continue
|
||||
|
||||
if {$dedup} {
|
||||
if {$ename in $seen} continue
|
||||
lappend seen $ename
|
||||
}
|
||||
|
||||
if {$favlist != "" && [$record get service_id] ni $favlist} {
|
||||
continue
|
||||
}
|
||||
@@ -108,7 +113,7 @@ foreach record [lsort -command rsort $records] {
|
||||
puts "<td>[$record get channel_num]</td>"
|
||||
puts "<td>[$record channel_icon 50]</td>"
|
||||
puts "<td nowrap>
|
||||
<a href=/cgi-bin/epg/service.jim?service=[$record get service_id]>
|
||||
<a href=/epg/$surl.jim?service=[$record get service_id]>
|
||||
[$record get channel_name]
|
||||
</a></td>"
|
||||
puts [$record cell]
|
||||
15
webif/cgi-bin/hximages.jim
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/mod/bin/jimsh
|
||||
|
||||
source /mod/webif/lib/setup
|
||||
|
||||
header
|
||||
|
||||
puts "<ul>"
|
||||
|
||||
foreach f [readdir "/opt/share/images/blue"] {
|
||||
if {![string match {*.png} $f]} continue
|
||||
puts "<li><img src=\"/images/$f\">$f</li>"
|
||||
}
|
||||
|
||||
puts "</ul>"
|
||||
|
||||
45
webif/cgi-bin/opkg.jim
Executable file
@@ -0,0 +1,45 @@
|
||||
#!/mod/bin/jimsh
|
||||
|
||||
package require cgi
|
||||
source /mod/webif/lib/setup
|
||||
require pkg.class system.class
|
||||
|
||||
cgi_input
|
||||
#cgi_dump
|
||||
|
||||
set cmd [cgi_get cmd update]
|
||||
|
||||
proc opkg {cmd} {
|
||||
puts ">>> opkg $cmd"
|
||||
set bcmd "|/mod/webif/lib/bin/opkg $cmd"
|
||||
set fd [open $bcmd r]
|
||||
while {[gets $fd line] >= 0} {
|
||||
puts "$line"
|
||||
}
|
||||
close $fd
|
||||
puts ""
|
||||
}
|
||||
|
||||
httpheader "text/plain"
|
||||
|
||||
if {![system connectivity]} {
|
||||
puts ""
|
||||
puts "!! ERROR - No network connectivity to package repository !!"
|
||||
puts ""
|
||||
puts "Check your Internet connection and DNS service and then try again."
|
||||
exit
|
||||
}
|
||||
|
||||
if {$cmd eq "upgrade"} { opkg update }
|
||||
opkg $cmd
|
||||
|
||||
if {$cmd eq "update" || $cmd eq "upgrade"} {
|
||||
puts "Updating package meta information"
|
||||
pkg fetchmeta
|
||||
puts "Done."
|
||||
puts ""
|
||||
puts "Updating diagnostic meta information"
|
||||
pkg fetchdiagmeta
|
||||
puts "Done."
|
||||
}
|
||||
|
||||
@@ -4,13 +4,10 @@ package require cgi
|
||||
source /mod/webif/lib/setup
|
||||
require rsv.class system.class
|
||||
|
||||
puts "Content-Type: text/html"
|
||||
puts ""
|
||||
|
||||
cgi_input
|
||||
httpheader
|
||||
|
||||
if {[cgi_get act] eq "cancel"} {
|
||||
file delete /tmp/.restartpending
|
||||
system restartpending 0
|
||||
exit
|
||||
}
|
||||
|
||||
@@ -21,7 +18,8 @@ if {[cgi_get now] eq "yes"} {
|
||||
exit
|
||||
}
|
||||
|
||||
file delete /tmp/.restartpending
|
||||
system restartpending 0
|
||||
jqplugin progressbar
|
||||
header
|
||||
|
||||
# Commit pending reservations on older mod versions.
|
||||
@@ -30,8 +28,6 @@ if {![file exists /sbin/rsvsync] && ![file exists /mod/boot/rsvsync]} {
|
||||
}
|
||||
|
||||
puts {
|
||||
<link href=/css/jquery.progressbar.css rel=stylesheet type=text/css />
|
||||
<script type="text/javascript" src="/js/jquery.progressbar.js"></script>
|
||||
|
||||
<script type=text/javascript>
|
||||
var handle = 0;
|
||||
@@ -49,7 +45,7 @@ puts {
|
||||
|
||||
$(document).ready(function() {
|
||||
$('#progressbar').reportprogress(0);
|
||||
handle = setInterval("update()", 350);
|
||||
handle = setInterval("update()", 400);
|
||||
$.get('/cgi-bin/restart.jim?now=yes');
|
||||
});
|
||||
</script>
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/mod/bin/jimsh
|
||||
|
||||
puts "Content-Type: text/html"
|
||||
puts ""
|
||||
source /mod/webif/lib/setup
|
||||
httpheader
|
||||
|
||||
source /mod/webif/include/restart.jim
|
||||
|
||||
12
webif/cgi-bin/service.jim
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/mod/bin/jimsh
|
||||
|
||||
package require cgi
|
||||
source /mod/webif/lib/setup
|
||||
|
||||
httpheader
|
||||
|
||||
set service [cgi_get service]
|
||||
set action [cgi_get action]
|
||||
|
||||
catch { puts [exec /mod/bin/service $action $service] }
|
||||
|
||||
306
webif/cgi-bin/status.jim
Executable file
@@ -0,0 +1,306 @@
|
||||
#!/mod/bin/jimsh
|
||||
|
||||
package require cgi
|
||||
source /mod/webif/lib/setup
|
||||
require system.class findhsvc epg.class rsv.class
|
||||
|
||||
set runmode cli
|
||||
if {[string match {*jim} $argv0]} { set runmode cgi }
|
||||
|
||||
set schedtime 1200
|
||||
switch $runmode {
|
||||
cgi {
|
||||
set type [cgi_get type "full"]
|
||||
httpheader
|
||||
}
|
||||
cli {
|
||||
set type "full"
|
||||
if {"-X" in $argv} { set schedtime 7200 }
|
||||
}
|
||||
}
|
||||
|
||||
if {"-d" in $argv} {
|
||||
proc debug {arg} { puts $arg }
|
||||
} else {
|
||||
proc debug {arg} {}
|
||||
}
|
||||
|
||||
if {[catch {set pid [exec pgrep -n humaxtv]}]} {
|
||||
puts "Cannot find humaxtv process."
|
||||
exit
|
||||
}
|
||||
|
||||
set exts {.ts .mkv .avi .mpg .mpeg .wmv .mp3 .mp4 .mov}
|
||||
|
||||
proc get_data {} {
|
||||
global pid exts opfile
|
||||
|
||||
set ret {}
|
||||
if {[catch {set data \
|
||||
[exec /mod/webif/lib/bin/lsof -X -Fns -p $pid]} msg]} {
|
||||
set ret {}
|
||||
} else {
|
||||
set size 0
|
||||
foreach line [split $data "\n"] {
|
||||
set typ [string index $line 0]
|
||||
switch $typ {
|
||||
s {
|
||||
set size [string range $line 1 end]
|
||||
}
|
||||
n {
|
||||
if {[string first Video/ $line] == -1 && \
|
||||
[string first /media/ $line] == -1} {
|
||||
continue
|
||||
}
|
||||
regsub -- { \([^\)]+\)$} $line "" line
|
||||
set ext [file extension $line]
|
||||
if {$ext ni $exts} continue
|
||||
set file [string range $line 1 end]
|
||||
# Handle chase play (same file open twice
|
||||
# and recently written)
|
||||
if {[dict exists $ret $file] && \
|
||||
$ext eq ".ts"} {
|
||||
set age [expr [clock seconds] - \
|
||||
[file mtime $file]]
|
||||
if {$age < 60} {
|
||||
set ret($file) -1
|
||||
}
|
||||
} else {
|
||||
set ret($file) $size
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if {$opfile ne "" && $opfile ni $ret} {
|
||||
set ret($opfile) [file size $opfile]
|
||||
}
|
||||
}
|
||||
return $ret
|
||||
}
|
||||
|
||||
set play 0
|
||||
set rec 0
|
||||
set output {}
|
||||
|
||||
set opfile ""
|
||||
if {[file exists "/mod/tmp/webif_auto/.op"} {
|
||||
set fp [open "/mod/tmp/webif_auto/.op"]
|
||||
lassign [split [string trim [$fp read]] ":"] op opfile
|
||||
$fp close
|
||||
debug "OP: $op - $opfile"
|
||||
}
|
||||
|
||||
set data {}
|
||||
if {$type eq "full"} {
|
||||
set data [get_data]
|
||||
}
|
||||
if {[llength $data]} {
|
||||
debug " DATA: ($data)"
|
||||
if {![file exists /tmp/.rractive]} {
|
||||
sleep 3
|
||||
set ndata [get_data]
|
||||
debug " NDATA: ($ndata)"
|
||||
set rr 0
|
||||
} else {
|
||||
sleep 1
|
||||
set ndata [get_data]
|
||||
debug " NDATA: ($ndata)"
|
||||
foreach k [array names data] {
|
||||
if {![dict exists $ndata $k]} {
|
||||
dict unset data $k
|
||||
}
|
||||
}
|
||||
|
||||
set rr 1
|
||||
set recs {}
|
||||
loop i 0 2 {
|
||||
catch {
|
||||
set fd [open "/tmp/.rec$i" r]
|
||||
lappend recs "[$fd read -nonewline].ts"
|
||||
$fd close
|
||||
}
|
||||
}
|
||||
debug " RECS: $recs"
|
||||
}
|
||||
foreach file [array names data] {
|
||||
set bname [file rootname [file tail $file]]
|
||||
|
||||
if {$file eq $opfile} {
|
||||
set mode $op
|
||||
} elseif {$data($file) == -1} {
|
||||
set mode chase
|
||||
} elseif {$rr} {
|
||||
if {$file in $recs} {
|
||||
set mode rec
|
||||
} else {
|
||||
set mode play
|
||||
}
|
||||
} else {
|
||||
if {![dict exists $ndata $file]} continue
|
||||
if {$ndata($file) > $data($file)} {
|
||||
set mode rec
|
||||
} else {
|
||||
set mode play
|
||||
}
|
||||
}
|
||||
|
||||
switch $mode {
|
||||
chase {
|
||||
incr rec
|
||||
incr play
|
||||
set mode "Chase Playing"
|
||||
set icon "745_1_11_Video_3REC_Live.png"
|
||||
}
|
||||
rec {
|
||||
incr rec
|
||||
set mode "Recording"
|
||||
set icon "745_1_11_Video_1REC.png"
|
||||
}
|
||||
play {
|
||||
incr play
|
||||
set mode "Playing"
|
||||
set icon "745_1_10_Video_2Live.png"
|
||||
}
|
||||
dec {
|
||||
set mode "Decrypting"
|
||||
set icon "/img/decrypt.png "
|
||||
append icon "style=\"padding: 0 0.2em 0 0.5em\""
|
||||
}
|
||||
mpg {
|
||||
set mode "Extracting MPG"
|
||||
set icon "/img/mpg.png "
|
||||
append icon "style=\"padding: 0 0.2em 0 0.5em\""
|
||||
}
|
||||
mp3 {
|
||||
set mode "Extracting MP3"
|
||||
set icon "/img/mp3.png "
|
||||
append icon "style=\"padding: 0 0.2em 0 0.5em\""
|
||||
}
|
||||
shrink {
|
||||
set mode "Shrinking"
|
||||
set icon "/img/compress.png "
|
||||
append icon "style=\"padding: 0 0.2em 0 0.5em\""
|
||||
}
|
||||
}
|
||||
|
||||
if {[string first "/" $icon] == -1} {
|
||||
set icon "/images/$icon"
|
||||
}
|
||||
|
||||
set name [string map {
|
||||
"/mnt/hd2/My Video/" ""
|
||||
"/media/drive1/Video/" ""
|
||||
"/media/" ""
|
||||
".ts" ""
|
||||
} $file]
|
||||
|
||||
if {$runmode eq "cgi"} {
|
||||
lappend output [concat \
|
||||
"<span class=\"va stitem\">\n" \
|
||||
" <img class=va src=$icon>\n" \
|
||||
" <span>$mode <i>$name</i></span>\n" \
|
||||
"</span>\n" \
|
||||
]
|
||||
} else {
|
||||
lappend output "$mode $name"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
######################################################################
|
||||
# Live viewing information
|
||||
|
||||
if {![system instandby] && $play < 1} {
|
||||
set hsvc [system param CUR_SVC Value USERCONFIG]
|
||||
|
||||
set ff [$rsvdb query "
|
||||
select usSvcid as svcid, usLcn as lcn,
|
||||
substr(szSvcName, 2) as name
|
||||
from channel.TBL_SVC
|
||||
where hSvc = $hsvc
|
||||
limit 1
|
||||
"]
|
||||
|
||||
if {[llength $ff] == 1} {
|
||||
lassign [lindex $ff 0] x svcid x lcn x name
|
||||
set epgs [epg dbfetch get \
|
||||
-service $svcid \
|
||||
-time [clock seconds]\
|
||||
]
|
||||
set prog ""
|
||||
if {[llength $epgs] == 1} {
|
||||
lassign $epgs epg
|
||||
set prog "- [$epg get name] ("
|
||||
append prog "[clock format [$epg get start] -format %H:%M] - "
|
||||
append prog "[clock format $([$epg get start] + [$epg get duration]) -format %H:%M]"
|
||||
append prog ") \[[$epg percent]%\]"
|
||||
}
|
||||
|
||||
if {$runmode eq "cgi"} {
|
||||
lappend output [concat \
|
||||
"<span class=\"va stitem\">\n" \
|
||||
" [epg channelicon $name 30 \
|
||||
{vertical-align: middle; padding: 0 4px 0 2px}]\n" \
|
||||
" <span>Watching <i>$lcn: $name $prog</i></span>\n" \
|
||||
"</span>\n" \
|
||||
]
|
||||
} else {
|
||||
lappend output "Watching $lcn: $name $prog"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
######################################################################
|
||||
# In standby
|
||||
|
||||
if {[system instandby]} {
|
||||
if {$runmode eq "cgi"} {
|
||||
lappend output [concat \
|
||||
"<span class=\"va stitem\">\n" \
|
||||
" <img class=va width=28 style=\"padding: 0 4px\"" \
|
||||
"src=/img/standby.png>\n" \
|
||||
" <span>System is in standby.</span>\n" \
|
||||
"</span>" \
|
||||
]
|
||||
} else {
|
||||
lappend output "System is in standby."
|
||||
}
|
||||
}
|
||||
|
||||
######################################################################
|
||||
# Upcoming recordings
|
||||
|
||||
set events [rsv list tbl_reservation \
|
||||
" where ersvtype = 3 and nsttime - [clock seconds] < $schedtime
|
||||
and nsttime > [clock seconds] "]
|
||||
foreach event $events {
|
||||
if {$runmode eq "cgi"} {
|
||||
set icon "175_1_11_Reservation_Record.png"
|
||||
lappend output [concat \
|
||||
"<span class=\"va stitem\">\n" \
|
||||
" <img class=va src=/images/$icon width=20>\n" \
|
||||
" <span>Will record <i>[$event name]</i>" \
|
||||
" on [$event channel_name] at"\
|
||||
" [clock format [$event get nsttime] -format {%H:%M}]" \
|
||||
" </span>\n" \
|
||||
"</span>\n" \
|
||||
} else {
|
||||
lappend output [concat \
|
||||
"Will record '[$event name]' " \
|
||||
"on [$event channel_name] at " \
|
||||
"[clock format [$event get nsttime] -format {%H:%M}]" \
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
######################################################################
|
||||
# Output
|
||||
|
||||
if {[llength $output]} {
|
||||
if {$runmode eq "cgi"} {
|
||||
puts [join $output "\n<br>\n"]
|
||||
} else {
|
||||
puts [join $output "\n"]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,18 +2,29 @@
|
||||
|
||||
package require cgi
|
||||
source /mod/webif/lib/setup
|
||||
require settings.class
|
||||
|
||||
puts "Content-Type: text/html"
|
||||
puts ""
|
||||
jqplugin enadis
|
||||
jscss xepg.js /css/xepg.css
|
||||
header
|
||||
|
||||
require epg.class spinner.class altrow epg_search totop
|
||||
require epg.class spinner.class altrow epg_search totop system.class
|
||||
|
||||
cgi_input
|
||||
set irinst [system pkginst ir]
|
||||
|
||||
puts {
|
||||
<link type="text/css" href="/css/xepg.css" rel="Stylesheet" />
|
||||
<script type=text/javascript src=/js/enadis.js></script>
|
||||
set s [settings]
|
||||
|
||||
if {[$s chanchangenc]} {
|
||||
puts { <script type=text/javascript src=/js/chanchangenc.js></script> }
|
||||
} else {
|
||||
jqplugin confirmAction
|
||||
puts { <script type=text/javascript src=/js/chanchange.js></script> }
|
||||
}
|
||||
|
||||
if {[$s service_style] eq "standard"} {
|
||||
set surl xservice
|
||||
} else {
|
||||
set surl service
|
||||
}
|
||||
|
||||
[spinner new {
|
||||
@@ -33,7 +44,7 @@ if {$stt <= $now} {
|
||||
set current 0
|
||||
}
|
||||
|
||||
set favgroup [[settings] channel_group]
|
||||
set favgroup [$s channel_group]
|
||||
|
||||
set hours [expr 1.0 * [[settings] xepghours]]
|
||||
if {$hours == 0} { set hours 4.0 }
|
||||
@@ -86,7 +97,8 @@ but "<< -1 Week" $($stt - 3600 * 24 * 7) \
|
||||
$($stt - $now + 3600 >= 3600 * 24 * 7)
|
||||
but "<< -1 Day" $($stt - 3600 * 24) $($stt - $now >= 3600 * 23)
|
||||
but "<< Earlier", $($stt - 3600 * 4) $($stt > $now)
|
||||
but "< Now >" $now $($current == 0)
|
||||
#but "< Now >" $now $($current == 0)
|
||||
but "< Now >" $now
|
||||
but ">> Later" $ett;
|
||||
but ">> +1 Day" $($stt + 3600 * 24) $($stt < $now + 8 * 3600 * 24)
|
||||
but ">> +1 Week" $($stt + 3600 * 24 * 7) $($stt < $now + 8 * 3600 * 24)
|
||||
@@ -125,9 +137,13 @@ foreach e $records {
|
||||
if {$chnum != $lcn} {
|
||||
puts "<div class=xechan style=\"width: ${chanpx}px;\">"
|
||||
|
||||
if {$irinst} {
|
||||
puts "<a class=chanchange chan=$chnum href=#>"
|
||||
}
|
||||
puts "[$e channel_icon 30] "
|
||||
if {$irinst} { puts "</a>" }
|
||||
puts "$chnum
|
||||
<a href=/cgi-bin/epg/service.jim?service=[$e get service_id]
|
||||
<a href=\"/epg/$surl.jim?service=[$e get service_id]\"
|
||||
title=\"[$e get channel_name]\">
|
||||
[$e get channel_name]
|
||||
</a></div>"
|
||||
@@ -177,7 +193,10 @@ foreach e $records {
|
||||
clock format $ee -format "%H:%M"])"
|
||||
if {$showing} { append hxt " ($perc%)" }
|
||||
|
||||
puts "<div class=\"xeprog $bg\"
|
||||
set lbg $bg
|
||||
if {[$e scheduled]} { set lbg "blueshade" }
|
||||
|
||||
puts "<div class=\"xeprog $lbg\"
|
||||
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]
|
||||
@@ -201,48 +220,11 @@ puts "
|
||||
</div>
|
||||
"
|
||||
|
||||
puts "
|
||||
|
||||
<script type=text/javascript>
|
||||
\$(document).ready(function() {
|
||||
|
||||
\$('#epgswitch').button().click(function() {
|
||||
window.location = '/epg.shtml';
|
||||
});
|
||||
|
||||
\$('button.nav').click(function() {
|
||||
window.location = '/cgi-bin/xepg.jim?stt=' + \$(this).attr('tt') +
|
||||
'&pos=' + \$('#xegrid').scrollTop();
|
||||
});
|
||||
|
||||
\$('#xepg_dp').datepicker({
|
||||
buttonImage: '/img/cal.gif',
|
||||
buttonImageOnly: true,
|
||||
showOn: 'button',
|
||||
dateFormat: '@',
|
||||
minDate: '[expr $now * 1000]',
|
||||
maxDate: '[expr ($now + 7 * 86400) * 1000]',
|
||||
onSelect: function(val, sel) {
|
||||
var stt = \$(this).attr('stt');
|
||||
// Extract date part
|
||||
dval = ~~(val / 86400000);
|
||||
// Extract current time part
|
||||
var tm = ~~(stt % 86400);
|
||||
|
||||
var ret = dval * 86400 + tm;
|
||||
|
||||
window.location = '/cgi-bin/xepg.jim?stt=' + ret;
|
||||
}
|
||||
});
|
||||
|
||||
\$('img.ui-datepicker-trigger').hover(
|
||||
function() { \$(this).css('cursor', 'pointer'); },
|
||||
function() { \$(this).css('cursor', 'auto'); }
|
||||
);
|
||||
|
||||
"
|
||||
|
||||
if {$current} {
|
||||
puts "
|
||||
<script type=text/javascript>
|
||||
\$(function() {
|
||||
"
|
||||
puts {
|
||||
|
||||
var kt = $('#xe0');
|
||||
@@ -253,23 +235,21 @@ 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 "
|
||||
});
|
||||
</script>
|
||||
"
|
||||
|
||||
puts "
|
||||
<a href=/cgi-bin/settings.jim>
|
||||
<a href=/settings/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>
|
||||
38
webif/cgi-bin/xepg.js
Normal file
@@ -0,0 +1,38 @@
|
||||
$(function() {
|
||||
|
||||
$('#epgswitch').button().click(function() {
|
||||
window.location = '/epg/list.jim';
|
||||
});
|
||||
|
||||
$('button.nav').click(function() {
|
||||
window.location = '/cgi-bin/xepg.jim?stt=' + $(this).attr('tt') +
|
||||
'&pos=' + $('#xegrid').scrollTop();
|
||||
});
|
||||
|
||||
$('#xepg_dp').datepicker({
|
||||
buttonImage: '/img/cal.gif',
|
||||
buttonImageOnly: true,
|
||||
showOn: 'button',
|
||||
dateFormat: '@',
|
||||
minDate: 0,
|
||||
maxDate: 8,
|
||||
onSelect: function(val, sel) {
|
||||
var stt = $(this).attr('stt');
|
||||
// Extract date part
|
||||
dval = Math.round(val / 86400000.0);
|
||||
// Extract current time part
|
||||
var tm = ~~(stt % 86400);
|
||||
|
||||
var ret = dval * 86400 + tm;
|
||||
|
||||
window.location = '/cgi-bin/xepg.jim?stt=' + ret;
|
||||
}
|
||||
});
|
||||
|
||||
$('img.ui-datepicker-trigger').hover(
|
||||
function() { $(this).css('cursor', 'pointer'); },
|
||||
function() { $(this).css('cursor', 'auto'); }
|
||||
);
|
||||
|
||||
});
|
||||
|
||||
37
webif/html/backup/backup.jim
Executable file
@@ -0,0 +1,37 @@
|
||||
#!/mod/bin/jimsh
|
||||
|
||||
package require cgi
|
||||
source /mod/webif/lib/setup
|
||||
|
||||
require rsv.class
|
||||
|
||||
set dir "/mod/var/backup"
|
||||
|
||||
httpheader
|
||||
|
||||
set now [clock seconds]
|
||||
set file [file tail [cgi_get file \
|
||||
[clock format $now -format "auto-%Y-%b-%d-%H:%M"]]]
|
||||
|
||||
if {[string match {auto-*} $file]} {
|
||||
# Delete any automatic backups over 7 days old.
|
||||
set mt $(15 * 86400)
|
||||
foreach af [glob -nocomplain "$dir/auto-*"] {
|
||||
set aft [file mtime $af]
|
||||
set diff $($now - $aft)
|
||||
if {$diff > $mt} {
|
||||
puts "Removing $af"
|
||||
file delete $af
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
set ffile "$dir/$file.rbk"
|
||||
|
||||
if {[file exists $ffile]} {
|
||||
puts "Backup file <i>$file</i> already exists."
|
||||
exit
|
||||
}
|
||||
|
||||
rsv backup $ffile
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
function refresh_files()
|
||||
{
|
||||
$('#backup_files').load('/cgi-bin/backup/files.jim', function() {
|
||||
$('#backup_files').load('files.jim', function() {
|
||||
$('input.restore').change(function() {
|
||||
$('#restore_button').removeAttr('disabled')
|
||||
.button('option', 'disabled', false);
|
||||
@@ -20,7 +20,7 @@ $(document).ready(function() {
|
||||
|
||||
$('#backup_button').click(function() {
|
||||
$('#backup_working').slideDown();
|
||||
$('#results').load('/cgi-bin/backup/backup.jim?' +
|
||||
$('#results').load('backup.jim?' +
|
||||
$('#backup_name').serialize(), function() {
|
||||
$('#results').slideDown(function() {
|
||||
$('#backup_working').slideUp();
|
||||
@@ -32,7 +32,7 @@ $(document).ready(function() {
|
||||
var backup = $('input.restore:checked').val();
|
||||
if (confirm('Confirm deletion of ' + backup))
|
||||
{
|
||||
$('#results').load('/cgi-bin/backup/delete.jim?' +
|
||||
$('#results').load('delete.jim?' +
|
||||
$('input.restore').serialize(), function() {
|
||||
$('#results').slideDown(function() {
|
||||
refresh_files();
|
||||
@@ -42,7 +42,7 @@ $(document).ready(function() {
|
||||
});
|
||||
$('#view_button').click(function() {
|
||||
var backup = $('input.restore:checked').val();
|
||||
$('#results').load('/cgi-bin/backup/view.jim?' +
|
||||
$('#results').load('view.jim?' +
|
||||
$('input.restore').serialize(), function() {
|
||||
$('#results').slideDown(function() {
|
||||
refresh_files();
|
||||
@@ -54,7 +54,7 @@ $(document).ready(function() {
|
||||
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();
|
||||
$('#results').load('/cgi-bin/backup/restore.jim?' +
|
||||
$('#results').load('restore.jim?' +
|
||||
$('input.restore').serialize(), function() {
|
||||
$('#results').slideDown(function() {
|
||||
$('#restore_working').slideUp();
|
||||
@@ -5,20 +5,14 @@ source /mod/webif/lib/setup
|
||||
|
||||
set dir /mod/var/backup
|
||||
|
||||
puts "Content-Type: text/html"
|
||||
puts "Pragma: no-cache"
|
||||
puts "Expires: Thu, 01 Jan 1970 00:00:00 GMT"
|
||||
puts ""
|
||||
httpheader
|
||||
|
||||
cgi_input
|
||||
#cgi_dump
|
||||
|
||||
if {![dict exists $_cgi restore_file]} {
|
||||
set file [file tail [cgi_get restore_file]]
|
||||
if {$file == 0} {
|
||||
puts "No filename supplied."
|
||||
exit
|
||||
}
|
||||
|
||||
set file [file tail [dict get $_cgi restore_file]]
|
||||
set ffile "/$dir/$file.rbk"
|
||||
|
||||
if {![file exists $ffile]} {
|
||||
@@ -1,11 +1,9 @@
|
||||
#!/mod/bin/jimsh
|
||||
|
||||
package require cgi
|
||||
source /mod/webif/lib/setup
|
||||
|
||||
puts "Content-Type: text/html"
|
||||
puts "Pragma: no-cache"
|
||||
puts "Expires: Thu, 01 Jan 1970 00:00:00 GMT"
|
||||
puts ""
|
||||
httpheader
|
||||
|
||||
set dir "/mod/var/backup"
|
||||
|
||||
@@ -3,17 +3,20 @@
|
||||
source /mod/webif/lib/setup
|
||||
require altrow rsv.class
|
||||
|
||||
jscss backup.js
|
||||
header
|
||||
|
||||
puts {
|
||||
<script type=text/javascript src=/cgi-bin/backup/backup.js></script>
|
||||
<h2>Backup/Restore</h2>
|
||||
|
||||
<div id=restore_warning class="hidden warningbox">
|
||||
<div>
|
||||
<center>
|
||||
<b>!!!!!!!!!!!!!! PLEASE NOTE !!!!!!!!!!!!!!
|
||||
<br><br>
|
||||
After restoring the scheduled recordings you <b>MUST</b> restart the box using
|
||||
the link at the top of the screen or via the remote control.
|
||||
</div>
|
||||
</div></div>
|
||||
|
||||
<div style="clear: both; float: left; width: 40%; border: 1px solid grey;
|
||||
padding: 1em">
|
||||
@@ -63,3 +66,5 @@ puts {
|
||||
</div>
|
||||
}
|
||||
|
||||
footer
|
||||
|
||||
21
webif/html/backup/restore.jim
Executable file
@@ -0,0 +1,21 @@
|
||||
#!/mod/bin/jimsh
|
||||
|
||||
package require cgi
|
||||
source /mod/webif/lib/setup
|
||||
|
||||
require rsv.class
|
||||
|
||||
set dir "/mod/var/backup"
|
||||
|
||||
httpheader
|
||||
|
||||
set file [file tail [cgi_get restore_file]]
|
||||
if {$file == 0} {
|
||||
puts "No filename supplied."
|
||||
exit
|
||||
}
|
||||
|
||||
set ffile "$dir/$file.rbk"
|
||||
|
||||
rsv restore $ffile
|
||||
|
||||
@@ -7,20 +7,14 @@ require rsv.class findhsvc
|
||||
|
||||
set dir /mod/var/backup
|
||||
|
||||
puts "Content-Type: text/html"
|
||||
puts ""
|
||||
httpheader
|
||||
|
||||
cgi_input
|
||||
#cgi_dump
|
||||
|
||||
#set _cgi(restore_file) "backup-2011-Jul-09-20:37"
|
||||
|
||||
if {![dict exists $_cgi restore_file]} {
|
||||
set file [file tail [cgi_get restore_file]]
|
||||
if {$file == 0} {
|
||||
puts "No filename supplied."
|
||||
exit
|
||||
}
|
||||
|
||||
set file [file tail [dict get $_cgi restore_file]]
|
||||
set ffile "/$dir/$file.rbk"
|
||||
|
||||
if {![file exists $ffile]} {
|
||||
@@ -45,7 +39,6 @@ foreach line $data {
|
||||
set vars {}
|
||||
set i 0
|
||||
foreach f $fields {
|
||||
if {$f eq "aulEventToRecordInfo"} { continue }
|
||||
incr i
|
||||
lappend vars $f [lindex $vals $i]
|
||||
}
|
||||
49
webif/html/browse/aexpiry.jim
Executable file
@@ -0,0 +1,49 @@
|
||||
#!/mod/bin/jimsh
|
||||
|
||||
package require cgi
|
||||
source /mod/webif/lib/setup
|
||||
require browse.class
|
||||
|
||||
# dir=%2Fmedia%2FMy+Video%2FWeatherview
|
||||
# aexpiry_days=13
|
||||
|
||||
set dir [cgi_get dir "-"]
|
||||
if {$dir eq "-"} exit
|
||||
|
||||
set act [cgi_get act "update"]
|
||||
|
||||
if {$act eq "fetch"} {
|
||||
httpheader "application/json"
|
||||
set data [{dir expiry} $dir]
|
||||
puts "{"
|
||||
puts " \"days\": \"$data(days)\","
|
||||
puts " \"keep\": \"$data(keep)\","
|
||||
puts " \"type\": \"$data(type)\","
|
||||
puts " \"keepnew\": \"$data(keepnew)\""
|
||||
puts "}"
|
||||
exit
|
||||
}
|
||||
|
||||
if {$act eq "remove"} {
|
||||
httpheader
|
||||
if {[file exists "$dir/.autoexpire"]} {
|
||||
file delete "$dir/.autoexpire"
|
||||
}
|
||||
exit
|
||||
}
|
||||
|
||||
httpheader
|
||||
|
||||
set data(days) [cgi_get aexpiry_days 0]
|
||||
set data(keep) [cgi_get aexpiry_min 0]
|
||||
set data(type) [cgi_get aexpiry_timetype recorded]
|
||||
set data(keepnew) [cgi_get aexpiry_unwatched 0]
|
||||
|
||||
if {![file isdirectory $dir]} {
|
||||
puts "Not a directory."
|
||||
exit
|
||||
}
|
||||
|
||||
{dir expiry} $dir $data
|
||||
puts "Ok."
|
||||
|
||||
@@ -21,10 +21,16 @@ if {$model eq "HDR"} {
|
||||
}
|
||||
if {[system pkginst ffmpeg]} {
|
||||
puts {
|
||||
<li><a href=#audio>Extract Audio</a></li>
|
||||
<li><a href=#mpg>Extract to MPG</a></li>
|
||||
<li class=mp3><a href=#audio>Extract Audio</a></li>
|
||||
<li class=mpg><a href=#mpg>Extract to MPG</a></li>
|
||||
<li class=thm><a href=#thm>Set Thumbnail</a></li>
|
||||
}
|
||||
}
|
||||
|
||||
puts { <li><a href=#vthm>View Thumbnail</a></li> }
|
||||
|
||||
puts { <li class=bookmark><a href=#bmarks>Bookmarks</a></li> }
|
||||
|
||||
if $nicesplice {
|
||||
puts {
|
||||
<li class="cut"><a href=#crop>Crop</a></li>
|
||||
@@ -34,6 +40,16 @@ if $nicesplice {
|
||||
puts {
|
||||
<li class=separator><a href=#lock>Toggle Lock</a></li>
|
||||
<li><a href=#new>Toggle New</a></li>
|
||||
}
|
||||
|
||||
if {[llength $plugins(menu)]} {
|
||||
foreach plugin $plugins(menu) {
|
||||
lassign $plugin tag options
|
||||
puts "<li class=$tag><a href=#$tag>$options(desc)</a></li>"
|
||||
}
|
||||
}
|
||||
|
||||
puts {
|
||||
</ul>
|
||||
|
||||
<ul id=ooptmenu class=contextMenu style="width: 160px">
|
||||
@@ -45,7 +61,15 @@ puts {
|
||||
<li><a href=#download>Download</a></li>
|
||||
</ul>
|
||||
|
||||
<ul id=doptmenu class=contextMenu style="width: 180px">
|
||||
<ul id=dooptmenu class=contextMenu style="width: 250px">
|
||||
<li class=delete><a href=#delete>Delete</a></li>
|
||||
<li class=cut><a href=#cut>Cut to clipboard</a></li>
|
||||
<li class=pwcopy><a href=#copy>Copy to clipboard</a></li>
|
||||
<li class=pwpaste><a href=#paste>Paste to folder</a></li>
|
||||
<li class=separator><a href=#rename>Rename</a></li>
|
||||
</ul>
|
||||
|
||||
<ul id=doptmenu class=contextMenu style="width: 250px">
|
||||
<li class=delete><a href=#delete>Delete</a></li>
|
||||
<li class=cut><a href=#cut>Cut to clipboard</a></li>
|
||||
<li class=pwcopy><a href=#copy>Copy to clipboard</a></li>
|
||||
@@ -53,15 +77,38 @@ puts {
|
||||
<li class=separator><a href=#rename>Rename</a></li>
|
||||
<li class=separator><a href=#resetnew>Reset new flag</a></li>
|
||||
<li class="separator compress"><a href=#shrink>Auto-Shrink</a></li>
|
||||
<li class="compressr"><a href=#shrinkr>Recursive Auto-Shrink</a></li>
|
||||
<li class=dedup><a href=#dedup>Auto-Dedup</a></li>
|
||||
}
|
||||
if {$model eq "HDR"} {
|
||||
puts { <li class=decrypt><a href=#decrypt>Auto-Decrypt</a></li> }
|
||||
puts {
|
||||
<li class=decrypt><a href=#decrypt>Auto-Decrypt</a></li>
|
||||
<li class=decryptr><a href=#decryptr>Recursive Auto-Decrypt
|
||||
</a></li>
|
||||
}
|
||||
}
|
||||
if $flatten {
|
||||
puts { <li class="separator"><a href=#flat>No-Flatten</a></li> }
|
||||
}
|
||||
|
||||
puts {
|
||||
<li class=clock><a href=#expire>Auto-Expire Options</a></li>
|
||||
}
|
||||
|
||||
if {[system pkginst ffmpeg]} {
|
||||
puts {
|
||||
<li class=mp3><a href=#mp3>Auto-Audio Extract</a></li>
|
||||
<li class=mpg><a href=#mpg>Auto-MPG Extract</a></li>
|
||||
}
|
||||
}
|
||||
|
||||
if {[llength $plugins(dmenu)]} {
|
||||
foreach plugin $plugins(dmenu) {
|
||||
lassign $plugin tag options
|
||||
puts "<li class=$tag><a href=#$tag>$options(desc)</a></li>"
|
||||
}
|
||||
}
|
||||
|
||||
puts {
|
||||
</ul>
|
||||
|
||||
@@ -129,16 +176,27 @@ puts {
|
||||
</th>
|
||||
<td>
|
||||
<select name="rename_genre" id="rename_genre"
|
||||
style="vertical-align: middle"
|
||||
class="text ui-widget-content ui-corner-all">
|
||||
<option value=0>Unclassified
|
||||
<option value=16>Film
|
||||
<option value=32>News & Factual
|
||||
<option value=48>Entertainment
|
||||
<option value=64>Sport
|
||||
<option value=80>Children
|
||||
<option value=96>Education
|
||||
<option value=160>Lifestyle
|
||||
<option value=240>Drama
|
||||
}
|
||||
|
||||
set glist [ts genrelist]
|
||||
foreach genre [array names glist] {
|
||||
lassign $glist($genre) txt img
|
||||
if {$img eq "Unclassified"} {
|
||||
set img /images/173_3_26_G3_$img.png
|
||||
} else {
|
||||
set img /images/173_3_00_G3_$img.png
|
||||
}
|
||||
puts "<option value=$genre style=\"
|
||||
background: url($img) no-repeat left;
|
||||
padding: 8px 0 8px 30px;
|
||||
vertical-align: middle;
|
||||
\" onclick=\"this.parentNode.setAttribute('style',
|
||||
this.getAttribute('style'));\">$txt"
|
||||
}
|
||||
|
||||
puts {
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -149,7 +207,7 @@ puts {
|
||||
|
||||
<div id=drenameform title="Rename directory" style="display: none">
|
||||
<form id=drenameform_form>
|
||||
<input type=hidden name="renameorig" id="drenameorig" value="">
|
||||
<input type=hidden name="renamefile" id="drenameorig" value="">
|
||||
<table border=0>
|
||||
<tr>
|
||||
<th>
|
||||
@@ -170,7 +228,10 @@ puts {
|
||||
<div id=savestreamform title="Save streamed content"
|
||||
style="display: none">
|
||||
<div class=pre id=savestream_detail></div>
|
||||
<form id=savestream_form>
|
||||
<div id=savestream_retrieving>
|
||||
<img src=/img/loading.gif> Retrieving details...
|
||||
</div>
|
||||
<form id=savestream_form class=hidden>
|
||||
}
|
||||
puts "<input type=hidden name=dir value=\"$dir\">"
|
||||
puts {
|
||||
@@ -178,7 +239,7 @@ puts {
|
||||
<tr>
|
||||
<th>
|
||||
<label for="savestream_name">
|
||||
<b>Filename</b>
|
||||
<b>Enter Filename</b>
|
||||
</label>
|
||||
</th>
|
||||
<td>
|
||||
@@ -186,7 +247,9 @@ puts {
|
||||
id="savestream_name"
|
||||
value="" size=70 maxlength=255
|
||||
class="text ui-widget-content ui-corner-all">
|
||||
<img id=savestream_spin src=/img/loading.gif>
|
||||
<span id=savestream_spin>
|
||||
<img src=/img/loading.gif> Saving...
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -215,6 +278,80 @@ puts {
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div id=aexpiry title="Auto-Expiry Settings"
|
||||
style="display: none; line-height: 1em;">
|
||||
<form id=aexpiry_form>
|
||||
<input type=hidden name="dir" id="aexpiry_ldir" value="">
|
||||
}
|
||||
puts {
|
||||
<table border=0>
|
||||
|
||||
<tr><th align=right>
|
||||
<label for="aexpiry_days">
|
||||
<b>Remove recordings after</b> (in days)
|
||||
<br><span class=footnote>
|
||||
(Leave blank to skip age check)
|
||||
</span>
|
||||
</label>
|
||||
</th><td>
|
||||
<input name="aexpiry_days" id="aexpiry_days"
|
||||
type=number value=0 size=5 maxlength=3
|
||||
class="text ui-widget-content ui-corner-all">
|
||||
</td></tr>
|
||||
|
||||
<tr><th>
|
||||
<label for="aexpiry_min">
|
||||
<b>Keep at least</b>
|
||||
(number of recordings)
|
||||
<br>
|
||||
<span class=footnote>(Oldest will be deleted first)
|
||||
</span>
|
||||
</label>
|
||||
</th><td>
|
||||
<input name="aexpiry_min" id="aexpiry_min"
|
||||
type=number value=0 size=5 maxlength=3
|
||||
class="text ui-widget-content ui-corner-all">
|
||||
</td></tr>
|
||||
|
||||
<tr><th>
|
||||
<label for="aexpiry_timetype">
|
||||
<b>For date of recording, use</b>
|
||||
</label>
|
||||
</th><td>
|
||||
<input name="aexpiry_timetype" id="aexpiry_timetype0"
|
||||
type=radio value=0 checked
|
||||
class="text ui-widget-content ui-corner-all">
|
||||
Recording end time
|
||||
<br>
|
||||
<input name="aexpiry_timetype" id="aexpiry_timetype1"
|
||||
type=radio value=1
|
||||
class="text ui-widget-content ui-corner-all">
|
||||
<span>
|
||||
When last watched
|
||||
<span class=bfootnote>(or end time if unwatched)</span>
|
||||
</span>
|
||||
</td></tr>
|
||||
|
||||
<tr><th>
|
||||
<label for="aexpiry_unwatched">
|
||||
<b>Never delete unwatched recordings</b>
|
||||
</label>
|
||||
</th><td>
|
||||
<input name="aexpiry_unwatched" id="aexpiry_unwatched"
|
||||
type=checkbox value=1
|
||||
class="ui-widget-content ui-corner-all">
|
||||
</td></tr>
|
||||
|
||||
</table>
|
||||
<div id=aexpiry_working class=hidden>
|
||||
<img src=/img/loading.gif> Applying changes...
|
||||
</div>
|
||||
<div id=aexpiry_loading class=hidden>
|
||||
<img src=/img/loading.gif> Retrieving data...
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div id=dialogue></div>
|
||||
<div id=confirm title="Confirmation Required"></div>
|
||||
<div id=pwdialogue style="display: none">
|
||||
@@ -226,5 +363,9 @@ Please wait...
|
||||
</center>
|
||||
</div>
|
||||
|
||||
<div id=bmpdialogue title="Recording Thumbnail" class=hidden>
|
||||
<img id=thmbmp class=doublebmp src="about:blank">
|
||||
</div>
|
||||
|
||||
}
|
||||
|
||||
@@ -3,24 +3,21 @@
|
||||
package require sqlite3
|
||||
package require cgi
|
||||
source /mod/webif/lib/setup
|
||||
require ts.class system.class
|
||||
require ts.class system.class settings.class
|
||||
|
||||
puts "Content-Type: text/html\r\n\r\n"
|
||||
jqplugin progressbar
|
||||
jscss audio.js
|
||||
header
|
||||
|
||||
cgi_input
|
||||
#cgi_dump
|
||||
set s [settings]
|
||||
set type [$s audiomp3descr [$s audiomp3]]
|
||||
|
||||
set rfile [cgi_get file]
|
||||
set ts [ts fetch $rfile]
|
||||
set dir [file dirname $rfile]
|
||||
set len [$ts duration 1]
|
||||
|
||||
header
|
||||
|
||||
puts "
|
||||
<link href=/css/jquery.progressbar.css rel=stylesheet type=text/css />
|
||||
<script type=text/javascript src=/js/jquery.progressbar.js></script>
|
||||
<script type=text/javascript src=audio.js></script>
|
||||
|
||||
<fieldset class=cleft>
|
||||
<legend>Audio Extraction</legend>
|
||||
@@ -36,7 +33,7 @@ puts "
|
||||
></span>
|
||||
|
||||
<div id=audiodiv style=\"padding: 1em\">
|
||||
<button id=audioit>Perform audio extraction</button>
|
||||
<button id=audioit>Perform audio extraction - $type</button>
|
||||
</div>
|
||||
|
||||
<div id=progressdiv class=hidden>
|
||||