changeset 628:a36ac5c316e2

Updated
author MURAKAMI Masaki <c112124@h.koeki-u.ac.jp>
date Tue, 09 Sep 2014 14:48:27 +0900
parents 717444a6d915
children 5766860b72bb
files 2014OC/accountcheck.rb 2014OC/admin/drawLots.rb 2014OC/admin/monitor.rb
diffstat 3 files changed, 21 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/2014OC/accountcheck.rb	Tue Aug 26 16:48:43 2014 +0900
+++ b/2014OC/accountcheck.rb	Tue Sep 09 14:48:27 2014 +0900
@@ -45,7 +45,7 @@
 db.execute(sql,name,sex,age,aria,job,'000010000','n,n,n,n,kamo1,n,n,n,n',0,0,mg); #初期値
 end
 
-expires = "SUN, 17 Aug 2014 24:00:00 GMT"
+expires = "SAT, 14 Sep 2014 00:00:00 GMT"
 
 printf("Content-type: text/html; charset=UTF-8
 Set-Cookie:id=%s ;expires=%s
--- a/2014OC/admin/drawLots.rb	Tue Aug 26 16:48:43 2014 +0900
+++ b/2014OC/admin/drawLots.rb	Tue Sep 09 14:48:27 2014 +0900
@@ -20,7 +20,7 @@
 
 t = Time.now
 expires = Time.local(2014, 8, 17, 8, 50)
-expires2 = Time.local(2014, 8, 17, 9, 00)
+expires2 = Time.local(2014, 9, 14, 0, 00)
 if t > expires && t < expires2
 else
   check = ""
--- a/2014OC/admin/monitor.rb	Tue Aug 26 16:48:43 2014 +0900
+++ b/2014OC/admin/monitor.rb	Tue Sep 09 14:48:27 2014 +0900
@@ -11,14 +11,14 @@
 add = ENV["REMOTE_ADDR"]
 
 if /^(172\.19\.5\.|172\.17\.54\.|172\.21\.90\.)|118.21.142.107|202.214.125.107/ =~ add
-#rank = c["rank"]
+rank = c["rank"]
 flag = 0
 text = "<p>登録者一覧を表示します</p>\n"
 begin
-#  if rank == "y"
-#    rank_reset = 'UPDATE main SET rank=0 WHERE NOT id=1;'
-#    db.execute(rank_reset)
-#  end
+  if rank == "y"
+    rank_reset = 'UPDATE main SET rank=0 WHERE NOT id=1;'
+    db.execute(rank_reset)
+  end
   result = db.execute("select * from main;")
   log = 'select * from logs;'
   logs = db.execute(log)
@@ -48,13 +48,13 @@
     printf("<tr><td>%04d</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td></tr>\n",line[0].to_i-1,line[1],line[2],line[3],line[4],line[8],line[9])
   end
   print'</table>'
-#  print'<p><form method="POST" action="./etsuran.rb">
-#rankをリセットしますか?<br>
-#NO <input name="rank" type="radio" value="n" checked="checked"> / 
-#YES <input name="rank" type="radio" value="y"><br>
-#<input type="submit" value="submit">
-#</form></p>
-#'
+  print'<p><form method="POST" action="./etsuran.rb">
+rankをリセットしますか?<br>
+NO <input name="rank" type="radio" value="n" checked="checked"> / 
+YES <input name="rank" type="radio" value="y"><br>
+<input type="submit" value="submit">
+</form></p>
+'
 end
 
 print'<h1>ログの閲覧</h1>'
@@ -67,7 +67,13 @@
     sec = line[3].to_i%3600%60
     printf("<tr><td width=50px>%s</td><td width=50px>%04d</td><td width=100px>%s</td><td width=100px>%d:%d:%d</td></tr>\n",line[0],line[1].to_i-1,line[2],hour,min,sec)
   end
- print"</table></marquee>"
+  print"</table></marquee>"
+  print'<h1>その他の操作</h1>
+<table border="1">
+<tr><th>データ削除</th><td><a href="operation.html">DELETE</a></td></tr>
+<tr><th>抽選</th><td><a href="drawLots.html">DRAW</a></td></tr>
+</table>
+'
 end
 else
   printf("Content-type: text/html; charset=UTF-8\n\n")

yatex.org