Mercurial > hgrepos > hgweb.cgi > skipweb
changeset 2316:59b0d974f342
merged
author | MURAKAMI Masaki <c112124@h.koeki-u.ac.jp> |
---|---|
date | Fri, 25 Jul 2014 16:20:46 +0900 |
parents | b23e3376a714 (current diff) 11f637388c8a (diff) |
children | f3d0e486ebf3 |
files | |
diffstat | 2 files changed, 20 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ruby/timetable/.htaccess Fri Jul 25 16:20:46 2014 +0900 @@ -0,0 +1,2 @@ +AddHandler cgi - script .rb +Options +ExecCGI
--- a/ruby/timetable/timechart_201.rb Fri Jul 25 16:16:58 2014 +0900 +++ b/ruby/timetable/timechart_201.rb Fri Jul 25 16:20:46 2014 +0900 @@ -1,3 +1,21 @@ #!/usr/bin/env ruby # coding:utf-8 +require 'cgi' +c = CGI.new(:accept_charset => "UTF-8") +require 'pstore' +x = Pstore.new("room201.db") + +print "Content-type: text/html; charset=UTF-8\n\n" + +print "<html> +<head><title>access log check</title></head> +<body>" +access = 0 + +x.transaction do + if x["foo"] == nil + x["foo"] == Hash.new + end + access = x["foo"] +end