require("include/top.php");
require("include/libbb.php");
if($_SESSION["SESSION"]&&$_SESSION["SCENEID"])
{
// $query = "SELECT topicposts FROM usersettings WHERE id='".$_SESSION["SCENEID_ID"]."'";
// $result = mysql_query($query);
$posts_per_page=$user["topicposts"];//mysql_result($result,0);
}
else
{
$posts_per_page = 25;
}
if ($com) $posts_per_page=$com; else $com=$posts_per_page;
$which = (int)$which;
/*
if ($which == 6618)
die("jesus christ people, okay, I GET IT - now stop acting like complete retards.");
if ($which == 7465) {
header("Location: http://www.scene.org/demoscene.php");
exit();
}
*/
$query='SELECT count(0) FROM bbs_posts WHERE topic='.(int)$which;
$result=mysql_query($query);
$nb_posts=mysql_result($result,0);
/*
if ($which == 2735 && $nb_posts >= 32767)
die("okay, the thread reached 0x8000 posts, which means it ran it's course. now go make a demo about it. (a demo, NOT a new thread.)");
*/
if(($page<=0)||(!$page)) {
$page=ceil($nb_posts/$posts_per_page);
}
$query="SELECT topic,category,closed FROM bbs_topics WHERE id=".$which;
$result=mysql_query($query);
$topic = mysql_fetch_object($result);
$topictitle=htmlcleanonerow($topic->topic);
$query="SELECT bbs_posts.id,bbs_posts.post,bbs_posts.author,bbs_posts.added,users.nickname,users.avatar,users.level FROM bbs_posts,users WHERE bbs_posts.author=users.id AND bbs_posts.topic=".$which." ORDER BY bbs_posts.added ASC";
$query.=" LIMIT ".(($page-1)*$posts_per_page).",".$posts_per_page;
$result=mysql_query($query);
while($tmp=mysql_fetch_assoc($result)) {
$replies[]=$tmp;
}
?>
=$topictitle?>
|
category: =$thread_categories[$topic->category]?>
if (canEditBBSCategories()) {
?>
[edit]
}
?>
|
|
for($i=0;$i
">">
if ($i == count($replies) - 1) printf(""); ?>
if (
( ($replies[$i]["level"]=='fakeuser') && $user["topichidefakeuser"] ) ||
( ($replies[$i]["level"]=='pr0nstahr') && $user["topichidepornstar"] ) ||
( ($replies[$i]["level"]=='annoyinguser') && $user["topichideannoyinguser"] )
)
{
print("i'm a ".$replies[$i]["level"]." so i got shamelessly censored, if you're registered you can uncensor my level's posts here");
}
else {
print(parse_message($replies[$i]["post"]));
}
?>
|
">
|
endfor; ?>
|
|
if($_SESSION["SCENEID_ID"])
{
if ($which==1024)
$message = "please always use [url=http://en.wikipedia.org/wiki/BBCode]bbcode[/url] in this thread when refering to broken things.";
if ($topic->closed)
{
?>
thread closed |
this thread now officially wants YOU to go make a demo about it instead. please comply.
|
}
else
{
?>
}
} else {
?>
}
?>
require("include/bottom.php"); ?>