mirror of
https://github.com/WhatCD/Gazelle.git
synced 2024-12-13 10:56:26 +00:00
71 lines
2.1 KiB
PHP
71 lines
2.1 KiB
PHP
<?
|
|
/**********|| Page to show individual threads || ********************************\
|
|
|
|
Things to expect in $_GET:
|
|
ThreadID: ID of the forum curently being browsed
|
|
page: The page the user's on.
|
|
page = 1 is the same as no page
|
|
|
|
********************************************************************************/
|
|
|
|
//---------- Things to sort out before it can start printing/generating content
|
|
|
|
include(SERVER_ROOT.'/classes/text.class.php'); // Text formatting class
|
|
$Text = new TEXT;
|
|
|
|
// Check for lame SQL injection attempts
|
|
if (!is_number($_GET['collageid'])) {
|
|
error(0);
|
|
}
|
|
$CollageID = (int)$_GET['collageid'];
|
|
|
|
list($NumComments, $Page, $Thread, $LastRead) = Comments::load('collages', $CollageID);
|
|
|
|
$DB->query("
|
|
SELECT Name
|
|
FROM collages
|
|
WHERE ID = '$CollageID'");
|
|
list($Name) = $DB->next_record();
|
|
|
|
// Start printing
|
|
View::show_header("Comments for collage $Name", 'comments,bbcode,subscriptions');
|
|
?>
|
|
<div class="thin">
|
|
<div class="header">
|
|
<h2>
|
|
<a href="collages.php">Collages</a> >
|
|
<a href="collages.php?id=<?=$CollageID?>"><?=$Name?></a>
|
|
</h2>
|
|
<div class="linkbox">
|
|
<a href="#" id="subscribelink_collages<?=$CollageID?>" class="brackets" onclick="SubscribeComments('collages',<?=$CollageID?>);return false;"><?=Subscriptions::has_subscribed_comments('collages', $CollageID) !== false ? 'Unsubscribe' : 'Subscribe'?></a>
|
|
<?
|
|
$Pages = Format::get_pages($Page, $NumComments, TORRENT_COMMENTS_PER_PAGE, 9);
|
|
if ($Pages) {
|
|
echo '<br /><br />' . $Pages;
|
|
}
|
|
?>
|
|
</div>
|
|
</div>
|
|
<?
|
|
|
|
//---------- Begin printing
|
|
CommentsView::render_comments($Thread, $LastRead, "collages.php?action=comments&collageid=$CollageID");
|
|
if (!$ThreadInfo['IsLocked'] || check_perms('site_moderate_forums')) {
|
|
if ($ThreadInfo['MinClassWrite'] <= $LoggedUser['Class'] && !$LoggedUser['DisablePosting']) {
|
|
View::parse('generic/reply/quickreply.php', array(
|
|
'InputName' => 'pageid',
|
|
'InputID' => $CollageID,
|
|
'Action' => 'comments.php?page=collages',
|
|
'InputAction' => 'take_post',
|
|
'TextareaCols' => 90,
|
|
'SubscribeBox' => true
|
|
));
|
|
}
|
|
}
|
|
?>
|
|
<div class="linkbox">
|
|
<?=$Pages?>
|
|
</div>
|
|
</div>
|
|
<? View::show_footer(); ?>
|