Это отдельная панель и разделы берутся с БД
Download
Код
if (!defined("IN_FUSION")) { header("Location:../../index.php"); exit; }
include INFUSIONS."downloads_menu_panel/locale/".$settings['locale'].".php";
function NomDow ($nome, $id){
global $num, $db_prefix;
$result = dbquery("SELECT * FROM ".$db_prefix."download_cats WHERE download_cat_idc ='$nome' AND download_cat_id ".$id." ORDER BY download_cat_id");
while ($data = dbarray($result)) {
$num =$num + dbcount("(download_cat)", "downloads", "download_cat='".$data['download_cat_id']."'");
NomDow ($data['download_cat_id'],'');
}
return $num;
}
$result2 = dbquery("SELECT * FROM ".$db_prefix."download_cats WHERE download_cat_idc='0' ORDER BY download_cat_id ASC");
if (dbrows($result2) != 0) {
openside($locale['Dik_001']);
echo "<table width='100%' cellpadding='0' cellspacing='0'>";
while ($data2 = dbarray($result2)) {
$num = NomDow ('0', "='".$data2['download_cat_id']."'");
echo "<tr>
<td class='small'>
<img src='".THEME."images/bullet.gif'>
<a href='".BASEDIR."downloads.php?cat_id=".$data2['download_cat_id']."' title='".$data2['download_cat_name']."' target='_self' class='side'>".$data2['download_cat_name']."</a>
</td>
<td align='right'>".$num."</td>
</tr>";
$num=0;
}
echo "</table>";
closeside();
}
Статьи
Код
if (!defined("IN_FUSION")) { header("Location:../../index.php"); exit; }
include INFUSIONS."articles_menu_panel/locale/".$settings['locale'].".php";
$result = dbquery("SELECT * FROM ".$db_prefix."article_cats WHERE ".groupaccess('article_cat_access')." ORDER BY article_cat_id");
$rows = dbrows($result);
if ($rows != 0) {
openside($locale['ma_01']);
echo "<table width='100%' cellpadding='0' cellspacing='0'>";
while ($data = dbarray($result)) {
$num = dbcount("(article_cat)", "articles", "article_cat='".$data['article_cat_id']."'");
echo "<tr>\n<td class='small' valign='top'>
<img src='".THEME."images/bullet.gif'><td class='small'>
<a href='".BASEDIR."articles.php?cat_id=".$data['article_cat_id']."' title='".$data['article_cat_name']."' target='_self' class='side'>".$data['article_cat_name']."</a>
</td>
<td align='right'>".$num."</td>
</tr>";
}
echo "</table>\n";
closeside();
}