} if ($cat_list[$f]['full_url'] . $product_content['id'] . '/' == $url_to_check && $product_content['parent'] == $cat_list[$f]['id']) { $page_found = true; if ($product_content['title'] != '') { $page_title = $product_content['title']; } else { $page_title = $product_content['name']; } $price = $product_content['price']; $product_content['price'] = number_format($product_content['price'] * $cur_admin['kurs'] / $cur_site['kurs'], 2); $product_content['price2'] = number_format($price * $cur_admin['kurs'] / $cur_site2['kurs'], 2); // ----парсинг контекта для вставки фотоальбома, таблицы и формы -- // $photo = new Photoalbum(); $product_content['description'] = $photo->pregReplace($product_content['description'], BASE_PATH, PHOTOS_FOLDER, PHOTOS_PER_PAGE_SUP); $table = new Table(); $product_content['description'] = $table->pregReplace($product_content['description'], BASE_PATH); $form = new Form(); $product_content['description'] = $form->pregReplace($product_content['description'], BASE_PATH); // ---- конец парсинга контекта для вставки фотоальбома, таблицы и формы -- // $smarty->assign("product", $product_content); if ($product_content['additional_products'] != '') { $additional_products = $db->get_all("SELECT * FROM fw_products WHERE id IN (" . $product_content['additional_products'] . ")"); for ($a = 0; $a < count($additional_products); $a++) { for ($a1 = 0; $a1 < count($cat_list); $a1++) { if ($additional_products[$a]['parent'] == $cat_list[$a1]['id']) { $additional_products[$a]['full_url'] = $cat_list[$a1]['full_url']; } } } $smarty->assign("additional_products", $additional_products); }
$smarty->assign("total_pages", $pager['total_pages']); $smarty->assign("current_page", $pager['current_page']); $smarty->assign("pages", $pager['pages']); $smarty->assign("mode", "archive"); $news_list = $db->get_all("SELECT * FROM fw_news WHERE {$where} ORDER BY publish_date DESC " . $limit_all); $page_title = $node_content['name'] . ' - ' . 'јрхив'; $smarty->assign("news_list", $news_list); $template = 'news_list.html'; break; case preg_match("/^([0-9]+)\$/", $url[$n]) && $url[$n - 1] == 'archive' && count($url) == 3: $navigation[] = array("url" => "archive", "title" => "јрхив"); $id = $url[$n]; $result = $db->get_single("SELECT * FROM fw_news WHERE id='{$id}' AND status='1'"); if ($result['id'] > 0) { // ----парсинг контекта дл¤ вставки фотоальбома, таблицы и формы -- // $photo = new Photoalbum(); $result['text'] = $photo->pregReplace($result['text'], BASE_PATH, PHOTOS_FOLDER, PHOTOS_PER_PAGE_SUP); $table = new Table(); $result['text'] = $table->pregReplace($result['text'], BASE_PATH); $form = new Form(); $result['text'] = $form->pregReplace($result['text'], BASE_PATH); // ---- конец парсинга контекта дл¤ вставки фотоальбома, таблицы и формы -- // $page_found = true; $navigation[] = array("url" => $result['title'], "title" => $result['title']); $page_title = $node_content['name'] . ' - ' . $result['title']; $smarty->assign("single_news", $result); $template = 'show_single_news.html'; } break; } }
$page_title = $document['title']; } else { $page_title = $document['name']; } if ($document['meta_keywords'] != '') { $meta_keywords = $document['meta_keywords']; } if ($document['meta_description'] != '') { $meta_description = $document['meta_description']; } $navigation[] = array("url" => "item_" . $document['id'], "title" => trim($document['name'])); $photo = new Photoalbum(); $document['description'] = $photo->pregReplace($document['description'], BASE_PATH, PHOTOS_FOLDER, PHOTOS_PER_PAGE_SUP); $document['small_description'] = $photo->pregReplace($document['small_description'], BASE_PATH, PHOTOS_FOLDER, PHOTOS_PER_PAGE_SUP); $table = new Table(); $document['description'] = $table->pregReplace($document['description'], BASE_PATH); $document['small_description'] = $table->pregReplace($document['small_description'], BASE_PATH); $form = new Form(); $document['description'] = $form->pregReplace($document['description'], BASE_PATH); $document['small_description'] = $form->pregReplace($document['small_description'], BASE_PATH); $smarty->assign("document", $document); $smarty->assign("content", $smarty->fetch($templates_path . "/document_elements.html")); } } break; } else { $page_found = true; $deny_access = true; } } }