2003-07-18 21:38:51 +00:00
|
|
|
<?php
|
|
|
|
require_once('../include.php');
|
2003-07-18 22:36:22 +00:00
|
|
|
require_once('../util.inc');
|
2003-07-18 21:38:51 +00:00
|
|
|
require_once('forum.inc');
|
|
|
|
doHeader('Forum');
|
|
|
|
|
|
|
|
/* sanitize variable */
|
|
|
|
$_GET['id'] = stripslashes(strip_tags($_GET['id']));
|
|
|
|
|
|
|
|
$thread = getThread($_GET['id']);
|
|
|
|
$thread->incView();
|
|
|
|
|
|
|
|
$forum = getForum($thread->forum);
|
2003-07-18 22:36:22 +00:00
|
|
|
|
|
|
|
$logged_in_user = get_logged_in_user(false);
|
|
|
|
|
2003-07-18 21:38:51 +00:00
|
|
|
?>
|
|
|
|
|
|
|
|
<p>
|
|
|
|
<span class="title"><?php echo $thread->title ?></span>
|
2003-07-18 22:36:22 +00:00
|
|
|
<br><a href="index.php"><?php echo $cfg['sitename'] ?> Forum</a> -> <a href="forum.php?id=<?php echo $forum->id ?>"><?php echo $forum->title ?></a>
|
2003-07-18 21:38:51 +00:00
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
<a href="reply.php?id=<?php echo $_GET['id'] ?>">Reply to Thread / Question</a>
|
|
|
|
</p>
|
|
|
|
<p style="text-align:center">
|
|
|
|
<table class="content" border="0" cellpadding="5" cellspacing="0" width="100%">
|
|
|
|
<tr>
|
|
|
|
<th style="width: 150px">Author</th>
|
|
|
|
<th>Message</th>
|
|
|
|
</tr>
|
|
|
|
<?php
|
|
|
|
|
|
|
|
$n = 0;
|
|
|
|
$posts = $thread->getPosts();
|
|
|
|
while ($post = getNextPost($posts)):
|
2003-07-18 22:36:22 +00:00
|
|
|
$user = getUser($post->user);
|
|
|
|
$can_edit = $logged_in_user && $user->id == $logged_in_user->id;
|
2003-07-18 21:38:51 +00:00
|
|
|
?>
|
|
|
|
<tr class="row<?php echo (($n++)%2+1) ?>" style="vertical-align:top">
|
|
|
|
<td>
|
|
|
|
<p style="font-weight:bold">
|
|
|
|
<?php if ($user->has_profile) { ?>
|
2003-07-18 22:36:22 +00:00
|
|
|
<a href="../view_profile.php?userid=<?php echo $post->user ?>"><?php echo $user->name ?></a>
|
|
|
|
<?php } else { echo $user->name; } ?>
|
2003-07-18 21:38:51 +00:00
|
|
|
</p>
|
|
|
|
<p style="font-size:8pt">
|
|
|
|
Joined: <?php echo date('M j, Y', $user->create_time) ?>
|
|
|
|
<br>Posts: <?php echo $user->posts ?>
|
|
|
|
</p>
|
|
|
|
</td>
|
|
|
|
<td>
|
2003-07-21 22:02:20 +00:00
|
|
|
<p style="font-size:8pt">
|
|
|
|
Posted: <?php echo date('D M j, Y g:i a', $post->timestamp) ?><?php if ($can_edit) echo " <a href=\"edit.php?id=$post->id\">[Edit this post]</a>" ?>
|
|
|
|
<?php if ($post->modified) echo "<br>Last Modified: ", date('D M j, Y g:i a', $post->modified) ?>
|
2003-07-19 00:27:42 +00:00
|
|
|
</p>
|
2003-07-18 22:36:22 +00:00
|
|
|
|
2003-07-18 21:38:51 +00:00
|
|
|
<p><?php echo nl2br(stripslashes($post->content)) ?></p>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<?php
|
|
|
|
endwhile;
|
|
|
|
|
|
|
|
?>
|
|
|
|
</table>
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<?php
|
|
|
|
doFooter();
|
2003-07-21 22:02:20 +00:00
|
|
|
?>
|