Mercurial > hgrepos > hgweb.cgi > skipweb
changeset 729:6d97d07ad653
prof.rb cookies
author | ARAKI Tsuyohito <c113007@e.koeki-u.ac.jp> |
---|---|
date | Tue, 07 Jul 2015 23:39:22 +0900 |
parents | ce015613b2f6 |
children | 94f43751d539 |
files | oasis2015/accountcheck.rb |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/oasis2015/accountcheck.rb Tue Jul 07 23:24:58 2015 +0900 +++ b/oasis2015/accountcheck.rb Tue Jul 07 23:39:22 2015 +0900 @@ -19,6 +19,9 @@ db.execute(cle3) db.execute(cle4) +id = c.cookies["id"][0] +person = id.to_i + name = c["name"] cal = c["cal"] age = c["age"] @@ -46,7 +49,7 @@ Set-Cookie:id=%s ;expires=%s Set-Cookie:pass=%s ;expires=%s\n\n", id, expires, id2, expires) -printf(<<_EOS_, name, id.to_i) +printf(<<_EOS_, person, name, id.to_i) <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> @@ -54,7 +57,7 @@ <link rel="stylesheet" type="text/css" href="profeel.css"> </head> <body> -<h1>さかたっち</h1> +<h1>さかたっち%d</h1> <h2>登録が完了しました!</h2> <p>ようこそ_ %s _さん!</p> <p>あなたのIDは%04dです。抽選はこのIDを元に行われます。</p>