##### YY-BOARD CMTユニット Ver0.10 by 一 五明 ################# if($ENV{"QUERY_STRING"}=~/point=([^\&]*)/){ $point=$1; # 表示開始日時(無いorNo.だと、3日前に) unless($point =~/^\d\d\d\d\/\d\d\/\d\d,\d\d:\d\d$/){ @a=(localtime(time-259200))[5,4,3,2,1]; # 3日=259200秒 $a[0]+=1900; $a[1]++; $point=sprintf("%4.4d/%2.2d/%2.2d,%2.2d:%2.2d",@a); } print "Content-type: text/plain\n\n", "#T:$title\n","#N:0\n#U:0\n#B:0\n", '#P:POST,$c,mode=msg&name=$N&email=$E&sub=$T&comment=$M&url=$H&pwd=$K&color=800000',"\n", '#F:POST,$C,mode=msg&resno=$Sr&name=$N&email=$E&sub=$T&comment=$M&url=$H&pwd=$K&color=800000',"\n"; %amp= (">",">", "<","<", "\"",""", "&","&"); %unamp=("gt",">", "lt","<", "quot","\"", "amp","&"); $/="\n"; open(BBS,$logfile); binmode(STDOUT); while(<BBS>){ ($num,$rn,$date,$name,$mail,$title,$_,$hp,$i,$k,$color,$icon)=split("<>",$_); if($date=~s/^(..)(..\/..\/..)\D+(..:..):..$/$2,$3/){ if("$1$date" ge $point){ # 指定日付以降なら if($rn){ $num="*"; }else{ $rn="*"; } $title="T:$title\n"."N:$name\n"; $title=~s/&(gt|lt|amp|quot);/$unamp{$1}/eg; $mail= "E:$mail\n" if $mail; $hp= "H:$hp\n" if $hp; $icon= "I:$icon\n" if $icon; $color="C:$color\n" if $color; s/<br>/\n/g; s/&(gt|lt|amp|quot);/$unamp{$1}/eg; s/\n\n\n\n+/\n\n\n/g; s/^\n+//; s/\n+$//; s/\n\.\n/\n \.\n/; s/^\.\n/ \.\n/; print "S:$num,$rn,$date,\n",$title, $hp,$mail,$icon,$color,"M:\n$_\n.\n"; } } } close(BBS); exit; } |