#!/usr/bin/env ruby
# coding: utf-8

require 'cgi'
c = CGI.new(:accept_charset => "UTF-8")
print "Content-type: text/html; charset=UTF-8\n\n"

gomi = c["namae"]
bunbetu   = c["syori"]

print "<!DOCTYPE html>
<html>
<head><title>gomi</title></head>
<body>\n"

print "<h1>#{name}は「#{gomi}」</h1>\n"

kekka = {			# A, B, AB, O に対応する値をHashで設定する
  "ペットボトル"	=> "ペットボトル専用袋（緑）",
  "空き缶"	=> "資源物袋（青）",
  "紙おむつ"	=> "もやすごみ袋（黒）",
  "生ごみ"	=> "もやすごみ袋（黒）",
  "一輪車"	=> "粗大ごみ",
  "入れ歯"	=> "埋め立てゴミ",
  "腕時計"	=> "埋め立てゴミ",
  "絵の具"	=> "もやすごみ袋（黒）",
  "鉛筆削り器"	=> "埋め立てゴミ",
  "延長コード"	=> "もやすごみ袋（黒） 1m以内に切る",
 "斧"	=> "埋立ごみ",
  "温度計 水銀式"	=> "水銀ゴミ",
}
kekka.default = "ゴミを検索してね"
printf("<p>%s型のあなたは%s</p>\n", bt, kekka[bunbetu])
print "</body>\n"
print "</html>\n"
