\n\nTopics\n\n\n

\n"; $barefooter="

\n\n\n"; function einde($eindStr) { global $bareheader, $barefooter; echo $bareheader; eScript($eindStr); echo $barefooter; die(); } $forumtable="forumberichten"; if ($admin=="yes") { if ($_COOKIE["cusertype"]=="superuser") { $doublecheck=checksuper(); if ($doublecheck!="ok") { einde($LANG_hacker); } else { $forumtable="adminberichten"; } } else { einde("".$LANG_adminforum."".$LANG_adminforum); } } // laat alle topics in een forum zien $numcols=6; $tpage=max(0,$tpage); if ($forumid<=0 && $topicid>0) { $result = mysql_query("SELECT ".$forumtable.".forumid FROM ".$forumtable." LEFT JOIN forumaccess ON ".$forumtable.".forumid = forumaccess.forumid WHERE (forumaccess.userid='".$_COOKIE["cuserid"]."' OR isnull(forumaccess.userid)) AND ".$forumtable.".id=".$topicid); $row=mysql_fetch_array($result); if ($row) { $forumid=$row["forumid"]; mysql_free_result($result); } else { einde($LANG_unknownforum); } } $result = mysql_query("SELECT forums.readonly, forums.membersonly, forums.leeftijd, forums.titel, forumcats.id as catid, forumcats.catnaam FROM forums LEFT JOIN forumcats ON forums.categorie = forumcats.id LEFT JOIN forumaccess ON forums.id = forumaccess.forumid WHERE (forumaccess.userid='".$_COOKIE["cuserid"]."' OR isnull(forumaccess.userid)) AND forums.id=".$forumid); $row=mysql_fetch_array($result); if ($row) { $forumname=$row["titel"]; $catid=$row["catid"]; $catnaam=$row["catnaam"]; $membersonly = $row["membersonly"]; $leeftijd=$row["leeftijd"]; $readonly = $row["readonly"]; mysql_free_result($result); } else { einde($LANG_unknownforum); } if ($membersonly=="ja") { $doenstr=$LANG_memberforum; $returnpage=$_SERVER["SCRIPT_NAME"]."?".$_SERVER["QUERY_STRING"]; if ($returnpage=="" || $returnpage=="null") { $returnpage=$_SERVER["HTTP_REFERER"]; } include_once("frm_checklogin.php"); if ($leeftijd>0) { $jouwleeftijd = round(max(1,intval($instel[16]))/365); if ($jouwleeftijd<$leeftijd) { if ($instel[16]=="") { einde($LANG_ageforum); } else { einde($LANG_tooyoungA.$leeftijd.$LANG_tooyoungB); } } } } $tmp_s="\n"; $tmp_s.="\n\n".$forum_vars_title." :: ".$forumname."\n"; $tmp_s.="\n"; $tmp_s.="\n"; $tmp_s.="\n"; $tmp_s.="\n"; $tmp_s.="\n"; $tmp_s.="\n"; $tmp_s.="\n"; $tmp_s.="\n"; $tmp_s.="\n"; $tmp_s.="\n"; if ($_COOKIE["cuserid"] && $_COOKIE["cvaliduser"]) { $result = mysql_query("SELECT count(*) as aantal FROM msgs WHERE map=0 AND aan_userid=".$_COOKIE["cuserid"]." AND gelezen='nee'"); if ($result) { $row=mysql_fetch_array($result); if ($row) { if ($row["aantal"]>0) { $tmp_s.="\n"; $showpms = "ShowPopUp('".$LANG_youhave." ".$row["aantal"]." ".$LANG_newmsgs."','".$forum_url."berichten.php');\n"; } else { $showpms = ""; } mysql_free_result($result); } } } $tmp_s.="\n\n"; echo $tmp_s; $result = mysql_query("SELECT count(*) as aantal FROM ".$forumtable." where forumid=".$forumid." and topic=0 and deleted='nee'"); $row=mysql_fetch_array($result); $maxreplies=$row["aantal"]; $showonlineusers=3;include_once("online.php"); $fpagestr=""; if ($maxreplies>$maxposts) { $fpagestr="Page "; $zb=0; if ($admin=="yes") { $adminstr = "&admin=".$admin; } else { $adminstr = ""; } for ($z=1;$z<=$maxreplies;$z+=$maxposts) { $zb++; $pstarter=($zb-1)*$maxposts; if ($tpage==$pstarter) { $fpagestr.="[".$zb."] "; } else { $fpagestr.="".$zb." "; } } } if ($_COOKIE["cusertype"]=="superuser") { $showtbox = 1; } else { $showtbox = 0; } wScript("maakTopicsTabel(\"".$fpagestr."\", \"".$_COOKIE["clastvisit"]."\",".$showtbox.", \"".$readonly."\");"); wScript("maakTopicsHeader('".$_COOKIE["cuserid"]."','".$_COOKIE["cusername"]."', ".$maxposts.", '".cSlash($onlineuserStr)."','".cSlash($announcement)."', $forumid, '".cSlash($forumname)."', $catid, '".cSlash($catnaam)."', $tpage, '".$admin."');"); echo "\n\n\n"; ?>