|
10.06.2006, 01:56
BFG Открываем modules/Web_Links/index.php
находим:
PHP код:
$result2 = $db->sql_query("SELECT cid, title, cdescription from ".$prefix."_links_categories where parentid='$cid' order by title");
Заменяем на:
PHP код:
$result2 = $db->sql_query("SELECT c.cid, c.title, c.cdescription, COUNT(l.lid) AS lcount FROM ".$prefix."_links_categories AS c LEFT JOIN ".$prefix."_links_links AS l ON(l.cid=c.cid) WHERE c.parentid='$cid' GROUP BY c.cid ORDER BY c.title");
Находим:
PHP код:
echo "<td><font class=\"option\"><strong><big>·</big></strong> <a href=\"modules.php?name=Web_Links&l_op=viewlink&cid=$cid2 \"><b>$title2</b></a></font>";
Заменяем на:
PHP код:
$lcount = intval($row2['lcount']); echo "<td><font class=\"option\"><strong><big>·</big></strong> <a href=\"modules.php?name=Web_Links&l_op=viewlink&cid=$cid2 \"><b>$title2</b></a></font> ($lcount)";
Находим:
PHP код:
$result = $db->sql_query("select cid, title, cdescription from ".$prefix."_links_categories where parentid=0 order by title");
Заменяем на:
PHP код:
$result = $db->sql_query("SELECT c.cid, c.title, c.cdescription, COUNT(l.lid) AS lcount FROM ".$prefix."_links_categories AS c LEFT JOIN ".$prefix."_links_links AS l ON(l.cid=c.cid) WHERE c.parentid=0 GROUP BY c.cid ORDER BY c.title");
Находим:
PHP код:
echo "<td><font class=\"option\"><strong><big>·</big></strong> <a href=\"modules.php?name=Web_Links&l_op=viewlink&cid=$cid\"><b>$title</b></a></font>";
Заменяем на:
PHP код:
$lcount = intval($row2['lcount']); echo "<td><font class=\"option\"><strong><big>·</big></strong> <a href=\"modules.php?name=Web_Links&l_op=viewlink&cid=$cid\"><b>$title</b></a></font> ($lcount)";
|
|