2011-06-22 23:36:30 +00:00
|
|
|
#!/mod/bin/jimsh
|
|
|
|
|
|
|
|
package require cgi
|
2012-05-21 20:23:41 +00:00
|
|
|
source /mod/webif/lib/setup
|
2013-01-30 23:48:37 +00:00
|
|
|
require safe_delete
|
2011-06-22 23:36:30 +00:00
|
|
|
|
2013-02-09 22:46:15 +00:00
|
|
|
httpheader
|
2011-06-22 23:36:30 +00:00
|
|
|
|
2012-01-16 22:28:20 +00:00
|
|
|
set dir [cgi_get dir]
|
|
|
|
|
|
|
|
#puts "DIR: ($dir)"
|
2011-06-22 23:36:30 +00:00
|
|
|
|
2012-01-16 22:28:20 +00:00
|
|
|
puts "<div id=deleting class=blood><img src=/img/loading.gif>Deleting...</div>"
|
|
|
|
puts "<ul style=\"list-style-type: square\">"
|
2012-01-25 23:19:57 +00:00
|
|
|
|
2012-01-16 22:28:20 +00:00
|
|
|
foreach file [cgi_get files] {
|
|
|
|
puts -nonewline "<li>\"$file\"..."
|
2012-01-25 23:19:57 +00:00
|
|
|
|
2012-08-07 22:22:30 +00:00
|
|
|
if {[string first "$dir/" $file] != 0} {
|
2012-01-16 22:28:20 +00:00
|
|
|
puts "Error - outside directory."
|
|
|
|
continue
|
|
|
|
}
|
2012-01-14 00:29:44 +00:00
|
|
|
|
2013-01-30 23:48:37 +00:00
|
|
|
if {[safe_delete $file]} {
|
2012-01-16 22:28:20 +00:00
|
|
|
puts -nonewline "Done..."
|
2013-01-30 23:48:37 +00:00
|
|
|
} else {
|
|
|
|
puts -nonewline "Error..."
|
2012-01-10 19:51:45 +00:00
|
|
|
}
|
|
|
|
|
2012-01-16 22:28:20 +00:00
|
|
|
puts "</li>"
|
2011-06-22 23:36:30 +00:00
|
|
|
}
|
2012-01-16 22:28:20 +00:00
|
|
|
puts "</ul>"
|
2011-06-22 23:36:30 +00:00
|
|
|
|