Mercurial > hgrepos > hgweb.cgi > skipweb
changeset 3351:7e328164a89a
mp3ÄɲÃ
author | OOTANI Hiroyuki <c115036@g.koeki-u.ac.jp> |
---|---|
date | Sat, 22 Jul 2017 12:08:00 +0900 |
parents | 7173c67457b7 |
children | a63e4b2c5bd7 |
files | event/oasis2017/ikusei/daizu.csv event/oasis2017/ikusei/daizu.rb event/oasis2017/ikusei/daizu1.mp3 event/oasis2017/ikusei/daizu2.mp3 event/oasis2017/ikusei/daizu3.mp3 event/oasis2017/ikusei/hiyoko1.mp3 event/oasis2017/ikusei/hiyoko2.mp3 event/oasis2017/ikusei/hiyoko3.mp3 event/oasis2017/ikusei/kayaku4.rb |
diffstat | 9 files changed, 168 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/event/oasis2017/ikusei/daizu.csv Sat Jul 22 12:08:00 2017 +0900 @@ -0,0 +1,13 @@ +1,Q1.「山王ç¥ã€ã¨ã—ã¦ã€1609å¹´ã‹ã‚‰ç¶šã„ã¦ã„ã¦ãŠã‚Šã€å±±è»Šè¡Œåˆ—ãŒè¡Œã‚れる酒田ã®ãŠç¥ã‚Šã¯ãªã‚“ã§ã—ょã†ã€‚,2,é…’ç”°ç¥ã‚Š,3,酒田港ã¾ã¤ã‚Š,4,舞鶴公園桜ã¾ã¤ã‚Š +2,Q1.「山王ç¥ã€ã¨ã—ã¦ã€1609å¹´ã‹ã‚‰ç¶šã„ã¦ã„ã¦ãŠã‚Šã€å±±è»Šè¡Œåˆ—ãŒè¡Œã‚れる酒田ã®ãŠç¥ã‚Šã¯ãªã‚“ã§ã—ょã†ã€‚,2,é…’ç”°ç¥ã‚Š,3,酒田港ã¾ã¤ã‚Š,4,舞鶴公園桜ã¾ã¤ã‚Š +3,æ£è§£!!!音楽ãŒæµã‚Œã¾ã™ +4,Q1.「山王ç¥ã€ã¨ã—ã¦ã€1609å¹´ã‹ã‚‰ç¶šã„ã¦ã„ã¦ãŠã‚Šã€å±±è»Šè¡Œåˆ—ãŒè¡Œã‚れる酒田ã®ãŠç¥ã‚Šã¯ãªã‚“ã§ã—ょã†ã€‚,2,é…’ç”°ã¾ã¤ã‚Š,3,酒田港ã¾ã¤ã‚Š,4,舞鶴公園桜ã¾ã¤ã‚Š +5,Q2.é…’ç”°ã§è¡Œã‚れる最上å·æ²³å£ã®åºƒå¤§ãªæ•·åœ°ã‚’最大é™ã«åˆ©ç”¨ã—ãŸãƒ€ã‚¤ãƒŠãƒŸãƒƒã‚¯ãªèŠ±ç«ã‚·ãƒ§ãƒ¼ã¯ä½•ã§ã—ょã†,6,玉簾ã®æ»ãƒ©ã‚¤ãƒˆã‚¢ãƒƒãƒ—,7,LIVE_WORLD_in眺海ã®æ£®,8,酒田花ç«ã‚·ãƒ§ãƒ¼ +6,Q2.é…’ç”°ã§è¡Œã‚れる最上å·æ²³å£ã®åºƒå¤§ãªæ•·åœ°ã‚’最大é™ã«åˆ©ç”¨ã—ãŸãƒ€ã‚¤ãƒŠãƒŸãƒƒã‚¯ãªèŠ±ç«ã‚·ãƒ§ãƒ¼ã¯ä½•ã§ã—ょã†,6,玉簾ã®æ»ãƒ©ã‚¤ãƒˆã‚¢ãƒƒãƒ—,7,LIVE_WORLD_in眺海ã®æ£®,8,酒田花ç«ã‚·ãƒ§ãƒ¼ +7,Q2.é…’ç”°ã§è¡Œã‚れる最上å·æ²³å£ã®åºƒå¤§ãªæ•·åœ°ã‚’最大é™ã«åˆ©ç”¨ã—ãŸãƒ€ã‚¤ãƒŠãƒŸãƒƒã‚¯ãªèŠ±ç«ã‚·ãƒ§ãƒ¼ã¯ä½•ã§ã—ょã†,6,玉簾ã®æ»ãƒ©ã‚¤ãƒˆã‚¢ãƒƒãƒ—,7,LIVE_WORLD_in眺海ã®æ£®,8,酒田花ç«ã‚·ãƒ§ãƒ¼ +8,æ£è§£!!!音楽ãŒæµã‚Œã¾ã™ +9,Q2.é…’ç”°ã§è¡Œã‚れる最上å·æ²³å£ã®åºƒå¤§ãªæ•·åœ°ã‚’最大é™ã«åˆ©ç”¨ã—ãŸãƒ€ã‚¤ãƒŠãƒŸãƒƒã‚¯ãªèŠ±ç«ã‚·ãƒ§ãƒ¼ã¯ä½•ã§ã—ょã†,10,呑舟(ã©ã‚“ã—ã‚…ã†ï¼‰,11,土産(ã©ã•ã‚“),12,度é‡ï¼ˆã©ã‚Šã‚‡ã†ï¼‰ +10,æ£è§£!!!音楽ãŒæµã‚Œã¾ã™ +11,「酒田ã©ã‚“ã—ゃんã¾ã¤ã‚Šã€ã®ã€Œã©ã‚“ã—ゃんã€ã®èªžæºã¨ãªã£ãŸè¨€è‘‰ã¯ãªã‚“ã§ã—ょã†ã€‚,10,呑舟(ã©ã‚“ã—ã‚…ã†ï¼‰,11,土産(ã©ã•ã‚“),12,度é‡ï¼ˆã©ã‚Šã‚‡ã†ï¼‰ +12,「酒田ã©ã‚“ã—ゃんã¾ã¤ã‚Šã€ã®ã€Œã©ã‚“ã—ゃんã€ã®èªžæºã¨ãªã£ãŸè¨€è‘‰ã¯ãªã‚“ã§ã—ょã†ã€‚,10,呑舟(ã©ã‚“ã—ã‚…ã†ï¼‰,11,土産(ã©ã•ã‚“),12,度é‡ï¼ˆã©ã‚Šã‚‡ã†ï¼‰ +13,「酒田ã©ã‚“ã—ゃんã¾ã¤ã‚Šã€ã®ã€Œã©ã‚“ã—ゃんã€ã®èªžæºã¨ãªã£ãŸè¨€è‘‰ã¯ãªã‚“ã§ã—ょã†ã€‚,10,呑舟(ã©ã‚“ã—ã‚…ã†ï¼‰,11,土産(ã©ã•ã‚“),12,度é‡ï¼ˆã©ã‚Šã‚‡ã†ï¼‰
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/event/oasis2017/ikusei/daizu.rb Sat Jul 22 12:08:00 2017 +0900 @@ -0,0 +1,154 @@ +#!/usr/bin/env ruby +# -*- coding: utf-8 -*- +Encoding.default_internal = "UTF-8" +Encoding.default_external = "UTF-8" + +require 'cgi' +require 'csv' + +c = CGI.new(:accept_charset => "UTF-8") +print "Content-type: text/html; charset=UTF-8\n\n" + +number = c["rd"] +img = c["img"] + +x = Hash.new +CSV.foreach("daizu.csv") do |row| + q_number = row.shift + question = row.shift + x[q_number] = [question, Hash[*row]] + ##x[number] = {"Q" => question, "A" => Hash[*row]} +end +#p x +#encoding:"SJIS:UTF-8" + +gazou1="07.png"#1ページ目ã®ç”»åƒ +link1 ="07.png"#1ページ目ã®ãƒªãƒ³ã‚¯ç”»åƒ +alt1 ="daizu"#1ページ目ã®altç”»åƒ +gazou2="08.png"#2ページ目ã®ç”»åƒ +link2 ="08.png"#2ページ目ã®ãƒªãƒ³ã‚¯ç”»åƒ +alt2 ="tounyu"#2ページ目ã®altç”»åƒ +gazou3="09.png"#3ページ目ã®ç”»åƒ +link3 ="09.png"#3ページ目ã®ãƒªãƒ³ã‚¯ç”»åƒ +alt3 ="toufu"#3ページ目ã®altç”»åƒ +ongaku1="daizu1.mp3" +ongaku2="daizu2.mp3" +ongaku3="daizu3.mp3" +ongaku4="daizu.ogg" + + +def outinput(value, name) + printf("<label><input type=\"radio\" name=\"rd\" value=\"%s\">%s</label>", value, name) +end + +def imgsrc(img) + printf("<img src=\"%s\">", img) +end + +if number == "" #åˆå›žèµ·å‹•æ™‚ã®ã¿ + number = "1" #numberã«"1"を代入 +end + + +print"<html><head><title>大豆</title></head><body>\n" + +print"<form method=\"POST\" action=\"./daizu.rb\">\n" + +q = x[number] + +#ifã§å ´åˆåˆ†ã‘åˆã‚ã¦ãã®å•é¡Œã«è¡Œãã€æ£è§£ã€ä¸æ£è§£ï¼‘ã€ä¸æ£è§£ï¼’,ã®ï¼”通り + +if number == "1" || number == "5" || number == "9" #åˆã‚ã¦æŒ‘戦 + printf("<p>%s</p>", q[0]) + if number == "1" + + printf("<p><a href=\"%s\"><img src=\"%s\" alt=\"%s\" height=\"300px\" width=\"300px\"></a></p>",link1,gazou1,alt1) + + elsif number == "5" + printf("<p><a href=\"%s\"><img src=\"%s\" alt=\"%s\" height=\"300px\" width=\"300px\"></a></p>",link2,gazou2,alt2) + elsif number == "9" + printf("<p><a href=\"%s\"><img src=\"%s\" alt=\"%s\" height=\"300px\" width=\"300px\"></a></p>",link3,gazou3,alt3) + end + for v, sel in q[1] + outinput(v, sel) + end + print"<input name=\"ok\" type=\"submit\" value=\"é€ä¿¡\">\n" + print"<input name=\"ng\" type=\"reset\" value=\"リセット\">\n" + +elsif number == "3" || number == "8" || number == "10" #æ£è§£ + printf("%s", q[0]) + #printf("%s", q[1]) + if number == "3" + print("<p>") + printf("<audio controls autoplay loop false preload=\"auto\"><source src=\"%s\"></audio>",ongaku1) + print("<\p>") + + printf("<label><input type=\"radio\" name=\"rd\" value=\"5\">次ã¸é€²ã‚‚ã†<br></label>") + # printf("<input type=\"submit\" value=\"次ã¸\">") + + elsif number =="8" + print("<p>") + + printf("<audio controls autoplay loop false preload=\"auto\"><source src=\"%s\"></audio>",ongaku2) +print("</p>") + printf("<label><input type=\"radio\" name=\"rd\" value=\"9\">次ã¸é€²ã‚‚ã†<br></label>") + + + + elsif number == "10" + print("<p>") + + printf("<audio controls autoplay loop false preload=\"auto\"><source src=\"%s\"></audio>",ongaku3) + print("<\p>") + printf("<label><input type=\"radio\" name=\"rd\" value=\"13\">次ã¸é€²ã‚‚ã†<br></label>") + end + printf("<input type=\"submit\" value=\"次ã¸\">") + + + + + + +elsif number == "2" || number == "6" || number == "11" #ä¸æ£è§£1 + print("<h1>残念ï¼ã‚‚ã†ä¸€åº¦æŒ‘戦ã ーー</h1>") + printf("<p>%s</p>", q[0]) + if number == "2" + printf("<p><a href=\"%s\"><img src=\"%s\" alt=\"%s\" height=\"300px\" width=\"300px\"></a></p>",link1,gazou1,alt1) + elsif number == "6" + printf("<p><a href=\"%s\"><img src=\"%s\" alt=\"%s\" height=\"300px\" width=\"300px\"></a></p>",link2,gazou2,alt2) + elsif number == "11" + printf("<p><a href=\"%s\"><img src=\"%s\" alt=\"%s\" height=\"300px\" width=\"300px\"></a></p>",link3,gazou3,alt3) + end + for v, sel in q[1] + outinput(v, sel) + end + print"<input name=\"ok\" type=\"submit\" value=\"é€ä¿¡\">\n" + print"<input name=\"ng\" type=\"reset\" value=\"リセット\">\n" + + + +elsif number == "4" || number == "7" || number == "12" #ä¸æ£è§£2 + print("<h1>惜ã—ã„ï¼ã‚‚ã†ä¸€åº¦ã‚„ã£ã¦ã¿ã‚ˆãƒ¼ãƒ¼</h1>") + printf("<p>%s</p>", q[0]) + if number == "4" + printf("<p><a href=\"%s\"><img src=\"%s\" alt=\"%s\" height=\"300px\" width=\"300px\"></a></p>",link1,gazou1,alt1) + elsif number == "7" + printf("<p><a href=\"%s\"><img src=\"%s\" alt=\"%s\" height=\"300px\" width=\"300px\"></a></p>",link2,gazou2,alt2) + elsif number == "12" + printf("<p><a href=\"%s\"><img src=\"%s\" alt=\"%s\" height=\"300px\" width=\"300px\"></a></p>",link3,gazou3,alt3) + end + for v, sel in q[1] + outinput(v, sel) + end + print"<input name=\"ok\" type=\"submit\" value=\"é€ä¿¡\">\n" + print"<input name=\"ng\" type=\"reset\" value=\"リセット\">\n" + +elsif number == "13" + print("<p>音楽ã®èžåˆ</p>\n") + printf("<audio controls autoplay loop false preload=\"auto\"><source src=\"%s\"></audio>\n",ongaku4) +printf("<p><a href=\"http://roy.e.koeki-u.ac.jp/~c115036/ikusei2017/ikusei.html\">topページã«æˆ»ã‚‹</a></p>\n") +end + +print"</form>\n" +print "</body>\n" +print "</html>\n"
--- a/event/oasis2017/ikusei/kayaku4.rb Sat Jul 22 11:53:10 2017 +0900 +++ b/event/oasis2017/ikusei/kayaku4.rb Sat Jul 22 12:08:00 2017 +0900 @@ -133,7 +133,7 @@ if number == "4" printf("<p><a href=\"%s\"><img src=\"%s\" alt=\"%s\" height=\"300px\" width=\"300px\"></a></p>",link1,gazou1,alt1) elsif number == "7" - printf("<p><a href=\"%s\"><img src=\"%s\" alt=\"%s\" height=\"300px\" width=\"500px\"></a></p>",link2,gazou2,alt2) + printf("<p><a href=\"%s\"><img src=\"%s\" alt=\"%s\" height=\"300px\" width=\"300px\"></a></p>",link2,gazou2,alt2) elsif number == "12" printf("<p><a href=\"%s\"><img src=\"%s\" alt=\"%s\" height=\"300px\" width=\"300px\"></a></p>",link3,gazou3,alt3) end