Mercurial > hgrepos > hgweb.cgi > skipweb
changeset 593:6df136790f98
Updated
author | MURAKAMI Masaki <c112124@h.koeki-u.ac.jp> |
---|---|
date | Fri, 25 Jul 2014 18:57:20 +0900 |
parents | e3a3c7155ac6 |
children | c629ae6feff1 |
files | minato2014/Bingo.rb minato2014/accountcheck.rb minato2014/howto.html |
diffstat | 3 files changed, 8 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/minato2014/Bingo.rb Fri Jul 25 18:42:05 2014 +0900 +++ b/minato2014/Bingo.rb Fri Jul 25 18:57:20 2014 +0900 @@ -18,16 +18,6 @@ print("Content-type: text/html; charset=UTF-8 \n\n") -### DROP TABLE ### - -getcom = ARGV[0].to_s -drop = 'DROP TABLE main ;' -if getcom == 'ududlrllba' - db.execute(drop) -end - -###### - ### DELETE TABLE ### del = 'DELETE FROM main WHERE id=?' @@ -144,8 +134,6 @@ # bingo[{[ビンゴまたはリーチに必要な番号] => [ビンゴまたはリーチのラインを形成する番号]}] ########## -bingo = # 現在のビンゴ数 - ### Checking Access Cord(AC) ### getAC = ARGV[0].to_i # URL?以降の引数を取得
--- a/minato2014/accountcheck.rb Fri Jul 25 18:42:05 2014 +0900 +++ b/minato2014/accountcheck.rb Fri Jul 25 18:57:20 2014 +0900 @@ -18,6 +18,8 @@ max = "select max(id) from main;" end +c_id = c.cookies["id"][0] +c_magic = c.cookies["magic"][0] name = c["name"] job = c["job"] age = c["age"] @@ -31,9 +33,12 @@ mg = code[id] +if c_id != nil && c_magic != nil +update = 'update main set name=?, job=?, age=?, sex=?, aria=? where id=? and magic=?' +else 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,kamo,n,n,n,n',0,0,mg); #初期値 - +end expires = "Sun, 27 Jul 2014 00:00:00 GMT" printf("Content-type: text/html; charset=UTF-8
--- a/minato2014/howto.html Fri Jul 25 18:42:05 2014 +0900 +++ b/minato2014/howto.html Fri Jul 25 18:57:20 2014 +0900 @@ -2,6 +2,7 @@ "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> +<meta http-equiv="refresh" content="0;http://skip.koeki-prj.org/minato2014/"> <title>sample how to play</title> <style type="text/css"> <!-- @@ -12,7 +13,7 @@ </head> <body> -<h1>߽ <br>under constuction </h1> +<h1>専用ページに移動中 … <br>移動しない場合は<a href="account.html">こちら</a>から移動して下さい。</h1> <p></p> </body>