#! /usr/local/bin/perl #はじあや@ふぁみーるのパソヲタさん、本当にありがとう #-------------------- $body = '
'; $bbstitle ="あやしいわーるど"; #$logdir = 'http://www2u.biglobe.ne.jp/~rebirth/strange/log/'; $cgiurl = 'getlog.cgi'; $action ='getlog'; $bbsurl = './bbs.cgi'; $logurl = './log/990720.html'; # 日本語コード変換ライブラリjocde.plのパス require './jcode.pl'; # キーワードの最大文字数(半角) $keylength = 64; # 時差 サーバの時計がずれてる時や日本時間以外にしたい時に使う $tim = 0; # 時刻処理 ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time + $tim ); $month = ($mon + 1); $month= "0$month"; $filedate3 = "./log/$year$month$mday.html"; $m2day =$mday-1; $filedate2 = "./log/$year$month$m2day.html"; $m1day =$mday-2; $filedate1 = "./log/$year$month$m1day.html"; #-------------------- $buffer = $ENV{'QUERY_STRING'}; @argv = split(/&/,$buffer); foreach (@argv) { ($name, $value) = split(/=/); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; &jcode'convert(*value,'sjis'); $COMMAND{$name} = $value; } &error(2) if (length($COMMAND{'keyword'}) > $keylength); &viewlog if ($COMMAND{'action'} eq "$action"); &list; # リストの出力 ######################## sub list { #&error(0) if(!opendir(DIR, $logdir)); opendir(DIR, $logdir); @files=readdir(DIR); closedir(DIR); @files = sort by_number @files; $end = @files; $end--; print "Content-type: text/html\n\n"; print "