#! /usr/local/bin/perl $file = './new.data'; $cgi = './NEWto.cgi'; require '../web.conf'; $title2 = 'What new'; if ($ENV{'REQUEST_METHOD'} eq "POST") { read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); } else { $buffer = $ENV{'QUERY_STRING'}; } if ($buffer eq "") { &error('data','error'); } @pairs = split(/&/,$buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $value =~ s/\n//g; $value =~ s/\,//g; $value =~ s///g; $value =~ s/<([^>]|\n)*>//g; $FORM{$name} = $value; } if (!open(IN,"$file")) { &error('system','error'); } @BASE = ; close(IN); if ($FORM{'c3'} eq '') { @NEW1 = @BASE; } else { foreach $line (@BASE) { ($c0,$c1,$c2,$c3,$c4,$c5,$c6,$c7,$c8,$c9,$c10,) = split(/\,/,$line); if ("$c3" eq $FORM{'c3'}) { $line_date = $line; last; } } } print "Content-type: text/html\n\n"; { ($c0,$c1,$c2,$c3,$c4,$c5,$c6,$c7,$c8,$c9,$c10,) = split(/\,/, $line_date); $c6_data = $c6 ; $c6_data =~ s/<//g; $c7_data = $c7 ; $c7_data =~ s/<//g; print <新着情報

■$c0年$c1月$c2日  $c5

$c7_data

[ もどる ]
$page_foot HTML } exit; sub error { print "Content-type: text/html\n\n"; print "$title2\n"; print "$body\n"; print "
$page_head_com

ERROR

\n"; print "
$_[1]

\n"; print "

\n"; print "$page_bottom_com

\n"; exit; }