#!/usr/local/bin/perl

# theme_read_comment.pl
# Comments reader program in Japan theme pavilion
# kawauso@acs.dnp.co.jp
# 95/12/27
# THIS CODE USES THESE LIBRARIES
#
#   jcode.pl    Copyright (c) 1991,1992 Software Research Associates, Inc.
#               Original by srekcah@sra.co.jp, Feb 1992
#               Maintained by Kazumasa Utashiro <utashiro@sra.co.jp>
#


require 'jcode.pl';

#
# コメントファイルの位置を得る
#
########
#### www.mediagalxy.co.jpテスト用 要書き変え
########
$ac_comment_file = "/stage/htdocs/Japan/Theme/logs/theme_ac_comments.html";

#
# HTMLヘッダ出力
#
print "Content-type: text/html\n\n";


#
# コメントファイルを標準出力へ出力
#
open (FILE, "<$ac_comment_file") || &err("Can not open comment file");
while (<FILE>) {
    $code = &jcode'convert(*_, 'jis');
    print $_;
}
close(FILE);


#
# エラーの場合
#
sub err{
    local($msg) = @_;
    print "<p>$msg</p>\n";
    close FILE;
    print "</BODY></HTML>\n";
    exit;
}

