require("include/top.php");
function goodfleche($wanted,$current) {
if($wanted==$current) {
$fleche="fleche1a";
} else {
$fleche="fleche1b";
}
return $fleche;
}
function htmlcleanonerow($inhtml){
$inhtml= str_replace( "<", "&" . "lt;", $inhtml);
$inhtml= str_replace( ">", "&" . "gt;", $inhtml);
$inhtml= str_replace( "\"", "&" . "quot;", $inhtml);
$inhtml= str_replace( "\n", " ", $inhtml);
return $inhtml;
}
$topics_per_page=$user["bbsbbstopics"];
if(($page<=0)||(!$page)) {
$page=1;
}
$query="SELECT count(0) FROM bbs_topics";
if ($_GET["categoryfilter"])
$query.= sprintf(" where bbs_topics.category = %d",$_GET["categoryfilter"]);
$result=mysql_query($query);
$nb_topics=mysql_result($result,0);
$query="SELECT bbs_topics.id, bbs_topics.topic, bbs_topics.firstpost, bbs_topics.lastpost, bbs_topics.userfirstpost, bbs_topics.userlastpost, bbs_topics.count, bbs_topics.category, users1.nickname as nickname_1, users1.avatar as avatar_1, users2.nickname as nickname_2, users2.avatar as avatar_2 FROM bbs_topics LEFT JOIN users as users2 on users2.id=bbs_topics.userfirstpost LEFT JOIN users as users1 on users1.id=bbs_topics.userlastpost";
if ($_GET["categoryfilter"])
$query.= sprintf(" where bbs_topics.category = %d",$_GET["categoryfilter"]);
switch($order) {
case "userfirstpost": $query.=" ORDER BY nickname_2, avatar_2, bbs_topics.lastpost DESC"; break;
case "firstpost": $query.=" ORDER BY firstpost DESC"; break;
case "userlastpost": $query.=" ORDER BY nickname_1, avatar_1, bbs_topics.lastpost DESC"; break;
case "lastpost": $query.=" ORDER BY bbs_topics.lastpost DESC"; break;
case "count": $query.=" ORDER BY bbs_topics.count DESC"; break;
case "topic": $query.=" ORDER BY bbs_topics.topic"; break;
case "category": $query.=" ORDER BY bbs_topics.category"; break;
default: $query.=" ORDER BY bbs_topics.lastpost DESC"; break;
}
$query.=" LIMIT ".(($page-1)*$topics_per_page).",".$topics_per_page;
$result=mysql_query($query);
while($tmp=mysql_fetch_assoc($result)) {
$topics[]=$tmp;
}
$sortlink ="bbs.php?";
if ($_GET["categoryfilter"])
$sortlink ="categoryfilter=".$_GET["categoryfilter"]."&";
$sortlink.="order=";
$pagelink = "bbs.php?order=".$order;
if ($_GET["categoryfilter"])
$pagelink .= "&categoryfilter=".$_GET["categoryfilter"]."";
$row = 6;
if (canSeeBBSCategories()) {
$row = 7;
}
?>
Disclaimer
|
The oldskool pouët BBS is not the demoscene, please visit a demoparty. This is merely a forum for sceners, with obviously too much free time, to release their frustrations and request salted communitary feedback, as opposed to polluting the prod comments section.
New users: please take your vaccines before entering, don't expect instant praise, and try not to feel easily insulted.
Old users: please don't feed the trolls. Reoccuring annoying behavior will result in a heavily subjective ban. Just try not to piss off 90% of our active users with childish and/or idiotic behaviour and you should be safe.
You have been warned.
Also, copycat threads are the equivalent of putting glow and ribbons in your demo.
|
|
if($_SESSION["SCENEID_ID"]): ?>
else: ?>
endif; ?>
require("include/bottom.php"); ?>