1 |
#!/usr/bin/perl |
#!/usr/bin/perl |
2 |
## This file is euc-jisx0213 encoding. |
## This file is euc-jisx0213 encoding. |
3 |
|
|
4 |
use Suika::CGI; |
#use Suika::CGI; |
5 |
$myvesion = '1.00 (2001-08-22)'; |
$myvesion = '1.00 (2001-08-22)'; |
6 |
|
|
7 |
$about_perl = <<"EOH"; |
$about_perl = <<"EOH"; |
40 |
|
|
41 |
#文字コード |
#文字コード |
42 |
$mojicode = "euc"; |
$mojicode = "euc"; |
43 |
|
require 'jcode.pl'; |
44 |
|
|
45 |
#NN2 で charset=EUC-JP を送ると化けるらしい。 |
#NN2 で charset=EUC-JP を送ると化けるらしい。 |
46 |
if( $ENV{'HTTP_USER_AGENT'} =~ /compatible/ ){ |
if( $ENV{'HTTP_USER_AGENT'} =~ /compatible/ ){ |
116 |
|
|
117 |
$defhead = <<"EOH"; |
$defhead = <<"EOH"; |
118 |
|
|
119 |
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
120 |
<html lang="ja"> |
<html lang="ja"> |
121 |
<head> |
<head> |
122 |
<title>$title</title> |
<title>$title</title> |
123 |
<link rel="stylesheet" type="text/css" href="/s/simpledoc"> |
<link rel="stylesheet" href="/s/simpledoc"> |
124 |
<link rel="stylesheet" type="text/css" href="../bo-style"> |
<link rel="stylesheet" href="../bo-style"> |
125 |
<link rel="index" href="../top" /> |
<link rel="index" href="../top" /> |
126 |
</head> |
</head> |
127 |
<body> |
<body> |
185 |
Content-Style-Type: text/css |
Content-Style-Type: text/css |
186 |
Content-Script-Type: text/javascript |
Content-Script-Type: text/javascript |
187 |
|
|
188 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"> |
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> |
189 |
<html lang="ja"> |
<html lang="ja"> |
190 |
<head> |
<head> |
191 |
<link rel="stylesheet" type="text/css" href="/s/simpledoc"> |
<link rel="stylesheet" href="/s/simpledoc"> |
192 |
<link rel="stylesheet" type="text/css" href="../bo-style"> |
<link rel="stylesheet" href="../bo-style"> |
193 |
$link_element |
$link_element |
194 |
<title>$title ($sub_title)</title> |
<title>$title ($sub_title)</title> |
195 |
_EOF_ |
_EOF_ |
196 |
|
|
197 |
if($indent eq 'css'){ |
if($indent eq 'css'){ |
198 |
my($i, $tmp_margin); |
my($i, $tmp_margin); |
199 |
$s .= '<style type="text/css"><!--'; |
$s .= '<style type="text/css">'; |
200 |
for( $i = 1; $i <= $max_depth; $i++ ){ |
for( $i = 1; $i <= $max_depth; $i++ ){ |
201 |
$tmp_margin = $margin * $i; |
$tmp_margin = $margin * $i; |
202 |
print ".lv$i\{margin-left:$tmp_margin\%\}"; |
print ".lv$i\{margin-left:$tmp_margin\%\}"; |
203 |
} |
} |
204 |
$s .= '--></style>'; |
$s .= '</style>'; |
205 |
} |
} |
206 |
$s .= <<"_EOF_"; |
$s .= <<"_EOF_"; |
207 |
</head> |
</head> |
226 |
|
|
227 |
sub ichiran { |
sub ichiran { |
228 |
&set_cookie; |
&set_cookie; |
229 |
local($s) = &html_header('一覧表示'); |
local($s) = &html_header('記事一覧'); |
230 |
|
|
231 |
#ログ読み出し |
#ログ読み出し |
232 |
open(LOG, $logfile) or &Suika::CGI::Error::die('open', file => $logfile); |
open(LOG, $logfile) or die qq(open: $logfile: $!); #&Suika::CGI::Error::die('open', file => $logfile); |
233 |
print $s; |
print $s; |
234 |
my($count, $last_nj); |
my($count, $last_nj); |
235 |
$count = <LOG>;chop($count); |
$count = <LOG>;chop($count); |
244 |
} |
} |
245 |
|
|
246 |
print $html_info; |
print $html_info; |
247 |
print '<div class="set"><h3>記事一覧</h3>'; |
print '<div class="set">'; |
248 |
print "<p><em class=\"note\">([全]を選択すると関連記事も含めて一括表示できます。)</em></p>\n"; |
print "<p><em class=\"note\">([全]を選択すると関連記事も含めて一括表示できます。)</em></p>\n"; |
249 |
$tree = int($tree/$max_tree) * $max_tree; |
$tree = int($tree/$max_tree) * $max_tree; |
250 |
$end_tree = $tree + $max_tree; |
$end_tree = $tree + $max_tree; |
281 |
print "[<a href=\"$this_name?$uri_query;md=set;tn=$tn\">全</a>]"; |
print "[<a href=\"$this_name?$uri_query;md=set;tn=$tn\">全</a>]"; |
282 |
} elsif ($indent eq 'space') { |
} elsif ($indent eq 'space') { |
283 |
my($space_width) = $lx * 2 + 2; |
my($space_width) = $lx * 2 + 2; |
284 |
print ' ' x $space_width; |
print ' ' x $space_width; |
285 |
} |
} |
286 |
print "<a href=\"$this_name?$uri_query;md=viw;no=$no;tn=$tn\">"; |
print "<a href=\"$this_name?$uri_query;md=viw;no=$no;tn=$tn\">"; |
287 |
if ($no > $count - $new_kiji) { |
if ($no > $count - $new_kiji) { |
338 |
if (!$children) { $children = 'コメントは投稿されていません。</p>'; } |
if (!$children) { $children = 'コメントは投稿されていません。</p>'; } |
339 |
else{$children = "以下のコメントが投稿されています。</p>\n<ul class=\"comment\">$children</ul>";} |
else{$children = "以下のコメントが投稿されています。</p>\n<ul class=\"comment\">$children</ul>";} |
340 |
$s .= <<"_EOF_"; |
$s .= <<"_EOF_"; |
341 |
|
<hr> |
342 |
<p>$parent |
<p>$parent |
343 |
$children |
$children |
344 |
<hr></div> |
<hr></div> |
848 |
# [ フォームからデータ取得 ] |
# [ フォームからデータ取得 ] |
849 |
|
|
850 |
sub read_form { |
sub read_form { |
851 |
%OPT = %Suika::CGI::param; |
# %OPT = %Suika::CGI::param; |
852 |
return; |
# return; |
853 |
my($pair,$buffer); |
my($pair,$buffer); |
854 |
if ($ENV{'REQUEST_METHOD'} eq "POST") { read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); |
if ($ENV{'REQUEST_METHOD'} eq "POST") { read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); |
855 |
} else { $buffer = $ENV{'QUERY_STRING'}; } |
} else { $buffer = $ENV{'QUERY_STRING'}; } |
1027 |
<html lang="ja"> |
<html lang="ja"> |
1028 |
<head> |
<head> |
1029 |
$link_element |
$link_element |
1030 |
<link rel="stylesheet" type="text/css" href="/s/simpledoc"> |
<link rel="stylesheet" href="/s/simpledoc"> |
1031 |
<link rel="stylesheet" type="text/css" href="../bo-style"> |
<link rel="stylesheet" href="../bo-style"> |
1032 |
<title>(エラー報告)</title> |
<title>(エラー報告)</title> |
1033 |
</head> |
</head> |
1034 |
<body> |
<body> |
1051 |
"http://www.w3.org/TR/html4/strict.dtd"> |
"http://www.w3.org/TR/html4/strict.dtd"> |
1052 |
<html lang="ja"> |
<html lang="ja"> |
1053 |
<head> |
<head> |
1054 |
<link rel="stylesheet" type="text/css" href="/s/simpledoc"> |
<link rel="stylesheet" href="/s/simpledoc"> |
1055 |
<link rel="stylesheet" type="text/css" href="../bo-style"> |
<link rel="stylesheet" href="../bo-style"> |
1056 |
<title>(エラー報告)</title> |
<title>(エラー報告)</title> |
1057 |
</head> |
</head> |
1058 |
<body> |
<body> |