#!/usr/bin/perl -w
use strict;
use CGI qw(:standard);
use lib qw(../registration/check);
use JesLog;
use Ktai;

my $id = param('id');
my $file_back = param('fb');
my $dir_log = '../registration/log';
my $hash_canceled = &JesLog::generate_canceled($dir_log);
my $unit = &JesLog::unit();
my $file = sprintf("$dir_log/%02i/%04i", $id / $unit, $id);
my $jes_log = JesLog->new($file, $hash_canceled);
my $pid = $jes_log->{'PID'};
my $authors = $jes_log->{'authors_short'};
$authors =~ s/\\PmarkH //go;
my $poster_c = '';
my $type = '口頭発表';
if ($pid =~ m/^L/o) {
	$type = "企画シンポジウムで発表";
}
elsif ($pid =~ m/^S/o) {
	$type = "公募シンポジウムで発表";
}
elsif ($pid =~ m/^P/o) {
	$type = 'ポスター発表';
	$poster_c = '<li> ポスター賞応募発表 </li>' if $pid =~ m/c$/o;
}
# output messages
my $htm = <<ENDMSG;
<html>
<body>
<b>$jes_log->{name_sei} $jes_log->{name_mei}</b>
<br>
<ul>
	<li>日時: $jes_log->{dateP} $jes_log->{time}
	<li>場所: $jes_log->{room} 会場 $type
	<li>分類: $jes_log->{session}
	<li>番号: $pid
	<li>演題: $jes_log->{title}
	$poster_c
	<li>演者: $authors
	<li><a href="$file_back">(もどる)</a>
	<li><a href="name0.htm">(トップにもどる)</a>
</ul>
</body>
</html>
ENDMSG
print "Content-type: text/html\n\n";
print Ktai::convKtai($htm);
__END__
