diff --git a/opencampus2015/.htaccess b/opencampus2015/.htaccess
new file mode 100644
index 0000000..3a8c330
--- /dev/null
+++ b/opencampus2015/.htaccess
@@ -0,0 +1,4 @@
+AddHandler cgi-script .rb
+AddType "text/html; charset=UTF-8" .rb
+AddType "text/html; charset=UTF-8" .html
+Options +ExecCGI
diff --git a/opencampus2015/accountcheck.rb b/opencampus2015/accountcheck.rb
new file mode 100755
index 0000000..0b3f91c
--- /dev/null
+++ b/opencampus2015/accountcheck.rb
@@ -0,0 +1,142 @@
+#!/usr/bin/env ruby22
+# -*- coding: utf-8 -*-
+
+require 'sqlite3'
+require 'kconv'
+require 'cgi'
+require 'csv'
+
+c = CGI.new(:tag_maker => "html5", :accept_charest => "UTF-8")
+db = SQLite3::Database.new("sql/main.sq3")
+csv = "list.csv"
+
+sql = "insert into test values(?, ?, ?, ?, ?, ?, ?, ?, ?)"
+
+toi = "insert into toi values (?, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)"
+item = "insert into goods values (?, 0, 0, 0, 0, 0, 0)"
+
+name = c["name"]
+pswd = c["pswd"]
+cle1 = "CREATE TABLE IF NOT EXISTS test(id, name, cal, age, sex, pswd, exp, pt, lv)"
+cle2 = "CREATE TABLE IF NOT EXISTS toi(id, q1, q2, q3, q4, q5, q6, q7, q8, q9, q10)"
+cle3 = "CREATE TABLE IF NOT EXISTS goods(id, g1, g2, g3, g4, g5, g6)"
+cle4 = "CREATE TABLE IF NOT EXISTS time(cd, now, id)"
+cle5 = "CREATE TABLE IF NOT EXISTS num(cd, id)"
+cle6 = "CREATE TABLE IF NOT EXISTS pass(id, pass, name)"
+
+cle7 = "CREATE TABLE IF NOT EXISTS zukan(no, name, tah, lv2, lv3, lv4, lv5)"
+cle8 = "CREATE TABLE IF NOT EXISTS box(id, no1, e1, t1, tm1, no2, e2, t2, tm2, no3, e3, t3, tm3)"
+ins8 = "insert into box values(?,?,0,?,?,0,0,0,0,0,0,0,0)"
+
+ins4 = 'insert into time values(?, 61, "n")'
+ins5 = 'insert into num values("aa",0)'
+ins6 = 'insert into pass values(?, ?, ?)'
+num = "select id from num where cd = ?"
+numup = "update num set id = ? where cd = ?"
+
+db.execute(cle1)
+db.execute(cle2)
+#db.execute(cle3)
+db.execute(cle4)
+db.execute(cle5)
+db.execute(cle6)
+db.execute(cle7)
+db.execute(cle8)
+if name == "createman789789789"
+ ("a".."j").each{|x|db.execute(ins4,x)}
+ db.execute(ins5)
+ #system `sqlite3 -separator , /sql/main.sq3 ".import list.csv zukan"` #(ins7)
+ CSV.foreach(csv) do |row|
+ db.execute("INSERT INTO zukan VALUES(?,?,?,?,?,?,?)",*row)
+ end
+end
+
+name = c["name"]
+namae = "#{name}"
+cal = c["cal"]
+age = c["age"]
+sex = c["sex"]
+aria = c["aria"]
+
+
+id = c.cookies["id"][0]
+pass = c.cookies["pass"][0]
+no1 = db.execute("select no from zukan where name = ?",cal)[0][0]
+t1 = db.execute("select tah from zukan where name = ?",cal)[0][0]
+
+
+if id == nil
+ number = db.execute(num, "aa")
+ begin
+ id = number[0][0].to_i + 1
+ rescue
+ ("a".."j").each{|x| db.execute(ins4,x)}
+ # db.execute(ins4, "b")
+ # db.execute(ins4, "c")
+ # db.execute(ins4, "d")
+ # db.execute(ins4, "e")
+ # db.execute(ins4, "f")
+ # db.execute(ins4, "g")
+ # db.execute(ins4, "h")
+ # db.execute(ins4, "i")
+ # db.execute(ins4, "j")
+ db.execute(ins5)
+ id = number[0][0].to_i + 1
+ end
+ exp = 0
+ pt = 0
+ lv = 1
+ cd = "aa"
+ if pass == nil
+ pass = id
+ end
+ db.execute(ins6, id, pass, name)
+ db.execute(sql, id, name, cal, age, sex, aria, exp, pt, lv)
+ db.execute(toi, id)
+ # db.execute(item, id)
+ db.execute(numup, id, cd)
+ db.execute(ins8,id,no1,t1.to_i/5,t1.to_i/5)
+end
+# srand(id.to_i)
+# id2 = rand(1000000)
+id2 = pass
+
+
+
+expires = "SUN, 5, MAR 2017 00:00:00 GMT"
+
+printf("Content-type: text/html; charset=UTF-8
+Set-Cookie:id=%s ;expires=%s
+Set-Cookie:pass=%s ;expires=%s\n\n", id, expires, id2, expires)
+
+printf(<<_EOS_, name, id.to_i)
+
+
+
+
+
+
+
+
+
+
+
+
+
+Registering Account
+
+
+
+Miyazac Quest
+登録完了!
+よくきた_ %s _よ!
+おまえのIDは%04dだ!
+
+
+
+_EOS_
+if name == "createman987987987"
+filename ='sql/main.sq3'
+File.delete filename
+end
diff --git a/opencampus2015/admin/.htaccess b/opencampus2015/admin/.htaccess
new file mode 100644
index 0000000..604c85d
--- /dev/null
+++ b/opencampus2015/admin/.htaccess
@@ -0,0 +1,10 @@
+AddHandler cgi-script .rb
+AddType "text/html; charset=utf-8" .rb
+AddType "text/html; charset=utf-8" .html
+Options +ExecCGI
+AuthUserFile /home/www/skip/opencampus2015/admin/.htpasswd
+#AuthUserFile /home/irhome/c113/c113007/public_html/web/opencampus2015/admin/.htpasswd#for_roy
+AuthGroupFile /dev/null
+AuthName "splatoon! piyopiyogirl"
+AuthType Basic
+require valid-user
diff --git a/opencampus2015/admin/.htpasswd b/opencampus2015/admin/.htpasswd
new file mode 100644
index 0000000..8baee9c
--- /dev/null
+++ b/opencampus2015/admin/.htpasswd
@@ -0,0 +1 @@
+c113007:QRf28ARYqd/FY
diff --git a/opencampus2015/admin/check.rb b/opencampus2015/admin/check.rb
new file mode 100755
index 0000000..cc527ee
--- /dev/null
+++ b/opencampus2015/admin/check.rb
@@ -0,0 +1,126 @@
+#!/usr/bin/env ruby22
+# -*- coding: utf-8 -*-
+require 'cgi'
+require 'sqlite3'
+require 'kconv'
+c = CGI.new(:tag_maker => "html5", :accept_charest => "UTF-8")
+db = SQLite3::Database.new("../sql/main.sq3")
+
+getAC1 = ARGV[0]
+pass = "hogehogeboy"
+
+hsh = c["SQ1"]
+hsh += c["SQ2"]
+
+pts = "| id | name | cal | age | sex | aria | exp | pt | lv |
"
+
+
+if c["SQ2"] == "toi"
+pts = "| id | q1 | q2 | q3 | q4 | q5 | q6 | q7 | q8 | q9 | secret |
"
+elsif c["SQ2"] == "time"
+pts = "| cd | now | id |
"
+elsif c["SQ2"] == "goods"
+pts = "| id | おちゃ | しょうひん2 | しょうひん3 | しょうひん4 | しょうひん5 | しょうひん6 |
"
+elsif c["SQ2"] == "pass"
+pts = "| id | pass | name |
"
+
+end
+
+
+######################################
+################SQ3###################
+if c["SQ3"] == ""
+else
+upd = c["SQ3"]
+db.execute(upd)
+end
+
+################SQ3###################
+######################################
+
+
+
+
+################################
+################################
+if hsh == ""
+# pts = "hoge"
+ hsh = "select * from test"
+else
+end
+
+hsh2 = db.execute(hsh)
+i = 0
+while i < hsh2.length
+ data = hsh2[i]
+ if c["SQ2"] == "toi"
+ pts += "| #{data[0]} | #{data[1]} | #{data[2]} | #{data[3]} | #{data[4]} | #{data[5]} | #{data[6]} | #{data[7]} | #{data[8]} | #{data[9]} | #{data[10]} |
"
+ elsif c["SQ2"] == "time"
+ pts += "| #{data[0]} | #{data[1]} | #{data[2]} |
"
+ elsif c["SQ2"] == "goods"
+ pts += "| #{data[0]} | #{data[1]} | #{data[2]} | #{data[3]} | #{data[4]} | #{data[5]} | #{data[6]} |
"
+ else
+ pts += "| #{data[0]} | #{data[1]} | #{data[2]} | #{data[3]} | #{data[4]} | #{data[5]} | #{data[6]} | #{data[7]} | #{data[8]} | #{data[9]} |
"
+ end
+ i += 1
+end
+#end
+pts += "
"
+
+
+print"Content-type: text/html; charset=UTF-8\n\n"
+
+
+######################################
+################if ~html##############
+
+#if getAC1 == pass
+
+printf(<<_EOS_, pts)
+
+
+
+
+
+
+
+
+
+
+
+control
+
+
+
+
+test,toi,goods,time,num,pass
+
+
+
+control
+
+
+
+%s
+
+
+
+
+
+_EOS_
+#############################################
+#############################################
+#else
diff --git a/opencampus2015/battle.rb b/opencampus2015/battle.rb
new file mode 100755
index 0000000..16d193d
--- /dev/null
+++ b/opencampus2015/battle.rb
@@ -0,0 +1,181 @@
+#!/usr/bin/env ruby22
+# -*- coding: utf-8 -*-
+require 'cgi'
+require 'sqlite3'
+require 'kconv'
+c = CGI.new(:tag_maker => "html5", :accept_charest => "UTF-8")
+db = SQLite3::Database.new("./sql/main.sq3")
+
+per = "%"
+id = c.cookies["id"][0]
+person = id.to_i
+
+data = "select * from test where id = ?"
+cook = db.execute(data, person)
+printf("Content-type: text/html; charset=UTF-8\n\n")
+
+begin
+id,name,cal,age,sex,aria,exp,pt,lv = cook[0]
+rescue
+printf(<<_EOS_)
+
+
+
+
+
+
+
+Miyazac Quest
+
+
+
+
+
+記録が無くなったようだ...
記憶も消してやりなおしたまえ......
+
+
+skip@xxxx.co.jp
+
+
+
+
+_EOS_
+exit(0) ##プログラム終了! これがないと以降のプログラムが動いてしまう。
+end
+
+#################キャラクタ#########
+chenge = c["chenge"].to_i
+box = db.execute("select * from box where id = ?",id)
+hoge,no1,e1,t1,tm1,no2,e2,t2,tm2,no3,e3,t3,tm3=box[0]
+newname = "select name from zukan where no = ?"
+if chenge == 2
+ db.execute("update box set no1=?,e1=?,t1=?,tm1=?,no2=?,e2=?,t2=?,tm2=? where id = ?",no2,e2,t2,tm2,no1,e1,t1,tm1,id)
+calname = db.execute(newname,no2)[0][0]
+
+db.execute("update test set cal = ? where id = ?",calname,id)
+elsif chenge == 3
+ db.execute("update box set no1=?,e1=?,t1=?,tm1=?,no3=?,e3=?,t3=?,tm3=? where id = ?",no3,e3,t3,tm3,no1,e1,t1,tm1,id)
+calname = db.execute(newname,no3)[0][0]
+db.execute("update test set cal = ? where id = ?",calname,id)
+end
+
+##################################レベル処理する####
+gage = 0
+e1 = db.execute("select e1 from box where id = ?",person)[0][0]#じぶんのidのboxにある一体目の経験値
+no1 = db.execute("select no1 from box where id = ?",person)[0][0]
+no2 = db.execute("select no2 from box where id = ?",person)[0][0].to_i#2体目id
+no3 = db.execute("select no3 from box where id = ?",person)[0][0].to_i#3体目id
+lv2 = db.execute("select lv2 from zukan where no = ?",no1)[0][0].to_i
+lv3 = db.execute("select lv3 from zukan where no = ?",no1)[0][0].to_i
+lv4 = db.execute("select lv4 from zukan where no = ?",no1)[0][0].to_i
+lv5 = db.execute("select lv5 from zukan where no = ?",no1)[0][0].to_i
+if e1 < lv2
+lv = 1
+gage = 100-(e1/lv2.to_f*100)
+elsif e1 >= lv5
+lv = 5
+gage = 0
+elsif e1 >= lv4
+lv = 4
+gage = 100-(e1-lv4)/(lv5-lv4.to_f)*100
+elsif e1 >= lv3
+lv = 3
+gage = 100-(e1-lv3)/(lv4-lv3.to_f)*100
+elsif e1 >= lv2
+lv = 2
+gage = 100-(e1-lv2)/(lv3-lv2.to_f)*100
+end#########################################
+
+
+image = "./img/#{cal}#{lv}.png"
+alt = "#{cal}.png"
+
+
+
+if lv == 1
+ color = "black"
+elsif lv == 2
+ color = "navy"
+elsif lv == 3
+ color = "green"
+elsif lv == 4
+ color = "red"
+elsif lv == 5
+ color = "yellow"
+else
+ color = "pink"
+ image = "./img/snail.png"
+ alt = "snails_bug"
+end
+
+printf(<<_EOS_, per, gage, per, per, per, color, cal, image, alt, name, person, cal, lv)
+
+
+
+
+
+
+
+
+
+
+
+
+
+BATTLE!
+
+
+
+
+
+Miyazac Quest
+
+
+
+

+
+
| name | :%s |
+| id | :%04d |
+| cara | :%s |
+| lv. | %d |
+
+
+
+
+
+
+
+
+
+_EOS_
diff --git a/opencampus2015/cookie.rb b/opencampus2015/cookie.rb
new file mode 100755
index 0000000..1f07f8e
--- /dev/null
+++ b/opencampus2015/cookie.rb
@@ -0,0 +1,37 @@
+#!/usr/bin/env ruby22
+# -*- coding: utf-8 -*-
+
+require 'sqlite3'
+require 'kconv'
+require 'cgi'
+
+c = CGI.new(:tag_maker => "html5", :accept_charest => "UTF-8")
+db = SQLite3::Database.new("sql/main.sq3")
+
+id = c.cookies["id"][0]
+id = nil
+expires = Time.now + 1
+if id == nil
+end
+
+
+printf("Content-type: text/html; charset=UTF-8
+Set-Cookie:id=%s ;expires=%s\n\n", id, expires)
+
+printf(<<_EOS_)
+
+
+
+
+
+
+Registering Account
+
+
+Miyazac Quest
+記憶は消えた...
+
+
+
+_EOS_
diff --git a/opencampus2015/gets.rb b/opencampus2015/gets.rb
new file mode 100755
index 0000000..28e0dc5
--- /dev/null
+++ b/opencampus2015/gets.rb
@@ -0,0 +1,171 @@
+#!/usr/bin/env ruby22
+# -*- coding:utf-8 -*-
+
+require 'sqlite3'
+require 'cgi'
+
+c = CGI.new(:tag_maker => "html5", :accept_charest => "UTF-8")
+db = SQLite3::Database.new("sql/main.sq3")
+
+id = c.cookies["id"][0]
+person = id.to_i
+
+data = "select * from test where id = ?"
+cook = db.execute(data, person)
+upd = "update test set pt = ? where id = ?"
+goods = "update goods set g1 = ?, g2 = ?, g3 = ?, g4 = ?, g5 = ?, g6 = ? where id = ?"
+
+
+name = cook[0][1]
+pt = cook[0][7]
+lv = cook[0][8]
+
+ticket = "select * from goods where id = ?"
+have = db.execute(ticket, person)
+g1 = have[0][1]
+g2 = have[0][2]
+g3 = have[0][3]
+g4 = have[0][4]
+g5 = have[0][5]
+g6 = have[0][6]
+
+srand
+x = rand(3) #0~2の変動
+
+gets = c["sho"]
+n1 = "おかし" #商品それぞれの名前
+c1 = 4 + x #商品それぞれに対して消費するポイント
+n2 = "ジュース"
+c2 = 10
+n3 = "入学権"
+c3 = 30000000
+n4 = ""
+c4 = 2
+n5 = ""
+c5 = 5
+n6 = ""
+c6 = 100
+
+
+h1 = "チケットを発行したよ!
205教室のスタッフの人と商品をこうかんしてね!"
+if lv < 3
+ h1 = "チケット発行できません!"
+ kekka = "レベル が たりないよ!"
+elsif gets == "s1" && pt >= c1
+ g1 += 1
+ pt -= c1
+ kekka = "#{n1}交換券をゲット!"
+elsif gets == "s2" && pt >= c2
+ g2 += 1
+ pt -= c2
+ kekka = "#{n2}交換券をゲット!"
+elsif gets == "s3" && pt >= c3
+ g3 += 1
+ pt -= c3
+ kekka = "#{n3}交換券をゲット!"
+elsif gets == "s4" && pt >= c4
+ g4 += 1
+ pt -= c4
+ kekka = "#{n4}交換券をゲット!"
+elsif gets == "s5" && pt >= c5
+ g5 += 1
+ pt -= c5
+ kekka = "#{n5}をゲット!"
+elsif gets == "s6" && pt >= c6
+ g6 += 1
+ pt -= c6
+ kekka = "#{n6}交換券をゲット!"
+else
+ h1 = "チケット発行できません!!"
+ kekka = "ポイントとかたりません!"
+end
+
+trade = c["trade"]
+if trade == n1 && g1 > 0
+ g1 -= 1
+ kekka = "#{n1} と交換します!
スタッフの人は、スタッフがボタンを押した場合のみ、交換してください!"
+ h1 = "#{n1}と交換します!
こぼさないで たべてね!"
+elsif trade == n2 && g2 > 0
+ g2 -= 1
+ kekka = "#{n2} と交換します!
スタッフの人は、スタッフがボタンを押した場合のみ、年齢を確認してから交換してください!"
+ h1 = "#{n2} と交換します!
ひやしてから おうち で のんでね!"
+elsif trade == n3 && g3 > 0
+g3 -= 1
+kekka = "#{n3} と交換します!
スタッフの人は、スタッフがボタンを押した場合のみ、交換してください!"
+ h1 = "#{n3}と交換します!"
+elsif trade == n4 && g4 > 0
+g4 -= 1
+ kekka = "#{n4} と交換します!
スタッフの人は、スタッフがボタンを押した場合のみ、交換してください!"
+ h1 = "#{n4}と交換します!"
+elsif trade == n5 && g5 > 0
+g5 -= 1
+ kekka = "#{n5}と交換します!
スタッフの人は、スタッフがボタンを押した場合のみ、交換してください!"
+h1 = "10えんと交換します!"
+elsif trade == n6 && g6 > 0
+g6 -= 1
+ kekka = "#{n6}と交換します!
スタッフの人は、スタッフがボタンを押した場合のみ、交換してください!"
+h1 = "まぐろと交換します!"
+end
+
+
+
+
+
+db.execute(goods, g1, g2, g3, g4, g5, g6, person)
+db.execute(upd, pt, person)
+
+
+pre = "%"
+printf(<<_EOS_, h1, name, pt, kekka, g1, g4)
+
+
+
+
+
+
+
+
+
+
+
+こうかん!
+
+
+
+
+
+
+ほげほげ!
+%s
+
+%sさん
+さかたポイント:%dp
+%s
+
+
+もっているチケット
+| おかし | :%d |
+| secret | |
+ | |
+
+
+
+
+
+
+
+
+
+
+
+_EOS_
diff --git a/opencampus2015/gohan.rb b/opencampus2015/gohan.rb
new file mode 100755
index 0000000..bc6b449
--- /dev/null
+++ b/opencampus2015/gohan.rb
@@ -0,0 +1,225 @@
+#!/usr/bin/env ruby22
+# -*- coding: utf-8 -*-
+require 'cgi'
+require 'sqlite3'
+require 'kconv'
+c = CGI.new(:tag_maker => "html5", :accept_charest => "UTF-8")
+db = SQLite3::Database.new("sql/main.sq3")
+
+id = c.cookies["id"][0]
+person = id.to_i
+
+data = "select * from test where id = ?"
+ #idが?(後で代入)のデータをtest票から探す。という命令をdataにしくむ。全てがほしい場合は「*」。「*」を「name」に変えると該当データのnameだけとりだす。
+
+cook = db.execute(data, person)
+ #dataに仕組んでいた命令を、personを代入しつつ実行。
+
+upd = "update test set exp = ?, pt = ? where id = ?"
+ #「idが?3のとき、expを?1にする。ptを?2にする。」という命令文。
+lvupd = "update test set lv = ? where id = ?"
+
+que = "select q10 from toi where id = ?"
+queupd = "update toi set q10 = 1 where id = ?"
+q10 = db.execute(que, person)
+
+ name = cook[0][1]
+ cal = cook[0][2]
+ exp = cook[0][6]
+ pt = cook[0][7]
+ lv = cook[0][8]
+ per = "%"
+#####################################
+##########秘密のこたえを設定##############
+if cal == "inu"
+m3 = "あゆ"
+elsif cal == "sisip"
+m3 = "ゆめ"
+elsif cal == "kamon"
+m3 = "ねぎ"
+elsif cal == "boy"
+m3 = "ふね"
+elsif cal == "girl"
+m3 = "かんざし"
+else
+m3 = "skipskip"
+end
+#####################################
+#####################################
+
+
+gohan = c["gohan"]
+#himitu = ""
+if gohan == "g1" && pt >= 2
+ exp += 2
+ pt -= 2
+ db.execute(upd, exp, pt, person)
+ kekka = "#{cal}が成長した!"
+elsif gohan == "g2" && pt >= 5
+ exp += 6
+ pt -= 5
+ db.execute(upd, exp, pt, person)
+ kekka = "#{cal}がすごく成長した!"
+elsif gohan == m3
+ if q10[0][0] == 0
+ exp += 10
+ db.execute(upd, exp, pt, person)
+ kekka = ""
+ db.execute(queupd, person)
+ else
+ kekka ="しつもん に こたえられるのは いっかい だけだよ!"
+ end
+else
+ kekka = "ポイント が たりない!"
+end
+
+if gohan == m3
+elsif gohan == "g1"
+elsif gohan == "g2"
+else
+kekka = "こたえ が ちがうよ!"
+end
+
+
+if exp >= lv*10 && lv < 5
+ lv += 1
+ db.execute(lvupd, lv, person)
+ kekka += "
レベルが上がった!
レベルが#{lv}になった!"
+end
+
+
+if cal == "inu"
+ image = "./img/inu#{lv}.png"
+ alt = "inu#{lv}"
+elsif cal == "sisip"
+ image = "./img/sisip#{lv}.png"
+ alt = "sisip#{lv}"
+elsif cal == "kamon"
+ image = "./img/kamon#{lv}.png"
+ alt = "kamon#{lv}"
+elsif cal == "boy"
+ image = "./img/boy#{lv}.png"
+ alt = "boy#{lv}"
+elsif cal == "girl"
+ image = "./img/girl#{lv}.png"
+ alt = "girl#{lv}"
+elsif cal == "snake"
+ image = "./img/snake#{lv}.png"
+ alt = "snake#{lv}"
+else
+ image = "./img/snail.png"
+end
+
+if lv == 1
+ color = "black"
+elsif lv == 2
+ color = "navy"
+elsif lv == 3
+ color = "green"
+elsif lv == 4
+ color = "red"
+elsif lv == 5
+ color = "yellow"
+else
+ color = "pink"
+ image = "./img/snail.png"
+ alt = "snails_bug"
+end
+
+gage = 0
+exp2 = exp
+if lv < 5
+ while exp2 >= 10
+ exp2 -= 10
+ end
+ gage = 100-exp2*10
+end
+
+
+
+modoru = '
'
+
+cook = db.execute(data, person)
+exp = cook[0][6]
+pt = cook[0][7]
+lv = cook[0][8]
+
+
+printf(<<_EOS_, per, gage, per, per, per, color, image, alt, name, person, cal, lv, pt, kekka, back)
+
+
+
+
+
+
+
+
+
+
+
+ごはぁん!
+
+
+
+
+
+ほげほげ!
+
+
+
+

+
+
| name | :%s |
+| id | :%04d |
+| cara | :%s |
+| lv. | %d |
+
+
+
+
+
+
+
+こうえきポイント:%dp
+%s
+
+
+%s
+
+
+
+
+_EOS_
diff --git a/opencampus2015/img/cabage.png b/opencampus2015/img/cabage.png
new file mode 100644
index 0000000..9fa70e5
--- /dev/null
+++ b/opencampus2015/img/cabage.png
Binary files differ
diff --git a/opencampus2015/img/exp.png b/opencampus2015/img/exp.png
new file mode 100644
index 0000000..346296a
--- /dev/null
+++ b/opencampus2015/img/exp.png
Binary files differ
diff --git a/opencampus2015/img/expfront.png b/opencampus2015/img/expfront.png
new file mode 100644
index 0000000..71c73d2
--- /dev/null
+++ b/opencampus2015/img/expfront.png
Binary files differ
diff --git a/opencampus2015/img/fish.png b/opencampus2015/img/fish.png
new file mode 100644
index 0000000..c52eacb
--- /dev/null
+++ b/opencampus2015/img/fish.png
Binary files differ
diff --git a/opencampus2015/img/food.png b/opencampus2015/img/food.png
new file mode 100644
index 0000000..e19d074
--- /dev/null
+++ b/opencampus2015/img/food.png
Binary files differ
diff --git a/opencampus2015/img/foot.png b/opencampus2015/img/foot.png
new file mode 100644
index 0000000..0668b89
--- /dev/null
+++ b/opencampus2015/img/foot.png
Binary files differ
diff --git a/opencampus2015/img/foot2.png b/opencampus2015/img/foot2.png
new file mode 100644
index 0000000..a069bf8
--- /dev/null
+++ b/opencampus2015/img/foot2.png
Binary files differ
diff --git a/opencampus2015/img/head.png b/opencampus2015/img/head.png
new file mode 100644
index 0000000..637374c
--- /dev/null
+++ b/opencampus2015/img/head.png
Binary files differ
diff --git a/opencampus2015/img/head2.png b/opencampus2015/img/head2.png
new file mode 100644
index 0000000..881e784
--- /dev/null
+++ b/opencampus2015/img/head2.png
Binary files differ
diff --git a/opencampus2015/img/inazuma1.png b/opencampus2015/img/inazuma1.png
new file mode 100644
index 0000000..3b8cef2
--- /dev/null
+++ b/opencampus2015/img/inazuma1.png
Binary files differ
diff --git a/opencampus2015/img/inazuma2.png b/opencampus2015/img/inazuma2.png
new file mode 100644
index 0000000..07f1ef4
--- /dev/null
+++ b/opencampus2015/img/inazuma2.png
Binary files differ
diff --git a/opencampus2015/img/inazuma3.png b/opencampus2015/img/inazuma3.png
new file mode 100644
index 0000000..a5e5b3b
--- /dev/null
+++ b/opencampus2015/img/inazuma3.png
Binary files differ
diff --git a/opencampus2015/img/inazuma4.png b/opencampus2015/img/inazuma4.png
new file mode 100644
index 0000000..5204a6d
--- /dev/null
+++ b/opencampus2015/img/inazuma4.png
Binary files differ
diff --git a/opencampus2015/img/inazuma5.png b/opencampus2015/img/inazuma5.png
new file mode 100644
index 0000000..281d703
--- /dev/null
+++ b/opencampus2015/img/inazuma5.png
Binary files differ
diff --git a/opencampus2015/img/inu1.png b/opencampus2015/img/inu1.png
new file mode 100644
index 0000000..c3ed656
--- /dev/null
+++ b/opencampus2015/img/inu1.png
Binary files differ
diff --git a/opencampus2015/img/inu1o.png b/opencampus2015/img/inu1o.png
new file mode 100644
index 0000000..47eb548
--- /dev/null
+++ b/opencampus2015/img/inu1o.png
Binary files differ
diff --git a/opencampus2015/img/inu2.png b/opencampus2015/img/inu2.png
new file mode 100644
index 0000000..10c300b
--- /dev/null
+++ b/opencampus2015/img/inu2.png
Binary files differ
diff --git a/opencampus2015/img/inu2o.png b/opencampus2015/img/inu2o.png
new file mode 100644
index 0000000..8a3776e
--- /dev/null
+++ b/opencampus2015/img/inu2o.png
Binary files differ
diff --git a/opencampus2015/img/inu3.png b/opencampus2015/img/inu3.png
new file mode 100644
index 0000000..298bec7
--- /dev/null
+++ b/opencampus2015/img/inu3.png
Binary files differ
diff --git a/opencampus2015/img/inu3o.png b/opencampus2015/img/inu3o.png
new file mode 100644
index 0000000..82a75fb
--- /dev/null
+++ b/opencampus2015/img/inu3o.png
Binary files differ
diff --git a/opencampus2015/img/inu4.png b/opencampus2015/img/inu4.png
new file mode 100644
index 0000000..4c4837a
--- /dev/null
+++ b/opencampus2015/img/inu4.png
Binary files differ
diff --git a/opencampus2015/img/inu4o.png b/opencampus2015/img/inu4o.png
new file mode 100644
index 0000000..d431b02
--- /dev/null
+++ b/opencampus2015/img/inu4o.png
Binary files differ
diff --git a/opencampus2015/img/inu5.png b/opencampus2015/img/inu5.png
new file mode 100644
index 0000000..efaac94
--- /dev/null
+++ b/opencampus2015/img/inu5.png
Binary files differ
diff --git a/opencampus2015/img/inu5o.png b/opencampus2015/img/inu5o.png
new file mode 100644
index 0000000..ac5961c
--- /dev/null
+++ b/opencampus2015/img/inu5o.png
Binary files differ
diff --git a/opencampus2015/img/ito1.png b/opencampus2015/img/ito1.png
new file mode 100644
index 0000000..93df1a0
--- /dev/null
+++ b/opencampus2015/img/ito1.png
Binary files differ
diff --git a/opencampus2015/img/ito2.png b/opencampus2015/img/ito2.png
new file mode 100644
index 0000000..634898d
--- /dev/null
+++ b/opencampus2015/img/ito2.png
Binary files differ
diff --git a/opencampus2015/img/ito3.png b/opencampus2015/img/ito3.png
new file mode 100644
index 0000000..d080054
--- /dev/null
+++ b/opencampus2015/img/ito3.png
Binary files differ
diff --git a/opencampus2015/img/ito4.png b/opencampus2015/img/ito4.png
new file mode 100644
index 0000000..daaa03d
--- /dev/null
+++ b/opencampus2015/img/ito4.png
Binary files differ
diff --git a/opencampus2015/img/ito5.png b/opencampus2015/img/ito5.png
new file mode 100644
index 0000000..1ce1072
--- /dev/null
+++ b/opencampus2015/img/ito5.png
Binary files differ
diff --git a/opencampus2015/img/kai.png b/opencampus2015/img/kai.png
new file mode 100644
index 0000000..37a9f4b
--- /dev/null
+++ b/opencampus2015/img/kai.png
Binary files differ
diff --git a/opencampus2015/img/kamon1.png b/opencampus2015/img/kamon1.png
new file mode 100644
index 0000000..0e95c6d
--- /dev/null
+++ b/opencampus2015/img/kamon1.png
Binary files differ
diff --git a/opencampus2015/img/kamon1o.png b/opencampus2015/img/kamon1o.png
new file mode 100644
index 0000000..96fbb18
--- /dev/null
+++ b/opencampus2015/img/kamon1o.png
Binary files differ
diff --git a/opencampus2015/img/kamon2.png b/opencampus2015/img/kamon2.png
new file mode 100644
index 0000000..51bc657
--- /dev/null
+++ b/opencampus2015/img/kamon2.png
Binary files differ
diff --git a/opencampus2015/img/kamon2o.png b/opencampus2015/img/kamon2o.png
new file mode 100644
index 0000000..6f1d257
--- /dev/null
+++ b/opencampus2015/img/kamon2o.png
Binary files differ
diff --git a/opencampus2015/img/kamon3.png b/opencampus2015/img/kamon3.png
new file mode 100644
index 0000000..9ae6100
--- /dev/null
+++ b/opencampus2015/img/kamon3.png
Binary files differ
diff --git a/opencampus2015/img/kamon3o.png b/opencampus2015/img/kamon3o.png
new file mode 100644
index 0000000..776f77d
--- /dev/null
+++ b/opencampus2015/img/kamon3o.png
Binary files differ
diff --git a/opencampus2015/img/kamon4.png b/opencampus2015/img/kamon4.png
new file mode 100644
index 0000000..14e9467
--- /dev/null
+++ b/opencampus2015/img/kamon4.png
Binary files differ
diff --git a/opencampus2015/img/kamon4o.png b/opencampus2015/img/kamon4o.png
new file mode 100644
index 0000000..4412305
--- /dev/null
+++ b/opencampus2015/img/kamon4o.png
Binary files differ
diff --git a/opencampus2015/img/kamon5.png b/opencampus2015/img/kamon5.png
new file mode 100644
index 0000000..e8a1da9
--- /dev/null
+++ b/opencampus2015/img/kamon5.png
Binary files differ
diff --git a/opencampus2015/img/kamon5o.png b/opencampus2015/img/kamon5o.png
new file mode 100644
index 0000000..bacdcfb
--- /dev/null
+++ b/opencampus2015/img/kamon5o.png
Binary files differ
diff --git a/opencampus2015/img/kinoko1.png b/opencampus2015/img/kinoko1.png
new file mode 100644
index 0000000..0d86b87
--- /dev/null
+++ b/opencampus2015/img/kinoko1.png
Binary files differ
diff --git a/opencampus2015/img/kinoko2.png b/opencampus2015/img/kinoko2.png
new file mode 100644
index 0000000..1a7d760
--- /dev/null
+++ b/opencampus2015/img/kinoko2.png
Binary files differ
diff --git a/opencampus2015/img/kinoko3.png b/opencampus2015/img/kinoko3.png
new file mode 100644
index 0000000..ed732f5
--- /dev/null
+++ b/opencampus2015/img/kinoko3.png
Binary files differ
diff --git a/opencampus2015/img/kinoko4.png b/opencampus2015/img/kinoko4.png
new file mode 100644
index 0000000..dda9e04
--- /dev/null
+++ b/opencampus2015/img/kinoko4.png
Binary files differ
diff --git a/opencampus2015/img/kinoko5.png b/opencampus2015/img/kinoko5.png
new file mode 100644
index 0000000..db343eb
--- /dev/null
+++ b/opencampus2015/img/kinoko5.png
Binary files differ
diff --git a/opencampus2015/img/kyabetsu.png b/opencampus2015/img/kyabetsu.png
new file mode 100644
index 0000000..8670782
--- /dev/null
+++ b/opencampus2015/img/kyabetsu.png
Binary files differ
diff --git a/opencampus2015/img/list.csv b/opencampus2015/img/list.csv
new file mode 100644
index 0000000..015c681
--- /dev/null
+++ b/opencampus2015/img/list.csv
@@ -0,0 +1,5 @@
+inu1
+inu2
+inu3
+inu4
+inu5
diff --git a/opencampus2015/img/lvb.png b/opencampus2015/img/lvb.png
new file mode 100644
index 0000000..f98c7f6
--- /dev/null
+++ b/opencampus2015/img/lvb.png
Binary files differ
diff --git a/opencampus2015/img/medama1.png b/opencampus2015/img/medama1.png
new file mode 100644
index 0000000..88fdb7d
--- /dev/null
+++ b/opencampus2015/img/medama1.png
Binary files differ
diff --git a/opencampus2015/img/medama2.png b/opencampus2015/img/medama2.png
new file mode 100644
index 0000000..ae80d44
--- /dev/null
+++ b/opencampus2015/img/medama2.png
Binary files differ
diff --git a/opencampus2015/img/medama3.png b/opencampus2015/img/medama3.png
new file mode 100644
index 0000000..ba8fde2
--- /dev/null
+++ b/opencampus2015/img/medama3.png
Binary files differ
diff --git a/opencampus2015/img/medama4.png b/opencampus2015/img/medama4.png
new file mode 100644
index 0000000..fb3b48c
--- /dev/null
+++ b/opencampus2015/img/medama4.png
Binary files differ
diff --git a/opencampus2015/img/medama5.png b/opencampus2015/img/medama5.png
new file mode 100644
index 0000000..488740e
--- /dev/null
+++ b/opencampus2015/img/medama5.png
Binary files differ
diff --git a/opencampus2015/img/momen1.png b/opencampus2015/img/momen1.png
new file mode 100644
index 0000000..714abdb
--- /dev/null
+++ b/opencampus2015/img/momen1.png
Binary files differ
diff --git a/opencampus2015/img/momen2.png b/opencampus2015/img/momen2.png
new file mode 100644
index 0000000..626d017
--- /dev/null
+++ b/opencampus2015/img/momen2.png
Binary files differ
diff --git a/opencampus2015/img/momen3.png b/opencampus2015/img/momen3.png
new file mode 100644
index 0000000..40902b4
--- /dev/null
+++ b/opencampus2015/img/momen3.png
Binary files differ
diff --git a/opencampus2015/img/momen4.png b/opencampus2015/img/momen4.png
new file mode 100644
index 0000000..6e3660f
--- /dev/null
+++ b/opencampus2015/img/momen4.png
Binary files differ
diff --git a/opencampus2015/img/momen5.png b/opencampus2015/img/momen5.png
new file mode 100644
index 0000000..13e9780
--- /dev/null
+++ b/opencampus2015/img/momen5.png
Binary files differ
diff --git a/opencampus2015/img/niku.png b/opencampus2015/img/niku.png
new file mode 100644
index 0000000..92a9d84
--- /dev/null
+++ b/opencampus2015/img/niku.png
Binary files differ
diff --git a/opencampus2015/img/ninnjinn.png b/opencampus2015/img/ninnjinn.png
new file mode 100644
index 0000000..d8779ad
--- /dev/null
+++ b/opencampus2015/img/ninnjinn.png
Binary files differ
diff --git a/opencampus2015/img/pan.png b/opencampus2015/img/pan.png
new file mode 100644
index 0000000..088c5d9
--- /dev/null
+++ b/opencampus2015/img/pan.png
Binary files differ
diff --git a/opencampus2015/img/qr/Q1.pdf b/opencampus2015/img/qr/Q1.pdf
new file mode 100644
index 0000000..b380b7f
--- /dev/null
+++ b/opencampus2015/img/qr/Q1.pdf
Binary files differ
diff --git a/opencampus2015/img/qr/Q2.pdf b/opencampus2015/img/qr/Q2.pdf
new file mode 100644
index 0000000..f137dc5
--- /dev/null
+++ b/opencampus2015/img/qr/Q2.pdf
Binary files differ
diff --git a/opencampus2015/img/qr/Q3.pdf b/opencampus2015/img/qr/Q3.pdf
new file mode 100644
index 0000000..2eb8acc
--- /dev/null
+++ b/opencampus2015/img/qr/Q3.pdf
Binary files differ
diff --git a/opencampus2015/img/qr/Q4.pdf b/opencampus2015/img/qr/Q4.pdf
new file mode 100644
index 0000000..f231810
--- /dev/null
+++ b/opencampus2015/img/qr/Q4.pdf
Binary files differ
diff --git a/opencampus2015/img/qr/Q5.pdf b/opencampus2015/img/qr/Q5.pdf
new file mode 100644
index 0000000..bb4ab33
--- /dev/null
+++ b/opencampus2015/img/qr/Q5.pdf
Binary files differ
diff --git a/opencampus2015/img/qr/Qlogin.pdf b/opencampus2015/img/qr/Qlogin.pdf
new file mode 100644
index 0000000..cc0b58b
--- /dev/null
+++ b/opencampus2015/img/qr/Qlogin.pdf
Binary files differ
diff --git a/opencampus2015/img/qr/qr1.png b/opencampus2015/img/qr/qr1.png
new file mode 100644
index 0000000..51d3d3c
--- /dev/null
+++ b/opencampus2015/img/qr/qr1.png
Binary files differ
diff --git a/opencampus2015/img/qr/qr2.png b/opencampus2015/img/qr/qr2.png
new file mode 100644
index 0000000..b3a5775
--- /dev/null
+++ b/opencampus2015/img/qr/qr2.png
Binary files differ
diff --git a/opencampus2015/img/qr/qr3.png b/opencampus2015/img/qr/qr3.png
new file mode 100644
index 0000000..c96ee80
--- /dev/null
+++ b/opencampus2015/img/qr/qr3.png
Binary files differ
diff --git a/opencampus2015/img/qr/qr4.png b/opencampus2015/img/qr/qr4.png
new file mode 100644
index 0000000..67231b2
--- /dev/null
+++ b/opencampus2015/img/qr/qr4.png
Binary files differ
diff --git a/opencampus2015/img/qr/qr5.png b/opencampus2015/img/qr/qr5.png
new file mode 100644
index 0000000..070f4b0
--- /dev/null
+++ b/opencampus2015/img/qr/qr5.png
Binary files differ
diff --git a/opencampus2015/img/qr/qrlogin.png b/opencampus2015/img/qr/qrlogin.png
new file mode 100644
index 0000000..0829af0
--- /dev/null
+++ b/opencampus2015/img/qr/qrlogin.png
Binary files differ
diff --git a/opencampus2015/img/room.png b/opencampus2015/img/room.png
new file mode 100644
index 0000000..00ad84b
--- /dev/null
+++ b/opencampus2015/img/room.png
Binary files differ
diff --git a/opencampus2015/img/ship.png b/opencampus2015/img/ship.png
new file mode 100644
index 0000000..8a5939c
--- /dev/null
+++ b/opencampus2015/img/ship.png
Binary files differ
diff --git a/opencampus2015/img/snail.png b/opencampus2015/img/snail.png
new file mode 100644
index 0000000..3588a1e
--- /dev/null
+++ b/opencampus2015/img/snail.png
Binary files differ
diff --git a/opencampus2015/img/snake1.png b/opencampus2015/img/snake1.png
new file mode 100644
index 0000000..1f3f1a6
--- /dev/null
+++ b/opencampus2015/img/snake1.png
Binary files differ
diff --git a/opencampus2015/img/snake2.png b/opencampus2015/img/snake2.png
new file mode 100644
index 0000000..ef24ec1
--- /dev/null
+++ b/opencampus2015/img/snake2.png
Binary files differ
diff --git a/opencampus2015/img/snake3.png b/opencampus2015/img/snake3.png
new file mode 100644
index 0000000..74d4bb7
--- /dev/null
+++ b/opencampus2015/img/snake3.png
Binary files differ
diff --git a/opencampus2015/img/snake4.png b/opencampus2015/img/snake4.png
new file mode 100644
index 0000000..fa5292a
--- /dev/null
+++ b/opencampus2015/img/snake4.png
Binary files differ
diff --git a/opencampus2015/img/snake5.png b/opencampus2015/img/snake5.png
new file mode 100644
index 0000000..b3616de
--- /dev/null
+++ b/opencampus2015/img/snake5.png
Binary files differ
diff --git a/opencampus2015/img/tako1.png b/opencampus2015/img/tako1.png
new file mode 100644
index 0000000..9d98e1a
--- /dev/null
+++ b/opencampus2015/img/tako1.png
Binary files differ
diff --git a/opencampus2015/img/tako2.png b/opencampus2015/img/tako2.png
new file mode 100644
index 0000000..d96566c
--- /dev/null
+++ b/opencampus2015/img/tako2.png
Binary files differ
diff --git a/opencampus2015/img/tako3.png b/opencampus2015/img/tako3.png
new file mode 100644
index 0000000..26f81f2
--- /dev/null
+++ b/opencampus2015/img/tako3.png
Binary files differ
diff --git a/opencampus2015/img/tako4.png b/opencampus2015/img/tako4.png
new file mode 100644
index 0000000..9c5acfc
--- /dev/null
+++ b/opencampus2015/img/tako4.png
Binary files differ
diff --git a/opencampus2015/img/tako5.png b/opencampus2015/img/tako5.png
new file mode 100644
index 0000000..f7c18ce
--- /dev/null
+++ b/opencampus2015/img/tako5.png
Binary files differ
diff --git a/opencampus2015/img/tamago.png b/opencampus2015/img/tamago.png
new file mode 100644
index 0000000..a31c151
--- /dev/null
+++ b/opencampus2015/img/tamago.png
Binary files differ
diff --git a/opencampus2015/img/tsuya.png b/opencampus2015/img/tsuya.png
new file mode 100644
index 0000000..3a629f6
--- /dev/null
+++ b/opencampus2015/img/tsuya.png
Binary files differ
diff --git a/opencampus2015/index.html b/opencampus2015/index.html
new file mode 100644
index 0000000..699fc75
--- /dev/null
+++ b/opencampus2015/index.html
@@ -0,0 +1,50 @@
+
+
+
+
+
+
+
+
+
+
+
+opencampus2015-7
+
+
+
+
+Miyazac Quest
~魔王駿を倒せ~
+ユーザ登録
+
+
+
+
diff --git a/opencampus2015/list.csv b/opencampus2015/list.csv
new file mode 100644
index 0000000..fee47a1
--- /dev/null
+++ b/opencampus2015/list.csv
@@ -0,0 +1,9 @@
+1,inazuma,30,20,50,90,120
+2,inu,25,16,30,50,70
+3,ito,10,6,12,18,24
+4,kamon,20,20,30,40,50
+5,kinoko,10,4,10,20,30
+6,medama,20,30,34,42,48
+7,momen,15,10,20,30,40
+8,snake,25,6,20,40,80
+9,tako,20,10,26,36,46
diff --git a/opencampus2015/list2.csv b/opencampus2015/list2.csv
new file mode 100644
index 0000000..64ea78a
--- /dev/null
+++ b/opencampus2015/list2.csv
@@ -0,0 +1,45 @@
+inazuma1
+inazuma2
+inazuma3
+inazuma4
+inazuma5
+inu1
+inu2
+inu3
+inu4
+inu5
+ito1
+ito2
+ito3
+ito4
+ito5
+kamon1
+kamon2
+kamon3
+kamon4
+kamon5
+kinoko1
+kinoko2
+kinoko3
+kinoko4
+kinoko5
+medama1
+medama2
+medama3
+medama4
+medama5
+momen1
+momen2
+momen3
+momen4
+momen5
+snake1
+snake2
+snake3
+snake4
+snake5
+tako1
+tako2
+tako3
+tako4
+tako5
diff --git a/opencampus2015/list3.csv b/opencampus2015/list3.csv
new file mode 100755
index 0000000..283d2db
--- /dev/null
+++ b/opencampus2015/list3.csv
@@ -0,0 +1,9 @@
+1,inazuma,30,10,25,45,60
+2,inu,25,8,15,25,35
+3,ito,10,3,6,9,12
+4,kamon,20,10,15,20,25
+5,kinoko,10,2,5,10,15
+6,medama,20,15,17,21,24
+7,momen,15,5,10,15,20
+8,snake,25,3,10,20,40
+9,tako,20,5,13,18,23
diff --git a/opencampus2015/prof.rb b/opencampus2015/prof.rb
new file mode 100755
index 0000000..3b90762
--- /dev/null
+++ b/opencampus2015/prof.rb
@@ -0,0 +1,380 @@
+#!/usr/bin/env ruby22
+# -*- coding: utf-8 -*-
+require 'cgi'
+require 'sqlite3'
+require 'kconv'
+c = CGI.new(:tag_maker => "html5", :accept_charest => "UTF-8")
+db = SQLite3::Database.new("./sql/main.sq3")
+
+id = c.cookies["id"][0]
+person = id.to_i
+
+data = "select * from test where id = ?"
+data2 = "select * from test where id = ?"
+#idが?(後で代入)のデータをtest票から探す。という命令をdataにしくむ。全てがほしい場合は「*」。「*」を「name」に変えると該当データのnameだけとりだす。
+cook = db.execute(data, person) #dataに仕組んでいた命令を、personを代入しつつ実行。
+cook2 = db.execute(data2, person)
+jikan1 = "select * from time where cd = ?"
+timeupd = "update time set now = ?, id = ? where cd = ?"
+
+que = "select * from toi where id = ?"
+queupd = "update toi set q1 = ?, q2 = ?, q3 = ?, q4 = ?, q5 = ? where id = ?"
+toi = db.execute(que, person)
+
+bomd = "update test set pt = ? where id = ?"
+ins4 = 'insert into time values(?, 61, "n")'
+printf("Content-type: text/html; charset=UTF-8\n\n")
+
+begin
+name = cook[0][1]
+cal = cook[0][2]
+age = cook[0][3]
+sex = cook[0][4]
+aria = cook[0][5]
+exp = cook[0][6]
+pt = cook[0][7]
+#lv = cook[0][8]
+rescue
+printf(<<_EOS_)
+
+
+
+
+
+
+
+Miyazac Quest
+
+
+
+
+
+記録が無くなったようだ...
記憶も消してやりなおしたまえ......
+
+
+skip@xxxx.co.jp
+
+
+
+
+_EOS_
+exit(0) ##プログラム終了! これがないと以降のプログラムが動いてしまう。
+end
+
+
+
+q1 = toi[0][1]
+q2 = toi[0][2]
+q3 = toi[0][3]
+q4 = toi[0][4]
+q5 = toi[0][5]
+
+per ="%"
+
+##################--ptを獲得するための乱数生成--#############
+##################----#############################
+
+def qrc()
+ srand(4567845678)
+ x = rand(10000000)
+ srand(x)
+ qrnumber = Hash.new("n")
+ qrarr = ["a", "b", "c", "d", "e"]
+ qrarr.length.times do |i|
+ qrnumber[rand(100000000)] = qrarr[i]
+ end
+ return qrnumber
+end
+
+##################ptを獲得した際の反応。####################
+#########前の人が書き込んだ時間と比べて60秒以内なら追加ポイント####
+kpt = 0
+
+
+begin
+ jikan2 = db.execute(jikan1, "j")
+ now1 = jikan2[0][1]
+rescue
+ ("a".."j").each{|x| db.execute(ins4,x)}
+end
+
+
+qrAC = qrc ###生成したハッシュには、"乱数"=>"記号"が入っている
+getAC = ARGV[0].to_i ###URL?以降の文字(特定の乱数)を取得してgetACに代入
+qr = qrAC[getAC] ###特定の"乱数"が一致すると、"乱数"=>"記号"がqrに正しく入力される。
+if qr =="a" && q1 == 0
+ q1 += 1
+ jikan2 = db.execute(jikan1, "a")
+ now1 = jikan2[0][1]
+ nowper = jikan2[0][2]
+ now2 = Time.now.to_i
+ db.execute(timeupd, now2, person, "a")
+ if person == nowper
+ elsif now1 == nil
+ elsif now2-now1 < 40
+ pt += 5
+ kpt += 5
+ end
+ pt += 7
+ kpt += 7
+elsif qr == "b" && q2 == 0
+ q2 += 1
+ jikan2 = db.execute(jikan1, "b")
+ now1 = jikan2[0][1]
+ nowper = jikan2[0][2]
+ now2 = Time.now.to_i
+ db.execute(timeupd, now2, person, "b")
+ if person == nowper
+ elsif now1 == nil
+ elsif now2-now1 < 20
+ pt += 2
+ kpt += 2
+ end
+ pt += 12
+ kpt += 12
+elsif qr == "c" && q3 == 0
+ q3 += 1
+ jikan2 = db.execute(jikan1, "c")
+ now1 = jikan2[0][1]
+ nowper = jikan2[0][2]
+ now2 = Time.now.to_i
+ db.execute(timeupd, now2, person, "c")
+ if person == nowper
+ elsif now1 == nil
+ elsif now2-now1 < 25
+ pt += 10
+ kpt += 10
+ end
+ pt += 3
+ kpt += 3
+elsif qr == "d" && q4 == 0
+ q4 += 1
+ jikan2 = db.execute(jikan1, "d")
+ now1 = jikan2[0][1]
+ nowper = jikan2[0][2]
+ now2 = Time.now.to_i
+ db.execute(timeupd, now2, person, "d")
+ if person == nowper
+ elsif now1 == nil
+ elsif now2-now1 < 60
+ pt += 2
+ kpt += 2
+ end
+ pt += 15
+ kpt += 15
+elsif qr == "e" && q5 == 0
+ q5 += 1
+ jikan2 = db.execute(jikan1, "e")
+ now1 = jikan2[0][1]
+ nowper = jikan2[0][2]
+ now2 = Time.now.to_i
+ db.execute(timeupd, now2, person, "e")
+ if person == nowper
+ elsif now1 == nil
+ elsif now2-now1 < 50
+ pt += 4
+ kpt += 4
+ end
+ pt += 10
+ kpt += 10
+end
+
+
+db.execute(bomd, pt, person)
+db.execute(queupd, q1, q2, q3, q4, q5, person)
+
+kkget = ""
+
+########################~ここまでpt処理~###################
+#######################################################
+
+##################################レベル処理する####
+lv = 1
+gage = 0
+e1 = db.execute("select e1 from box where id = ?",person)[0][0]#じぶんのidのboxにある一体目の経験値
+no1 = db.execute("select no1 from box where id = ?",person)[0][0]
+no2 = db.execute("select no2 from box where id = ?",person)[0][0].to_i#2体目id
+no3 = db.execute("select no3 from box where id = ?",person)[0][0].to_i#3体目id
+lv2 = db.execute("select lv2 from zukan where no = ?",no1)[0][0].to_i
+lv3 = db.execute("select lv3 from zukan where no = ?",no1)[0][0].to_i
+lv4 = db.execute("select lv4 from zukan where no = ?",no1)[0][0].to_i
+lv5 = db.execute("select lv5 from zukan where no = ?",no1)[0][0].to_i
+if e1 < lv2
+lv = 1
+gage = 100-(e1/lv2.to_f*100)
+elsif e1 >= lv5
+lv = 5
+gage = 0
+elsif e1 >= lv4
+lv = 4
+gage = 100-(e1-lv4)/(lv5-lv4.to_f)*100
+elsif e1 >= lv3
+lv = 3
+gage = 100-(e1-lv3)/(lv4-lv3.to_f)*100
+elsif e1 >= lv2
+lv = 2
+gage = 100-(e1-lv2)/(lv3-lv2.to_f)*100
+end#########################################
+
+
+image = "./img/#{cal}#{lv}.png"
+alt = "#{cal}.png"
+
+
+
+if lv == 1
+ color = "black"
+elsif lv == 2
+ color = "navy"
+elsif lv == 3
+ color = "green"
+elsif lv == 4
+ color = "red"
+elsif lv == 5
+ color = "yellow"
+else
+ color = "pink"
+ image = "./img/snail.png"
+ alt = "snails_bug"
+end
+#expが10あがる毎にlvが1あがる。
+#expの1の位*10で、次のレベルアップに必要な経験値の割合が出る。
+#(exp=12の場合、2*10=『20%』、次のレベルアップまであと80%が必要、と分かる。)
+#(exp=35の場合、5*10=『50%』、次のレベルアップまであと50%が必要、と分かる。)
+#exppoint = "select e1 from box where id = ?" #じぶんのidのboxにある一体目の経験値
+#expp = db.execute(exppoint,id)
+#exp = expp[0][0].to_i
+#gage = 0
+#gage2 = db.execute("select no1 from box where id = ?",id)
+#exp2 = exp
+#esa = "
"
+
+wcname ="select name from zukan where no = ?"
+cal1 = db.execute(wcname,no1)[0][0]
+begin
+cal2 = db.execute(wcname,no2.to_s)[0][0]
+rescue
+cal2 = db.execute(wcname,no2.to_s)[0]
+end
+begin
+cal3 = db.execute(wcname,no3.to_s)[0][0]
+rescue
+cal3 = db.execute(wcname,no3.to_s)[0]
+end
+chengeform = '