Файл: pages/smiles/index.php
Строк: 38
<?php
require_once '../../sys/inc/start.php';
require_once '../../sys/inc/compress.php';
require_once '../../sys/inc/sess.php';
require_once '../../sys/inc/settings.php';
require_once '../../sys/inc/db_connect.php';
require_once '../../sys/inc/ipua.php';
require_once '../../sys/inc/fnc.php';
require_once '../../sys/inc/user.php';
$set['title'] = 'Смайлы';
require_once '../../sys/inc/thead.php';
only_reg();
aut();
err();
$k_post = mysql_result(mysql_query("SELECT COUNT(*) FROM `smiles_dir`"), 0);
$k_page = k_page($k_post, $set['p_str']);
$page = page($k_page);
$start = $set['p_str'] * $page - $set['p_str'];
echo "<div class = 'menu_razd'>Категории смайлов</div>";
if ($k_post == 0) {
echo "<table class = 'foot'><tr><td class = 'null'>";
echo "<img src = '/style/icons/bullet_error.png' /> Нет результатов";
echo "</td></tr></table>";
}
$q = mysql_query("SELECT * FROM `smiles_dir` ORDER BY `pos` ASC LIMIT $start, $set[p_str]");
while ($post = mysql_fetch_array($q)) {
$smile = mysql_result(mysql_query("SELECT COUNT(*) FROM `smiles_spis` WHERE `id_dir` = '$post[id]'"), 0);
echo "<table class = 'foot'><tr><td class = 'null'>";
echo "<img src = '/style/icons/folder.png' /> <a href = 'dir.php?id=$post[id]'>$post[name]</a> ";
echo "<span class = 'count1'>";
echo $smile;
echo "</span></td></tr></table>";
}
if ($k_page > 1) {
str('index.php?', $k_page, $page);
}
require_once '../../sys/inc/tfoot.php';