28 行
879 B
PHP
28 行
879 B
PHP
<?php
|
|
// 投稿詳細
|
|
require __DIR__ . '/post-common.php';
|
|
|
|
$post = $view['post'] ?? [];
|
|
$post_id = $post['id'] ?? '';
|
|
$title = ($post['title']) ?? '';
|
|
$thread_title = ($post['thread_title']) ?? '';
|
|
$thread_url = ($post['thread_url']) ?? '';
|
|
$thread_id = ($post['thread_id']) ?? '';
|
|
$reply_list = $view['reply_list'] ?? [];
|
|
$total = sizeof($reply_list) + 1;
|
|
$total_view = $total > 1 ? " ($total)" : '';
|
|
?>
|
|
<?php if ($title != ''): ?>
|
|
<h2>件名:<?= htmlspecialchars("$title{$total_view}") ?></h2>
|
|
<?php elseif ($thread_id != ''): ?>
|
|
<h2>RE:<a href="<?= $thread_url ?>"><?= htmlspecialchars($thread_title) ?></a></h2>
|
|
<?php endif; ?>
|
|
<?php
|
|
view_post($post, ['res_num' => $thread_id != '' ? 0 : 1, 'is_single' => true, 'link_to_thread' => true, 'res_num' => $view['res_num'] ?? 1]);
|
|
?>
|
|
<?php
|
|
foreach ($reply_list as $i => $reply) {
|
|
view_post($reply, ['res_num' => $i + 2]);
|
|
}
|
|
?>
|