diff options
author | Benjamin Kellermann <Benjamin.Kellermann@gmx.de> | 2009-03-29 20:13:16 +0200 |
---|---|---|
committer | Benjamin Kellermann <Benjamin.Kellermann@gmx.de> | 2009-03-29 20:13:16 +0200 |
commit | c1d8584e633b5a5a0d246e0b1f7e2f97c736e717 (patch) | |
tree | 3cadb2cd0e78f9561562a8ac2ab6e6c2b6265b61 /index.cgi | |
parent | ba358e7d1ea76b86a3fb6e259376ded0aac249c7 (diff) |
charset in own file
Diffstat (limited to 'index.cgi')
-rwxr-xr-x | index.cgi | 37 |
1 files changed, 3 insertions, 34 deletions
@@ -14,39 +14,6 @@ if __FILE__ == $0 $cgi = CGI.new - -utfcookie = CGI::Cookie.new("utf", "true") -utfcookie.path = "/" -if ($cgi.include?("utf") || $cgi.cookies["utf"][0]) && !$cgi.include?("ascii") - utfcookie.expires = Time.now+1*60*60*24*365 - UTFASCII = "<a href='?ascii' style='text-decoration:none'>ASCII</a>" - BACK = CGI.escapeHTML("↩") - - YES = CGI.escapeHTML('✔') - NO = CGI.escapeHTML('✘') - MAYBE = CGI.escapeHTML('?') - UNKNOWN = CGI.escapeHTML("–") - - YEARBACK = CGI.escapeHTML("↞") - MONTHBACK = CGI.escapeHTML("←") - MONTHFORWARD = CGI.escapeHTML("→") - YEARFORWARD = CGI.escapeHTML("↠") -else - utfcookie.expires = Time.now-1*60*60*24*36 - UTFASCII = "<a href='?utf' style='text-decoration:none'>#{CGI.escapeHTML('↩✔✘?–↞←→↠')}</a>" - BACK = CGI.escapeHTML("<-") - - YES = CGI.escapeHTML('OK') - NO = CGI.escapeHTML('NO') - MAYBE = CGI.escapeHTML('?') - UNKNOWN = CGI.escapeHTML("-") - - YEARBACK = CGI.escapeHTML("<<") - MONTHBACK = CGI.escapeHTML("<") - MONTHFORWARD = CGI.escapeHTML(">") - YEARFORWARD = CGI.escapeHTML(">>") -end - TYPE = "text/html" #TYPE = "application/xhtml+xml" CHARSET = "utf-8" @@ -60,15 +27,17 @@ HEAD if File.exist?("data.yaml") olddir = File.expand_path(".") Dir.chdir("..") + load "charset.rb" load "config.rb" Dir.chdir(olddir) load "../participate.rb" else + load "charset.rb" load "config.rb" load "overview.rb" end -$cgi.out("type" => TYPE ,"charset" => CHARSET,"cookie" => utfcookie, "Cache-Control" => "no-cache"){$htmlout} +$cgi.out("type" => TYPE ,"charset" => CHARSET,"cookie" => $utfcookie, "Cache-Control" => "no-cache"){$htmlout} end |