2011-07-08 20:39:57 +00:00
|
|
|
#!/mod/bin/jimsh
|
|
|
|
|
|
|
|
package require cgi
|
2013-02-09 22:46:15 +00:00
|
|
|
source /mod/webif/lib/setup
|
|
|
|
require ts.class
|
2011-07-08 20:39:57 +00:00
|
|
|
|
2013-02-09 22:46:15 +00:00
|
|
|
httpheader
|
2011-07-08 20:39:57 +00:00
|
|
|
|
2013-02-09 22:46:15 +00:00
|
|
|
set file [cgi_get file]
|
2011-07-08 20:39:57 +00:00
|
|
|
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]"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|