diff --git a/2014OC/.htaccess b/2014OC/.htaccess deleted file mode 100644 index 3a8c330..0000000 --- a/2014OC/.htaccess +++ /dev/null @@ -1,4 +0,0 @@ -AddHandler cgi-script .rb -AddType "text/html; charset=UTF-8" .rb -AddType "text/html; charset=UTF-8" .html -Options +ExecCGI diff --git a/2014OC/2015test/index.html b/2014OC/2015test/index.html deleted file mode 100644 index f97a2be..0000000 --- a/2014OC/2015test/index.html +++ /dev/null @@ -1,42 +0,0 @@ - - -
-入力してね
- - - diff --git a/2014OC/2015test/test.rb b/2014OC/2015test/test.rb deleted file mode 100755 index 6e482a6..0000000 --- a/2014OC/2015test/test.rb +++ /dev/null @@ -1,71 +0,0 @@ -#!/usr/bin/env ruby -# -*- coding: utf-8 -*- - -require 'cgi' -require 'sqlite3' -require './magic.rb' - -c = CGI.new(:accept_charset => "UTF-8") -db = SQLite3::Database.new("./sql/stamp.sq3") - -begin - result = db.execute("select * from main;") - max = "select max(id) from main;" -rescue - db.execute("create table main(id INTEGER PRIMARY KEY AUTOINCREMENT,name,sex,age,aria,cal,stamp_status,stamp_img,exp INTEGER,rank INTEGER,magic)"); - db.execute("insert into main(name,sex,age,aria,cal,stamp_status,stamp_img,exp,rank,magic) values('名前','性別','年代','住所','職業','スタンプ状況','スタンプ画像','レベル','当選順位','本人確認用')"); - result = db.execute("select * from main;") - max = "select max(id) from main;" -end - -id = c.cookies["id"][0] -c_magic = c.cookies["magic"][0] -name = c["name"] -cal = c["cal"] -age = c["age"] -sex = c["sex"] -aria = c["aria"] - -begin -sel = 'select * from main where id=? AND magic=?' -h = db.execute(sel, id.to_i, c_magic.to_i) -rescue -h == [] -end - -if id != nil && h != [] -update = 'update main set name=?, cal=?, age=?, sex=?, aria=? where id=? and magic=?' -mg = c_magic -db.execute(update, name, cal, age, sex, aria, id.to_i, mg.to_i) -else -code = magic() -id = db.execute(max).flatten(2)[0].to_i + 1 -mg = code[id] -sql = "insert into main(name,sex,age,aria,cal,stamp_status,stamp_img,exp,rank,magic) values (?,?,?,?,?,?,?,?,?,?);" -db.execute(sql,name,sex,age,aria,cal,'000010000','n,n,n,n,kamo1,n,n,n,n',0,0,mg); #初期値 -end - -expires = "SAT, 26 Oct 2015 00:00:00 GMT" - - -printf(<<_EOS_,id, expries, mg.to_s, exprires) -Content-type: text/html; charset=UTF-8 -Set-Cookie:id=%s ;expires=%s -Set-Cookie:magic=%s;expires=%s - - - -
-・#{name}
・#{cal}
・#{age}
・#{sex}
・#{aria}
・#{id}
-
-tukaretanaaaa、#{names} -
- - -_EOS_ diff --git a/2014OC/Bingo.css b/2014OC/Bingo.css deleted file mode 100644 index 171d05e..0000000 --- a/2014OC/Bingo.css +++ /dev/null @@ -1,76 +0,0 @@ -html,body { - width: 100%; - height: 100%; -} -div.outflam{ - width: 800px; - height: 1240px; - margin-left: auto; - margin-right: auto; - padding: 0 auto; - } - -div.top{ - background: #214e4d; - background-image: url("png/top.png"); - background-repeat: no-repeat; - border: thin solid #214e4d; - width: 100%; - height: 180px; - margin-top:0 auto; - margin-bottom:0 auto; - margin-left: auto; - margin-right: auto; - -} - -p,h3 { - margin:0; - padding-left: 5%; - font-weight: 900; - height: 5%; - width: 95%; - border: thin solid #214e4d; -} - -div.center{ - border: thin solid #214e4d; - background: #214e4d; - width: 100%; - height: 45%; - margin-left: auto; - margin-right: auto; -} - -table { - background: white; - margin-left: auto; - margin-right: auto; - margin-top: 1%; - margin-bottom: auto; -} - -div.bottom{ - background: #214e4d; - background-image: url("png/bottom.png"); - background-repeat: no-repeat; - background-position: center bottom; - border:thin solid #214e4d; - width: 100%; - height: 150px; - margin-left: auto; - margin-right: auto; -} - -div.bottom img { - float: left; - margin-left: 15%; -} - -div.charSTATUS { - clear: right; - margin-top: 7%; - background: rgba(255,255,255,0.75); - width: 70%; -} - diff --git a/2014OC/Bingo.rb b/2014OC/Bingo.rb deleted file mode 100755 index d593593..0000000 --- a/2014OC/Bingo.rb +++ /dev/null @@ -1,436 +0,0 @@ -#!/usr/bin/env ruby -# -*- coding: utf-8 -*- - -require 'sqlite3' -require 'cgi' -require 'date' -require './sub.rb' -require 'net/http' - -c = CGI.new(:tag_maker => "html5", :accept_charest => "UTF-8") -db = SQLite3::Database.new("sql/stamp.sq3") - -id = c.cookies["id"][0].to_i -magic = c.cookies["magic"][0].to_i -err = 0 # 不正な動きであれば負の値になる -sidesize = 3 -message = "はりきって行きましょう!ログインに失敗しました。
-
-アカウント登録ページへ接続中…
-* 3秒経っても移動しない場合はこちらから移動して下さい。
-
抽選は終了しましたが、引続きゆる☆スタをお楽しみ下さい!!
' -end - -# End of top -print' -%sおめでとうございます!☆ %d等 ☆が当選しました!!
", message, rank) -else - printf("%s
", message) -end - -## - -###### - -### CENTER ### -print' -%d | \n", stamp_img[3*i+n], stamp_st[3*i+n]) - else - print"\n" - end - end - print' |
入力してね
- - - diff --git a/2014OC/accountcheck.rb b/2014OC/accountcheck.rb deleted file mode 100755 index 12b0b82..0000000 --- a/2014OC/accountcheck.rb +++ /dev/null @@ -1,68 +0,0 @@ -#!/usr/bin/env ruby -# -*- coding: utf-8 -*- - -require 'sqlite3' -require 'cgi' -require './magic.rb' - -c = CGI.new(:tag_maker => "html5", :accept_charest => "UTF-8") -db = SQLite3::Database.new("sql/stamp.sq3") - -begin - result = db.execute("select * from main;") - max = "select max(id) from main;" -rescue - db.execute("create table main(id INTEGER PRIMARY KEY AUTOINCREMENT,name,sex,age,aria,job,stamp_status,stamp_img,exp INTEGER,rank INTEGER,magic)"); - db.execute("insert into main(name,sex,age,aria,job,stamp_status,stamp_img,exp,rank,magic) values('名前','性別','年代','住所','職業','スタンプ状況','スタンプ画像','レベル','当選順位','本人確認用')"); - result = db.execute("select * from main;") - max = "select max(id) from main;" -end - -id = c.cookies["id"][0] -c_magic = c.cookies["magic"][0] -name = c["name"] -job = c["job"] -age = c["age"] -sex = c["sex"] -aria = c["aria"] - -begin -sel = 'select * from main where id=? AND magic=?' -h = db.execute(sel, id.to_i, c_magic.to_i) -rescue -h == [] -end - -if id != nil && h != [] -update = 'update main set name=?, job=?, age=?, sex=?, aria=? where id=? and magic=?' -mg = c_magic -db.execute(update, name, job, age, sex, aria, id.to_i, mg.to_i) -else -code = magic() -id = db.execute(max).flatten(2)[0].to_i + 1 -mg = code[id] -sql = "insert into main(name,sex,age,aria,job,stamp_status,stamp_img,exp,rank,magic) values (?,?,?,?,?,?,?,?,?,?);" -db.execute(sql,name,sex,age,aria,job,'000010000','n,n,n,n,kamo1,n,n,n,n',0,0,mg); #初期値 -end - -expires = "SAT, 24 Oct 2015 00:00:00 GMT" - -printf("Content-type: text/html; charset=UTF-8 -Set-Cookie:id=%s ;expires=%s -Set-Cookie:magic=%s;expires=%s\n\n",id,expires,mg.to_s,expires) - -print' - - -登録が完了しました。
-あなたのIDは%04dです。抽選はこのIDを元に行われます
-下記リンクからスタンプラリーを開始して下さい!
- - - -