Compare commits

...

53 Commits

Author SHA1 Message Date
hummypkg
767021557f download decrypted fiels
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@285 2a923420-c742-0410-a762-8d5b09965624
2011-08-13 00:18:42 +00:00
hummypkg
4f900f47b4 download decrypted versions of files
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@284 2a923420-c742-0410-a762-8d5b09965624
2011-08-13 00:18:12 +00:00
hummypkg
8383651367 minor bugfixes, support ffmpeg 0.8
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@282 2a923420-c742-0410-a762-8d5b09965624
2011-07-19 23:10:32 +00:00
hummypkg
d764969b8f update to 0.6.3, show alternate showings
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@280 2a923420-c742-0410-a762-8d5b09965624
2011-07-18 19:26:58 +00:00
hummypkg
301336b778 updae to 0.6.2
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@277 2a923420-c742-0410-a762-8d5b09965624
2011-07-17 21:01:27 +00:00
hummypkg
1b8761b8f3 fix diskspace bug, add sortable schedule list, fix plugin bug
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@276 2a923420-c742-0410-a762-8d5b09965624
2011-07-17 20:52:33 +00:00
hummypkg
b2f5f2c48a more attempts at chunked opkg
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@274 2a923420-c742-0410-a762-8d5b09965624
2011-07-15 23:20:57 +00:00
hummypkg
64b73ee14b create chunked module and add iajax. Update pkg to handled chunked responses
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@273 2a923420-c742-0410-a762-8d5b09965624
2011-07-14 22:22:54 +00:00
hummypkg
dbc3d21807 fix diskspace problem on HD
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@272 2a923420-c742-0410-a762-8d5b09965624
2011-07-14 19:28:00 +00:00
hummypkg
d1267cbd1e update version number
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@268 2a923420-c742-0410-a762-8d5b09965624
2011-07-12 18:57:48 +00:00
hummypkg
7643a92550 scheduling updates
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@267 2a923420-c742-0410-a762-8d5b09965624
2011-07-12 18:57:30 +00:00
hummypkg
b1176d9f64 remove etc directory
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@266 2a923420-c742-0410-a762-8d5b09965624
2011-07-11 23:30:42 +00:00
hummypkg
ded9495595 re-implemented package management. Initial suppor for remote scheduling
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@265 2a923420-c742-0410-a762-8d5b09965624
2011-07-11 23:29:21 +00:00
hummypkg
2a224c1055 bug fixes, to 0.6.0-2
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@262 2a923420-c742-0410-a762-8d5b09965624
2011-07-09 20:12:33 +00:00
hummypkg
33a72aa43f include var/backup
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@261 2a923420-c742-0410-a762-8d5b09965624
2011-07-08 22:51:33 +00:00
hummypkg
ca6129abef update version
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@258 2a923420-c742-0410-a762-8d5b09965624
2011-07-08 20:53:46 +00:00
hummypkg
42b5805c45 finish restart
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@253 2a923420-c742-0410-a762-8d5b09965624
2011-07-08 20:39:57 +00:00
hummypkg
88ada938d1 commit initial backup/restore framework and restart
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@252 2a923420-c742-0410-a762-8d5b09965624
2011-07-07 22:33:19 +00:00
hummypkg
15040206ab work on restore
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@245 2a923420-c742-0410-a762-8d5b09965624
2011-07-06 23:16:20 +00:00
hummypkg
4861459aec checkpoint backup/restore
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@236 2a923420-c742-0410-a762-8d5b09965624
2011-07-05 22:59:34 +00:00
hummypkg
5523ec6a43 initial backup function
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@235 2a923420-c742-0410-a762-8d5b09965624
2011-07-05 18:38:42 +00:00
hummypkg
5f6c7a843c new reservations screen
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@234 2a923420-c742-0410-a762-8d5b09965624
2011-07-05 00:19:02 +00:00
hummypkg
e712f38bb1 fix plugin error
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@233 2a923420-c742-0410-a762-8d5b09965624
2011-07-04 22:41:24 +00:00
hummypkg
61d879e90a update to 0.5.9
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@225 2a923420-c742-0410-a762-8d5b09965624
2011-07-04 20:02:59 +00:00
hummypkg
638d2dedb3 no caching, add draghandle, less flushing
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@224 2a923420-c742-0410-a762-8d5b09965624
2011-07-04 20:01:14 +00:00
hummypkg
d1cfff8899 restructure requires, add initial plugin class and hook into settings
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@220 2a923420-c742-0410-a762-8d5b09965624
2011-07-01 22:56:53 +00:00
hummypkg
9116c6e8a9 improve new folder icon, allow [S]CRID searches from the term box
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@216 2a923420-c742-0410-a762-8d5b09965624
2011-06-30 22:10:22 +00:00
hummypkg
6efcb5bde0 group search terms together
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@215 2a923420-c742-0410-a762-8d5b09965624
2011-06-30 00:16:10 +00:00
hummypkg
444ca7370b update to 0.5.8. Add jim.pack requirement
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@213 2a923420-c742-0410-a762-8d5b09965624
2011-06-29 23:59:00 +00:00
hummypkg
a44be5f1ae better solution to cleaning keywords
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@212 2a923420-c742-0410-a762-8d5b09965624
2011-06-29 23:57:01 +00:00
hummypkg
4e42dcf655 show new folders
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@211 2a923420-c742-0410-a762-8d5b09965624
2011-06-29 23:53:16 +00:00
hummypkg
43db44d742 improve EPG search using drop-down options. Implement package management
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@210 2a923420-c742-0410-a762-8d5b09965624
2011-06-29 22:53:15 +00:00
hummypkg
050cb611bf working on package system
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@209 2a923420-c742-0410-a762-8d5b09965624
2011-06-28 00:20:31 +00:00
hummypkg
d068d93073 improve directory size display
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@207 2a923420-c742-0410-a762-8d5b09965624
2011-06-27 21:59:07 +00:00
hummypkg
7025cf09f5 fix lock, add guidance icons, add new icon
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@205 2a923420-c742-0410-a762-8d5b09965624
2011-06-27 19:57:32 +00:00
hummypkg
32db0c900b depend on hmt 1.0.5
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@204 2a923420-c742-0410-a762-8d5b09965624
2011-06-26 23:13:01 +00:00
hummypkg
d7dcb79dad update to version 0.5.5
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@200 2a923420-c742-0410-a762-8d5b09965624
2011-06-26 23:07:06 +00:00
hummypkg
04453c1815 finish rename function
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@199 2a923420-c742-0410-a762-8d5b09965624
2011-06-26 23:05:38 +00:00
hummypkg
3bc9f5217b add sync script
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@198 2a923420-c742-0410-a762-8d5b09965624
2011-06-25 21:02:26 +00:00
hummypkg
8d67bb82bb more work on rename
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@197 2a923420-c742-0410-a762-8d5b09965624
2011-06-25 20:59:50 +00:00
hummypkg
9faac3c8fe support HD model for EPG
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@196 2a923420-c742-0410-a762-8d5b09965624
2011-06-23 11:14:57 +00:00
hummypkg
0c858b3410 restructure browser
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@194 2a923420-c742-0410-a762-8d5b09965624
2011-06-22 23:36:30 +00:00
hummypkg
1cd0f96bf4 add missing return
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@193 2a923420-c742-0410-a762-8d5b09965624
2011-06-22 10:41:41 +00:00
hummypkg
8e839121de tweak popup
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@192 2a923420-c742-0410-a762-8d5b09965624
2011-06-22 00:32:13 +00:00
hummypkg
7400437a1f add iphone checkboxes and improve services screen
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@191 2a923420-c742-0410-a762-8d5b09965624
2011-06-22 00:21:48 +00:00
hummypkg
26e90143bf add files
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@189 2a923420-c742-0410-a762-8d5b09965624
2011-06-21 22:38:43 +00:00
hummypkg
884e17b3a7 add download option, require busybox 1.18.3-1
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@188 2a923420-c742-0410-a762-8d5b09965624
2011-06-21 22:38:20 +00:00
hummypkg
7202b7e4f8 mv
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@183 2a923420-c742-0410-a762-8d5b09965624
2011-06-17 09:30:09 +00:00
hummypkg
087532136c mv
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif~@181 2a923420-c742-0410-a762-8d5b09965624
2011-06-17 09:29:33 +00:00
hummypkg
700306b3a8 implement delete action + menu item greying out and correct lock/unlock labels. Also add SMTP server settings
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif@180 2a923420-c742-0410-a762-8d5b09965624
2011-06-16 23:49:48 +00:00
hummypkg
5dccb7cbbf commit
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif@179 2a923420-c742-0410-a762-8d5b09965624
2011-06-16 03:10:41 +00:00
hummypkg
d0d6474169 add new channel icon set
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif@173 2a923420-c742-0410-a762-8d5b09965624
2011-06-14 11:50:54 +00:00
hummypkg
240a4d7589 updates barring channel icons
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif@172 2a923420-c742-0410-a762-8d5b09965624
2011-06-14 11:48:55 +00:00
941 changed files with 5804 additions and 759 deletions

View File

@@ -1,10 +1,11 @@
Package: webif
Priority: optional
Section: web
Version: 0.5.1
Version: 0.6.4
Architecture: mipsel
Maintainer: af123@hummypkg.org.uk
Depends: mongoose(>=2.11-4),jim-sqlite3,jim-cgi,service-control,busybox,lsof,jim-oo,epg(>=1.0.2)
Depends: mongoose(>=3.0-2),jim(>=0.71-1),jim-sqlite3(>=0.71-1),jim-cgi(>=0.4),jim-oo,jim-pack,service-control,busybox(>=1.18.3-1),lsof,epg(>=1.0.2),hmt(>=1.0.6),ssmtp
Replaces: af123-webif
Conflicts: af123-webif
Description: A web interface for the Humax. In development.
Suggests: ffmpeg
Description: An evolving web interface for the Humax.

View File

@@ -0,0 +1,75 @@
#!/mod/bin/jimsh
package require cgi
source /mod/var/mongoose/lib/setup
require rsv.class
set dir /mod/var/backup
puts "Content-Type: text/html"
puts ""
cgi_input
#cgi_dump
if {![dict exists $_cgi file]} {
puts "No filename supplied."
exit
}
set file [file tail [dict get $_cgi file]]
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
from TBL_FAV join TBL_SVC using (hSvc)
order by eFavGroup
}] {
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)"
}
puts "Done."
close $fd
rsv cleanup

View File

@@ -0,0 +1,59 @@
function refresh_files()
{
$('#backup_files').load('/cgi-bin/backup/files.jim', function() {
$('input.restore').change(function() {
$('#restore_button').removeAttr('disabled')
.button('option', 'disabled', false);
$('#delete_button').removeAttr('disabled')
.button('option', 'disabled', false);
});
});
}
$(document).ready(function() {
$('button').button();
refresh_files();
$('#backup_button').click(function() {
$('#backup_working').slideDown();
$('#results').load('/cgi-bin/backup/backup.jim?' +
$('#backup_name').serialize(), function() {
$('#results').slideDown(function() {
$('#backup_working').slideUp();
refresh_files();
});
});
});
$('#delete_button').click(function() {
var backup = $('input.restore').val();
if (confirm('Confirm deletion of ' + backup))
{
$('#results').load('/cgi-bin/backup/delete.jim?' +
$('input.restore').serialize(), function() {
$('#results').slideDown(function() {
refresh_files();
});
});
}
});
$('#restore_button').click(function() {
var backup = $('input.restore').val();
if (confirm('!!!!!!!!!!!!!!!!!!!!!!!!! PLEASE CONFIRM !!!!!!!!!!!!!!!!!!!!!!!!!\n\nAre you sure you wish to erase all scheduled recordings and favourite channels and then restore them from\n' + backup + '?'))
{
$('#restore_working').slideDown();
$('#results').load('/cgi-bin/backup/restore.jim?' +
$('input.restore').serialize(), function() {
$('#results').slideDown(function() {
$('#restore_working').slideUp();
refresh_files();
$('#restore_warning').slideDown();
$('#restart_block').load(
'/cgi-bin/restartblock.jim');
});
});
}
});
});

View File

@@ -0,0 +1,31 @@
#!/mod/bin/jimsh
package require cgi
source /mod/var/mongoose/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 ""
cgi_input
#cgi_dump
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."
} elseif {[catch { file delete $ffile } msg]} {
puts "Deletion failed: $msg"
} else {
puts "Successfully deleted <i>$file</i>"
}

View File

@@ -0,0 +1,39 @@
#!/mod/bin/jimsh
package require cgi
puts "Content-Type: text/html"
puts "Pragma: no-cache"
puts "Expires: Thu, 01 Jan 1970 00:00:00 GMT"
puts ""
set dir "/mod/var/backup"
proc empty {} {
puts "<font style=\"color: grey\">
<i>No current backup files.</i>
</font>"
}
if {![file isdirectory $dir]} {
empty
exit
}
set backups [glob -nocomplain "$dir/*.rbk"]
if {![llength $backups]} {
empty
exit
}
foreach backup $backups {
set b [file rootname [file tail $backup]]
puts "<input name=restore_file class=restore
type=radio value=\"$b\">$b <font class=footnote>(
[clock format [file mtime $backup] -format {%c %Z}]
)</font></input>
<br>
"
}

View File

@@ -0,0 +1,142 @@
#!/mod/bin/jimsh
package require cgi
source /mod/var/mongoose/lib/setup
require rsv.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 backup file. - $msg"
exit
}
proc findhsvc {channel} {
global rsvdb
set hsvc [$rsvdb query "
select hSvc
from channel.TBL_SVC
where szSvcName = '$channel'
or szSvcname = '\025$channel'
limit 1
"]
if {[llength $hsvc] == 1} {
return [lindex [lindex $hsvc 0] 1]
} else {
return 0
}
}
puts "Restoring scheduled events..."
$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]
}
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} { $rsv insert }
}
$rsvdb query {commit transaction;}
puts "Restoring favourite channels..."
$rsvdb query {begin transaction;}
$rsvdb query {delete from channel.TBL_FAV}
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 hsvc [findhsvc $chan]
if {$grp != $group} {
set grp $group
puts " Group $grp"
}
puts " $chan"
if {!$hsvc} {
puts " Cannot map channel name to service."
continue
}
set query "
insert into channel.TBL_FAV(hSvc, eFavGroup, eSvcType)
values($hsvc, $group, $type);
"
$rsvdb query $query
}
$rsvdb query {commit transaction;}
close [open /tmp/.restartpending w]
close $fd
rsv cleanup

236
var/mongoose/cgi-bin/browse.jim Executable file
View File

@@ -0,0 +1,236 @@
#!/mod/bin/jimsh
package require cgi
source /mod/var/mongoose/lib/setup
require ts.class pretty_size
puts "Content-Type: text/html"
puts ""
set ignore {.nts .thm .hmt .hmi}
set include {.ts .avi .mpg .mpeg .wmv .mkv .mp3 .mp4 .mov}
cgi_input
#cgi_dump
#set env(REQUEST_URI) ''
#set _cgi(dir) "/media/My Video/Chuggington"
proc directory {file bfile} {
regsub -all " +" $bfile "" tbfile
puts "<div class=va>"
puts "<a href=$::env(REQUEST_URI)?dir=[cgi_quote_url $file]>"
puts "<img border=0 class=va id=\"img$tbfile\"
src=/images/711_1_09_Media_Folder.png>"
puts "$bfile</a><span class=filesize id=\"$tbfile\">
</span></div>"
}
proc entry {file} {{i 0}} {
set bfile [file tail $file]
if {[string index $bfile 0] == "\025"} {
set bfile [string range $bfile 1 end]
}
if [file isdirectory "$file"] {
directory $file $bfile
continue
}
set ext [file extension $file]
if {$ext in $::ignore || $ext ni $::include} { continue }
file stat $file st
set sz [pretty_size $st(size)]
set base [file rootname $file]
if {$ext eq ".ts" && [file exists "${base}.nts"]} {
set type ts
set ts [ts fetch $file 1]
set img Video_TS
} else {
set type gen
set ts 0
set img Video_Other
}
puts "
<div class=\"va bf\" id=[incr i]>
<a class=bf file=\"$file\" type=$type href=#>
"
set new 0
if {$type eq "ts"} {
if {[$ts flag "New"] > 0} { set new 1 }
} else {
if {![file exists "[file rootname $file].hmi"]} { set new 1 }
}
if {$new} { append img _New }
puts "<img class=va border=0 src=/img/$img.png>"
puts "
$bfile
</a>
"
# Size
puts "<span class=filesize> ($sz) </span>"
# Icons
set locked 0
set encd 0
set def unknown
if {$type eq "ts"} {
# HD / SD
if {[$ts get definition] eq "HD"} {
set def HD
set img "172_1_00_HD"
} else {
set def SD
set img "172_1_26_SD"
}
puts "<img class=va src=/images/$img.png height=21>"
# Locked
if {[$ts flag "Locked"] > 0} {
set locked 1
puts "<img class=va src=/images/178_1_00_Icon_Lock.png
height=21>"
}
# Encrypted
if {[$ts flag "Encrypted"] > 0} {
set encd 1
puts "<img class=va
src=/images/749_1_26_Video_Encryption.png
height=21>"
}
# Guidance
if {[$ts flag "Guidance"] > 0} {
puts "<img class=va
src=/images/174_1_26_GuidancePolicy.png
height=21>"
}
}
# Opt+ button
puts "
<a href=#>
<img class=\"opt va\" border=0 width=45 type=$type did=$i
locked=$locked encd=$encd def=$def new=$new
src=/images/181_1_00_Help5_OPT_Plus.png>
</a>
<div class=\"results blood\" style=\"margin: 0 0 0 5em\"></div>
"
puts "</div>"
}
if {[dict exists $_cgi dir]} {
set dir [dict get $_cgi dir]
} else {
set dir "/media/My Video"
}
######################################################################
# Render web page
header
puts {
<link href=/css/jquery.contextMenu.css rel=stylesheet type=text/css />
<script type="text/javascript" src="/js/jquery.contextMenu.js"></script>
<ul id=optmenu class=contextMenu>
<li><a href=#delete>Delete</a></li>
<li><a href=#lock>Toggle Lock</a></li>
<li><a href=#enc>Toggle Enc</a></li>
<li><a href=#new>Toggle New</a></li>
<li><a href=#rename>Rename</a></li>
<li><a href=#download>Download</a></li>
</ul>
<div id=renameform title="Rename media file" style="display: none">
<form id=renameform_form>
<input type=hidden name="renameorig" id="renameorig" value="">
<input type=hidden name="titleorig" id="titleorig" value="">
<table border=0>
<tr>
<th>
<label for="rename">
<b>New Filename</b>
</label>
</th>
<td>
<input type=text name="rename" id="rename"
value="" size=70 maxlength=255
class="text ui-widget-content ui-corner-all">
</td>
</tr>
<tr style="display: none" class=tstype>
<th>
<label for="renametitle" style="padding-top: 0.5em">
<b>New EPG Title</b>
</label>
</th>
<td>
<input type=text name="renametitle" id="renametitle"
value="" size=70 maxlength=48
class="text ui-widget-content ui-corner-all">
</td>
</tr>
<tr style="display: none" class=tstype>
<td colspan=2 id=synopsis style="font-style: italic"></td>
</tr>
</table>
</form>
</div>
<div id=dialogue></div>
<div id=confirm title="Confirmation Required"></div>
<script type=text/javascript src=/cgi-bin/browse/browse.js></script>
}
puts "<span style=\"display:none\" id=dir>$dir</span>"
# Breadcrumb path
puts "
<fieldset style=\"margin: 1em\">
<legend style=\"font-size: 1.5em; padding: 0 0.5em 0.5em 0.5em;\">
"
set stub ""
foreach part [split $dir /] {
if {$stub eq "/"} { set name $part } else { set name "/$part" }
append stub $name
puts "<a href=$env(REQUEST_URI)?dir=[cgi_quote_url $stub]>$name</a>
}
puts "<span class=filesize id=dirsize></span>"
puts "</legend>"
# Parent directory
set parent [join [lrange [split $dir /] 0 end-1] /]
if {$parent ne ""} {
puts "
<div class=va>
<a href=$env(REQUEST_URI)?dir=[cgi_quote_url $parent]>
<img border=0 src=/images/711_3_09_Media_Folder_UP.png class=va>
\[parent directory\]</a>
</div>
"
}
# Strip double slashes
regsub -all -- {\/+} "$dir/*" "/" dir
foreach file [lsort [glob -nocomplain "$dir"]] {
entry $file
}
puts "</fieldset>"
footer

View File

@@ -0,0 +1,287 @@
function epginfo_callback(data, status, xhr)
{
var width = 85;
if (status != 'success')
return;
//console.log(status);
//console.dir(data);
$('#titleorig').val(data.title);
$('#renametitle').val(data.title);
if (data.synopsis.length > width)
data.synopsis = data.synopsis.substring(0, width) + '...';
$('#synopsis').html(data.synopsis);
$('tr.tstype').show('slow');
}
function insert_folder_size(folder, size)
{
folder = folder.replace(/ /g, '');
folder = folder.replace(/([ #;&,.+*~\':"!^$[\]()=>|\/@])/g, '\\$1');
//console.log("Folder: (%s) = (%s)", folder, size);
if (folder == "")
$('#dirsize').text(' (' + size + 'iB)');
else
$('#' + folder).text(' (' + size + 'iB)');
}
function folder_size_callback(data, status, xhr)
{
//console.log("Status: %s", status);
//console.dir(data);
$.each(data, insert_folder_size);
}
function set_folder_new(folder, cnt)
{
folder = folder.replace(/ /g, '');
folder = folder.replace(/([ #;&,.+*~\':"!^$[\]()=>|\/@])/g, '\\$1');
//console.log("Folder: (%s) = (%s)", folder, cnt);
$('#img' + folder).attr('src', '/img/Folder_New.png');
}
function new_folder_callback(data, status, xhr)
{
//console.log("Status: %s", status);
//console.dir(data);
$.each(data, set_folder_new);
}
function delete_callback(file, type, id)
{
var el = 'div.bf#' + id;
var results = el + ' .results';
var url = '/cgi-bin/browse/delete.jim?file=' +
encodeURIComponent(file) + '&type=' + type;
$(results).load(url, function() {
$(el).delay(3000).slideUp(300, function() {
$(el).remove();
});
});
}
function lock_callback(file, type, id)
{
var url = '/cgi-bin/browse/lock.jim?file=' + encodeURIComponent(file);
$.get(url, function() { window.location.reload(true); });
}
function enc_callback(file, type, id)
{
var url = '/cgi-bin/browse/enc.jim?file=' + encodeURIComponent(file);
$.get(url, function() { window.location.reload(true); });
}
function new_callback(file, type, id)
{
var url = '/cgi-bin/browse/new.jim?file=' + encodeURIComponent(file);
$.get(url, function() { window.location.reload(true); });
}
function rename_submit()
{
var s = $('#renameform_form').serialize();
$.get('/cgi-bin/browse/rename.jim?' + s,
function() { window.location.reload(true); });
}
var $confirm; // Populated after DOM is loaded.
function confirm_action(action, callback, file, type, id)
{
var bfile = file.replace(/.*\/|\.[^.]*$/g, '');
$confirm.dialog('option', 'buttons', {
'Yes': function() { $(this).dialog('close');
callback(file, type, id); },
'No': function() {$(this).dialog('close');}
});
$('#confirm').empty().html(
'Are you sure you wish to ' + action + '<br>' +
'<i>' + bfile + '</i> ?'
);
$confirm.dialog('open');
}
function preparemenu(el, menu)
{
if (el.attr('type') == 'ts')
{
if (el.attr('def') == 'HD')
{
$('#optmenu').enableContextMenuItems('#enc');
if (el.attr('encd') == 1)
$(menu).changeContextMenuItem('#enc',
'Remove ENC');
else
$(menu).changeContextMenuItem('#enc',
'Set ENC');
}
else
$('#optmenu').disableContextMenuItems('#enc');
$('#optmenu').enableContextMenuItems('#new');
if (el.attr('new') == 1)
$(menu).changeContextMenuItem('#new', 'Mark watched');
else
$(menu).changeContextMenuItem('#new', 'Mark new');
$('#optmenu').enableContextMenuItems('#lock');
if (el.attr('locked') == 1)
{
$(menu).changeContextMenuItem('#lock', 'Unlock');
$('#optmenu').disableContextMenuItems('#delete');
}
else
{
$(menu).changeContextMenuItem('#lock', 'Lock');
$('#optmenu').enableContextMenuItems('#delete');
}
}
else
{
$('#optmenu').enableContextMenuItems('#delete');
$('#optmenu').disableContextMenuItems('#lock');
$('#optmenu').disableContextMenuItems('#enc');
$('#optmenu').disableContextMenuItems('#new');
}
}
$(document).ready(function() {
var menuclick = function(action, el, pos)
{
var file = $(el).parent().prevAll('a.bf').last().attr('file');
var bfile = file.replace(/.*\/|\.[^.]*$/g, '');
bfile = bfile.replace(/[\x00-\x1f]+/g, '');
var type = $(el).attr('type');
var id = $(el).attr('did');
switch (action)
{
case 'delete':
confirm_action('delete', delete_callback, file,
type, id);
break;
case 'lock':
confirm_action('change the lock on', lock_callback,
file, type, id);
break;
case 'enc':
confirm_action('change the ENC flag on', enc_callback,
file, type, id);
break;
case 'new':
confirm_action('change the New flag on', new_callback,
file, type, id);
break;
case 'rename':
$('#rename').val(bfile);
$('#renameorig').val(file);
$('#titleorig').val('');
$('#renametitle').val('');
$('#synopsis').val('');
$('tr.tstype').css('display', 'none');
if (type == 'ts')
{
$.getJSON('/cgi-bin/browse/epgtitle.jim?file=' +
encodeURIComponent(file), epginfo_callback);
}
$('#renameform').dialog('open');
break;
case 'download':
window.location.href = '/cgi-bin/browse/download.jim?file=' +
encodeURIComponent(file);
break;
default:
alert('Unhandled action: ' + action);
break;
}
};
// Bind context menu to opt+ image
$('img.opt').contextMenu(
{
menu: 'optmenu',
leftButton: true,
beforeShow: preparemenu
},
menuclick
);
// Disable items which are not yet implemented.
$('#optmenu').disableContextMenuItems('#title');
// Create reusable dialogue.
var $dialog = $('#dialogue').dialog({
title: "Media Details",
modal: false, autoOpen: false,
height: 600, width: 700,
show: 'scale', hide: 'fade',
draggable: true, resizable: true,
buttons: {
"Close": function() {
$(this).dialog('close');
}
},
close: function(e,u) { $('#dialogue').empty().html(
'<img src="/img/loading.gif" alt="loading">'); }
});
// Bind dialogue open to filenames.
$('a.bf').click(function(e) {
e.preventDefault();
var file = $(this).attr('file');
var type = $(this).attr('type');
var url = '/cgi-bin/browse/file.jim?file=' +
encodeURIComponent(file) + '&type=' + type;
$('#dialogue').load(url);
$dialog.dialog('open');
});
$('#renameform').dialog({
autoOpen: false,
height: 'auto', width: 'auto',
modal: true,
buttons: {
"Update": rename_submit,
"Close": function() {
$(this).dialog('close');
}
},
close: function() { $('#rename').val(''); }
});
// Create re-usable confirmation dialogue.
$confirm = $('#confirm').dialog({
modal: true, autoOpen: false,
height: 160, width: 500,
show: 'fade', hide: 'fade',
draggable: false, resizable: false
});
var dir = $('#dir').text();
// Load folder sizes
$.getJSON('/cgi-bin/browse/sizes.jim?dir=' + encodeURIComponent(dir),
folder_size_callback);
// Flag folders with unwatched items
$.getJSON('/cgi-bin/browse/newdir.jim?dir=' + encodeURIComponent(dir),
new_folder_callback);
});

View File

@@ -0,0 +1,27 @@
#!/mod/bin/jimsh
package require cgi
source /mod/var/mongoose/lib/ts.class
puts "Content-Type: text/html"
puts ""
cgi_input
#cgi_dump
set file [dict get $_cgi file]
set type [dict get $_cgi type]
if {$type eq "ts"} {
set ts [ts fetch $file]
if {[$ts delete]} {
puts "Successfully deleted $file."
} else {
puts "Problem deleting $file, [$ts get error]"
}
exit
}
file delete $file
puts "Successfully deleted $file."

View File

@@ -0,0 +1,48 @@
#!/mod/bin/jimsh
package require cgi
package require sqlite3
source /mod/var/mongoose/lib/setup
require ts.class
cgi_input
#cgi_dump
set file [dict get $_cgi file]
set rfile [file normalize $file]
set ts [ts fetch $file]
set dmsfile /mnt/hd2/dms_cds.db
set url $file
set mime "video/ts"
if {[file exists $dmsfile]} {
set db [sqlite3.open /mnt/hd2/dms_cds.db]
set muri [$db query "
select tblresource.mimetype, contenturi
from tblresource join tblmedia using (mediaid)
where localurl = '$rfile'
"]
if {$muri != ""} {
set rec [lindex $muri 0]
set xuri [lindex $rec 3]
set mime [lindex $rec 1]
set url "http://$env(HTTP_HOST):9000/web/$xuri"
}
}
puts "Content-Type: text/plain"
puts "Refresh: 0; url=$url"
puts "Content-length: 0"
puts ""
#puts "Pragma: public"
#puts "Expires: 0"
#puts "Cache-Control: must-revalidate, post-check=0, pre-check=0"
#puts "Content-Type: application/force-download"
#puts "Content-Type: application/download"
#puts "Content-Type: $mime"
#puts "Content-Disposition: attachment; filename=\"[file tail $file]\""
#puts "Content-Transfer-Encoding: binary"
#puts "Content-Length: [file size $rfile]"

View File

@@ -0,0 +1,27 @@
#!/mod/bin/jimsh
package require cgi
source /mod/var/mongoose/lib/ts.class
puts "Content-Type: text/html"
puts ""
cgi_input
#cgi_dump
#set _cgi(file) "/media/My Video/The Walking Dead/The Walking Dead S01E06.ts"
set file [dict get $_cgi file]
set ts [ts fetch $file]
if {[set ts [ts fetch $file]] != 0} {
set action enc
if {[$ts flag "Encrypted"]} { set action unenc }
if {[$ts $action]} {
puts "Successfully [set action]ed $file."
} else {
puts "Problem [set action]ing $file,
[$ts get error]"
}
}

View File

@@ -0,0 +1,22 @@
#!/mod/bin/jimsh
package require cgi
source /mod/var/mongoose/lib/ts.class
puts "Content-Type: application/json"
puts ""
cgi_input
#cgi_dump
#set _cgi(file) "/media/My Video/Doctor Who/6.13._The_Almost_People.ts"
if {![dict exists $_cgi file]} { exit }
set file [dict get $_cgi file]
set ts [ts fetch $file]
puts "{"
puts "\"title\" : \"[$ts get title]\","
puts "\"synopsis\" : \"[$ts get synopsis]\""
puts "}"

View File

@@ -0,0 +1,17 @@
#!/mod/bin/jimsh
package require cgi
puts "Content-Type: text/html"
puts ""
cgi_input
#cgi_dump
if [file exists /mod/bin/ffmpeg] {
set file [dict get $_cgi file]
puts [exec /mod/var/mongoose/lib/ffmpeg -i $file]
} else {
puts "Install ffmpeg package for more information..."
}

View File

@@ -0,0 +1,115 @@
#!/mod/bin/jimsh
package require cgi
source /mod/var/mongoose/lib/pretty_size
puts "Content-Type: text/html"
puts ""
cgi_input
#cgi_dump
#set _cgi(file) "/media/My Video/Dangermouse/Series 1/01_rogue_robots.avi"
if {![dict exists $_cgi file]} { exit }
set file [dict get $_cgi file]
set type [dict get $_cgi type]
file stat $file st
set sz [pretty_size $st(size)]
if {$type eq "ts"} {
source /mod/var/mongoose/lib/epg.class
source /mod/var/mongoose/lib/ts.class
set ts [ts fetch $file]
puts "
<table class=keyval>
<tr>
<th>Title</th>
<td>[$ts get title]</td>
</tr><tr>
<th>Synopsis</th>
<td>[$ts get synopsis]</td>
</tr><tr>
"
if {[$ts flag "Guidance"] > 0} {
puts "
<th>Guidance</th>
<td><img class=va
src=/images/174_1_26_GuidancePolicy.png height=21>
[$ts get guidance]
</td>
</tr><tr>
"
}
puts "
<th>Definition</th>
<td>
"
if {[$ts get definition] eq "HD"} {
puts "<img class=va src=/images/172_1_00_HD.png height=21>"
} else {
puts "<img class=va src=/images/172_1_26_SD.png height=21>"
}
puts "</td>
</tr><tr>
<th>Channel</th>
<td>[epg channelicon [$ts get channel_name] 50 "vertical-align: middle"]
[$ts get channel_num] - [$ts get channel_name]</td>
</tr><tr>
<th>Start Time</th>
<td>"
puts [clock format [$ts get start] -format "%c %Z"]
puts "</td>
</tr><tr>
<th>End Time</th>
<td>"
puts [clock format [$ts get end] -format "%c %Z"]
puts "</td>
</tr><tr>
<th>Duration</th>
<td>[$ts duration] minute(s).</td>
</tr><tr>
<th>Size</th>
<td>$sz</td>
</tr><tr>
<th>Flags</th>
<td>[$ts get flags]</td>
</tr>
</table>
"
exit
}
# Otherwise, for a general file.
puts "
<table class=keyval>
<tr>
<th>File</th>
<td>$file</td>
</tr><tr>
<th>Size</th>
<td>$sz</td>
</tr><tr>
<th>Info</th>
<td class=pre id=ffmpeg>
<img src=/img/loading.gif><i>Loading...</i>
</td>
</tr>
</table>
"
set url "/cgi-bin/browse/ffmpeg.jim?file=[cgi_quote_url $file]"
puts { <script type="text/javascript"> }
puts "var url = \"$url\";"
puts {
$('#ffmpeg').load(url);
</script>
}

View File

@@ -0,0 +1,27 @@
#!/mod/bin/jimsh
package require cgi
source /mod/var/mongoose/lib/ts.class
puts "Content-Type: text/html"
puts ""
cgi_input
#cgi_dump
#set _cgi(file) "/media/My Video/The Walking Dead/The Walking Dead S01E06.ts"
set file [dict get $_cgi file]
set ts [ts fetch $file]
if {[set ts [ts fetch $file]] != 0} {
set action lock
if {[$ts flag "Locked"]} { set action unlock }
if {[$ts $action]} {
puts "Successfully [set action]ed $file."
} else {
puts "Problem [set action]ing $file,
[$ts get error]"
}
}

View File

@@ -0,0 +1,27 @@
#!/mod/bin/jimsh
package require cgi
source /mod/var/mongoose/lib/ts.class
puts "Content-Type: text/html"
puts ""
cgi_input
#cgi_dump
#set _cgi(file) "/media/My Video/The Walking Dead/The Walking Dead S01E06.ts"
set file [dict get $_cgi file]
set ts [ts fetch $file]
if {[set ts [ts fetch $file]] != 0} {
set action new
if {[$ts flag "New"]} { set action watched }
if {[$ts set_$action]} {
puts "Successfully marked $file as $action."
} else {
puts "Problem marking $file as $action,
[$ts get error]"
}
}

View File

@@ -0,0 +1,34 @@
#!/mod/bin/jimsh
package require cgi
package require pack
puts "Content-Type: application/json"
puts ""
cgi_input
#cgi_dump
#set _cgi(dir) "/media/My Video"
set root [dict get $_cgi dir]
# Strip double slashes
regsub -all -- {\/+} "$root/*" "/" root
puts "{"
foreach dir [glob -nocomplain "$root"] {
if {[file exists "$dir/.series"]} {
set fd [open "$dir/.series"]
set bytes [read $fd 8]
set recs [unpack $bytes -uintle 0 32]
set plays [unpack $bytes -uintle 32 32]
set diff $($recs - $plays)
if {$diff != 0} {
set node [lindex [split $dir /] end]
puts "\"$node\": $diff,"
}
}
}
puts "\"dummy\" : 0"
puts "}"

View File

@@ -0,0 +1,53 @@
#!/mod/bin/jimsh
package require cgi
source /mod/var/mongoose/lib/ts.class
puts "Content-Type: text/html"
puts ""
cgi_input
#cgi_dump
#renameorig
#titleorig
#rename
#renametitle
#set _cgi(renameorig) "/media/My Video/The Walking Dead/The Walking Dead_20110521_2201.ts"
#set _cgi(rename) "Last Episode"
if {![dict exists $_cgi renameorig]} { exit }
set file [dict get $_cgi renameorig]
set newfile [dict get $_cgi rename]
if {[string length [string trim $newfile]] == 0 || $file eq $newfile} {
set newfile ""
}
if {[file isdirectory $file]} {
#puts "Directory."
if {$newfile ne ""} {
set dir [file dirname $file]
set newfile "${dir}/${newfile}"
file rename $file $newfile
}
} elseif {[set ts [ts fetch $file]] != 0} {
#puts "TS file."
catch {
set title [dict get $_cgi renametitle]
set titleorig [dict get $_cgi titleorig]
if {[string length [string trim $title]] > 0 &&
$title ne $titleorig} {
$ts settitle $title
}
}
if {$newfile ne ""} { ts renamegroup $file $newfile }
} else {
#puts "Normal file."
if {$newfile ne ""} { ts renamegroup $file $newfile }
}

View File

@@ -0,0 +1,26 @@
#!/mod/bin/jimsh
package require cgi
puts "Content-Type: application/json"
puts ""
cgi_input
#cgi_dump
#set _cgi(dir) "/media/My Video"
set dir [dict get $_cgi dir]
#9.4G /media/My Video/Archive
#1.4G /media/My Video/CSI_ Crime Scene Investigation
puts "{"
foreach line [split [exec /mod/bin/busybox/du -h "$dir/"] "\n"] {
set fields [split $line "\t"]
set size [lindex $fields 0]
set node [lindex [split [lindex $fields 1] /] end]
puts "\"$node\" : \"$size\","
}
puts "\"dummy\" : \"\""
puts "}"

71
var/mongoose/cgi-bin/db.jim Executable file
View File

@@ -0,0 +1,71 @@
#!/mod/bin/jimsh
package require cgi
package require sqlite3
source /mod/var/mongoose/lib/setup
require altrow
puts "Content-Type: text/html"
puts ""
header
cgi_input
#cgi_dump
set ftab [cgi_get tab]
set fdb [cgi_get db]
if {$fdb != 0} {
puts "<h1><a href=/cgi-bin/db.jim>Remove filters</a></h1>"
}
proc db_info {db_file} {
global _cgi fdb ftab
if {$fdb != 0 && [file tail $db_file] ne $fdb} { return }
if {![file exists $db_file]} { return }
set db [sqlite3.open $db_file]
set tables [$db query {
select name from sqlite_master
where type='table' order by name
}]
puts "<h1><a href=/cgi-bin/db.jim?db=[file tail $db_file]>
$db_file</a></h1>"
foreach table $tables {
set table [lindex $table 1]
if {$ftab != 0 && $ftab ne $table} { continue }
set columns [$db query "pragma table_info($table)"]
set datas [$db query "SELECT * FROM $table order by 1"]
puts "<h2><a href=/cgi-bin/db.jim?db=[file tail $db_file]&tab=$table>$table</a></h2>"
puts "<table class=borders>"
puts " <tr>"
foreach column $columns {
puts " <th>[lindex $column 3]</th>"
}
puts " </tr>"
foreach data $datas {
altrow
for {set i 1} {$i < [llength $data]} {incr i 2} {
puts " <td>[lindex $data $i]</td>"
}
puts " </tr>"
}
puts "</table>"
}
$db close
}
db_info /var/lib/humaxtv/rsv.db
db_info /var/lib/humaxtv/setup.db
db_info /var/lib/humaxtv/channel.db
db_info /mnt/hd2/dms_cds.db
footer

View File

@@ -1,12 +1,13 @@
#!/mod/bin/jimsh
package require cgi
source /mod/var/mongoose/lib/epg.class
source /mod/var/mongoose/lib/setup
require epg.class
puts "Content-Type: text/html"
puts ""
source /mod/var/mongoose/html/lib/header.jim
header
cgi_input
#cgi_dump
@@ -31,5 +32,6 @@ if { $raw == 0 } {
puts "</pre>"
epg cleanup
source /mod/var/mongoose/html/lib/footer.jim
footer

View File

@@ -1,7 +1,8 @@
#!/mod/bin/jimsh
package require cgi
source /mod/var/mongoose/lib/epg.class
source /mod/var/mongoose/lib/setup
require epg.class
puts "Content-Type: text/html"
puts ""
@@ -13,14 +14,26 @@ set service 0
catch { set service [dict get $_cgi service] }
set event 0
catch { set event [dict get $_cgi event] }
if {! [dict exists $_cgi bare]} {
source /mod/var/mongoose/html/lib/header.jim
}
if {! [dict exists $_cgi bare]} { header }
#set service 8384
#set event 25293
#set service 8448
#set event 30843
set record [lindex [epg fetch dump -service $service -event $event] 0]
$record get_channel_info
set others [$record othertimes]
puts {
<style type=text/css>
font.also
{
font-size: 0.9em;
font-style: italic;
color: #333;
background: transparent;
}
</style>
}
puts "
<table class=keyval>
@@ -32,10 +45,38 @@ puts "
<td>[$record get text]</td>
</tr><tr>
<th>Start</th>
<td>[clock format [$record get start] -format {%c %Z}]</td>
<td>[clock format [$record get start] -format {%c %Z}]
"
foreach o $others {
if {[$o ended]} { continue }
$o get_channel_info
$o process_sched
if {[$o get series_crid] eq ""} { set ro 1 } else { set ro 2 }
puts -nonewline "<br><font class=also>&nbsp;&nbsp;&nbsp;&nbsp;"
puts -nonewline "Also: "
puts -nonewline "<a class=event href=# xs=[$o get service_id] "
puts -nonewline "xe=[$o get event_id] "
puts -nonewline "sch=[$o get sched_type] rec=$ro>"
puts -nonewline "[clock format [$o get start] -format {%c %Z}]"
puts -nonewline " on "
puts -nonewline [$o channel_icon 16]
puts -nonewline "[$o get channel_name] "
puts "</a>"
puts "</font>"
}
puts "
</td>
</tr><tr>
<th>Duration</th>
<td>[clock format [$record get duration] -format %T]</td>
<td>[clock format [$record get duration] -format %T]
"
if {[$record showing]} {
puts [progressbar [$record percent]]
}
puts "
</td>
</tr><tr>
<th>Type</th>
<td>[$record get content_type] ([$record get content_code])</td>
@@ -54,8 +95,13 @@ if {[$record get warning] != ""} {
if {[$record get event_crid] != ""} {
puts "
<tr>
<th>CRID</th>
<td>[$record get channel_crid][$record get event_crid]</td>
<th>CRID</th><td>
<a href=/cgi-bin/epg_search.jim?crid=[$record get event_crid]>
<img border=0 height=14
src=/images/421_1_00_CH_Title_2R_Arrow.png>
[$record get channel_crid][$record get event_crid]
</a>
</td>
</tr>
"
}
@@ -91,7 +137,7 @@ if {[$record get rec_crid] != ""} {
puts "
<tr>
<td colspan=2 valign=top>
[$record channel_icon]
[$record channel_icon 70]
[join [$record icon_set] "&nbsp;"]
</td>
</tr>
@@ -103,8 +149,8 @@ puts "
</a>
"
epg cleanup
if {! [dict exists $_cgi bare]} {
source /mod/var/mongoose/html/lib/footer.jim
}
puts "<div id=epginfo_extra class=footnote></div>"
epg cleanup
if {! [dict exists $_cgi bare]} { footer }

View File

@@ -0,0 +1,83 @@
#!/mod/bin/jimsh
package require cgi
source /mod/var/mongoose/lib/setup
require epg.class
puts "Content-Type: text/html"
puts ""
cgi_input
#cgi_dump
#set _cgi(service) 4170
#set _cgi(event) 38584
#set _cgi(type) 2
if {![dict exists $_cgi service] || ![dict exists $_cgi event]} {
puts "Error, insufficient parameters passed."
exit
}
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."
exit
}
if {[$event percent] > 0} {
puts "Error, cannot record programme which has already started showing"
puts "or occurred in the past."
exit
}
$event get_channel_info
set args {}
set args(ersvtype) 3
set args(hsvc) [$event get channel_hsvc]
set args(nsttime) [$event get start]
set args(nduration) [$event get duration]
set args(usevtid) [$event get event_id]
set args(szevtname) "\025[$event get name]"
set args(eReady) 30
set ccrid [$event get channel_crid]
if {$type == 1} {
# Event
set args(ucCRIDType) 49
set args(ucRecKind) 1
set args(szCRID) "$ccrid[$event get event_crid]"
set args(szEventToRecord) "1$args(szCRID)|"
} else {
# Series
set args(ucCRIDType) 50
set args(ucRecKind) 4
set args(szCRID) "$ccrid[$event get series_crid]"
set args(szFPBRecPath) "$args(szevtname)"
set progs [lmap i [epg fetch dump -scrid [$event get series_crid]] {
if {[set ecrid [$i get event_crid]] eq ""} { continue }
list "1$::ccrid$ecrid"
}]
set args(szEventToRecord) "[join $progs "|"]|"
}
#puts $args
set msg ""
if {![file exists /mod/.schedule.testing]} { set msg "Disabled during testing" }
if {$msg ne "" || [catch {[rsv new $args] insert} msg]} {
puts "Error encountered while scheduling the recording: <i>$msg</i>"
} else {
puts "Successfully scheduled recording of <i>[$event get name]</i>"
close [open /tmp/.restartpending w]
}
epg cleanup

View File

@@ -1,28 +1,19 @@
#!/mod/bin/jimsh
package require cgi
source /mod/var/mongoose/lib/epg.class
source /mod/var/mongoose/lib/altrow
source /mod/var/mongoose/lib/cat
source /mod/var/mongoose/lib/setup
require epg.class spinner.class altrow
puts "Content-Type: text/html"
puts ""
source /mod/var/mongoose/html/lib/header.jim
header
puts "<script type=text/javascript src=/js/highlight.js></script>"
source /mod/var/mongoose/lib/epg_popup
puts "<script type=text/javascript src=/js/jquery.highlight.js></script>"
cgi_input
#cgi_dump
#set _cgi [dict create term "doctor who"]
#set env(REQUEST_URI) "test"
set term ""
catch { set term [dict get $_cgi term] }
set cmd "search"
if {[dict exists $_cgi full]} { set cmd "searchall" }
set ct 0
catch { set ct [dict get $_cgi ct] }
set crid ""
@@ -30,72 +21,35 @@ catch { set crid [dict get $_cgi crid] }
set scrid ""
catch { set scrid [dict get $_cgi scrid] }
puts "
<form method=get action=/cgi-bin/epg_search.jim>
Search EPG: <input name=term size=20 maxlength=255 value=\"$term\">
<input type=checkbox name=full"
if {[dict exists $_cgi full]} { puts " checked" }
puts ">Search descriptions as well as titles.
<input type=submit value=Search>
"
if {[dict exists $_cgi term]} {
set lterm [dict get $_cgi term]
set db [sqlite3.open /var/lib/humaxtv/setup.db]
set res [$db query {
select itemBlob from TBL_USERCONFIG
where itemName like 'EPG\_KEYWORD\_%%' ESCAPE '\'
}]
proc cts {type img text} {
puts "<a href=$::env(REQUEST_URI)?ct=$type>
<img height=18 border=0 src=/images/173_3_00_G3_$img.png>&nbsp;$text</a>";
}
puts {
<br>
<table>
<tr><td rowspan=2>Content Type Searches</td>
<td>
}
cts 1 "Movie" "Film/Drama"
puts "</td><td>"
cts 2 "News" "News/Current affairs"
puts "</td><td>"
cts 4 "Sports" "Sport"
puts "</td><td>"
cts 9 "Education" "Education/Science/Factual"
puts "</td><td>"
cts 10 "Leisure" "Leisure"
puts "</td></tr><tr><td>"
cts 7 "Art" "Arts/Culture"
puts "</td><td>"
cts 3 "Show" "Show/Game show"
puts "</td><td>"
cts 5 "Children" "Children"
puts "</td><td>"
cts 8 "Society" "Social/Political/Economic"
puts "</td><td>"
cts 6 "Music" "Music/Ballet/Dance"
puts "</tr></table>"
puts "<table cellpadding=5>"
if {[llength $res] > 0} {
puts "<tr><td>Keyword Searches</td>"
foreach keyword $res {
set kw [string range [lindex $keyword 1] 1 end]
puts "<td><a href=$env(REQUEST_URI)?term=[cgi_quote_url $kw]>$kw
</a></td>"
if {[string match {CRID:*} $lterm]} {
set crid [string range $lterm 5 end]
} elseif {[string match {SCRID:*} $lterm]} {
set scrid [string range $lterm 6 end]
}
puts "</tr>"
} elseif {$crid ne ""} {
set _cgi(term) "CRID:$crid"
} elseif {$scrid ne ""} {
set _cgi(term) "SCRID:$scrid"
}
puts "</table>"
$db close
require epg_search
puts "</form>"
[spinner new {
text "Searching EPG..."
size "1.2em"
style "margin: 1em;"
}] start
require epg_popup
#set _cgi [dict create term "doctor who"]
#set env(REQUEST_URI) "test"
set cmd "search"
if {$searchfull} { set cmd "searchall" }
if {$ct > 0 } {
set records [epg fetch dump -type $ct]
@@ -103,11 +57,16 @@ if {$ct > 0 } {
set records [epg fetch dump -crid $crid]
} elseif {$scrid ne ""} {
set records [epg fetch dump -scrid $scrid]
} elseif {$term ne ""} {
set records [epg fetch $cmd -extra $term]
} elseif {$searchterm ne ""} {
set records [epg fetch $cmd -extra $searchterm]
} else {
set records {}
}
puts {
set favlist [epg favlist]
if {[llength $records] > 0} {
puts {
<table class=borders id=results style="clear: both;margin: 0.5em 0 0 0">
<tr>
<th>Date</th>
@@ -115,6 +74,9 @@ puts {
<th>Programme</th>
<th>Synopsis</th>
</tr>
}
} else {
puts "No results found."
}
proc rsort {v1 v2} {
@@ -126,13 +88,21 @@ proc rsort {v1 v2} {
return -1
}
set i 0
foreach record [lsort -command rsort $records] {
if {$favlist != "" && [$record get service_id] ni $favlist} {
continue
}
altrow
puts "<td nowrap>
$record get_channel_info
set ended [$record ended]
if $ended { puts "<td nowrap class=blood>" } else { puts "<td nowrap>"}
puts "
[clock format [$record get start] -format "%a %d %b %Y"]<br>
[clock format [$record get start] -format "%H:%M %Z"]</td>"
[clock format [$record get start] -format "%H:%M %Z"]"
puts "</td>"
puts "<td>[$record get channel_num]</td>"
puts "<td>[$record channel_icon 50]</td>"
puts "<td nowrap>
@@ -142,18 +112,17 @@ foreach record [lsort -command rsort $records] {
puts [$record cell]
puts "<td>[$record get text]</td><td>[$record get warning]</td>"
puts "</tr>"
flush stdout
}
puts "</table>"
if {$term != ""} {
if {$searchterm != ""} {
puts "
<script type=text/javascript>
highlight(document.getElementById(\"results\"), \"$term\");
\$('#results').highlight('$searchterm');
</script>
"
}
epg cleanup
source /mod/var/mongoose/html/lib/footer.jim
footer

View File

@@ -1,15 +1,13 @@
#!/mod/bin/jimsh
package require cgi
source /mod/var/mongoose/lib/epg.class
source /mod/var/mongoose/lib/spinner.class
source /mod/var/mongoose/lib/altrow
source /mod/var/mongoose/lib/cat
source /mod/var/mongoose/lib/setup
require epg.class spinner.class altrow
puts "Content-Type: text/html"
puts ""
source /mod/var/mongoose/html/lib/header.jim
header
[spinner new {
text "Loading EPG Data..."
@@ -20,21 +18,19 @@ source /mod/var/mongoose/html/lib/header.jim
cgi_input
#cgi_dump
source /mod/var/mongoose/lib/epg_popup
set service 0
set service 4351
catch { set service [dict get $_cgi service] }
require epg_popup
set service [cgi_get service 4351]
set records [epg fetch dump -service $service]
set tr [lindex $records 0]
$tr get_channel_info
set channel_num [$tr get channel_num]
set channel_name [$tr get channel_name]
puts "
<div style=\"margin: 0 1em 1em 1em\">
[$tr channel_icon 0 {vertical-align:middle}]
[$tr channel_icon 80 {vertical-align:middle}]
<span style=\"vertical-align: middle\">
$channel_num - $channel_name
</span>
@@ -55,21 +51,22 @@ puts {
set i 0
foreach record $records {
altrow
$record get_channel_info
set ended [$record ended]
if {[$record showing]} {
puts "<td><img src=/images/111_1_00_Cursor_2R_Arrow.png></td>"
} else { puts "<td></td>" }
puts "<td nowrap>
[clock format [$record get start] -format "%a %d %b %Y"]</td>"
puts "<td nowrap>
[clock format [$record get start] -format "%H:%M"]</td>"
if $ended { puts "<td nowrap class=blood>" } else { puts "<td nowrap>" }
puts "[clock format [$record get start] -format "%a %d %b %Y"]</td>"
if $ended { puts "<td nowrap class=blood>" } else { puts "<td nowrap>" }
puts "[clock format [$record get start] -format "%H:%M"]</td>"
puts [$record cell]
puts "<td>[$record get text]</td>"
puts "<td>[$record get warning]</td>"
puts "</tr>"
flush stdout
}
puts "</table>"
epg cleanup
source /mod/var/mongoose/html/lib/footer.jim
footer

29
var/mongoose/cgi-bin/opkg.jim Executable file
View File

@@ -0,0 +1,29 @@
#!/mod/bin/jimsh
package require cgi
source /mod/var/mongoose/lib/setup
require pkg.class chunked
cgi_input
#cgi_dump
set cmd [cgi_get cmd update]
start_chunked
set bcmd "|/mod/var/mongoose/lib/opkg $cmd"
set fd [open $bcmd r]
while {[gets $fd line] >= 0} {
chunk "$line\r\n"
#chunk_pad
}
close $fd
if {$cmd eq "update"} {
chunk "Updating package meta information\r\n"
pkg fetchmeta
chunk "Done.\r\n"
}
end_chunked

98
var/mongoose/cgi-bin/pkg.jim Executable file
View File

@@ -0,0 +1,98 @@
#!/mod/bin/jimsh
package require cgi
source /mod/var/mongoose/lib/setup
require settings.class pkg.class altrow
if {[[settings] pkgdev]} { set filter 0 } else { set filter 1 }
puts "Content-Type: text/html"
puts "Pragma: no-cache"
puts "Expires: Thu, 01 Jan 1970 00:00:00 GMT"
puts ""
cgi_input
#cgi_dump
if {![dict exists $_cgi type]} { set _cgi(type) avail }
proc pkgrow {pkg} {
set name [$pkg get name]
altrow
puts "
<td nowrap>$name</td>
"
if {$::type eq "avail"} {
puts "<td nowrap>[$pkg get latest]</td>"
} else {
puts "<td nowrap>[$pkg get installed]</td>"
}
if {$::type eq "upgr"} {
puts "<td nowrap>[$pkg get latest]</td>"
}
if {[dict exists $::pkgmeta $name]} {
puts "<td>$::pkgmeta($name)</td>"
} else {
puts "<td>[$pkg get descr]</td>"
}
if {![$pkg is installed]} {
set type Install
} elseif {$::type eq "upgr" && [$pkg is upgradable]} {
set type Upgrade
} else {
set type Remove
}
puts "<td align=center><small><button id=\"[$pkg get name]\"
action=[string tolower $type]
class=[string tolower $type]>$type</button></small></td>"
puts "</tr>"
}
pkg loadmeta
set type $_cgi(type)
set pkgs [pkg $type]
if {[llength $pkgs] > 0} {
puts "<table><tr><th>Package</th>"
if {$type eq "avail"} {
puts "<th>Available</th>"
} else {
puts "<th>Installed</th>"
}
if {$type eq "upgr"} {
puts "<th>Avail</th>"
}
puts "
<th>Description</th>
<th>&nbsp;&nbsp;Action&nbsp;&nbsp;</th>
</tr>
"
foreach pkg $pkgs {
if {$filter && ![dict exists $::pkgmeta $pkg]} { continue }
pkgrow [pkg load $pkg]
}
puts "</table>"
if {$filter} {
puts "<font class=footnote>This is a filtered package list. To show all packages, enable the <i>Show development and advanced packages</i> in the settings screen.</font>"
}
} else {
puts "<i>No packages "
switch $type {
inst { puts "are installed." }
upgr { puts "are available for upgrade." }
avail { puts "are available for installation." }
}
puts "</i>"
}

View File

@@ -0,0 +1,9 @@
#!/mod/bin/jimsh
puts "Content-Type: text/html"
puts ""
#puts [exec /etc/init.d/S90settop restart]
#file delete /tmp/.restartpending
puts [exec killall humaxtv]

View File

@@ -0,0 +1,7 @@
#!/mod/bin/jimsh
puts "Content-Type: text/html"
puts ""
source /mod/var/mongoose/include/restart.jim

View File

@@ -1,6 +1,9 @@
#!/mod/bin/jimsh
package require cgi
source /mod/var/mongoose/lib/setup
require settings.class
require plugin
puts "Content-Type: text/html"
puts ""
@@ -8,41 +11,60 @@ puts ""
cgi_input
#cgi_dump
# Set variables
set settings [settings new]
if {[catch {set fd [open "/var/lib/humaxtv/hostname" r]}]} {
set hostname "humax"
} else {
set hostname [string trim [read $fd]]
close $fd
}
set hostname [$settings hostname]
set smtp_server [$settings smtp_server]
set channel_group [$settings channel_group]
set pkgdev [$settings pkgdev]
# Handle updates
if {[dict exists $_cgi hostname]} {
set nhostname [string trim [dict get $_cgi hostname]]
if {$nhostname eq $hostname} {
puts "Hostname is already '$hostname'."
} elseif [string is alnum -strict $hostname] {
set fd [open "/var/lib/humaxtv/hostname" w]
puts $fd $nhostname
close $fd
exec hostname -F /var/lib/humaxtv/hostname
puts "Hostname successfully updated, reboot recommended."
} else {
puts "Invalid hostname."
if {![dict exists $env REQUEST_URI]} { set env(REQUEST_URI) "" }
proc _handle_update {class var old text} {
global _cgi
global settings
if {[dict exists $_cgi $var]} {
set new [string trim [dict get $_cgi $var]]
if {$new == $old} {
puts "$text unchanged."
} elseif [string is $class -strict $new] {
$settings $var $new
puts "$text updated."
} else {
puts "Invalid value for $var."
}
exit
}
exit
}
source /mod/var/mongoose/html/lib/header.jim
proc handle_int_update {var old {text "Value"}} {
_handle_update digit $var $old $text
}
proc handle_str_update {var old {text "Value"}} {
_handle_update alnum $var $old $text
}
handle_str_update hostname $hostname Hostname
_handle_update ascii smtp_server $smtp_server "SMTP Server"
handle_int_update channel_group $channel_group "Channel Group"
if {[dict exists $_cgi pkgdevoff] && ![dict exists $_cgi pkgdev]} {
set _cgi(pkgdev) 0
}
handle_int_update pkgdev $pkgdev "Development Package Display"
header
puts {<script type="text/javascript" src="/js/jquery.form.js"></script>}
puts {
<script type=text/javascript>
$(document).ready(function () {
$(":submit").button();
$('form').each(function(i, el) {
$('form.auto').each(function(i, el) {
var id = $(this).attr('id');
var output = '#' + id + '_output'
$(this).ajaxForm({
@@ -59,23 +81,122 @@ puts {
}
puts "
<h1>Settings</h1>
<form id=hostname method=get action=$env(REQUEST_URI)>
<table class=keyval>
<link href=/css/iphone-style-checkboxes.css rel=stylesheet type=text/css />
<script type=\"text/javascript\" src=\"/js/iphone-style-checkboxes.js\">
</script>
<fieldset style=\"display: inline\">
<legend>
General Settings
</legend>
<table>
"
puts "
<tr>
<th>Hostname</th>
<form class=auto id=hostname method=get action=$env(REQUEST_URI)>
<th class=key>Hostname</th>
<td><input name=hostname value=\"$hostname\"
class=\"text ui-widget-content ui-corner-all\"
length=20 maxlength=50>
<small>
<input id=hostname_submit value=\"change\" type=submit>
</small>
<div id=hostname_output></div>
</td>
</tr>
</table>
</form>
<br>
More coming soon...
<br>
<br>
</tr>
"
source /mod/var/mongoose/html/lib/footer.jim
puts "
<tr>
<form class=auto id=channel_group method=get action=$env(REQUEST_URI)>
<th class=key>Channel Group for EPG</th>
<td><select id=channel_group name=channel_group
class=\"text ui-widget-content ui-corner-all\"
value=[$settings channel_group]>
"
set i 0
puts "<option value=0>-- None --"
foreach grp [$settings channel_groups] {
incr i
puts -nonewline "<option value=$i"
if {$channel_group == $i} {
puts -nonewline " selected"
}
puts ">$grp"
}
puts "
</select>
<small>
<input name=channel_group value=\"set\" type=submit>
</small>
<div id=channel_group_output></div>
</td>
</form>
</tr>
"
puts "
</table>
</fieldset>
<br><br>
<fieldset style=\"display: inline\">
<legend> Email Settings </legend>
<table>
"
puts "
<tr>
<form class=auto id=smtp_server method=get action=$env(REQUEST_URI)>
<th class=key>SMTP Server for outbound email</th>
<td><input name=smtp_server value=\"$smtp_server\"
class=\"text ui-widget-content ui-corner-all\"
length=20 maxlength=50>
<small>
<input id=smtp_server_submit value=\"change\" type=submit>
</small>
<div id=smtp_server_output></div>
</td>
</form>
</tr>
"
puts "
</table>
</fieldset>
<br><br>
<fieldset style=\"display: inline\">
<legend> Advanced Settings </legend>
<table>
"
puts "
<tr>
<form class=auto id=pkgdev method=get action=$env(REQUEST_URI)>
<th class=key>Show development and advanced packages?</th>
<td><input name=pkgdevoff value=0 type=hidden>
<input name=pkgdev id=pkgdev value=1 type=checkbox
"
if {$pkgdev} { puts " checked" }
puts {
>
<small>
<input id=pkgdev_submit value="save" type=submit>
</small>
<div id=pkgdev_output></div>
</td>
</form>
</tr>
}
puts "
</table>
</fieldset>
"
eval_plugins settings
footer

View File

@@ -3,10 +3,6 @@
puts "Content-Type: text/html"
puts ""
#puts "<img style=\"vertical-align: middle\" src=/images/745_1_11_Video_1REC.png><span style=\"vertical-align: middle\">Recording one thing</span>"
#puts "<img style=\"vertical-align: middle\" src=/images/745_1_11_Video_1REC.png><span style=\"vertical-align: middle\">Recording another thing</span>"
#puts "<img style=\"vertical-align: middle\" src=/images/745_1_10_Video_2Live.png><span style=\"vertical-align: middle\">Watching something else</span>"
if {[catch {set pid [exec pgrep humaxtv]}]} { exit }
if {[catch {set data [exec lsof -p $pid | grep Video | fgrep .ts]} ]} {
@@ -43,9 +39,8 @@ foreach line $lines {
incr seen($name)
lappend output "<img style=\"vertical-align: middle\"
src=/images/$icon><span
style=\"vertical-align: middle\">$mode&nbsp;$name</span>"
lappend output "<img class=va src=/images/$icon><span class=va>
$mode&nbsp;$name</span><br>"
}
if {[llength $output]} {

View File

@@ -0,0 +1,13 @@
#!/mod/bin/jimsh
set url "http://$env(HTTP_HOST):9091/"
puts "Content-Type: text/html
Location: $url
<meta http-equiv=refresh content=\"0; url=$url\">
Transmission is available <a href=$url>here</a>
"

View File

@@ -1,4 +1,4 @@
<!--#include virtual="/lib/header.shtml" -->
<!--#exec cmd="/mod/var/mongoose/include/db.jim" -->
<!--#include virtual="/lib/footer.shtml" -->
<!--#include virtual="/lib/header.shtml" -->
<!--#exec cmd="/mod/var/mongoose/include/backup.jim" -->
<!--#include virtual="/lib/footer.shtml" -->

View File

@@ -0,0 +1,75 @@
.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'); }

View File

@@ -0,0 +1,62 @@
/* Generic context menu styles */
.contextMenu {
position: absolute;
width: 150px;
z-index: 99999;
border: solid 1px #CCC;
background: #EEE;
padding: 0px;
margin: 0px;
display: none;
}
.contextMenu LI {
list-style: none;
padding: 0px;
margin: 0px;
}
.contextMenu A {
color: #333;
text-decoration: none;
display: block;
line-height: 20px;
height: 20px;
background-position: 6px center;
background-repeat: no-repeat;
outline: none;
padding: 1px 5px;
padding-left: 28px;
}
.contextMenu LI.hover A {
color: #FFF;
background-color: #3399FF;
}
.contextMenu LI.disabled A {
color: #AAA;
cursor: default;
}
.contextMenu LI.hover.disabled A {
background-color: transparent;
}
.contextMenu LI.separator {
border-top: solid 1px #CCC;
}
/*
Adding Icons
You can add icons to the context menu by adding
classes to the respective LI element(s)
*/
.contextMenu LI.edit A { background-image: url(images/page_white_edit.png); }
.contextMenu LI.cut A { background-image: url(images/cut.png); }
.contextMenu LI.copy A { background-image: url(images/page_white_copy.png); }
.contextMenu LI.paste A { background-image: url(images/page_white_paste.png); }
.contextMenu LI.delete A { background-image: url(images/page_white_delete.png); }
.contextMenu LI.quit A { background-image: url(images/door.png); }

View File

@@ -52,6 +52,13 @@ div.footer
padding-top: 2em;
}
div.warningbox
{
background: url('/img/redshade.png') repeat-x;
padding: 0.5em;
margin: 1em;
}
table
{
empty-cells: show;
@@ -63,13 +70,13 @@ table.borders, table.borders td, table.borders th
empty-cells: show;
}
table tr.odd
table tr.odd, table td.odd, table th.odd
{
background: #ccff99;
color: black;
}
table tr.even
table tr.even, table td.even, table th.even
{
background: #ffffcc;
color: black;
@@ -86,7 +93,7 @@ table th
text-align: left;
}
table.keyval th
table.keyval th, th.key
{
background: #ccff99;
font-weight: bold;
@@ -101,7 +108,7 @@ table.keyval td
color: black;
}
pre
pre, .pre
{
font-family: Consolas, 'Courier New', Courier, monospace;
color: black;
@@ -174,6 +181,12 @@ pre
background: transparent;
}
.filesize
{
color: #6a6aff;
background: transparent;
}
.footnote
{
color: #ff4000;
@@ -220,3 +233,28 @@ img.progress
background-position: 1px 0;
}
.va
{
vertical-align: middle;
}
.block
{
display: block;
}
.hidden
{
display: none;
}
input.text
{
padding: .4em;
}
.highlight
{
background-color: yellow;
}

View File

@@ -0,0 +1,21 @@
table.tablesorter .header {
background-image: url(/img/tsort/bg.png);
background-repeat: no-repeat;
border-left: 1px solid #FFF;
border-right: 1px solid #000;
border-top: 1px solid #FFF;
padding-left: 30px;
padding-top: 8px;
height: auto;
}
table.tablesorter .headerSortUp {
background-image: url(/img/tsort/asc.png);
background-repeat: no-repeat;
}
table.tablesorter .headerSortDown {
background-image: url(/img/tsort/desc.png);
background-repeat: no-repeat;
}

View File

@@ -1,9 +1,4 @@
<!--#include virtual="/lib/header.shtml" -->
<form method=get action=/cgi-bin/epg_search.jim>
Search EPG: <input name=term size=20 maxlength=255>
<input type=checkbox name=full>Search descriptions as well as titles.
<input type=submit value=Search>
</form>
<!--#exec cmd="/mod/var/mongoose/include/epg.jim" -->
<!--#include virtual="/lib/footer.shtml" -->

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

View File

@@ -1 +0,0 @@
freeview/BBC-RED-BUTTON_logo.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

View File

@@ -0,0 +1 @@
302.png -

View File

@@ -0,0 +1 @@
303.png -

View File

@@ -0,0 +1 @@
305.png -

View File

@@ -1 +0,0 @@
freeview/4-MUSIC_logo.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

View File

@@ -0,0 +1 @@
4Music.png

View File

@@ -1 +0,0 @@
freeview/5-USA_logo.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

View File

@@ -1 +0,0 @@
freeview/Five_logo.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

View File

@@ -0,0 +1 @@
9X.png -

View File

@@ -0,0 +1 @@
AAG.png -

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

View File

@@ -1 +0,0 @@
freeview/Absolute_logo.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

View File

@@ -0,0 +1 @@
Absolute Radio.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

View File

@@ -0,0 +1 @@
Alibi.png -

View File

@@ -0,0 +1 @@
Alibi+1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

View File

@@ -0,0 +1 @@
BBC 1 Cl.png

View File

@@ -0,0 +1 @@
BBC 1 Cl.png

View File

@@ -0,0 +1 @@
BBC 1 Cl.png

View File

@@ -0,0 +1 @@
BBC 1 Cl.png

View File

@@ -0,0 +1 @@
BBC 1 Cl.png

View File

@@ -0,0 +1 @@
BBC 1 Cl.png

View File

@@ -0,0 +1 @@
BBC 1 Cl.png

View File

@@ -0,0 +1 @@
BBC 1 Cl.png

View File

@@ -0,0 +1 @@
BBC 1 Cl.png

View File

@@ -0,0 +1 @@
BBC 1 Cl.png

View File

@@ -0,0 +1 @@
BBC 1 Cl.png

View File

@@ -0,0 +1 @@
BBC 1 Cl.png

View File

@@ -0,0 +1 @@
BBC 1 Cl.png

View File

@@ -0,0 +1 @@
BBC 1 Cl.png

View File

@@ -0,0 +1 @@
BBC 1 Cl.png

View File

@@ -0,0 +1 @@
BBC 1 Cl.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

View File

@@ -0,0 +1 @@
BBC 2 England.png

View File

@@ -0,0 +1 @@
BBC 2 England.png

Some files were not shown because too many files have changed in this diff Show More