changeset 548:aa296a1d1eb5

merge
author SATO Tomohisa <c111080@g.koeki-u.ac.jp>
date Fri, 18 Jul 2014 17:39:54 +0900
parents 35a143ac0fb3 (current diff) 0ab1a0f141d7 (diff)
children f2cf9053e4f9
files
diffstat 61 files changed, 36 insertions(+), 20 deletions(-) [+]
line wrap: on
line diff
Binary file .png has changed
--- a/minato2014/.htaccess	Fri Jul 18 17:38:58 2014 +0900
+++ b/minato2014/.htaccess	Fri Jul 18 17:39:54 2014 +0900
@@ -1,3 +1,4 @@
 AddHandler cgi-script   .rb
 AddType	"text/html; charset=UTF-8" .rb
+AddType	"text/html; charset=UTF-8" .html
 Options +ExecCGI
--- a/minato2014/account.html	Fri Jul 18 17:38:58 2014 +0900
+++ b/minato2014/account.html	Fri Jul 18 17:39:54 2014 +0900
@@ -1,15 +1,14 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
 	"http://www.w3.org/TR/html4/strict.dtd">
-
 <html>
 <head>
-<title>デザイン用サンプル</title>
+<title>ゆるスタ登録ページ</title>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 <link rel="stylesheet" type="text/css" href="design.css">
 </head>
 
 <body>
-<h1>みなとスタンプラリー登録ページ</h1>
+<h1>ゆるスタ登録ページ</h1>
 <p>入力してね</p>
 <form method="POST" action="./accountcheck.rb">
 <p>名前:<input name="name" type="text">(ニックネーム)</p>
@@ -25,7 +24,7 @@
 	 <option>50代
 	 <option>60代以上
 	</select></p>
-<p>出身地:<select name="home">
+<p>出身地:<select name="aria">
 	 <option>酒田市内
 	 <option>山形県内 
 	 <option>県外 
@@ -36,8 +35,9 @@
 	   <option value="yumi">弓使い
 	   <option value="thief">盗賊
 	</select></p>
-<p>(あなたの職業を上記のジョブで例えて選んでください)</p>
-<input type="submit" value="OK">
+<p>(好きな職業を選んでください)</p>
+<input type="submit" value="OK"><br>
+<img src="rain.png" width="" height="画像の高さ" alt="代替テキスト">
 </form>
 </body>
 </html>
--- a/minato2014/accountcheck.rb	Fri Jul 18 17:38:58 2014 +0900
+++ b/minato2014/accountcheck.rb	Fri Jul 18 17:39:54 2014 +0900
@@ -1,34 +1,48 @@
 #!/usr/bin/env ruby
 # -*- coding: utf-8 -*-
 
-#require 'sqlite3'
+require 'sqlite3'
 require 'cgi'
 
 c = CGI.new(:tag_maker => "html5", :accept_charest => "UTF-8")
-#db = SQLite3::Database.new("sql/stump.sq3")
+db = SQLite3::Database.new("sql/stump.sq3")
 
-print("Content-type: text/html; charset=UTF-8 \n\n")
+begin
+  result = db.execute("select * from main;")
+rescue
+  db.execute("create table main(id PRIMARY KEY,name,sex,age,aria,job,stamp_status,stamp_img,exp,rank,magic)");
+  db.execute("insert into main values('ID','名前','性別','年代','住所','職業','スタンプ状況','スタンプ画像','レベル','当選順位','本人確認用')");
+  result = db.execute("select * from main");
+end
 
 name = c["name"]
-job = c["job"]
-sex = c["sex"]
+job  = c["job"]
+age  = c["age"]
+sex  = c["sex"]
+aria = c["aria"]
+
+id = result.length
+printf("%04d",id)
 
-print'
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
+mg = 0
+
+sql = "insert into main values (?,?,?,?,?,?,?,?,?,?,?);"
+db.execute(sql,id,name,aria,sex,age,job,'000010000','n,n,n,n,kamo,n,n,n,n','0','0',mg); #初期値
+
+printf("Set-Cookie:id=%d; magic=%s\n",id,mg)
+print"Content-type: text/html; charset=UTF-8 \n\n"
+
+print'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
 	"http://www.w3.org/TR/html4/strict.dtd">
-
 <html>
 <head>
 <title>Registering Account</title>
 <link rel="stylesheet" type="text/css" href="design.css">
-</head>
-'
+</head>'
 printf'
 <p>登録が完了しました。下記リンクからスタンプラリーカードを入手して下さい!</p>
-<p><a href="hoge.rb?%s+%s+%s"> >> Let\'s go to Stamp Rally << </a></p>
-',name,job,sex
-print'
+<p><a href="hoge.rb"> >> Let\'s go to Stamp Rally << </a></p>
 <p></p>
 <p><a href="account.html"> >> アカウント登録画面に戻る << </a></p>
+</body></html>
 '
-print'</body></html>'
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/minato2014/design.css	Fri Jul 18 17:39:54 2014 +0900
@@ -0,0 +1,1 @@
+body{background-color:  #E0FFFF;}
Binary file minato2014/png/madousiB1.png has changed
Binary file minato2014/png/madousiB2.png has changed
Binary file minato2014/png/madousiB3.png has changed
Binary file minato2014/png/madousiB4.png has changed
Binary file minato2014/png/madousiB5.png has changed
Binary file minato2014/png/madousiB6.png has changed
Binary file minato2014/png/madousiB7.png has changed
Binary file minato2014/png/madousiG1.png has changed
Binary file minato2014/png/madousiG2.png has changed
Binary file minato2014/png/madousiG3.png has changed
Binary file minato2014/png/madousiG4.png has changed
Binary file minato2014/png/madousiG5.png has changed
Binary file minato2014/png/madousiG6.png has changed
Binary file minato2014/png/madousiG7.png has changed
Binary file minato2014/png/sensiB1.png has changed
Binary file minato2014/png/sensiB2.png has changed
Binary file minato2014/png/sensiB3.png has changed
Binary file minato2014/png/sensiB4.png has changed
Binary file minato2014/png/sensiB5.png has changed
Binary file minato2014/png/sensiB6.png has changed
Binary file minato2014/png/sensiB7.png has changed
Binary file minato2014/png/sensiG1.png has changed
Binary file minato2014/png/sensiG2.png has changed
Binary file minato2014/png/sensiG3.png has changed
Binary file minato2014/png/sensiG4.png has changed
Binary file minato2014/png/sensiG5.png has changed
Binary file minato2014/png/sensiG6.png has changed
Binary file minato2014/png/sensiG7.png has changed
Binary file minato2014/png/thiefB1.png has changed
Binary file minato2014/png/thiefB2.png has changed
Binary file minato2014/png/thiefB3.png has changed
Binary file minato2014/png/thiefB4.png has changed
Binary file minato2014/png/thiefB5.png has changed
Binary file minato2014/png/thiefB7.png has changed
Binary file minato2014/png/thiefG1.png has changed
Binary file minato2014/png/thiefG2.png has changed
Binary file minato2014/png/thiefG3.png has changed
Binary file minato2014/png/thiefG4.png has changed
Binary file minato2014/png/thiefG5.png has changed
Binary file minato2014/png/thiefG6.png has changed
Binary file minato2014/png/thiefG7.png has changed
Binary file minato2014/png/yumiB1.png has changed
Binary file minato2014/png/yumiB2.png has changed
Binary file minato2014/png/yumiB3.png has changed
Binary file minato2014/png/yumiB4.png has changed
Binary file minato2014/png/yumiB5.png has changed
Binary file minato2014/png/yumiB6.png has changed
Binary file minato2014/png/yumiB7.png has changed
Binary file minato2014/png/yumiG1.png has changed
Binary file minato2014/png/yumiG2.png has changed
Binary file minato2014/png/yumiG3.png has changed
Binary file minato2014/png/yumiG4.png has changed
Binary file minato2014/png/yumiG5.png has changed
Binary file minato2014/png/yumiG6.png has changed
Binary file minato2014/png/yumiG7.png has changed
Binary file minato2014/rain.png has changed

yatex.org