98c4182a1f
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@1785 2a923420-c742-0410-a762-8d5b09965624
33 lines
565 B
Plaintext
Executable File
33 lines
565 B
Plaintext
Executable File
#!/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]/[\
|
|
regsub -all {["%*\./:<>?\\|]} [$event folder] "_"]"
|
|
|
|
|
|
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
|
|
|