#!/usr/local/bin/perl # ↑あなたが加入しているプロバイダの「perl」言語が使用できる # パスを指定します。一般的に「#!/usr/local/bin/perl」で大丈夫 #*************************************************************************************** # △Resboard Var 1.0▽ # ○Yuppies CGI # http://http://www.geocities.co.jp/Milano/1567/ # ○フリープログラム # 使用条件:[Yuppies]へのリンクは消さないで下さい。 # ○質問、コメントはYumiまで。 # Yuppi(Yumi Tanaka) # YUPPI@chat.club.or.jp # # ※パスワードの変更を行ってください。 #*************************************************************************************** #日本語コード変換モジュール #-------------変更1------------- #require 'jcode.pl'; if (-f "jcode.pl") { $jflag = true; require "jcode.pl"; $code = ord(substr("漢", 0, 1)); if ($code == 0xb4) { $ccode = "euc"; $hcode = "x-euc-jp"; } elsif ($code == 0x1b) { $ccode = "jis"; $hcode = "iso-2022-jp"; } else { $ccode = "sjis"; $hcode = "x-sjis"; } } #*************************************************************************************** # ▼ここから▼ 初期設定を行います #*************************************************************************************** #掲示板を設置するURLを設定 #コメント送信後、リロードしますので必ず指定 $reload = 'http://***/***/cgi-bin/resboard1.cgi'; #「Home」で戻るURLを設定 $homeadd = ''; #管理者のメールアドレスを指定 $mailto = ''; #掲示板のタイトル $bbstitle = 'ResBBS'; #ヘッダー $head = <<"_HEAD_";
$mailto _UNDER_ #Bodyタグ設定 $body = "
"; #記事部分のテーブルの枠サイズ(0で枠無し) $t_size = 2; #記事上部(書き込み者表示部分)バック&テキストカラー $color_nb = '#555555'; $color_nn = '#ffffff';#訪問者name色 $color_nd = '#eeeeee';#日付の表示色 $color_tl = '#555555';#タイトル色 #記事バック&テキストカラー $color_cb = '#dddddd'; $color_ct = '#333333'; #レス書き込み者nameカラー $color_rn = '#555555'; #レス部分バック&テキストカラー $color_rb = '#efefef'; $color_rt = '#777777'; #管理者削除モードのパスワード $password = 'abc777'; #ファイル最大記憶数(極端に多くするとパフォーマンスが低下します) $max = 50; #1ページ表示数(新規投稿記事) $pagevew = 10; #レス記入のテキスト部分の行数指定 → 0〜(0だとテキストボックス、1〜でテキストエリア) $resrow = 1; #*************************************************************************************** # ▲ここまで▲ #*************************************************************************************** $file = 'resboard1.txt'; $CookieName = 'resboard1'; ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time); $date_now = sprintf("%02d/%02d/%02d %02d:%02d", $year, $mon + 1, $mday, $hour, $min); if ($ENV{'REQUEST_METHOD'} eq "POST") { read(STDIN, $formdata, $ENV{'CONTENT_LENGTH'}); } else { $formdata = $ENV{'QUERY_STRING'}; } $ENV{'TZ'} = "GMT"; #クッキーの有効期限:30日 ($c_sec,$c_min,$c_hour,$c_mday,$c_mon,$c_year,$c_wday,$c_yday,$c_isdst) = localtime(time + 30 * 86400); @pairs = split(/&/,$formdata); 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/</g; $value =~ s/>/>/g; $value =~ s/\n//g; $value =~ s/\,//g; &jcode'convert(*value,'sjis'); $FORM{$name} = $value; } if (!open(NOTE,"$file")) { &error(bad_file); } @DATA =\n"; print "\n"; print "$name\n"; print " \n"; print "\n"; if( $email ne "" ){ print " \n"; print "[Email]\n"; } if( $homepage ne ""){ print " \n"; $dammy = $homepage; print "\n"; print "[HomePage]\n"; } print "\n"; print " $date\n"; print " | |
\n"; print "\n"; print " $title\n"; print " | \n"; print "|
\n";
print "\n"; print "\n"; print "$comment\n"; &res; print " |
\n";
print "$x \n";
print "\n";
print "$na\n";
print " $da\n";
print "\n"; print "\n"; print "$com\n"; print " |