#! /usr/local/bin/perl require './jcode.pl'; require "./cgi-lib.pl"; #■■■■■■■■■■ お絵かき掲示板 ver.1.32 # (c)2000,poo site # Web page:http://www2.plala.or.jp/junji21/index.htm # パスワード設定(必ず変更して下さい。12文字以内の英数字) #=================== Oekaki BBS ver.1.32 # (c)2000,poo site # Web page:http://www2.plala.or.jp/junji21/index.htm # Enter your password below, maximum 12 characters $pass="12345"; # 戻り先のURL # Your default path for returning to your web page $homepage = "../index.html"; #■■■■■■■■■■ 配色等のカスタマイズ ■■■■■■■■■■ #=================== Cosmetic Attributes =================== # 壁紙を使用する場合(使用する場合にのみ、ファイル名を指定して下さい) # Background image to use $BACKGIF = "bg.jpg"; # 背景色(壁紙を使用しない場合) # Background color (if background image is not specified) $BGcolor="ffffff"; # 本文の表示色 # Text color $TXcolor="#000000"; # 日付の表示色 # Date color $DTcolor="#666666"; # 絵のナンバーの表示色 # Picture number color $NOcolor="#333333"; # コメント投稿画面の入力部の色 # Comment entry color $CM2color="#ccccff"; # コメント表示部の色 # Comment display area color $CMcolor="#ffffff"; # コメント表示部の枠の色 # Comment border color $BDcolor="#ffffff"; # コメント投稿者の名前の表示色 # Author's name color $NMcolor="#3333ff"; # タイトル(お絵かき掲示板)の表示色 # Title color (at the BBS) $TLcolor="#333333"; #■■■■■■■■■■ メッセージのカスタマイズ ■■■■■■■■■■ #=================== Message Customization =================== # タイトルに画像を使用する場合 # If you wish to use an image for the title, enter it below, along with the width and height $TITLEGIF = ""; $TGW = '150';# width of image (in pixel) $TGH = '50';# height of image (in pixel) # 新規画像投稿用リンクに画像を使用する場合 # Link image for submitting new doodle $NEWGIF = ""; $NGW = '150';# width of image (in pixel) $NGH = '50';# height of image (in pixel) # 新規コメント投稿用リンクに画像を使用する場合 # Link image for submitting comment $NEWCOM = ""; $NCW = '150';# width of image (in pixel) $NCH = '50';# height of image (in pixel) # タイトルメッセージ(画像を用いない場合) # Title Message (When Title Image is not used) $TITLE="Oekaki BBS"; # タイトル文字のフォントタイプ # Font type for title message $TITLEFACE = "MS Pゴシック"; # リターンメッセージ # Return link message $RETURN="Home"; # メッセージ1 # Administration page message $MESSAGE1="Admin"; # メッセージ2(画像を用いない場合) # Picture submission message (when image is not specified) $MESSAGE2="Doodle"; # メッセージ3 # Comment submission message (when image is not specified) $MESSAGE3="Comment for this doodle"; # メッセージ4 # Text for comment button $MESSAGE4="Add Comment"; # メッセージ5 # Text for sort by latest picture submission $MESSAGE5="Sort by date of doodle"; # メッセージ6 # Text for sort by comment date $MESSAGE6="Sort by date of comments"; # メッセージ7 # Text for comment submission button $MESSAGE7="Submit comment"; # メッセージ8 # Text for returning $MESSAGE8="Return to BBS"; # メッセージ9 # Text for adding comment $MESSAGE9="Comment"; # 文字の大きさ(2、3、4のどれかを指定。数が大きいほど、文字も大きい) # Font size (use sizes 2, 3, and 4, with 4 being the biggest $moji="2"; # コメント欄の横幅のブラウザの幅に対する割合 # Frame size for comment window $CWIDTH="80%"; # URLの自動リンク (0=no 1=yes) # Allow auto link of URL submitted $autolink = 1; # 家アイコンの使用 (0=no 1=yes) # Use an icon for the link for homepage (0=no 1=yes) $home_icon = 0; $home_gif = "";# 家アイコンのファイル名 $home_wid = 25;# 画像の横サイズ $home_hei = 22;# 〃 縦サイズ #■■■■■■■■■■ 一画面の表示枚数および画像の保持枚数 ■■■■■■■■■■ #=================== Number of Doodles to Show in Every page =================== #一画面の画像表示枚数 # Number of doodles to show in every page $gznumber=20; #画像の保持枚数(デフォルトは50枚) #この値を変更する場合は、必ず、getpic.cgiのソース中の対応する部分も変更して下さい。 # Number of pictures to keep in the server (default 50) # If you change this value, you must change the same value in the getpic.cgi file. $lgnumber=50; #■■■■■■■■■■ ホスト名の表示 ■■■■■■■■■■ #=================== Show Hostname =================== #コメントと同時にホストも表示する(0:off 1:on) # Show hostname $sw_host=0; #■■■■■■■■■■ コメントのみの投稿を許可するか ■■■■■■■■■■ #=================== Comment Posting Allowance =================== #コメントのみの投稿(0:許可しない 1:許可する) #Allow visitors to post comments $cm_sw=0; #■■■■■■■■■■ 表示順序 ■■■■■■■■■■ #=================== Sorting Order =================== #標準的な表示順序(0:最新イラスト順 1:最新レス順) #Default sort type (0 = Sort by pictures, 1 = Sort by latest comment) $def_sort=0; #■■■■■■■■■■ ロック機構 ■■■■■■■■■■ #=================== Locking Method =================== #ロック機構の方法(0:symlink関数(標準) 1:open関数 2:なし) #File lock mode (0 = use symlink, 1 = use regular file, 2 = Don't use filelock) $lock_mode=0; #■■■■■■■■■■ 各種パスの設定(通常は変更する必要はありません) ■■■■■■■■■■ #=================== Filepath setup (not required to change) =================== #お絵かきをする時に呼び出すファイルへのパス #relative link for location of oekaki BBS file $oefile="./oekaki.html"; #画像ファイルへのパス(内部パス) #Internal path for storing pictures $gzfile="./"; #画像ファイルへのパス(絶対パス) #URL path for stored pictures $gz2file="./"; #■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ #以下は、なるべく変更しないで下さい。レイアウトの変更などのために書き換える場合は、自己の責任において行なって下さい。 # Becareful about changing anything below this line. Alter at your own risk. $back_message="Hit the back button on your browser to return."; $moji1=$moji-1; $moji3=$moji+1; $moji5=$moji+3; $lock_file ="./lock/count.lock"; $script = "picture.cgi"; $method = 'POST'; if ($ENV{'REQUEST_METHOD'} eq "POST") { read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); } else { $buffer = $ENV{'QUERY_STRING'}; } @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//>/g; $value =~ s/\"/"/g; if ($name eq 'del') { push(@delete,$value); } if ($name eq 'del_res') {$value =~ s/[^a-zA-Z0-9\/\:]//gs;push(@delres,$value); } $FORM{$name} = $value; } $name = $FORM{'name'}; $name =~ s/\r//g; $name =~ s/\n//g; $title = $FORM{'title'}; $title =~ s/\r//g; $title =~ s/\n//g; $comment = $FORM{'comment'}; $comment =~ s/\r\n/
/g; $comment =~ s/\r/
/g; $comment =~ s/\n/
/g; $email = $FORM{'email'}; $email =~ s/\r//g; $email =~ s/\n//g; $url = $FORM{'url'}; $url =~ s/^http\:\/\///; $url =~ s/\r//g; $url =~ s/\n//g; $mode = $FORM{'mode'}; $sort = $FORM{'sort'}; $res_mode = $FORM{'res'}; $count_file = "./count"; $targetfile = "./data.txt"; $erasefile = "./erase.txt"; if ($sort eq "0"){$s_mode=0;} elsif($sort eq "1"){$s_mode=1;} else {$s_mode=$def_sort;} if ($mode eq "msg") { ®ist; } if ($mode eq "res_msg"){&res_msg;} if ($mode eq "admin") { &pass; } if ($mode eq "del") { &del; } if ($mode eq "master_del") { &master_del; } if ($mode eq "l_check") { &check_lock; } if (open(FILE,"<$count_file")) { $access = ; close(FILE); } @res=(); $comments=0; open(FILE,"<$targetfile"); while(){ chop; ($pic,$name,$mail,$http,$body,$date,$ip,$host,$title)=split("\t",$_); $title =~ s/\r//g; $title =~ s/\n//g; if($pic =~ /[\d]/){ $rank{$pic*100+$res[$pic]}.="$pic\t$name\t$mail\t$http\t$body\t$date\t$ip\t$host\t$title"; $res[$pic]++; if($s_mode==1){ $sort[$comments]=$pic; $coms[$pic]=0; $comments++; } } } close(FILE); if($s_mode==1) { $pnum=$access; for($i=$comments-1;$i>0;$i--) { if($coms[$sort[$i]]>0){} else { $s[$pnum]=$sort[$i]; $coms[$sort[$i]]++; $pnum--; } } $i=$access; while($i>$access-$lgnumber && $i>0) { if($res[$i]==0) { $s[$pnum]=$i; $pnum--; } $i--; } } @era=(); open(FILE,"<$erasefile"); while(){ $era[$_]=1; } close(FILE); &head; if ($NEWGIF eq '') { print "
$MESSAGE2

\n"; } else { print "

\"NEW

\n"; } if($cm_sw==1){ if ($NEWCOM eq '') { print "

$MESSAGE7

\n"; } else { print "

\"NEW

\n"; } } print << "EOH";

[$RETURN] [$MESSAGE1]

[$MESSAGE5] [$MESSAGE6]

EOH if ($FORM{'page'} eq '') { $cc = 0; } else { $cc = $FORM{'page'}; } if ($FORM{'fno'} eq '') { $i = $access-$cc; } else { $i = $FORM{'fno'}; } $start=$cc; while($i>0 && $i>($access-$lgnumber) && ($cc-$start)<$gznumber ) { if($s_mode==0) {$file=$i%$lgnumber;$article=$i;} else {$file=$s[$i]%$lgnumber;$article=$s[$i];} ($pic,$name,$mail,$http,$body,$date,$ip,$host,$title)=split("\t",$rank{$article*100}); $flag=0; if($cm_sw==1) { if(($title eq "") && ((-e "$gzfile".$file.".gif"==0 && -e "$gzfile".$file.".jpg"==0 && -e "$gzfile".$file.".png"==0 )|| $era[$file]==1)){$i--;$flag=1;} }else { if((-e "$gzfile".$file.".gif"==0 && -e "$gzfile".$file.".jpg"==0 && -e "$gzfile".$file.".png"==0 )|| $era[$file]==1){$i--;$flag=1;} } if($flag==0) { print << "EOH";
EOH if($title eq "") { print << "EOH"; EOH } print << "EOH";
[$article] EOH if( -e "$gzfile".$file.".png"==0){ if(-e "$gzfile".$file.".jpg"==0){ print "

"; }else{ print "

"; } }else { print "

"; } print << "EOH";
EOH $com_flag=0; for($j=0;$j<$res[$article];$j++) { ($pic,$name,$mail,$http,$body,$date,$ip,$host,$title)=split("\t",$rank{$article*100+$j}); if($title ne "") { $com_flag=1; print "[$article]
\n"; print "$title
\n"; } if ($mail =~ /^\s*$/) { print "$name\n"; } else{ print "\n"; print "$name\n"; } $http=~ s/^http\:\/\///; if ($http && $home_icon) { print "\n"; } elsif ($http && $http ne 'http://' && $home_icon == 0) { print "[Home Page]\n"; } if($sw_host==1){ print "\n"; print "$date
$ip $host\n"; print "
\n"; } else{ print "\n"; print "$date\n"; print "\n"; } print << "EOH";
$body

EOH if($title ne "") { $body =~ s/"/'/g; print << "EOH"; EOH } if($title ne "" && $res[$article]>1) { print "


\n"; print "
    \n"; } } if($com_flag==1 && $res[$article]>1) { print "
\n"; } print << "EOH";

EOH $i--; $cc++; } $file=$i%$lgnumber; if($i<0){$i=$lgnumber-1;} } print "
\n"; if($i==($access-$lgnumber) || $i==0 || $cc %$gznumber==0 ) { if($cc>$gznumber){ print << "EOH"; EOH } } if($cc % $gznumber== 0 && $cc<$lgnumber && $i!=0) { # 次頁処理 print << "EOH"; EOH } print "
\n"; &foot; exit; #■■■■■■■■■■ コメント投稿処理 ■■■■■■■■■■ sub regist { if ($name eq "") { &CgiError("Your name is missing.","$back_message"); exit; } if ($comment eq "") { &CgiError("Your comment is missing.", "$back_message"); exit; } my ($sec,$min,$hour,$mday,$mon,$year,$wday,$seireki_nen,$month,$tuki,$youbi,@youbi,$currenttime,$seireki); ($sec,$min,$hour,$mday,$mon,$year,$wday)=(localtime)[0,1,2,3,4,5,6]; $seireki_nen = $year + 1900; $month = $mon + 1; @youbi = ("Sun","Mon","Tue","Wed","Thurs","Fri","Sat"); $youbi = $youbi[$wday]; $currenttime = sprintf("%02d:%02d:%02d",$hour,$min,$sec); $seireki = "$seireki_nen" . "/" . "$month" . "/" . "$mday" . " ($youbi.)"; $date = "$seireki" . " $currenttime"; if ($autolink) { &auto_link($comment);} # ロック処理 if ($lock_mode == 0) { &process_lock; } elsif ($lock_mode == 1) { &process_lock2; } if($res_mode eq "new") { if (open(FILE,"<$count_file")) { $access = ; close(FILE); } if (open(FILE,">$count_file")) { $access++; print FILE $access; close(FILE); } open(OUT,">>$erasefile") or &CgiDie("The BBS is currently busy with another submission", "Please try again soon."); $pic=$access; $pic =~ s/[^0-9]//gs; $pic=$pic%$lgnumber; print OUT "$pic\n"; close(OUT); if($access>$lgnumber) { open(DATA,"$targetfile") or &CgiDie("The file is locked due to another submission request.","please try again soon."); @lines=; close(DATA); foreach $line (@lines) { ($pic,$nm,$mail,$http,$body,$dt,$ip,$host,$subject)=split("\t",$line); $pic =~ s/[^0-9]//gs; if ($pic ne $access-$lgnumber){ push(@new,$line); } } open(DATA,">$targetfile") or &CgiDie("The file is locked due to another submission request.","please try again soon."); print DATA @new; close(DATA); } if($title eq "") { $title="Untitled"; } open(OUT,">>$targetfile") or &CgiDie("The file is locked due to another submission request.","please try again soon."); print OUT "$access\t$name\t$email\t$url\t$comment\t$date\t$ENV{'REMOTE_ADDR'}\t$ENV{'REMOTE_HOST'}\t$title\n"; } else { open(OUT,">>$targetfile") or &CgiDie("The file is locked due to another submission request.","please try again soon."); print OUT "$FORM{'resno'}\t$name\t$email\t$url\t$comment\t$date\t$ENV{'REMOTE_ADDR'}\t$ENV{'REMOTE_HOST'}\t$title\n"; } close(OUT); &process_unlock; if($FORM{'cook'} eq 'on'){&set_cookie;} $mode=""; $name=""; $comment=""; $sub=""; $email=""; $url=""; } #■■■■■■■■■■ コメント投稿画面 ■■■■■■■■■■ sub res_msg { &get_cookie; $file=$FORM{'resno'}%$lgnumber; &head; if($res_mode eq "new") { print "
$MESSAGE8

\n"; } elsif($res_mode eq "comment") { $comment =~ s/<//g; print << "EOH";

$MESSAGE8

$comment

EOH } else { print "
$MESSAGE3

\n"; if( -e "$gzfile".$file.".png"==0){ if(-e "$gzfile".$file.".jpg"==0){ print "

"; }else { print "

"; } }else { print "

"; } } print << "EOH";

EOH if($res_mode eq "new") { print "title :
\n"; } print << "EOH"; name :
e-mail :
URL :
cookie reminder
HTML tags are not allowed

EOH &foot; exit; } #■■■■■■■■■■ ファイルロック処理 ■■■■■■■■■■ #=================== File Lock Process =================== sub process_lock { local($wait) = 10; while ( !symlink(".",$lock_file) ) { &CgiDie("lock busy") if --$wait <= 0; sleep (6); } } #■■■■■■■■■■ ファイルロック処理2 ■■■■■■■■■■ #=================== File Lock Process 2 =================== sub process_lock2 { local($flag) = 0; foreach (1 .. 5) { if (-e $lock_file) { sleep(1); } else { open(LOCK,">$lock_file") || &CgiDie("lock busy"); close(LOCK); $flag = 1; last; } } if ($flag == 0) { &CgiDie("lock busy") } } #■■■■■■■■■■ ファイルアンロック処理 ■■■■■■■■■■ #=================== File Lock Removal Process =================== sub process_unlock { unlink ($lock_file); } #■■■■■■■■■■ ロック状況の監視 ■■■■■■■■■■ #=================== File Lock Monitoring =================== sub check_lock { if ($FORM{'pass'} ne "$pass") { &CgiError("Wrong Password","$back_message");exit; } if($FORM{'operate'} eq "unlock") { &process_unlock; } else { $lock_state="normal"; local($wait) = 4; while ( !symlink(".",$lock_file) && $wait>0 ) { $wait--; if ($wait <= 0){$lock_state="failed";} sleep (6); } if($lock_state eq "normal") { &process_unlock; } } &head; print << "EOH";
EOH if($FORM{'operate'} eq "unlock") { print "
Unlocked
"; } else { print "Current file lock state: $lock_state"; if($lock_state eq "failed") { print "

"; print "File is locked, probably due to heavy load.
"; print "[Filelock must be removed by the administrator]"; } } print << "EOH";

[Return to BBS]

EOH &foot; } #■■■■■■■■■■ パスワード認証 ■■■■■■■■■■ #=================== Password Checking =================== sub pass { &head; print << "EOH";

Please enter the administrator password.


EOH &foot; exit; } #■■■■■■■■■■ 管理者削除処理 ■■■■■■■■■■ #=================== Administration Process =================== sub del{ if ($FORM{'pass'} ne "$pass") { &CgiError("Wrong password","Please hit he back button on your browser.");exit; } if (open(FILE,"<$count_file")) { $access = ; close(FILE); } @res=(); open(FILE,"<$targetfile"); while(){ chop; ($pic,$name,$mail,$http,$body,$date,$ip,$host,$title)=split("\t",$_); $title =~ s/\r//g; $title =~ s/\n//g; if($pic =~ /[\d]/){ $rank{$pic*100+$res[$pic]}.="$pic\t$name\t$mail\t$http\t$body\t$date\t$ip\t$host\t$title"; $res[$pic]++; } } close(FILE); @era=(); open(FILE,"<$erasefile"); while(){ $era[$_]=1; } close(FILE); &head; print << "EOH";

Check Status of File Lock

Select entries with the checkbox, and delete with the delete button.

[Return to BBS]

EOH if ($FORM{'page'} eq '') { $cc = 0; } else { $cc = $FORM{'page'}; } if ($FORM{'fno'} eq '') { $i = $access-$cc; } else { $i = $FORM{'fno'}; } $start=$cc; while($i>0 && $i>($access-$lgnumber) && ($cc-$start)<$gznumber ) { $file=$i%$lgnumber; ($pic,$name,$mail,$http,$body,$date,$ip,$host,$title)=split("\t",$rank{$i*100}); $flag=0; if($cm_sw==1) { if(($title eq "") && ((-e "$gzfile".$file.".gif"==0 && -e "$gzfile".$file.".jpg"==0 && -e "$gzfile".$file.".png"==0 )|| $era[$file]==1)){$i--;$flag=1;} }else { if((-e "$gzfile".$file.".gif"==0 && -e "$gzfile".$file.".jpg"==0 && -e "$gzfile".$file.".png"==0 )|| $era[$file]==1){$i--;$flag=1;} } if($flag==0) { print << "EOH";

EOH if($title eq "") { print << "EOH"; EOH } print ""; print "
[$i] EOH if( -e "$gzfile".$file.".png"==0){ #### if( -e "$gzfile".$file.".jpg"==0){ print "

";#### }else{ print "

";#### } }else#### {#### print "

";#### }#### print << "EOH"; Delete
\n"; for($j=0;$j<$res[$i];$j++) { ($pic,$name,$mail,$http,$body,$date,$ip,$host,$title)=split("\t",$rank{$i*100+$j}); print "Delete\n"; if ($mail =~ /^\s*$/) { print "$name\n"; } else{ print "\n"; print "$name\n"; } if ($http =~ /^\s*$/ || $http eq 'http://') { } else{ print "[Home Page]\n"; } print "$date\n"; print "
\n"; print "$body\n"; print "

\n"; } print "


\n"; $i--; $cc++; } $file=$i%$lgnumber; if($i<0){$i=$lgnumber-1;} } print "
\n"; print "
\n"; if($i==($access-$lgnumber) || $i==0 || $cc %$gznumber==0 ) { if($cc>$gznumber){ print << "EOH"; EOH } } if($cc % $gznumber== 0 && $cc<$lgnumber && $i!=0) { print << "EOH"; EOH } print "
\n"; &foot; exit; } #■■■■■■■■■■ 一括削除処理 ■■■■■■■■■■ #=================== Batch Removal =================== sub master_del{ if ($FORM{'pass'} ne "$pass") { &CgiError("Password is incorrect","$back_message");exit; } if ($FORM{'del'} eq "" && $FORM{'del_res'} eq "") { &CgiError("No items are checked for deletion.","$back_button");exit; } # ロック処理 if ($lock_mode == 0) { &process_lock; } elsif ($lock_mode == 1) { &process_lock2; } if($FORM{'del_res'} ne "") { open(DATA,"$targetfile") or &CgiDie("Files are currently locked due to another submission.","Please try again soon."); @lines=; close(DATA); foreach $line (@lines) { $flag=0; ($pic,$name,$mail,$http,$body,$date,$ip,$host,$title)=split("\t",$line); $title =~ s/\r//g; $title =~ s/\n//g; $date =~ s/[^a-zA-Z0-9\/\:]//gs; foreach $res (@delres) { if ($date eq $res) {$flag = 1;if($title ne ""){push(@delete,$pic);$FORM{'del'}="del";}} } if ($flag == 0) { push(@new,$line); } } open(DATA,">$targetfile") or &CgiDie("Files are currently locked due to another submission.","Please try again soon."); print DATA @new; close(DATA); } if($FORM{'del'} ne "") { open(OUT,">>$erasefile") or &CgiDie("Files are currently locked due to another submission.","Please try again soon."); foreach $pic (@delete) { $pic =~ s/[^0-9]//gs; $pic=$pic%$lgnumber; unlink "$gzfile$pic.gif";#### unlink "$gzfile$pic.jpg";#### unlink "$gzfile$pic.png";#### print OUT "$pic\n"; } close(OUT); } &process_unlock; &del; } #■■■■■■■■■■ URLの自動リンク ■■■■■■■■■■ #=================== Auto Link =================== sub auto_link { $_[0] =~ s/([^=^\"]|^)(http\:[\w\.\~\-\/\?\&\+\=\:\@\%\;\#]+)/$1$2<\/a>/g; } #■■■■■■■■■■ クッキー設定 ■■■■■■■■■■ #=================== Cookie Setup =================== sub set_cookie { # クッキーは60日間有効 # Cookies expires in 60 days ($secg,$ming,$hourg,$mdayg,$mong,$yearg,$wdayg) = gmtime(time + 60*24*60*60); $yearg += 1900; if ($secg < 10) { $secg = "0$secg"; } if ($ming < 10) { $ming = "0$ming"; } if ($hourg < 10) { $hourg = "0$hourg"; } if ($mdayg < 10) { $mdayg = "0$mdayg"; } $month = ('Jan','Feb','Mar','Apr','May','Jun','Jul', 'Aug','Sep','Oct','Nov','Dec')[$mong]; $youbi = ('Sunday','Monday','Tuesday','Wednesday', 'Thursday','Friday','Saturday')[$wdayg]; $date_gmt = "$youbi, $mdayg\-$month\-$yearg $hourg:$ming:$secg GMT"; $cook="name\:$name\,email\:$email\,url\:$url"; print "Set-Cookie: OEBBS=$cook; expires=$date_gmt\n"; } #■■■■■■■■■■ クッキーを取得 ■■■■■■■■■■ #=================== Coockie Retreveal Process =================== sub get_cookie { @pairs = split(/\;/, $ENV{'HTTP_COOKIE'}); foreach $pair (@pairs) { local($name, $value) = split(/\=/, $pair); $name =~ s/ //g; $DUMMY{$name} = $value; } @pairs = split(/\,/, $DUMMY{'OEBBS'}); foreach $pair (@pairs) { local($name, $value) = split(/\:/, $pair); $COOKIE{$name} = $value; } $c_name = $COOKIE{'name'}; $c_email = $COOKIE{'email'}; $c_url = $COOKIE{'url'}; if($FORM{'cook'}eq 'on'){ if ($FORM{'name'}) { $c_name = $FORM{'name'}; } if ($FORM{'email'}) { $c_email = $FORM{'email'}; } if ($FORM{'url'}) { $c_url = $url; } } } #■■■■■■■■■■ ヘッダー ■■■■■■■■■■ #=================== Header =================== sub head{ print << "EOH"; Content-type: text/html Oekaki BBS EOH if ($BACKGIF eq '') { print "
Make your own free website on Tripod.com

\n"; } else { print "

\n"; } if ($TITLEGIF eq '') { print "

+ $TITLE +

\n"; } else { print "

\"TITLE\"

\n"; } } #■■■■■■■■■■ フッター ■■■■■■■■■■ #=================== Footer =================== sub foot{ #このリンク部を削除することはできません print << "EOH";

EOH exit; }