From 6203b064af34f4a0504c2f975867f3bcd0dee06d Mon Sep 17 00:00:00 2001 From: Benjamin Kellermann Date: Thu, 2 Jul 2009 08:06:37 +0200 Subject: struktur von index.cgi umgebaut --- participate.rb | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) mode change 100644 => 100755 participate.rb (limited to 'participate.rb') diff --git a/participate.rb b/participate.rb old mode 100644 new mode 100755 index a203e11..dfab3ba --- 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 + 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 += "" +$htmlout += "" + +$cgi.out("type" => TYPE ,"charset" => CHARSET,"cookie" => $utfcookie, "Cache-Control" => "no-cache"){$htmlout} +end -- cgit v1.2.3