git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@1016 2a923420-c742-0410-a762-8d5b09965624
This commit is contained in:
hummypkg 2012-05-21 20:23:41 +00:00
parent d04dcee369
commit d7284ff3ef
101 changed files with 291 additions and 174 deletions

View File

@ -1,7 +1,7 @@
Package: webif
Priority: optional
Section: web
Version: 0.9.8-3
Version: 0.9.9
Architecture: mipsel
Maintainer: af123@hummypkg.org.uk
Depends: webif-channelicons(>=1.0.1),mongoose(>=3.0-7),jim(>=0.73-1),jim-oo,jim-sqlite3(>=0.73),jim-cgi(>=0.5),service-control(>=1.2),busybox(>=1.19.3-1),lsof,epg(>=1.0.9),hmt(>=1.1.6),ssmtp,anacron,trm,openssl-command,nicesplice,id3v2,file,rsvsync(>=1.0.2),webif-charts(>=1.1)

View File

@ -1,7 +1,7 @@
#!/mod/bin/jimsh
package require cgi
source /mod/var/mongoose/lib/setup
source /mod/webif/lib/setup
require rsv.class

View File

@ -1,7 +1,7 @@
#!/mod/bin/jimsh
package require cgi
source /mod/var/mongoose/lib/setup
source /mod/webif/lib/setup
set dir /mod/var/backup

View File

@ -1,7 +1,7 @@
#!/mod/bin/jimsh
package require cgi
source /mod/var/mongoose/lib/setup
source /mod/webif/lib/setup
require rsv.class findhsvc system.class

View File

@ -1,7 +1,7 @@
#!/mod/bin/jimsh
package require cgi
source /mod/var/mongoose/lib/setup
source /mod/webif/lib/setup
require ts.class pretty_size system.class settings.class escape
puts "Content-Type: text/html"
@ -222,7 +222,7 @@ puts {
<link type=text/css rel=stylesheet href=/cgi-bin/browse/style.css />
}
source /mod/var/mongoose/cgi-bin/browse/assets.jim
source browse/assets.jim
puts "
<span style=\"display:none\" id=dir>$dir</span>

View File

@ -2,7 +2,7 @@
package require sqlite3
package require cgi
source /mod/var/mongoose/lib/setup
source /mod/webif/lib/setup
require ts.class system.class
puts "Content-Type: text/html\r\n\r\n"

View File

@ -2,7 +2,7 @@
package require sqlite3
package require cgi
source /mod/var/mongoose/lib/setup
source /mod/webif/lib/setup
require ts.class system.class
puts "Content-Type: text/html\r\n\r\n"

View File

@ -1,7 +1,7 @@
#!/mod/bin/jimsh
package require cgi
source /mod/var/mongoose/lib/setup
source /mod/webif/lib/setup
require ts.class
puts "Content-Type: text/html\r\n\r\n"

View File

@ -1,7 +1,7 @@
#!/mod/bin/jimsh
package require cgi
source /mod/var/mongoose/lib/setup
source /mod/webif/lib/setup
require ts.class pretty_size
puts "Content-Type: text/html\r\n\r\n"

View File

@ -1,7 +1,7 @@
#!/mod/bin/jimsh
package require cgi
source /mod/var/mongoose/lib/setup
source /mod/webif/lib/setup
require ts.class pretty_size
puts "Content-Type: text/html\r\n\r\n"

View File

@ -1,7 +1,7 @@
#!/mod/bin/jimsh
package require cgi
source /mod/var/mongoose/lib/setup
source /mod/webif/lib/setup
require ts.class
puts "Content-Type: text/html\r\n\r\n"

View File

@ -1,7 +1,7 @@
#!/mod/bin/jimsh
package require cgi
source /mod/var/mongoose/lib/setup
source /mod/webif/lib/setup
require clipboard.class ts.class
puts "Content-Type: text/html; no-cache"

View File

@ -1,7 +1,7 @@
#!/mod/bin/jimsh
package require cgi
source /mod/var/mongoose/lib/setup
source /mod/webif/lib/setup
require ts.class pretty_size
puts "Content-Type: text/html\r\n\r\n"

View File

@ -1,7 +1,7 @@
#!/mod/bin/jimsh
package require cgi
source /mod/var/mongoose/lib/setup
source /mod/webif/lib/setup
require ts.class pretty_size
puts "Content-Type: text/html\r\n\r\n"

View File

@ -1,7 +1,7 @@
#!/mod/bin/jimsh
package require cgi
source /mod/var/mongoose/lib/setup
source /mod/webif/lib/setup
require ts.class
puts "Content-Type: text/html\r\n\r\n"

View File

@ -2,7 +2,7 @@
package require sqlite3
package require cgi
source /mod/var/mongoose/lib/setup
source /mod/webif/lib/setup
require ts.class
puts "Content-Type: text/html\r\n\r\n"

View File

@ -2,7 +2,7 @@
package require sqlite3
package require cgi
source /mod/var/mongoose/lib/setup
source /mod/webif/lib/setup
require ts.class
puts "Content-Type: text/html\r\n\r\n"

View File

@ -1,7 +1,7 @@
#!/mod/bin/jimsh
package require cgi
source /mod/var/mongoose/lib/setup
source /mod/webif/lib/setup
require ts.class
puts "Content-Type: text/html\r\n\r\n"

View File

@ -1,7 +1,7 @@
#!/mod/bin/jimsh
package require cgi
source /mod/var/mongoose/lib/setup
source /mod/webif/lib/setup
require ts.class pretty_size system.class tdelete
puts "Content-Type: text/html\r\n"

View File

@ -2,7 +2,7 @@
package require cgi
package require sqlite3
source /mod/var/mongoose/lib/setup
source /mod/webif/lib/setup
require ts.class
#puts "Content-Type: text/plain\r\n\r\n"

View File

@ -1,7 +1,7 @@
#!/mod/bin/jimsh
package require cgi
source /mod/var/mongoose/lib/ts.class
source /mod/webif/lib/ts.class
puts "Content-Type: text/html"
puts ""

View File

@ -1,7 +1,7 @@
#!/mod/bin/jimsh
package require cgi
source /mod/var/mongoose/lib/ts.class
source /mod/webif/lib/ts.class
puts "Content-Type: application/json"
puts ""

View File

@ -10,7 +10,7 @@ cgi_input
if [file exists /mod/bin/ffmpeg] {
set file [dict get $_cgi file]
puts [exec /mod/var/mongoose/lib/ffmpeg -i $file]
puts [exec /mod/webif/lib/ffmpeg -i $file]
} else {
puts "Install ffmpeg package for more information..."
}

View File

@ -1,7 +1,8 @@
#!/mod/bin/jimsh
package require cgi
source /mod/var/mongoose/lib/pretty_size
source /mod/webif/lib/setup
require pretty_size
puts "Content-Type: text/html"
puts ""
@ -20,8 +21,7 @@ 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
require epg.class ts.class
set ts [ts fetch $file]

View File

@ -1,7 +1,8 @@
#!/mod/bin/jimsh
package require cgi
source /mod/var/mongoose/lib/ts.class
source /mod/webif/lib/setup
require ts.class
puts "Content-Type: text/html"
puts ""

View File

@ -1,7 +1,7 @@
#!/mod/bin/jimsh
package require cgi
source /mod/var/mongoose/lib/setup
source /mod/webif/lib/setup
require ts.class pretty_size
puts "Content-Type: text/html\r\n\r\n"

View File

@ -1,7 +1,7 @@
#!/mod/bin/jimsh
package require cgi
source /mod/var/mongoose/lib/setup
source /mod/webif/lib/setup
require ts.class pretty_size
puts "Content-Type: text/html\r\n\r\n"

View File

@ -1,7 +1,7 @@
#!/mod/bin/jimsh
package require cgi
#source /mod/var/mongoose/lib/setup
#source /mod/webif/lib/setup
puts "Content-Type: text/html\r\n\r\n"

View File

@ -1,7 +1,8 @@
#!/mod/bin/jimsh
package require cgi
source /mod/var/mongoose/lib/ts.class
source /mod/webif/lib/setup
require ts.class
puts "Content-Type: text/html"
puts ""

View File

@ -2,7 +2,7 @@
package require sqlite3
package require cgi
source /mod/var/mongoose/lib/setup
source /mod/webif/lib/setup
require ts.class system.class
puts "Content-Type: text/html\r\n\r\n"

View File

@ -2,7 +2,7 @@
package require sqlite3
package require cgi
source /mod/var/mongoose/lib/setup
source /mod/webif/lib/setup
require ts.class system.class
puts "Content-Type: text/html\r\n\r\n"

View File

@ -1,7 +1,7 @@
#!/mod/bin/jimsh
package require cgi
source /mod/var/mongoose/lib/setup
source /mod/webif/lib/setup
require ts.class
puts "Content-Type: text/html\r\n\r\n"

View File

@ -1,7 +1,7 @@
#!/mod/bin/jimsh
package require cgi
source /mod/var/mongoose/lib/setup
source /mod/webif/lib/setup
require ts.class
puts "Content-Type: text/html"

View File

@ -1,7 +1,7 @@
#!/mod/bin/jimsh
package require cgi
source /mod/var/mongoose/lib/setup
source /mod/webif/lib/setup
require ts.class pretty_size
puts "Content-Type: text/html\r\n"

View File

@ -1,7 +1,8 @@
#!/mod/bin/jimsh
package require cgi
source /mod/var/mongoose/lib/ts.class
source /mod/webif/lib/setup
require ts.class
puts "Content-Type: text/html"
puts ""

View File

@ -2,7 +2,7 @@
package require cgi
package require pack
source /mod/var/mongoose/lib/setup
source /mod/webif/lib/setup
require ts.class hexdump
puts "Content-Type: text/html"

View File

@ -1,7 +1,8 @@
#!/mod/bin/jimsh
package require cgi
source /mod/var/mongoose/lib/ts.class
source /mod/webif/lib/setup
require ts.class
puts "Content-Type: text/html"
puts ""

View File

@ -1,7 +1,7 @@
#!/mod/bin/jimsh
package require cgi
source /mod/var/mongoose/lib/setup
source /mod/webif/lib/setup
require system.class chunked pretty_size
cgi_input

View File

@ -2,7 +2,7 @@
package require cgi
package require sqlite3
source /mod/var/mongoose/lib/setup
source /mod/webif/lib/setup
require altrow progressbar epg.class
puts "Content-Type: text/html"

View File

@ -2,7 +2,7 @@
package require cgi
package require sqlite3
source /mod/var/mongoose/lib/setup
source /mod/webif/lib/setup
require altrow
puts "Content-Type: text/html"

View File

@ -1,7 +1,7 @@
#!/mod/bin/jimsh
package require cgi
source /mod/var/mongoose/lib/setup
source /mod/webif/lib/setup
require epg.class
puts "Content-Type: text/html"

View File

@ -1,7 +1,7 @@
#!/mod/bin/jimsh
package require cgi
source /mod/var/mongoose/lib/setup
source /mod/webif/lib/setup
require epg.class
puts "Content-Type: text/html"

View File

@ -1,7 +1,7 @@
#!/mod/bin/jimsh
package require cgi
source /mod/var/mongoose/lib/setup
source /mod/webif/lib/setup
require epg.class system.class
puts "Content-Type: text/html"

View File

@ -1,7 +1,7 @@
#!/mod/bin/jimsh
package require cgi
source /mod/var/mongoose/lib/setup
source /mod/webif/lib/setup
require epg.class spinner.class altrow
puts "Content-Type: text/html"

View File

@ -1,7 +1,7 @@
#!/mod/bin/jimsh
package require cgi
source /mod/var/mongoose/lib/setup
source /mod/webif/lib/setup
require epg.class spinner.class altrow
puts "Content-Type: text/html"

View File

@ -1,7 +1,7 @@
#!/mod/bin/jimsh
package require cgi
source /mod/var/mongoose/lib/setup
source /mod/webif/lib/setup
require pkg.class chunked
cgi_input
@ -11,7 +11,7 @@ set cmd [cgi_get cmd update]
proc opkg {cmd} {
chunk ">>> opkg $cmd\r\n"
set bcmd "|/mod/var/mongoose/lib/opkg $cmd"
set bcmd "|/mod/webif/lib/opkg $cmd"
set fd [open $bcmd r]
while {[gets $fd line] >= 0} {
chunk "$line\r\n"

View File

@ -1,7 +1,7 @@
#!/mod/bin/jimsh
package require cgi
source /mod/var/mongoose/lib/setup
source /mod/webif/lib/setup
require settings.class pkg.class altrow
if {[[settings] pkgdev]} { set filter 0 } else { set filter 1 }

View File

@ -1,7 +1,7 @@
#!/mod/bin/jimsh
package require cgi
source /mod/var/mongoose/lib/setup
source /mod/webif/lib/setup
require rsv.class system.class
puts "Content-Type: text/html"

View File

@ -3,5 +3,5 @@
puts "Content-Type: text/html"
puts ""
source /mod/var/mongoose/include/restart.jim
source /mod/webif/include/restart.jim

View File

@ -1,7 +1,7 @@
#!/mod/bin/jimsh
package require cgi
source /mod/var/mongoose/lib/setup
source /mod/webif/lib/setup
require settings.class
require plugin
@ -29,6 +29,7 @@ set smtp_server [$settings smtp_server]
set channel_group [$settings channel_group]
set epg_style [$settings epg_style]
set pkgdev [$settings pkgdev]
set notoolbar [$settings notoolbar]
# Handle updates
@ -65,6 +66,7 @@ _handle_update ascii smtp_server $smtp_server "SMTP Server"
handle_int_update channel_group $channel_group "Channel Group"
handle_str_update epg_style $epg_style "EPG Type"
handle_int_update pkgdev $pkgdev "Development Package Display"
handle_int_update notoolbar $notoolbar "Disable toolbar"
set acluser [cgi_get acluser "-"]
set aclpass [cgi_get aclpass "-"]
@ -140,6 +142,17 @@ puts ">
</tr>
"
puts -nonewline "
<tr>
<th class=key>Slide-down toolbar?</th>
<td><input id=toolbar_toggle name=toolbar type=checkbox value=yes"
if {$notoolbar == 0} { puts -nonewline " checked" }
puts ">
<div id=toolbar_output></div>
</td>
</tr>
"
puts "
<tr>
<form class=auto id=epg_style method=get action=$env(REQUEST_URI)>

View File

@ -73,5 +73,24 @@ $(document).ready(function () {
.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');
});
});
});

View File

@ -1,6 +1,6 @@
#!/mod/bin/jimsh
source /mod/var/mongoose/lib/setup
source /mod/webif/lib/setup
require system.class findhsvc epg.class
puts "Content-Type: text/html"

View File

@ -1,7 +1,7 @@
#!/mod/bin/jimsh
package require cgi
source /mod/var/mongoose/lib/setup
source /mod/webif/lib/setup
puts "Content-Type: text/html"
puts ""

View File

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

View File

@ -1,10 +1,10 @@
#!/mod/bin/jimsh
source /mod/var/mongoose/lib/setup
source /mod/webif/lib/setup
require ts.class
source /mod/var/mongoose/html/dedup/normalise.jim
source /mod/var/mongoose/html/dedup/process.jim
source /mod/webif/html/dedup/normalise.jim
source /mod/webif/html/dedup/process.jim
set dirs {}
@ -23,6 +23,7 @@ foreach dir $dirs {
set dir [string range $dir 0 end-1]
}
puts "\[$dir\]"
loadseries $dir
foreach file [readdir $dir] {
if {[file extension $file] ne ".hmt"} { continue }
@ -67,7 +68,7 @@ foreach dir $dirs {
# Dooooo, it.
$ts settitle $syn
ts renamegroup $file $fn
puts -nonewline "Done"
puts -nonewline " ... Done"
}
}
}

View File

@ -1,7 +1,7 @@
#!/mod/bin/jimsh
package require cgi
source /mod/var/mongoose/lib/setup
source /mod/webif/lib/setup
require ts.class pretty_size altrow
source normalise.jim
@ -31,8 +31,7 @@ puts "<fieldset style=\"display: inline\">
</tr>
"
set seen {}
loadseries $dir
foreach file [readdir $dir] {
set file "$dir/$file"
if {[file extension $file] ne ".hmt"} { continue }

View File

@ -8,8 +8,32 @@ set dedup_prefixes {
{^\.+}
}
proc loadseries {dir} {
global seriesmap
set seriesmap [dict create]
if {![file exists "$dir/series.info"]} { return }
if {[catch {set fd [open "$dir/series.info" "r"]} msg]} {
puts "Error opening series.info: $msg"
return
}
foreach line [split [read $fd] "\n\r"] {
set i [string first " ==> " $line]
if {$i == -1} { continue }
set name [string range $line 0 $($i - 1)]
set prefix [string range $line $($i + 5) end]
if {$prefix eq ""} { continue }
dict set seriesmap $name $prefix
regsub -all -- {[[:space:]]+} [string tolower $name] "" name
dict set seriesmap $name $prefix
}
$fd close
}
proc dedupnormalise {title {reserve ""}} {
global dedup_prefixes
global dedup_prefixes seriesmap
# Strip common prefixes
foreach prefix $dedup_prefixes {
@ -38,6 +62,16 @@ proc dedupnormalise {title {reserve ""}} {
}
}
if {[dict exists $seriesmap $title]} {
set ntitle "$seriesmap($title): $title"
set title $ntitle
} else {
regsub -all -- {[[:space:]]+} [string tolower $title] "" ntitle
if {[dict exists $seriesmap $ntitle]} {
set title "$seriesmap($ntitle): $title"
}
}
# Shorten if too long.
if {[string length $title] > 40} {
set title [string range $title 0 39]

View File

@ -1,7 +1,7 @@
#!/mod/bin/jimsh
package require cgi
source /mod/var/mongoose/lib/setup
source /mod/webif/lib/setup
require pretty_size
puts "Content-Type: text/html"

View File

@ -1,7 +1,7 @@
#!/mod/bin/jimsh
package require cgi
source /mod/var/mongoose/lib/setup
source /mod/webif/lib/setup
require system.class chunked
cgi_input

View File

@ -2,7 +2,7 @@
package require cgi
package require sqlite3
source /mod/var/mongoose/lib/setup
source /mod/webif/lib/setup
require ts.class pretty_size
puts "Content-Type: text/html\r\n\r\n"

View File

@ -1,6 +1,6 @@
#!/mod/bin/jimsh
source /mod/var/mongoose/lib/setup
source /mod/webif/lib/setup
require system.class
puts "Content-Type: text/html"

View File

@ -0,0 +1,18 @@
#!/mod/bin/jimsh
package require cgi
source /mod/webif/lib/setup
cgi_input
#cgi_dump
set file [cgi_get file "/tmp/hosts"]
if {$file eq "-"} { exit }
puts "Content-Type: text/plain\n"
if {[file exists $file]} {
puts ">>> File already exists."
exit
}

View File

@ -1,7 +1,7 @@
#!/mod/bin/jimsh
package require cgi
source /mod/var/mongoose/lib/setup
source /mod/webif/lib/setup
puts "Content-Type: text/html"
puts ""
@ -33,6 +33,7 @@ Use the <i>Open</i> button below to begin.
<button class=xeditactive id=open>Open</button>
<button class=editactive id=save>Save</button>
<button class=editactive id=revert>Revert</button>
<button class=xeditactive id=create>Create File</button>
<div id=result class="blood hidden" />
@ -47,6 +48,26 @@ Use the <i>Open</i> button below to begin.
<div id=chooser></div>
</div>
<div id=createf title="Create new file" style="display: none">
<form id=createf_form>
<table border=0>
<tr>
<th>
<label for="createf_name">
<b>Filename</b>
</label>
</th>
<td>
<input type=text name="createf_name"
id="createf_name"
value="/mod/" size=70 maxlength=255
class="text ui-widget-content ui-corner-all">
</td>
</tr>
</table>
</form>
</div>
}
footer

View File

@ -1,7 +1,7 @@
#!/mod/bin/jimsh
package require cgi
source /mod/var/mongoose/lib/setup
source /mod/webif/lib/setup
cgi_input
#cgi_dump

View File

@ -1,7 +1,7 @@
#!/mod/bin/jimsh
package require cgi
source /mod/var/mongoose/lib/setup
source /mod/webif/lib/setup
require chunked pretty_size
cgi_input

View File

@ -1,7 +1,7 @@
#!/mod/bin/jimsh
package require cgi
source /mod/var/mongoose/lib/setup
source /mod/webif/lib/setup
puts "Content-Type: text/html"
puts ""

View File

@ -103,5 +103,45 @@ $('#back').click(function() {
window.location = '/diag/diag.jim';
});
function createf_submit()
{
var f = $('#createf_name').val();
console.log('Creating: ' + f);
$('#createf').dialog('close');
$.get('create.jim?file=' + encodeURIComponent(f), function(data) {
if (data.match('^>>>'))
{
$('#msg').text(data);
file = null;
changed = false;
}
else
{
$('#editor').val('').enable();
$('button.editactive').enable();
$('#msg').html('Editing new file <i>' + f + '</i>');
file = f;
changed = false;
}
});
}
$('#createf').dialog({
autoOpen: false,
height: 'auto', width: 'auto',
modal: true,
buttons: {
"Create File": createf_submit,
"Cancel": function() {
$(this).dialog('close');
}
}
});
$('#create').click(function() {
console.log('opening dialog');
$('#createf').dialog('open');
});
});

View File

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

View File

@ -18,10 +18,10 @@ $(document).ready(function() {
});
</script>
<!--#exec cmd="/mod/var/mongoose/include/menuicons.jim" -->
<!--#exec cmd="/mod/webif/include/menuicons.jim" -->
<div style="clear: both; padding-top: 1em">
<!--#exec cmd="/mod/var/mongoose/include/menuplugins.jim" -->
<!--#exec cmd="/mod/webif/include/menuplugins.jim" -->
</div>
<div class=footer>
@ -34,7 +34,7 @@ Firmware</a> |
<a target=_blank href="http://wiki.hummy.tv/wiki/Webif_release_notes">Webif</a>
</li>
</ul>
<!--#exec cmd="/mod/var/mongoose/include/modversion.jim" -->
<!--#exec cmd="/mod/webif/include/modversion.jim" -->
</div>
<!--#include virtual="/lib/footer.shtml" -->

0
var/mongoose/html/lib/footer.jim Normal file → Executable file
View File

View File

@ -1,7 +1 @@
<!-- Start of footer -->
<div class=footer>
</div>
</div>
</body>
</html>
<!--#exec cmd="/mod/webif/html/lib/footer.jim" -->

8
var/mongoose/html/lib/header.jim Normal file → Executable file
View File

@ -1,10 +1,12 @@
#!/mod/bin/jimsh
puts {
<!doctype html>
<html>
<head>
<title>
}
source /mod/var/mongoose/include/model.jim
source /mod/webif/include/model.jim
puts {
</title>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE9" />
@ -17,9 +19,9 @@ puts {
<body>
}
source /mod/var/mongoose/html/lib/topbar.jim
source /mod/webif/html/lib/topbar.jim
puts "<div id=restart_block>"
source /mod/var/mongoose/include/restart.jim
source /mod/webif/include/restart.jim
puts "</div>"
puts {

View File

@ -1,23 +1 @@
<!doctype html>
<html>
<head>
<title><!--#exec cmd="/mod/var/mongoose/include/model.jim" --></title>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE9" />
<meta http-equiv="expires" value="Thu, 01 Jan 1970 00:00:00 GMT" />
<meta http-equiv="pragma" content="no-cache" />
<link rel="shortcut icon" href=/img/favicon.ico />
<link type="text/css" href="/css/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="/js/jquery-ui.js"></script>
</head>
<body>
<!--#include virtual="/lib/topbar.shtml" -->
<div id=restart_block>
<!--#exec cmd="/mod/var/mongoose/include/restart.jim" -->
</div>
<div style="clear: both">
<!-- end of header -->
<!--#exec cmd="/mod/webif/html/lib/header.jim" -->

View File

@ -6,21 +6,21 @@ puts {
<div class=middle>
<!-- Start include diskspace - above other items to work around IE feature.. -->
}
source /mod/var/mongoose/include/diskspace.jim
source /mod/webif/include/diskspace.jim
puts {
<!-- End include diskspace -->
<img border=0 src=/images/516_1_26_Freeview_Logo.png>
<span style="display: inline; font-size: 150%;
padding: 0 0 0 2em;">
}
source /mod/var/mongoose/include/model.jim
source /mod/webif/include/model.jim
puts {
</span>
</div>
<div class=right><img src=/images/154_1_00_WIN_MD116_3R.png></div>
</div>
}
source /mod/var/mongoose/include/toolbar.jim
source /mod/webif/include/toolbar.jim
puts {
<script type=text/javascript>
$('#topbar').hover(

View File

@ -1,27 +0,0 @@
<!-- start of topbar -->
<div id=topbar class=container onclick="location.href='/'; return false;">
<div class=left><img src=/images/154_1_00_WIN_MD116_1L.png></div>
<div class=middle>
<!-- Start include diskspace - above other items to work around IE feature.. -->
<!--#exec cmd="/mod/var/mongoose/include/diskspace.jim" -->
<!-- End include diskspace -->
<img border=0 src=/images/516_1_26_Freeview_Logo.png>
<span style="font-size: 1.5em; padding: 0 0 0 2em;">
<!--#exec cmd="/mod/var/mongoose/include/model.jim" -->
</span>
</div>
<div class=right><img src=/images/154_1_00_WIN_MD116_3R.png></div>
</div>
<!--#exec cmd="/mod/var/mongoose/include/toolbar.jim" -->
<script type=text/javascript>
$('#topbar').hover(
function() {
$(this).css('cursor', 'pointer');
}, function() {
$(this).css('cursor', 'auto');
}
);
</script>
<!-- end of topbar -->

View File

@ -1,7 +1,7 @@
#!/mod/bin/jimsh
package require cgi
source /mod/var/mongoose/lib/setup
source /mod/webif/lib/setup
require rsv.class system.class
puts "Content-Type: text/html"

View File

@ -1,7 +1,7 @@
#!/mod/bin/jimsh
package require cgi
source /mod/var/mongoose/lib/setup
source /mod/webif/lib/setup
require rsv.class system.class
puts "Content-Type: text/html"

View File

@ -1,7 +1,7 @@
#!/mod/bin/jimsh
package require cgi
source /mod/var/mongoose/lib/setup
source /mod/webif/lib/setup
require rsv.class system.class
puts "Content-Type: text/html"

View File

@ -1,7 +1,7 @@
#!/mod/bin/jimsh
package require cgi
source /mod/var/mongoose/lib/setup
source /mod/webif/lib/setup
require rsv.class progressbar
puts "Content-Type: text/html"

View File

@ -1,7 +1,7 @@
#!/mod/bin/jimsh
package require cgi
source /mod/var/mongoose/lib/setup
source /mod/webif/lib/setup
require rsv.class system.class
puts "Content-Type: text/html"

View File

@ -1,7 +1,7 @@
#!/mod/bin/jimsh
package require cgi
source /mod/var/mongoose/lib/setup
source /mod/webif/lib/setup
require altrow rsv.class progressbar epg.class system.class
puts "Content-Type: text/html"

View File

@ -40,6 +40,6 @@ Results...
<th>Auto Startup</th>
<th>Status</th>
</tr>
<!--#exec cmd="/mod/var/mongoose/include/services.jim" -->
<!--#exec cmd="/mod/webif/include/services.jim" -->
</table>
<!--#include virtual="/lib/footer.shtml" -->

View File

@ -1,6 +1,6 @@
#!/mod/bin/jimsh
source /mod/var/mongoose/lib/setup
source /mod/webif/lib/setup
require altrow rsv.class
puts {

View File

@ -1,9 +1,9 @@
#!/mod/bin/jimsh
source /mod/var/mongoose/lib/setup
source /mod/webif/lib/setup
require system.class
lassign [system diskspace] size used perc
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
@ -25,7 +25,8 @@ puts "
<span style=\"float: right\">
<br>
Total space: $size<br>
Used: $used ($perc%)
Used: $used ($perc%)<br>
Free: $free ($fperc%)
</span>
"

View File

@ -1,7 +1,7 @@
#!/mod/bin/jimsh
package require cgi
source /mod/var/mongoose/lib/setup
source /mod/webif/lib/setup
require epg.class spinner.class altrow epg_search totop
[spinner new {

View File

@ -1,6 +1,6 @@
#!/mod/bin/jimsh
source /mod/var/mongoose/lib/setup
source /mod/webif/lib/setup
require settings.class
if {[[settings] epg_style] eq "grid"} {

View File

@ -1,6 +1,6 @@
#!/mod/bin/jimsh
source /mod/var/mongoose/lib/setup
source /mod/webif/lib/setup
require settings.class
proc menuitem {title icon link {width 217} {height 0} {extra ""}} {

View File

@ -1,6 +1,6 @@
#!/mod/bin/jimsh
source /mod/var/mongoose/lib/setup
source /mod/webif/lib/setup
require plugin system.class
proc menuitem {title icon link {width 217} {height 0} {extra ""}} {

View File

@ -1,6 +1,6 @@
#!/mod/bin/jimsh
source /mod/var/mongoose/lib/setup
source /mod/webif/lib/setup
require system.class
puts "Humax [system model] Fox T2 ([system hostname])"

View File

@ -1,6 +1,6 @@
#!/mod/bin/jimsh
source /mod/var/mongoose/lib/setup
source /mod/webif/lib/setup
require system.class
puts "<font class=blood style=\"font-size: 0.9em; float: right; clear: right\">

View File

@ -1,6 +1,6 @@
#!/mod/bin/jimsh
source /mod/var/mongoose/lib/setup
source /mod/webif/lib/setup
puts {
<script type=text/javascript src=/js/packages.js></script>

View File

@ -1,6 +1,6 @@
#!/mod/bin/jimsh
source /mod/var/mongoose/lib/setup
source /mod/webif/lib/setup
require system.class
if {[file exists /tmp/.restartpending]} {

View File

@ -1,7 +1,10 @@
#!/mod/bin/jimsh
source /mod/var/mongoose/lib/setup
require plugin settings.class system.class
source /mod/webif/lib/setup
require settings.class
if {[[settings] notoolbar] eq "0"} {
require plugin system.class
if {[[settings] epg_style] eq "grid"} {
set epglink "/cgi-bin/xepg.jim"
@ -26,6 +29,8 @@ proc tb {icon txt link {height 50} {width 0}} {
}
puts {
<!-- start of toolbar -->
<div class=toolbarouter>
<div id=toolbar class=toolbar>
}
@ -48,8 +53,8 @@ puts {
var lastupd = 0;
if (window.location.pathname != '/' &&
window.location.pathname != '/index.shtml')
$('#topbar, #toolbar').hover(
function() {
{
var down = function() {
$('#toolbar').stop(true, true).delay(200).slideDown(400,
function() {
if (+new Date() - lastupd > 5000)
@ -62,10 +67,12 @@ if (window.location.pathname != '/' &&
.load('/cgi-bin/status.jim');
}
});
}, function() {
};
var up = function() {
$('#toolbar').stop(true, true).delay(200).slideUp();
}
);
};
$('#topbar, #toolbar').hover(down, up);
}
$('span.toolbarcell').hover(
function() {
@ -75,5 +82,9 @@ $('span.toolbarcell').hover(
});
</script>
<!-- end of toolbar -->
}
}

View File

@ -1,4 +1,4 @@
source /mod/var/mongoose/lib/setup
source /mod/webif/lib/setup
if {![exists -proc class]} { package require oo }
if {![exists -proc sqlite3.open]} { package require sqlite3 }

View File

@ -1,6 +1,6 @@
proc eval_plugins {hook} {
foreach plugin [glob -nocomplain /mod/var/mongoose/plugin/*] {
foreach plugin [glob -nocomplain /mod/webif/plugin/*] {
if {[file isfile "$plugin/$hook.hook"]} {
uplevel source "$plugin/$hook.hook"
}

View File

@ -1,4 +1,4 @@
source /mod/var/mongoose/lib/setup
source /mod/webif/lib/setup
if {![exists -proc class]} { package require oo }
if {![exists -proc sqlite3.open]} { package require sqlite3 }

View File

@ -22,6 +22,7 @@ class settings {
epg_style "standard"
smtp_server ""
pkgdev 0
notoolbar 0
}
settings method hostname {{name ""}} {
@ -116,6 +117,10 @@ settings method pkgdev {{val -1}} {
return [$self _nval_setting pkgdev $val]
}
settings method notoolbar {{val -1}} {
return [$self _nval_setting notoolbar $val]
}
settings method sortorder {{val -1}} {
return [$self _nval_setting sortorder $val]
}

View File

@ -3,18 +3,18 @@ if {![exists -proc require]} {
proc require {args} {{done {}}} {
foreach file $args {
if {$file ni $done} {
uplevel source "/mod/var/mongoose/lib/$file"
uplevel source "/mod/webif/lib/$file"
lappend $done $file
}
}
}
proc header {} {
uplevel source /mod/var/mongoose/html/lib/header.jim
uplevel source /mod/webif/html/lib/header.jim
}
proc footer {} {
uplevel source /mod/var/mongoose/html/lib/footer.jim
uplevel source /mod/webif/html/lib/footer.jim
}
# Replace the built-in jim {file copy} command with one that is

View File

@ -68,6 +68,7 @@ proc {system diskspace} {} {
set size 0
set used 0
set free 0
set perc 0
foreach line [split [exec /mod/bin/busybox/df -h $part 2>>/dev/null] "\n\r"] {
if {[string match "/*" $line]} {
@ -75,12 +76,14 @@ proc {system diskspace} {} {
set fields [split $line]
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]
return [list $size $used $perc $free $fperc]
}
proc {system busy} {} {

View File

@ -1,6 +1,6 @@
if {![exists -proc class]} { package require oo }
source /mod/var/mongoose/lib/setup
source /mod/webif/lib/setup
require tdelete
set dmsfile /mnt/hd2/dms_cds.db

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