$row7 = $db->sql_fetchrow($db->sql_query("select title, content, active, position from ".$prefix."_blocks where blockfile='block-Login.php' $querylang"));
$title = $row7['title'];
$content = $row7['content'];
$active = $row7['active'];
$position = $row7['position'];
if (($active == 1) AND ($position == "r") AND (!is_user($user))) {
loginbox();
}
$boxtitle = ""._RELATED."";
$boxstuff = "<font class=\"content\">";
$result8 = $db->sql_query("select name, url from ".$prefix."_related where tid='$topic'");
$querylang = "AND (alanguage='$currentlang' OR alanguage='')"; /* the OR is needed to display stories who are posted to ALL languages */
} else {
$querylang = "";
}
$row9 = $db->sql_fetchrow($db->sql_query("select sid, title from ".$prefix."_stories where topic='$topic' $querylang order by counter desc limit 0,1"));