207 lines
6.4 KiB
Plaintext
207 lines
6.4 KiB
Plaintext
|
#! /usr/local/bin/perl
|
|||
|
#
|
|||
|
#<23>䂢<EFBFBD>ۂ<EFBFBD><DB82><EFBFBD>1.1(list.cgi)
|
|||
|
#
|
|||
|
|
|||
|
require './jcodeLE.pl';
|
|||
|
&init;&decode;
|
|||
|
if ($make ne 'on'){
|
|||
|
$page = 0 if ($page eq '');
|
|||
|
$page2 = $page*$lmax;
|
|||
|
|
|||
|
&html; exit;
|
|||
|
}else{
|
|||
|
&make
|
|||
|
; exit;
|
|||
|
}
|
|||
|
##################################################
|
|||
|
sub init{
|
|||
|
($sec,$min,$hour,$mday,$month,$year,$wday,$yday,$isdst) = localtime(time);
|
|||
|
$min = "0$min" if ($min < 10); $month++;
|
|||
|
$youbi = ('<27><>','<27><>','<27><>','<27><>','<27><>','<27><>','<27>y') [$wday];
|
|||
|
$date = "$month<74><68>$mday<61><79><EFBFBD>i$youbi<62>j$hour<75><72>$min<69><6E>$sec<65>b";
|
|||
|
$today = "$month/$mday";
|
|||
|
$chat_file = './den/log.000.dat';
|
|||
|
$roommax = 300;#<23>ݒu<DD92>ł<EFBFBD><C582><EFBFBD><EFBFBD>ő<EFBFBD><C591>̎<EFBFBD><CC8E><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
$cgidir = 'http://www.plumfield.ne.jp/~neu/reflex/yuipost/';#post<73>Ƃ<EFBFBD><C682><EFBFBD><EFBFBD>f<EFBFBD>B<EFBFBD><42><EFBFBD>N<EFBFBD>g<EFBFBD><67><EFBFBD><EFBFBD><EFBFBD><EFBFBD>CGI<47><49><EFBFBD>u<EFBFBD><75><EFBFBD>ꍇ
|
|||
|
if ($ENV{'REQUEST_METHOD'} eq "POST") { read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); }
|
|||
|
else { $buffer = $ENV{'QUERY_STRING'}; }
|
|||
|
}#init END
|
|||
|
##################################################
|
|||
|
sub html {
|
|||
|
print "Content-type: text/html\n\n";
|
|||
|
print <<"_HTML_";
|
|||
|
<HTML><HEAD><TITLE><3E><><EFBFBD>₵<EFBFBD><E282B5><EFBFBD><EFBFBD><EFBFBD>[<5B><><EFBFBD><EFBFBD>REFLEX <20>V<EFBFBD>K<EFBFBD>f<EFBFBD><66><EFBFBD>쐬</TITLE></HEAD>
|
|||
|
<BODY bgcolor="#004040" text="#ffffff" link="#eeffee" vlink="#dddddd" alink="#ff0000">
|
|||
|
|
|||
|
_HTML_
|
|||
|
|
|||
|
|
|||
|
|
|||
|
print <<"_HTML_";
|
|||
|
</ul>
|
|||
|
<FONT size=+1><B><A NAME="make"><3E><><EFBFBD>₵<EFBFBD><E282B5><EFBFBD><EFBFBD><EFBFBD>[<5B><><EFBFBD><EFBFBD>REFLEX <20>V<EFBFBD>K<EFBFBD>f<EFBFBD><66><EFBFBD>쐬</A></B></FONT><3E>@<font size=-1><b><a href=\"bbs.cgi\"><3E><><EFBFBD>X<EFBFBD>g<EFBFBD>ꗗ</a></font></b><3E>@<font size=-1><b><a href=\"bbs.cgi\?area\=read\"><3E>ŐV<C590><56><EFBFBD>e<EFBFBD>ꗗ</a></b></font><BR><p>
|
|||
|
<FORM method="GET" ACTION="./list.cgi"><INPUT TYPE=hidden NAME="make" value="on">
|
|||
|
<EFBFBD>^<5E>C<EFBFBD>g<EFBFBD><67><EFBFBD>@ <INPUT TYPE=text NAME="title" SIZE="30"><BR>
|
|||
|
ID<EFBFBD>@<40>@<40>@<40>@ <INPUT TYPE=text NAME="id" SIZE="7">(<28><><EFBFBD>p<EFBFBD>p<EFBFBD><70><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>K<EFBFBD><4B><EFBFBD>L<EFBFBD><4C>)<BR>
|
|||
|
<EFBFBD>p<EFBFBD>X<EFBFBD><EFBFBD><EFBFBD>[<5B>h <INPUT TYPE=text NAME="pass" SIZE="7">(<28><><EFBFBD>p<EFBFBD>p<EFBFBD><70><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>K<EFBFBD><4B><EFBFBD>L<EFBFBD><4C>)<p>
|
|||
|
<EFBFBD>w<EFBFBD>i<EFBFBD>F<EFBFBD>@<40>@ <20>@<INPUT TYPE=text NAME="bgcolor" SIZE="7" VALUE="004040"><BR>
|
|||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>F <20>@<40>@<40>@<INPUT TYPE=text NAME="mgcolor" SIZE="7" VALUE="ffffff"><BR>
|
|||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>N<EFBFBD>F <20>@<40>@<INPUT TYPE=text NAME="lkcolor" SIZE="7" VALUE="eeffee">
|
|||
|
<br>
|
|||
|
<EFBFBD><EFBFBD><EFBFBD>ǃ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>N<EFBFBD>F <input type=text name="vlinkcolor" size=7 value="dddddd"><br>
|
|||
|
<EFBFBD>薼<EFBFBD>F <20>@<40>@<40>@<input type=text name="sbcolor" size=7 value="ffffee"><br>
|
|||
|
<EFBFBD>w<EFBFBD>i<EFBFBD>摜 <20>@<40>@<input type=text name="backimage" size=30 value="http://">
|
|||
|
<p>
|
|||
|
<INPUT type=submit value="<22>V<EFBFBD>K<EFBFBD>쐬<EFBFBD>^<5E>ݒ<EFBFBD><DD92>ύX"></FORM><hr><font size=-1>
|
|||
|
<EFBFBD>ݒ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ύX<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƃ<EFBFBD><EFBFBD>ɂ́AID<EFBFBD>ƃp<EFBFBD>X<EFBFBD><EFBFBD><EFBFBD>[<5B>h<EFBFBD>͑O<CD91>Ɠ<EFBFBD><C693><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̂<EFBFBD><CC82>g<EFBFBD>p<EFBFBD><70><EFBFBD>Ă<EFBFBD><C482><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>B<br>
|
|||
|
</font><hr>
|
|||
|
|
|||
|
<H5 align=right><A HREF="http://www.cup.com/yui/index.html"><3E>䂢<EFBFBD>ۂ<EFBFBD><DB82><EFBFBD>(Free)</A></H5></BODY></HTML>
|
|||
|
_HTML_
|
|||
|
}#html END
|
|||
|
##################################################
|
|||
|
sub listing{
|
|||
|
|
|||
|
}#listing END
|
|||
|
|
|||
|
##################################################
|
|||
|
sub decode {
|
|||
|
@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;
|
|||
|
&jcode'convert(*value,'sjis');
|
|||
|
$value =~ s/\n//g;$value =~ s/\r//g;$value =~ s/:#//g;
|
|||
|
$value =~ s/<//g;$value =~ s/>//g;
|
|||
|
$value =~ s/>//g;$value =~ s/\x00-\x1f//g;
|
|||
|
$value =~ s/$//g;$value =~ s/%//g;$value =~ s/|//g;
|
|||
|
$FORM{$name} = $value;
|
|||
|
}
|
|||
|
|
|||
|
$id=$FORM{'id'};
|
|||
|
$pass = $FORM{'pass'};
|
|||
|
$title = $FORM{'title'};
|
|||
|
$page = $FORM{'page'};
|
|||
|
$make = $FORM{'make'};
|
|||
|
$amode = $FORM{'amode'};
|
|||
|
$bmode = $FORM{'bmode'};
|
|||
|
$bgcolor = $FORM{'bgcolor'};
|
|||
|
$mgcolor = $FORM{'mgcolor'};
|
|||
|
$lkcolor = $FORM{'lkcolor'};
|
|||
|
$vlkcolor = $FORM{'lkcolor'};
|
|||
|
$subcolor = $FORM{'sbcolor'};
|
|||
|
$bimage = $FORM{'backimage'};
|
|||
|
|
|||
|
|
|||
|
|
|||
|
if($FORM{'chg'}){
|
|||
|
$hotlist = $FORM{'h'}; $rev = $FORM{'r'}; $lmax = $FORM{'lm'};
|
|||
|
}else{ &getcookie;}
|
|||
|
$option = $FORM{'op'};
|
|||
|
$lmax = '2' if($lmax eq '');
|
|||
|
$rev = 'on' if($rev eq '');$hotlist = '0' if($hotlist eq '');
|
|||
|
&setcookie;
|
|||
|
}#decode END
|
|||
|
##################################################
|
|||
|
sub make {#<23>V<EFBFBD>K<EFBFBD>b<EFBFBD>胋<EFBFBD>[<5B><><EFBFBD><EFBFBD><EFBFBD>ݒu
|
|||
|
#<23>^<5E>C<EFBFBD>g<EFBFBD><67><EFBFBD>`<60>F<EFBFBD>b<EFBFBD>N<EFBFBD>B
|
|||
|
#&err(3) if(length($title) < 3);
|
|||
|
#&err(4) unless(($ENV{'HTTP_REFERER'} eq '') || ($ENV{'HTTP_REFERER'}=~/$cgidir\/list.cgi/) );
|
|||
|
|
|||
|
$chat_file="./pref/bbb.dat";
|
|||
|
$chat_file =~ s/bbb/$id/g;
|
|||
|
|
|||
|
$data_file="./data/bbb.dat";
|
|||
|
$data_file =~ s/bbb/$id/g;
|
|||
|
|
|||
|
|
|||
|
open(DB, $chat_file);
|
|||
|
@lines = <DB>;
|
|||
|
close(DB);
|
|||
|
$set=shift(@lines);
|
|||
|
($idd,$passd,$dum) = split(/:#/,$set);
|
|||
|
if(($idd eq $id)&&($passd ne $pass)){&err(1);}
|
|||
|
|
|||
|
|
|||
|
$value = "$id:#$pass:#$title:#$amode:#$bmode:#$bgcolor:#$mgcolor:#$lkcolor:#$vlkcolor:#$subcolor:#$bimage:#\n";
|
|||
|
|
|||
|
|
|||
|
open(DB,">$chat_file");
|
|||
|
print DB $value; print DB @lines;
|
|||
|
close(DB);
|
|||
|
|
|||
|
|
|||
|
|
|||
|
if (!open(DB,"$data_file"))
|
|||
|
|
|||
|
{
|
|||
|
open(OUT,">$data_file");
|
|||
|
print OUT $none;
|
|||
|
close(OUT);
|
|||
|
}
|
|||
|
|
|||
|
close(DB);
|
|||
|
|
|||
|
|
|||
|
chmod 0600, "./pref/$id.dat";#0666<36>łȂ<C582><C882>ƃ_<C683><5F><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>B
|
|||
|
chmod 0666, "./data/$id.dat";#0666<36>łȂ<C582><C882>ƃ_<C683><5F><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>B
|
|||
|
|
|||
|
$buffer=~s/&title=/&name2=/;
|
|||
|
&locate;
|
|||
|
}#make END
|
|||
|
#################################################
|
|||
|
sub locate{ #<23>ړ<EFBFBD><DA93><EFBFBD><EFBFBD>܂<EFBFBD><DC82>B
|
|||
|
|
|||
|
print "Content-type: text/html\n\n";
|
|||
|
print <<"_HTML_";
|
|||
|
<HTML><HEAD><TITLE>$title</TITLE>
|
|||
|
</HEAD><BODY bgcolor="#004040" text="#ffffff" link="#eeffee" vlink="#dddddd" alink="#ff0000">
|
|||
|
<H1>
|
|||
|
<EFBFBD>쐬<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>B</H1>
|
|||
|
<HR><BR>
|
|||
|
<a href="bbs.cgi?area=$id">
|
|||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ɉړ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>܂<EFBFBD><EFBFBD>B</a><BR><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>e<EFBFBD><65><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƃ<EFBFBD><C683>X<EFBFBD>g<EFBFBD>ɒlj<C992><C789><EFBFBD><EFBFBD><EFBFBD><EFBFBD>܂<EFBFBD><DC82>B<BR>
|
|||
|
<BR><BR><BR><BR><BR>
|
|||
|
<H5 ALIGN=right><A HREF="http://www.cup.com/yui/index.html"><3E>䂢<EFBFBD>ۂ<EFBFBD><DB82><EFBFBD>(Free)</A></H5></BODY></HTML>
|
|||
|
_HTML_
|
|||
|
exit;
|
|||
|
}#make END
|
|||
|
|
|||
|
#################################################
|
|||
|
|
|||
|
|
|||
|
sub getcookie{ #<23><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>[<5B><EFBFBD><F092B882>܂<EFBFBD><DC82>B
|
|||
|
$cooks = $ENV{'HTTP_COOKIE'};
|
|||
|
$cooks = '' unless($cooks =~s/.*yuipost=(.*)yuipostend.*/$1/) ;
|
|||
|
($hotlist,$rev,$lmax) = split(/\t/, $cooks);
|
|||
|
}#getcookie END
|
|||
|
|
|||
|
sub setcookie{ #<23><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>[<5B><><EFBFBD>u<EFBFBD><75><EFBFBD>E<EFBFBD>U<EFBFBD>Ƀv<C983><76><EFBFBD>[<5B><><EFBFBD>g<EFBFBD><67><EFBFBD>܂<EFBFBD><DC82>B
|
|||
|
$data = "$hotlist\t$rev\t$lmax\tyuipostend";
|
|||
|
print "Set-Cookie: yuipost=$data; expires=Wednesday, 09-Nov-1999 00:00:00 GMT\n" unless ($ENV{'HTTP_COOKIE'}=~/$data/);
|
|||
|
}#<23><><EFBFBD>̃N<CC83>b<EFBFBD>L<EFBFBD>[<5B><>1999/11/9<>܂ŗL<C597><4C><EFBFBD>ł<EFBFBD><C582>B<EFBFBD><42><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>߂<EFBFBD><DF82><EFBFBD><EFBFBD><EFBFBD><EFBFBD>A<EFBFBD><41><EFBFBD>t<EFBFBD><74><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ɛ<EFBFBD><C690>ɂ<EFBFBD><C982>āB
|
|||
|
sub err{
|
|||
|
$error = $_[0];
|
|||
|
print "Content-type: text/html\n\n";
|
|||
|
print <<"_HTML_";
|
|||
|
<HTML><HEAD><TITLE>$title</TITLE>
|
|||
|
</HEAD><BODY BGCOLOR="#A1FE9F" TEXT="#000000" LINK="#ff0000" VLINK="#ff0000" ALINK="#FF0000">
|
|||
|
<H1>
|
|||
|
<EFBFBD>^<5E>C<EFBFBD>v $error <20>̃G<CC83><47><EFBFBD>[<5B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>܂<EFBFBD><DC82><EFBFBD><EFBFBD>B</H1>
|
|||
|
<HR><BR>
|
|||
|
<EFBFBD>G<EFBFBD><EFBFBD><EFBFBD>[<5B>^<5E>C<EFBFBD>v<EFBFBD>̐<EFBFBD><CC90><EFBFBD><BR><BR>
|
|||
|
<EFBFBD>^<5E>C<EFBFBD>v0<76>F<EFBFBD><46><EFBFBD>O<EFBFBD>t<EFBFBD>@<40>C<EFBFBD><43><EFBFBD><EFBFBD><EFBFBD>J<EFBFBD><4A><EFBFBD>܂<EFBFBD><DC82><EFBFBD><EFBFBD>B<BR>
|
|||
|
<EFBFBD>^<5E>C<EFBFBD>v1<76>F<EFBFBD><46><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݒ<EFBFBD><DD92>̏C<CC8F><43><EFBFBD><EFBFBD><EFBFBD>ɕK<C995>v<EFBFBD>ƂȂ<C682><C882>p<EFBFBD>X<EFBFBD><58><EFBFBD>[<5B>h<EFBFBD><68><EFBFBD>Ԉ<EFBFBD><D488><EFBFBD><EFBFBD>Ă<EFBFBD><C482>܂<EFBFBD><DC82>B<BR>
|
|||
|
<EFBFBD>^<5E>C<EFBFBD>v3<76>F<EFBFBD><46><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̃^<5E>C<EFBFBD>g<EFBFBD><67><EFBFBD><EFBFBD><EFBFBD>Z<EFBFBD><5A><EFBFBD>ł<EFBFBD><C582>B<BR>
|
|||
|
<EFBFBD>^<5E>C<EFBFBD>v4<76>F<EFBFBD>\<5C><><EFBFBD><EFBFBD><EFBFBD>ʃG<CA83><47><EFBFBD>[<5B>ł<EFBFBD><C582>B<BR>
|
|||
|
<EFBFBD>^<5E>C<EFBFBD>v5<76>F<EFBFBD>ݒu<DD92><75><EFBFBD><EFBFBD><EFBFBD>ő<EFBFBD><C591>ݒ<EFBFBD><DD92>l$roommax<61><78><EFBFBD>z<EFBFBD><7A><EFBFBD>邽<EFBFBD>߁A<DF81>V<EFBFBD>K<EFBFBD>ɐݒu<DD92><75><EFBFBD>ł<EFBFBD><C582>܂<EFBFBD><DC82><EFBFBD><EFBFBD>B<BR>
|
|||
|
<BR><BR><BR><BR><BR>
|
|||
|
<H5 ALIGN=right><A HREF="http://www.cup.com/yui/index.html"><3E>䂢<EFBFBD>ۂ<EFBFBD><DB82><EFBFBD>(Free)</A></H5></BODY></HTML>
|
|||
|
_HTML_
|
|||
|
exit;
|
|||
|
}
|
|||
|
__END__
|