HEAD
load "charset.rb"
if File.exists?("config.rb")
load "config.rb"
else
puts "\nPlease configure me in the file config.rb"
exit
end
require "poll"
require "datepoll"
require "timepoll"
$htmlout += <
dudle
HEAD
$htmlout += '' if File.exists?("atom.cgi")
$htmlout += "
dudle
"
if $cgi.include?("create_poll")
SITE=$cgi["create_poll"].gsub(/^\//,"")
unless File.exist?(SITE)
Dir.mkdir(SITE)
Dir.chdir(SITE)
VCS.init
File.symlink("../participate.rb","index.cgi")
File.symlink("../atom_single.rb","atom.cgi")
File.symlink("../config_poll.rb","config.cgi")
File.symlink("../remove_poll.rb","remove.cgi")
["index.cgi","atom.cgi","config.cgi","remove.cgi"].each{|f|
VCS.add(f)
}
["data.yaml",".htaccess",".htdigest"].each{|f|
File.open(f,"w").close
VCS.add(f)
}
case $cgi["poll_type"]
when "create normal poll"
Poll.new SITE
when "create event schedule"
TimePoll.new SITE
end
Dir.chdir("..")
else
$htmlout += ""
end
end
$htmlout += ""
$htmlout += <
CREATE
$htmlout += <
#{UTFASCII}
CHARSET
$htmlout += NOTICE
$htmlout += ""
$htmlout += ""
$cgi.out("type" => TYPE ,"charset" => CHARSET,"cookie" => $utfcookie, "Cache-Control" => "no-cache"){$htmlout}
end