Код:
echo "<font class=\"content\"><a href=\"modules.php?name=$module_name&d_op=viewdownload&ci d=$cid\">$stitle</a>$cnum</font>";
$space++;
Код:
function getparentlink($parentid,$title) {
global $prefix, $db, $module_name;
$parentid = intval($parentid);
$sql = "SELECT cid, title, parentid FROM ".$prefix."_downloads_categories WHERE cid='$parentid'";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$cid = intval($row['cid']);
$ptitle = filter($row['title'], "nohtml");
$pparentid = intval($row['parentid']);
if (!empty($ptitle)) $title="<a href=modules.php?name=$module_name&d_op=viewdownlo ad&cid=$cid>$ptitle</a>/".$title;
if ($pparentid!=0) {
$title=getparentlink($pparentid,$ptitle);
}
return $title;