php require_once _system PDO_connect php title Просмотр категорий requ

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?php
require_once('_system/PDO_connect.php');
$title = 'Просмотр категорий';
require_once('_system/Headers.php');
ini_set('error_reporting', E_ALL);
$inf = core::$dbs->queryFetch("SELECT * FROM `cat` WHERE `id` = ? LIMIT 1",array($id));
if(empty($inf['id'])){
header('location:/');
die();
}
echo '<div class="menu">'.$inf['name'].'</div><div class="obvodka">';
$count = core::$dbs->querySingle("SELECT COUNT(id) FROM work WHERE cid = '$id'",0);
$n = new pager($count,$end, '?');
if ($count == 0) err('Нет действующих работ!');
echo'ddddddddd';
$array = core:: $dbs-> query("SELECT * FROM work WHERE cid = '$id' ORDER BY time DESC LIMIT $n->start,$end",array($id));
while($arr = $array -> fetch()){
echo '<div class="main"><a href="/work_'.$arr['id'].'.html">
<img style="padding-right:0px; border-radius: 20px; border: 2px solid #B89E44;" src="'.$arr['screen'].'" alt="Скриншот" width="80" height="80"> '.$arr['name'].'</a></div>';
}
$n->pag();
require_once('_system/Footers.php');
?>