= 3) { $cat = substr($cat_id, 0, 1); $result = mysqli_query($handler_top, "SELECT name FROM catalog WHERE id='" . $cat . "'"); $category2 = mysqli_fetch_array($result); mysqli_free_result($result); } } ?>
   "; ?>Каталог ресурсов"; ?>" . $category2['name'] . ""; ?>
'" . $cat_id . "'"); $col = mysqli_num_rows($result); $i=1; print "
"; while ($row = mysqli_fetch_array($result)) { $result2 = mysqli_query($handler_top, "SELECT count(*) FROM sites WHERE accept='1' AND dir='" . $row['id'] . "'"); $count = mysqli_fetch_array($result2); mysqli_free_result($result2); print "" . $row['name'] . ""; if ($count[0]) print " (" . $count[0] . ")"; //if ($row['name'] == "прочее") print "..."; if ($i % 4 == 0 && $i) print ""; else print "
"; $i++; } mysqli_free_result($result); print "
"; ?>
   Лучшие 10 ресурсов в данном разделе
"; showYandexDirect(1); include($sr . '/catalog/subcat.php'); print "
"; showYandexDirect(2); listPagesCat(); } } else { include($sr . '/template/catalog.tmpl'); } } ?>
   Новые сайты в каталоге

"; print "Добавить сайт в каталог"; } ?>
  Страницы: "; for ($i = 0; $i < ceil($cnt / $items_per_page); $i++) { if ($i == $page) print ' ' . ($i + 1) . ' '; else { if (isset($cat_id)) $csc = "&cat_id=" . $cat_id; else $csc = ""; print ' " . ($i + 1) . ' '; } } print ""; } function showYandexDirect($id) { ?>