#! /usr/local/bin/perl #はじあや@ふぁみーるのパソヲタさん、本当にありがとう #-------------------- $body = '
'; $bbstitle ="あやしいわーるどREQUIEM"; $logdir = './log/'; $cgiurl = 'getlog.cgi'; $action ='getlog'; $bbsurl = './bbs.cgi'; # 日本語コード変換ライブラリjocde.plのパス require './jcode.pl'; # キーワードの最大文字数(半角) $keylength = 64; # 時差 サーバの時計がずれてる時や日本時間以外にしたい時に使う $tim = 0; $\ = "\n"; #-------------------- #if ($ENV{'REQUEST_METHOD'} eq "POST") { read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); } #else { $buffer = $ENV{'QUERY_STRING'}; } $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)); @files=readdir(DIR); closedir(DIR); @files = sort by_number @files; $end = @files; $end--; print "Content-type: text/html\n\n"; print "