caching = false; $smarty -> cache_lifetime = 86400; $_GET['id'] = ( $_GET['id'] ) ? $_GET['id'] : 0; $categoryInfo=\DB::getAll("SELECT * FROM `tovar_category` WHERE `id`=?", $_GET['id']); $smarty->assign('page_info', $categoryInfo);//получаем инфо о категории $childrenCategory=\DB::getAll("SELECT * FROM `tovar_category` WHERE `status` = 1 AND `category` = ? ORDER BY `title` LIMIT 33", $_GET['id'] ); $smarty->assign('list', $childrenCategory);//получаем дочерние категории if ($_GET['id']>0) $childrenTovar=\DB::getAll("SELECT * FROM `tovar` WHERE `category` = ? AND `status`=1", $_GET['id'] ); else $childrenTovar=\DB::getAll("SELECT * FROM `tovar` WHERE `category`IS NULL AND `status`=1 ORDER BY RANDOM() LIMIT 200" ); for ($i=0; $iassign('list2', $childrenTovar);//получаем дочерние категории /* ---------------------------------------------------------------------- 19.09.2022 Узнаем обложку раздела ---------------------------------------------------------------------- */ $mainImg=\DB::getValue("SELECT `filename` FROM `tovar_category_img` WHERE `tovar_category_id`=?", $_GET['id']); $smarty->assign('oblozhka', $mainImg); /* ---------------------------------------------------------------------- 28.12.2022 Получаем теги ---------------------------------------------------------------------- */ $meta = \core::getMeta( $_GET['mod'], $_GET['id'] ); $smarty -> assign( 'keywords', $meta['keywords'] ); $smarty -> assign( 'description', $meta['description'] ); ?>