aboutsummaryrefslogtreecommitdiff
path: root/index.cgi
diff options
context:
space:
mode:
authorBenjamin Kellermann <Benjamin.Kellermann@gmx.de>2009-10-25 22:02:20 +0100
committerBenjamin Kellermann <Benjamin.Kellermann@gmx.de>2009-10-25 22:02:20 +0100
commit93d0fb408e038267560908f60980dd2a45ea7aa6 (patch)
treef95504d6463ae49755ca9f79ae1348303f992ca4 /index.cgi
parent1777f35c3b48cb445d4ff12708b9a4ba1caa50f9 (diff)
automatically redirect when poll is created
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