diff options
author | Benjamin Kellermann <Benjamin.Kellermann@gmx.de> | 2009-10-25 22:02:20 +0100 |
---|---|---|
committer | Benjamin Kellermann <Benjamin.Kellermann@gmx.de> | 2009-10-25 22:02:20 +0100 |
commit | 93d0fb408e038267560908f60980dd2a45ea7aa6 (patch) | |
tree | f95504d6463ae49755ca9f79ae1348303f992ca4 /index.cgi | |
parent | 1777f35c3b48cb445d4ff12708b9a4ba1caa50f9 (diff) |
automatically redirect when poll is created
Diffstat (limited to 'index.cgi')
-rwxr-xr-x | index.cgi | 15 |
1 files changed, 9 insertions, 6 deletions
@@ -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 |