<?php defined("CATALOG") or die("Access denied"); include 'models/main_model.php'; $categories = get_cat(); $categories_tree = map_tree($categories); $categories_menu = categories_to_string($categories_tree); // получение страниц меню $pages = get_pages(); check_remember();
<?php defined("CATALOG") or die("Access denied"); ?> <li> <a href="<?php echo PATH; ?> category/<?php echo $category['alias']; ?> "><?php echo $category['title']; ?> </a> <?php if (isset($category['childs']) && $category['childs']) { ?> <ul> <?php echo categories_to_string($category['childs']); ?> </ul> <?php } ?> </li>
<?php defined("CATALOG") or die("Access denied"); include 'main_controller.php'; include "models/{$view}_model.php"; $get_one_product = get_one_product($product_alias); if (!$get_one_product) { include VIEW . "404.php"; exit; } // получаем ID категории $id = $get_one_product['parent']; // ID товара $product_id = $get_one_product['id']; // кол-во комментариев $count_comments = count_comments($product_id); // получаем комментарии к товару $get_comments = get_comments($product_id); // строим дерево $comments_tree = map_tree($get_comments); // получаем HTML-код комментариев $comments = categories_to_string($comments_tree, 'comments_template.php'); include 'libs/breadcrumbs.php'; include VIEW . "{$view}.php";
?> </span></b> <?php echo $category['created']; ?> </em> </div> <div> <?php echo nl2br(htmlspecialchars($category['comment_text'])); ?> <p class='open-form'> <a class="reply" data="<?php echo $category['comment_id']; ?> ">Ответить</a> </p> </div> </div> <?php if (isset($category['childs']) && $category['childs']) { ?> <ul> <?php echo categories_to_string($category['childs'], 'comments_template.php'); ?> </ul> <?php } ?> </li>