Mercurial > hgrepos > hgweb.cgi > skipweb
changeset 622:06e0d0099ff0
Updated logs
author | MURAKAMI Masaki <c112124@h.koeki-u.ac.jp> |
---|---|
date | Sun, 03 Aug 2014 09:42:16 +0900 |
parents | dfeaaa54f80a |
children | e01943123b0c |
files | 2014OC/admin/monitor.rb 2014OC/admin/operation.rb |
diffstat | 2 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/2014OC/admin/monitor.rb Sun Aug 03 09:15:54 2014 +0900 +++ b/2014OC/admin/monitor.rb Sun Aug 03 09:42:16 2014 +0900 @@ -62,7 +62,10 @@ else print'<marquee direction=up hspace=50 scrolldelay=1 loop=1 scrollamount=1000 behavior="slide" width=500 height=200><table style="margin=0;">' logs.each do |line| - printf("<tr><td width=50px>%s</td><td width=50px>%04d</td><td width=100px>%s</td><td width=100px>%s</td></tr>\n",line[0],line[1].to_i-1,line[2],line[3]) + hour = line[3].to_i/3600 + min = line[3].to_i%3600/60 + 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>" end
--- a/2014OC/admin/operation.rb Sun Aug 03 09:15:54 2014 +0900 +++ b/2014OC/admin/operation.rb Sun Aug 03 09:42:16 2014 +0900 @@ -16,7 +16,7 @@ if check == "OK" begin db.execute("drop table main;") - db.extcute("drop table logs;") + db.execute("drop table logs;") text = "<p>データを削除しました。</p>" rescue text = "<p>データがありません。</p>"