sql_query("SELECT topicid, topicname, topicimage, topictext FROM ".$prefix."_topics ORDER BY topictext"); title("$sitename: "._ACTIVETOPICS.""); if ($db->sql_numrows($result) > 0) { $r_options = ""; if (isset($cookie[4])) { $r_options .= "&mode=$cookie[4]"; } if (isset($cookie[5])) { $r_options .= "&order=$cookie[5]"; } if (isset($cookie[6])) { $r_options .= "&thold=$cookie[6]"; } echo "
\n"
." \n" ."\n" ."· "._TOPIC.": $topictext \n" ."· "._TOTNEWS.": $numrows \n" ."· "._TOTREADS.": $reads\n" ." | \n"
."";
$result2 = $db->sql_query("SELECT sid, catid, title FROM ".$prefix."_stories WHERE topic='$topicid' ORDER BY sid DESC LIMIT 0,10");
$num = $db->sql_numrows($result2);
if ($num != 0) {
while ($row2 = $db->sql_fetchrow($result2)) {
$sid = intval($row2['sid']);
$catid = intval($row2['catid']);
$title = stripslashes(check_html($row2['title'], "nohtml"));
$row3 = $db->sql_fetchrow($db->sql_query("SELECT title FROM ".$prefix."_stories_cat WHERE catid='$catid'"));
$rtitle = stripslashes(check_html($row3['title'], "nohtml"));
if ($catid == 0) {
$cat_link = "";
} else {
$cat_link = "$rtitle: ";
}
echo " $cat_link$title "; } if ($num == 10) { echo ""; } } else { echo ""._NONEWSYET.""; } echo " |