aboutsummaryrefslogtreecommitdiff
path: root/index.cgi
diff options
context:
space:
mode:
Diffstat (limited to 'index.cgi')
-rwxr-xr-xindex.cgi15
1 files changed, 9 insertions, 6 deletions
diff --git a/index.cgi b/index.cgi
index 6158925..5904478 100755
--- a/index.cgi
+++ b/index.cgi
@@ -72,12 +72,15 @@ if $cgi.include?("create_poll")
TimePoll.new SITE
end
Dir.chdir("..")
- createnotice = <<SUCCESS
-<div class='success'>
- The poll was created successfully. The link to your new poll is:<br />
- <a href='#{SITEURL}#{SITE}'>#{SITEURL}#{SITE}</a>
-</div>
-SUCCESS
+ $cgi.out("status" => "REDIRECT",
+ "Location" => "#{SITEURL}#{SITE}/",
+ "type" => TYPE,
+ "charset" => CHARSET,
+ "cookie" => $utfcookie,
+ "Cache-Control" => "no-cache"){
+ "The poll was created successfully. The link to your new poll is:<br /><a href='#{SITEURL}#{SITE}'>#{SITEURL}#{SITE}</a>"
+ }
+ exit
else
createnotice = "<div class='error'>Error: This poll already exists!</div>"
end