Example #1
0
<?php

$boxID = 'sections';
$box_info_query = tep_db_query("select blocks_name from " . TABLE_BLOCKS . " where blocks_filename = '" . tep_db_input(basename(__FILE__)) . "' and language_id = '" . (int) $languages_id . "'");
$box_info = tep_db_fetch_array($box_info_query);
$boxHeading = $box_info['blocks_name'];
$boxContent = tep_show_sections_tree();
include DIR_WS_TEMPLATES_BOXES . 'box.php';
Example #2
0
function tep_show_sections_tree($parent_id = 0, $show_all = false, $level = 0)
{
    global $languages_id, $current_information_id, $sPath_array;
    if (!is_array($sPath_array)) {
        $sPath_array = array();
    }
    $sections_string = '';
    $menu = tep_get_sections_menu($parent_id, $show_all);
    reset($menu);
    while (list($i, $menu_item) = each($menu)) {
        if (tep_not_null($menu_item['link'])) {
            $active = $menu_item['active'];
            $sections_string .= '		<div class="li' . ($level == 0 && $i == 0 ? '_first' : '') . '"><div class="level_' . $level . '"><a href="' . $menu_item['link'] . '"' . ($active ? ' class="active"' : '') . '>' . $menu_item['title'] . '</a></div></div>' . "\n";
            if ($menu_item['type'] == 'section' && $menu_item['active'] == true) {
                $sections_string .= tep_show_sections_tree($menu_item['id'], $show_all, $level + 1);
            }
        }
    }
    return $sections_string;
}
Example #3
0
<?php

$section_path = 'from_abroad';
$boxID = 'sections_' . $section_path;
$box_info_query = tep_db_query("select sections_id, sections_name from " . TABLE_SECTIONS . " where sections_path = '" . tep_db_input($section_path) . "' and language_id = '" . (int) $languages_id . "'");
if (tep_db_num_rows($box_info_query) > 0) {
    $box_info = tep_db_fetch_array($box_info_query);
    $boxHeading = '<a href="' . tep_href_link(FILENAME_DEFAULT, 'sPath=' . $box_info['sections_id']) . '">' . $box_info['sections_name'] . '</a>';
    $boxContent = tep_show_sections_tree($box_info['sections_id']);
    include DIR_WS_TEMPLATES_BOXES . 'box.php';
}