Файл: vsime.com/devices/inc/act_producer.php
Строк: 48
<?
if (isset($_GET['id_producer'])) {
$cat = mysqli_fetch_array(mysqli_query($dbi, "SELECT * FROM `devices_cat` WHERE `id` = '".intval($_GET['id_producer'])."'"));
if (!$cat['id']) {
$title .= ' - Ошибка!';
show_errors("Произврдитель не найден");
ex_foot();
}
$navigation .= " / <a href='?act=producers'>Производители</a> / ".hsc($cat['name']);
$title .= " / Производители / ".hsc($cat['name']);
ex_head();
echo "<div class='grand_h'>n";
echo "<table>n";
echo "<td><a href='/devices'><span class='block_l'>Популярные</span></a></td>n";
echo "<td><span class='block_l'>Производители</span></td>n";
echo "<td><a href='/devices/?act=search'><span class='block_l'>Поиск</span></a></td>n";
echo "</table>n";
echo "</div>n";
$count_results = mysqli_result("SELECT COUNT(*) FROM `devices_list` WHERE `id_cat` = '$cat[id]'");
$count_pages = navi :: count_pages($count_results);
$page = navi :: page();
$start = navi :: start_pages();
if (!$count_results) {
echo "<div class='list_empty'>n";
echo "Список девайсов пустn";
echo "</div>n";
}
$query = mysqli_query($dbi, "SELECT * FROM `devices_list` WHERE `id_cat` = '$cat[id]' ORDER BY `id` ASC LIMIT $start, $config[rop]");
while ($post = mysqli_fetch_array($query)) {
echo "<div class='list'>n";
echo "<div class='left'>n";
echo "<img src='/i/devices/device_$post[id]_small.png' />n";
echo "</div>n";
echo "<div class='overf_hid'>n";
echo "<a href='?act=device_info&id_device=$post[id]'>".hsc($post['name'])."</a>n";
echo "</div>n";
echo "<div class='clear'></div>n";
echo "</div>n";
}
navi :: pages_show("?act=producer&id_producer=$cat[id]&");
echo "<div class='foot'>n";
echo image_back()." <a href='/devices/?act=producers'>Назад</a>n";
echo "</div>n";
ex_foot();
}
?>