diff options
author | Benjamin Kellermann <Benjamin.Kellermann@gmx.de> | 2009-07-02 08:06:37 +0200 |
---|---|---|
committer | Benjamin Kellermann <Benjamin.Kellermann@gmx.de> | 2009-07-02 08:06:37 +0200 |
commit | 6203b064af34f4a0504c2f975867f3bcd0dee06d (patch) | |
tree | 14c643c02799334e2cb8f417d638e3f57d273fe7 /participate.rb | |
parent | 046113ceef5029ccf93999380c54e6b545f2d5e3 (diff) |
struktur von index.cgi umgebaut
Diffstat (limited to 'participate.rb')
-rwxr-xr-x[-rw-r--r--] | participate.rb | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/participate.rb b/participate.rb index a203e11..dfab3ba 100644..100755 --- a/participate.rb +++ b/participate.rb @@ -1,14 +1,36 @@ +#!/usr/bin/env ruby + ################################ # Author: Benjamin Kellermann # # Licence: CC-by-sa 3.0 # # see Licence # ################################ +require "yaml" +require "cgi" + + +if __FILE__ == $0 + +$cgi = CGI.new + +TYPE = "text/html" +#TYPE = "application/xhtml+xml" +CHARSET = "utf-8" + +$htmlout = <<HEAD +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" + "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> +HEAD + olddir = File.expand_path(".") Dir.chdir("..") require "poll" require "datepoll" require "timepoll" +load "charset.rb" +load "config.rb" Dir.chdir(olddir) if $cgi.include?("revision") @@ -66,3 +88,7 @@ $htmlout += table.comment_to_html $htmlout += "</body>" +$htmlout += "</html>" + +$cgi.out("type" => TYPE ,"charset" => CHARSET,"cookie" => $utfcookie, "Cache-Control" => "no-cache"){$htmlout} +end |