#!/usr/bin/perl
#================#
# プログラム情報 #
#================#------------------------------------------#
# #
# TreeBBS ver.1.10 #
# Produced by [GROOWEB] Takahiro Aoki #
# #
# URL:http://www.tsubaki.sakura.ne.jp/~campus/grooweb/ #
# E-Mail:campus@tsubaki.sakura.ne.jp #
# #
#-----------------------------------------------------------#
#===初期設定ここから========================================#
#--ファイル名やアドレスなどの設定--#
# ファイルの場所を変更した場合は相対パスも含める
# このスクリプトのファイル名
$cgifile = './tree.cgi';
# Assistanceファイルの名前
$assistancefile = './assist.cgi';
# データファイルの名前
$datafile = './data/tree.dat';
# カウンタ保存ファイルの名前
$countfile = './data/count.log';
# 戻り先のURL(ホームページなど)
$home = 'http://www.ouzan.net/toto.html';
#--表示に関する設定--#
# 掲示板のタイトル
$bbs_title = 'toto BBS';
# タイトルの書体(フォント名を書く)
$title_f = 'Comic Sans MS';
# タイトルのサイズ
$title_s = '5';
# タイトルのカラー
$title_c = '#000000';
# タイトルに画像を使う場合はパスと名前を指定
$title_image = '';
# 画像ファイルのパス指定
# 名前を変更した場合は名前も変更すること
$newgif = './images/new.gif'; # 新着用のイメージ画像
$clipgif = './images/clip.gif'; # クリップ用のイメージ画像
# 全体の区切り線(ボーダー)の太さ
$border_b = '1';
# 全体的なバーの色(デフォルトはなし)
$bar_color = '#EEEEEE';
# フォントの基本サイズ(スタイルシートで)
$base_size = '10pt';
# フォントの基本カラー(デフォルトはグレイ)
$base_color = '#666666';
# 背景色(全体に適用されます)
$base_bgcolor = '#FFCC00';
# 背景に画像を使う場合は背景画像までのパス
$background = '';
# 表示していないリンクのカラー
$alinkcolor = '#3A75E2';
# 既に表示したリンクのカラー
$avisitedcolor = '#1F96C9';
# マウスが上にある時のカラー
$ahovercolor = '#F127BF';
# それぞれのリンクに下線をつけるかつけないか
# (つける='underline' つけない='none')
$al_decoration = 'none'; # 表示していないリンク
$av_decoration = 'none'; # 既に表示したリンク
$ah_decoration = 'underline'; # マウスが上にある時のリンク
# 親記事のヘッド部分のサイン(☆や◇など好みでどうぞ)
$base_head = '◆';
# 表示部分の親記事のセル背景色(デフォルトはグレイ)
$main_cellbg = '#DDDDDD';
# ページトップのモード表示部分のセル色
$top_cellbar = '#DDDDDD';
# メインページ上部に表示させたい説明を編集できます(タグ可)
$mini_manual = '
□ 24時間以内に投稿された記事には
が表示されます。
□
をクリックすると
関連記事の一覧を見ることが出来ます。
';
# 新記事投稿ページ上部に表示させたい説明を編集できます(タグ可)
$in_minimanual = "
□ プレビューすると実際の投稿イメージを確認出来ます。
□ タグは使用できません。ご注意ください。
";
#--処理に関する設定--#
# ホストを表示する(yes='1' no='0')
$host_flag = '0';
# 上が1の場合はホストのカラーを指定(16進数)
$host_color = '#666666';
# カウンターを表示する(yes='1' no='0')
$countflag = '1';
# カウンターの桁数
$count_width = '6';
# メソッドのタイプ('post' or 'get')
$method = 'post';
# 1ページに表示する件数(あまり大きくすると処理がおそくなります)
# また、返信記事はカウントされません
$p_log = '15';
# 全記事の最大保存件数(100程度が目安)
$maxmessage = '100';
# クッキーの名前(必要であればお好みで変更してください)
$cookie_name = 'GWsupportbbs';
# クッキーの有効期限
$holds = '20';
# 次の時間以内に投稿された記事を新着扱いする
$new_time = '24';
# マスターキーの設定(半角英数8文字以内で指定)
$MASTERKEY = '1954';
# ロック処理を行う?(Yes='1' No='0')
$lockkey = '1';
# ロックファイルの名前(CGIが自動生成)
# ファイル名の競合が起きる場合のみ変更してください
$lockfile = './data/lock.file';
# ライブラリへのパス
require './jcode.pl';
#===初期設定ここまで========================================#
#============#
# メイン処理 #
#============#
&get_Host;
&form_decode;
if ($countflag) { &countup; }
if ($in{'action'} eq 'view') { &view; }
elsif ($in{'action'} eq 'manual') { &manual; }
elsif ($in{'action'} eq 'clip') { &clip; }
elsif ($in{'action'} eq 'indata') { &indata; }
elsif ($in{'action'} eq 'usr_kill') { &usr_kill; }
elsif ($in{'action'} eq 'management') { &management; }
elsif ($in{'action'} eq 'check_in') { &check_in; }
elsif ($in{'action'} eq 'management_action') { &management_view("$in{'mode'}"); }
else { &basic; }
#===S/記事表示処理===================================================#
sub basic {
&cookie_in;
&html_head;
if ($countflag) {
$countview = sprintf ("%0${count_width}d", $count);
print "$countview\n";
}
if ($title_image eq "") {
print "
| $mini_manual |
HERE } } print " |
|
|||||||||||||||
HERE
open(FILE, "$datafile");
@allbody =
$main_rescomHERE } } if ($in{'res'} eq "") { $moveno = "$in{'no'}"; } else { $moveno = "$in{'res'}"; } print <<"HERE"; 以下は関連する記事の一覧です。 [一括\表\示] HERE if ($in{'res'} eq "") { foreach $line (@allbody) { ($no,$res,$name,$mail,$title,$comment,$date,$time,$hp,$H_A,$PWD) = split(/\,/, $line); if ($in{'no'} eq "$no") { if ($mail ne "") { $name = "$name"; } $flagtitle = "$title"; print<<"HERE"; $base_head $title - 【$name】 $date NO:$no HERE } } $xmode = 0; $xxx = '.........'; foreach $line (@allbody) { ($rno,$rres,$rname,$rmail,$rtitle,$rcomment,$rdate,$rtime,$rhp,$rH_A,$rPWD) = split(/\,/, $line); if ($in{'no'} eq "$rres") { $xmode++; if ($rmail ne "") { $rname = "$rname"; } print "\n"; print "$xxx" x $xmode; print "\n"; print<<"HERE"; Re: $rtitle - 【$rname】 $rdate NO:$rno HERE } } } else { foreach $line (@allbody) { ($no,$res,$name,$mail,$title,$comment,$date,$time,$hp,$H_A,$PWD) = split(/\,/, $line); if ($in{'res'} eq "$no") { if ($mail ne "") { $name = "$name"; } $flagtitle = "$title"; print<<"HERE"; $base_head $title - 【$name】 $date NO:$no HERE } } $xmode = 0; $xxx = '.........'; foreach $line (@allbody) { ($rno,$rres,$rname,$rmail,$rtitle,$rcomment,$rdate,$rtime,$rhp,$rH_A,$rPWD) = split(/\,/, $line); if ($in{'res'} eq "$rres") { $xmode++; if ($rmail ne "") { $rname = "$rname"; } print "\n"; print "$xxx" x $xmode; print "\n"; print<<"HERE"; Re: $rtitle - 【$rname】 $rdate NO:$rno HERE } } } if ($in{'res'} eq "") { $flagno = "$in{'no'}"; } else { $flagno = "$in{'res'}"; } $main_rescom = "> $main_rescom"; $main_rescom =~ s/ /> /g; print <<"HERE"; | ||||||||||||
|
HERE
open(FILE, "$datafile");
@allbody = HERE } } $xmode = 0; $xxx = '.........'; foreach $line (@allbody) { ($rno,$rres,$rname,$rmail,$rtitle,$rcomment,$rdate,$rtime,$rhp,$rH_A,$rPWD) = split(/\,/, $line); if ($in{'no'} eq "$rres") { $xmode++; if ($rmail ne "") { $rname = "$rname"; } print "\n"; print "$xxx" x $xmode; print ""; print<<"HERE"; Re: $rtitle - 【$rname】 $rdate NO:$rno HERE } } ($no,$res,$name,$mail,$title,$comment,$date,$time,$hp,$H_A,$PWD) = split(/\,/, $mainline); if ($mail eq "") { $mail = "未記入"; } else { $mail = "$mail"; } if ($hp eq "") { $hp = "未記入"; } else { $hp = "$hp"; } $position = "(親記事)"; $main_rescom = "$comment"; $comment =~ s/([^=^\"]|^)(http\:[\w\.\~\-\/\?\&\+\=\:\@\%\;\#]+)/$1$2<\/a>/g; print <<"HERE";
$commentHERE foreach $line (@allbody) { ($rno,$rres,$rname,$rmail,$rtitle,$rcomment,$rdate,$rtime,$rhp,$rH_A,$rPWD) = split(/\,/, $line); if ($in{'no'} eq "$rres") { if ($rmail ne "") { $rname = "$rname"; } if ($rmail eq "") { $rmail = "未記入"; } else { $rmail = "$rmail"; } if ($rhp eq "") { $rhp = "未記入"; } else { $rhp = "$rhp"; } $position = "(記事No$in{'no'}への返信記事)"; $rcomment =~ s/([^=^\"]|^)(http\:[\w\.\~\-\/\?\&\+\=\:\@\%\;\#]+)/$1$2<\/a>/g; print<<"HERE";
$rcommentHERE } } &cookie_in; $main_rescom = "> $main_rescom"; $main_rescom =~ s/ /> /g; print <<"HERE"; | ||||||||||||||||||||||||
| $title | |
| 記事No/ | $no $position |
| 投稿者/ | $name |
| 投稿日/ | $gettime |
| E-Mail/ | |
| URL/ | $hp |
$comment
| $in_minimanual |
| 終了 | 管理モード |