$subClass = $db->get_row($sql, ARRAY_A); $subdivisionTemplate = $nc_core->catalogue->get_current('Template_ID') != $innerSubdivision['Template_ID'] ? $nc_core->template->get_by_id($innerSubdivision['Template_ID']) : null; if ($i > 0) { echo "<div " . nc_ls_display_pointer($innerSubdivisionId, $sub == $innerSubdivisionId) . "></div>"; } if ($subdivisionTemplate) { if ($File_Mode) { $longpageTemplateView = new nc_template_view($nc_core->TEMPLATE_FOLDER, $nc_core->db); $longpageTemplateView->load_template($innerSubdivision['Template_ID'], $subdivisionTemplate['File_Path']); foreach ($longpageTemplateView->get_all_settings_path_in_array() as $path) { include $path; } $longpageTemplateView->fill_fields(); } if ($File_Mode) { echo $longpageTemplateView->get_header(); } else { eval("echo \"" . $subdivisionTemplate['Header'] . "\";"); } } echo "<div " . nc_ls_display_container($innerSubdivisionId) . ">"; if ($sub == $innerSubdivisionId) { echo $nc_result_msg; } else { if ($subClass) { echo nc_objects_list($innerSubdivisionId, $subClass['Sub_Class_ID']); } } echo "</div>"; if ($subdivisionTemplate) { if ($File_Mode) {
if ($nc_core->template->get_current("CustomSettings") && $nc_core->subdivision->get_current('Template_ID') != $template) { require_once $nc_core->ADMIN_FOLDER . "array_to_form.inc.php"; $nc_a2f = new nc_a2f($nc_core->template->get_current("CustomSettings"), array()); $template_settings = $nc_a2f->get_values_as_array(); } if (!$templatePreview) { $array_settings_path = $template_view->get_all_settings_path_in_array(); foreach ($array_settings_path as $path) { include $path; } } $template_view->fill_fields(); if ($templatePreview) { eval('?>' . $template_view->get_settings()); } $template_env['Header'] = $template_view->get_header(); $template_env['Footer'] = $template_view->get_footer(); // %FIELD replace with inherited template field value $template_env = $nc_core->template->convert_subvariables($template_env); } $template_header = ""; $template_footer = ""; if (!$isNaked && $nc_core->get_page_type() != 'rss' && $nc_core->get_page_type() != 'xml') { $template_header = $template_env['Header']; $template_footer = $template_env['Footer']; if ($nc_core->subdivision->get_current("UseMultiSubClass") == 2 && !$nc_core->get_variable("inside_admin")) { $template_header_code = ''; $array_headers_path = $template_view->get_all_header_path_in_array(); foreach ($array_headers_path as $path) { $template_header_code .= file_get_contents($path); }