forked from hummypkg/webif
5523ec6a43
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@235 2a923420-c742-0410-a762-8d5b09965624
40 lines
674 B
Plaintext
Executable File
40 lines
674 B
Plaintext
Executable File
#!/mod/bin/jimsh
|
|
|
|
package require cgi
|
|
|
|
puts "Content-Type: text/html"
|
|
puts "Pragma: nocache"
|
|
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/*"]
|
|
|
|
if {![llength $backups]} {
|
|
empty
|
|
exit
|
|
}
|
|
|
|
foreach backup [glob -nocomplain "$dir/*"] {
|
|
set b [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>
|
|
"
|
|
}
|
|
|