2014-02-10 23:03:36 +00:00
|
|
|
#!/mod/bin/jimsh
|
|
|
|
|
|
|
|
package require cgi
|
|
|
|
source /mod/webif/lib/setup
|
|
|
|
require rsv.class system.class
|
|
|
|
|
|
|
|
httpheader
|
|
|
|
|
|
|
|
set slot [cgi_get slot 0]
|
|
|
|
set table [cgi_get table TBL_RESERVATION]
|
|
|
|
|
|
|
|
set event [rsv slot $table $slot]
|
|
|
|
|
|
|
|
# Humax TV replaces these characters.
|
|
|
|
# "%*./:<>?\|
|
|
|
|
|
|
|
|
set dir "[system mediaroot]/[\
|
2014-02-10 23:21:26 +00:00
|
|
|
regsub -all {["%*\./:<>?\\|]} [$event folder] "_"]"
|
2014-02-10 23:03:36 +00:00
|
|
|
|
|
|
|
|
|
|
|
if {[file exists $dir]} {
|
|
|
|
puts "Folder $dir already exists."
|
|
|
|
} else {
|
|
|
|
if {[catch {file mkdir $dir} msg]} {
|
|
|
|
puts "Failed to create $dir ($msg)"
|
|
|
|
} else {
|
|
|
|
puts "Created $dir"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
system restartpending
|
|
|
|
|