#!/usr/bin/perl
## PETIT BOARD 補助プログラム
## 過去ログ表示・検索システム
## petit2.cgi (99/03/07)
## by KENT
$|=1;
## 基本設定
$title = 'JAPANESE TRASH1 過去ログ';
$script = './bbs.cgi'; # スクリプト名
$nofile = '../kakopastnum.txt'; # カウントファイル名
$bbsfile = '../bbs.cgi'; # 掲示板への戻り先
# bodyタグ
$body = '
';
$method = 'POST'; # method形式 (POST or GET)
$logfile = '../newbbsdat.txt'; # YY-BOARDログファイル
$past_dir = "."; # 過去ログのディレクトリ(フルパスだと / から)
$past_url = "."; # 過去ログのURL(フルパスだと http:// から)
# アクセスを禁止するUserAgent
@denyagent = ('JustView','WebTV');
## 設定完了
# 過去ログカウントファイルを読み込み
open(NUM,"$nofile") || &error("Can't open $nofile");
$count = ;
close(NUM);
## -------- メイン処理 --------------------------------- ##
&get_form;
if (!$buffer) { &frame; }
&form_decode;
if ($mode) { &ue_html; }
#if ($mode eq 'find_html') { &find_html; }
#if ($mode eq 'do_find') { &do_find; }
exit;
## --------- 処理完了 ---------------------------------- ##
## フレーム部
sub frame {
# 過去ログ用カウントファイルをチェック
unless (-e $nofile) { &error("Don't exist $nofile"); }
print "Content-type: text/html\n\n";
print <<"HTML";
$title
HTML
exit;
}
## 上フレーム(メニュー部)
sub ue_html {
&header;
print <<"HTML";
[最新]
HTML
# 過去ログの[リンク]を新規順に表示
for ($i=$count-1; $i>0; $i--) {
print "[$i]\n";
}
print "[掲示板へもどる]\n";
print "
\n";
print "