Mercurial > hgrepos > hgweb.cgi > skipweb
changeset 3435:62c2055f42fd
set point by db
author | HIROSE Yuuji <yuuji@koeki-u.ac.jp> |
---|---|
date | Thu, 27 Jul 2017 18:49:22 +0900 |
parents | eac2e2279719 |
children | 95afc12da8e1 |
files | event/oasis2017/idol/home.rb |
diffstat | 1 files changed, 23 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/event/oasis2017/idol/home.rb Thu Jul 27 18:32:35 2017 +0900 +++ b/event/oasis2017/idol/home.rb Thu Jul 27 18:49:22 2017 +0900 @@ -132,6 +132,29 @@ end +qr = ARGV[0] + + +point = nil +if ARGV[0] == "508568506962120147" #1つ目 + point = "idol-1" +elsif ARGV[0] =="381770736200286426" #二つ目 + point = "idol-2" +elsif ARGV[0] =="942515613567750545" #三つ目 + point = "idol-3" +elsif ARGV[0] =="849054474888775292" #四つ目 + point = "idol-4" +elsif ARGV[0] =="61520500659400819" #五つ目 + point = "idol-5" +elsif ARGV[0] =="528856582528717535" #六つ目 + point = "idol-6" +end +if point + db.execute("REPLACE INTO point VALUES(?, ?)", id, point) +end +r = db.execute("SELECT count(*) FROM point WHERE id=?", id)[0] +pt = (r ? r[0].to_i : 0) + printf("<br>現在の獲得ポイント数:%s<br>",pt) if pt < 100