#! /usr/in/env ruby
# -*- coding: utf-8 -*-

require 'cgi'

cgi = CGI.new(:accept_charset => "utf-8")
print "Content-Type: text/html; charset=UTF-8\n\n"

q1 = cgi["q1"]

print "<html>\n"
print "<head>\n"
print "<title>判定</title>\n"
print "<meta http-equiv=\"Content-Style-Type\" content=\"text/css\">\n"
print "<style type=\"text/css\">\n"
print "<!--\n"

if q1 == tr
    print "body {background-color: #e6cde3}\n"
    hantei = "正解"
    tugi = "<a href=\"https://www.yatex.org/gitbucket/HiroseLabo./2020-yuuki-t/pages/eiyoukuiz03.html\" >次の問題へ</a>"
elsif q1 == fa
    print "body {background-color: #e6cde3}\n"
    hantei = "不正解"
    tugi = "<a href=\"http://localhost:8080/eiyoukuiz02.html\">戻る</a>"
end

print "-->\n"
print "</style>\n"
print "</head>\n"
print "<body>\n"

print "<h1>判定結果</h1>\n"

print "<p>あなたが選んだのは#{hantei}です。#{hantei}。</p>\n"

print "</body>\n"
print "</html>\n"