/**
     * html_viewsub()
     *
     * @param mixed $list_sub
     * @return
     */
    function html_viewsub($list_sub)
    {
        global $global_array_shops_cat, $cut_num;
        if (empty($list_sub)) {
            return "";
        } else {
            $html = "<ul>\n";
            $list = explode(",", $list_sub);
            foreach ($list as $catid) {
                if ($global_array_shops_cat[$catid]['inhome'] == '1') {
                    $html .= "<li>\n";
                    $html .= "<a title=\"" . $global_array_shops_cat[$catid]['title'] . "\" href=\"" . $global_array_shops_cat[$catid]['link'] . "\">" . nv_clean60($global_array_shops_cat[$catid]['title'], $cut_num) . "</a>\n";
                    if (!empty($global_array_shops_cat[$catid]['subcatid'])) {
                        $html .= html_viewsub($global_array_shops_cat[$catid]['subcatid']);
                    }
                    $html .= "</li>\n";
                }
            }
            $html .= "</ul>\n";
            return $html;
        }
    }
}
$content = nv_pro_catalogs();
Exemplo n.º 2
0
     * @param mixed $list_sub
     * @param mixed $block_config
     * @return
     */
    function html_viewsub($list_sub, $block_config)
    {
        global $array_cat_shops;
        $cut_num = $block_config['cut_num'];
        if (empty($list_sub)) {
            return "";
        } else {
            $html = "<ul>\n";
            $list = explode(",", $list_sub);
            foreach ($list as $catid) {
                if ($array_cat_shops[$catid]['inhome'] == '1') {
                    $html .= "<li>\n";
                    $html .= "<a title=\"" . $array_cat_shops[$catid]['title'] . "\" href=\"" . $array_cat_shops[$catid]['link'] . "\">" . nv_clean60($array_cat_shops[$catid]['title'], $cut_num) . "</a>\n";
                    if (!empty($array_cat_shops[$catid]['subcatid'])) {
                        $html .= html_viewsub($array_cat_shops[$catid]['subcatid'], $block_config);
                    }
                    $html .= "</li>\n";
                }
            }
            $html .= "</ul>\n";
            return $html;
        }
    }
}
if (defined('NV_SYSTEM')) {
    $content = nv_pro_catalogs($block_config);
}