Mercurial > hgrepos > hgweb.cgi > after5
changeset 13:d2c36cb4206a draft
RCS-revision 1.14
date: 2004/04/10 17:07:31; author: yuuji; state: Exp; lines: +12 -8
logfile is located in s/ directory.
author | HIROSE Yuuji <yuuji@gentei.org> |
---|---|
date | Sat, 10 Apr 2004 17:07:31 +0859 |
parents | d7c978950000 |
children | 9aa45b698d56 |
files | after5.rb |
diffstat | 1 files changed, 12 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/after5.rb Thu Feb 26 16:30:06 2004 +0859 +++ b/after5.rb Sat Apr 10 17:07:31 2004 +0859 @@ -2,8 +2,8 @@ # # Associative Scheduling Table - after5 # (C)2003, 2004 by HIROSE Yuuji [yuuji@gentei.org] -# $Id: after5.rb,v 1.13 2004/02/26 16:30:06 yuuji Exp $ -# Last modified Fri Feb 27 01:29:12 2004 on firestorm +# $Id: after5.rb,v 1.14 2004/04/10 17:07:31 yuuji Exp $ +# Last modified Sun Apr 11 02:07:17 2004 on firestorm # See http://www.gentei.org/~yuuji/software/after5/ # このスクリプトはEUCで保存してください。 @@ -681,8 +681,9 @@ gomifiles << File.join(ud, date) next end - date = sprintf("%04d-%02d-%02d-%04d", - $1.to_i, $2.to_i, $3.to_i, $4.to_i) + #date = sprintf("%04d-%02d-%02d-%04d", + # $1.to_i, $2.to_i, $3.to_i, $4.to_i) + date.untaint f = File.join(ud, date) if test(?s, f) ntl[user][date] = {} @@ -927,7 +928,7 @@ @opt = { 'conf' => @mybase+".cf", 'css' => @mybase+".css", - 'logfile' => @mybase+".log", + 'logfile' => 's/'+@mybase+".log", "sendmail" => "/usr/sbin/sendmail", 'hostcmd' => '/usr/bin/host', 'nslookup' => '/usr/sbin/nsookup', @@ -1524,10 +1525,13 @@ hd = holiday.isHoliday(day.year, day.month, d, wd) tdclass['class'] = (hd ? 'holiday' : wname[wd]) @H.element("td", tdclass){ - if d>0 && d <= last - date = "%d/%d/%d"%[day.year, day.month, d] + if d>0 + thisday = first+(d-1)*3600*24 + #date = "%d/%d/%d"%[day.year, day.month, d] + date = "%d/%d/%d"%[thisday.year, thisday.month, thisday.day] @H.element("p", {'class'=>todayp ? 'todayline' : 'dayline'}){ - @H.a(@myname+"?-show+"+date, "%4d"%d) + ##@H.a(@myname+"?-show+"+date, "%4d"%d) + @H.a(@myname+"?-show+"+date, "%4d"%thisday.day) } + \ # isHoliday? if hd