File size: 824B
<?php
include 'inc/db.php';
include 'inc/1.php';
$a=mysql_query("SELECT * FROM `obmen_t` WHERE `razdel` = '0'");
$b=1;
$count=0;
while ($f=mysql_fetch_assoc($a)){
$o=($b%2);
//общий подсчет
$u=mysql_query("SELECT * FROM `obmen_t` WHERE `razdel` = '$f[id]'");
while ($r=mysql_fetch_assoc($u)){
$d=mysql_query("SELECT * FROM `obmen` WHERE `razdel` = '$r[id]'");
while ($g=mysql_fetch_assoc($d)){
$count++;
}
}
//конец
echo "<div class='p$o'><img src='icon/razdel.gif'> <a href='orazdel.php?id=$f[id]'>".htmlspecialchars($f['name'])."</a> ($count)<br>".htmlspecialchars($f['opis'])."</div>";
$b++;
$count=0;
}
msg("<a href='ofnewts.php'>Новые файлы</a>");
if ($user['admin']==1)msg("<a href='onewr.php?id=0'>Новый раздел</a>");
include_once 'inc/foot.php';
?>