Файл: forum_php/all/smiles_r.php
Строк: 8
<?
include '../system/sys.php';
include '../system/funcs.php';
if (!isset ($us)) {
header ('location: /');
exit;
}
H ('Разделы смайлов', 'Разделы смайлов');
if (DB :: $dbs -> querySingle ("SELECT COUNT(*) FROM `smiles_r`") != 00){
$query = DB :: $dbs -> query ("SELECT * FROM `smiles_r`");
while ($r = $query -> fetch ()) {
echo '<div class="lst">» <a href="/all/smile.php?id=' . $r['id'] . '">' . $r['name'] . '</a> [' . DB :: $dbs -> querySingle ("SELECT COUNT(*) FROM `smile` WHERE (`id_r`='" . $r['id'] . "')") . ']</div>';
}
}
else {
echo '<div class="list1">Разделов нет!</div>';
}
F ();
?>