if ($value > 0) {
        $column_list[] = $key;
    }
}
// Eversun mod for sppp
if (!isset($_SESSION['sppc_customer_group_id'])) {
    $customer_group_id = 'G';
} else {
    $customer_group_id = $_SESSION['sppc_customer_group_id'];
}
// Eversun mod end for sppp
$customer_group_array = array();
if (!isset($_SESSION['sppc_customer_group_id'])) {
    $customer_group_array[] = 'G';
} else {
    $customer_group_array = tep_get_customers_access_group($_SESSION['customer_id']);
}
$select_column_list = '';
for ($i = 0, $n = sizeof($column_list); $i < $n; $i++) {
    switch ($column_list[$i]) {
        case 'PRODUCT_LIST_MODEL':
            $select_column_list .= 'p.products_model, ';
            break;
        case 'PRODUCT_LIST_MANUFACTURER':
            $select_column_list .= 'm.manufacturers_name, ';
            break;
        case 'PRODUCT_LIST_QUANTITY':
            $select_column_list .= 'p.products_quantity, ';
            break;
        case 'PRODUCT_LIST_IMAGE':
            $select_column_list .= 'p.products_image, ';
function tep_show_category3($cid, $cpath, $COLLAPSABLE, $level = 0)
{
    global $categories_string3, $languages_id, $categories;
    $selectedPath = array();
    // Get all of the categories on this level
    $level++;
    $customer_group_array = array();
    if (!isset($_SESSION['sppc_customer_group_id'])) {
        $customer_group_array[] = 'G';
    } else {
        $customer_group_array = tep_get_customers_access_group($_SESSION['customer_id']);
    }
    $categories_query_raw = "SELECT c.categories_id, cd.categories_name, c.parent_id\r\n                             from " . TABLE_CATEGORIES . " c,\r\n                                  " . TABLE_CATEGORIES_DESCRIPTION . " cd\r\n                           WHERE c.parent_id = '" . $cid . "'\r\n                             and c.categories_id = cd.categories_id\r\n                             and cd.language_id='" . $languages_id . "'";
    $categories_query_raw .= tep_get_access_sql('c.products_group_access', $customer_group_array);
    $categories_query_raw .= " ORDER BY sort_order, cd.categories_name";
    $categories_query = tep_db_query($categories_query_raw);
    while ($categories = tep_db_fetch_array($categories_query)) {
        if (!isset($categories[$level]['parent_id']) || $categories[$level]['parent_id'] == "") {
            $categories[$level]['parent_id'] = 0;
        }
        $categories[$level]['categories_id'] = $categories[$level]['parent_id'] + 1;
        // Add category link to $categories_string3
        for ($a = 1; $a < $level; $a++) {
            $categories_string3 .= "&nbsp;&nbsp;";
        }
        $categories_string3 .= '<a href="';
        $cPath_new = $cpath;
        // if ($categories[$level]['parent_id'] > 0) {
        if ($categories['parent_id'] > 0) {
            $cPath_new .= "_";
        }
        $cPath_new .= $categories['categories_id'];
        // added for CDS CDpath support
        $CDpath = isset($_SESSION['CDpath']) ? '&CDpath=' . $_SESSION['CDpath'] : '';
        $cPath_new_text = "cPath=" . $cPath_new . $CDpath;
        $categories_string3 .= tep_href_link(FILENAME_DEFAULT, $cPath_new_text);
        $categories_string3 .= '">';
        if ($_GET['cPath']) {
            $selectedPath = explode("_", $_GET['cPath']);
        }
        if (in_array($categories['categories_id'], $selectedPath)) {
            $categories_string3 .= '<b>';
        }
        if ($categories[$level]['categories_id'] == 1) {
            $categories_string3 .= '<u>';
        }
        $categories_string3 .= tep_db_decoder($categories['categories_name']);
        if ($COLLAPSABLE && tep_has_category_subcategories($categories['categories_id'])) {
            $categories_string3 .= ' ->';
        }
        if ($categories[$level]['categories_id'] == 1) {
            $categories_string3 .= '</u>';
        }
        if (in_array($categories['categories_id'], $selectedPath)) {
            $categories_string3 .= '</b>';
        }
        $categories_string3 .= '</a>';
        if (SHOW_COUNTS) {
            $products_in_category = tep_count_products_in_category($categories['categories_id']);
            if ($products_in_category > 0) {
                $categories_string3 .= '&nbsp;(' . $products_in_category . ')';
            }
        }
        $categories_string3 .= '<br>';
        // If I have subcategories, get them and show them
        if (tep_has_category_subcategories($categories['categories_id'])) {
            if ($COLLAPSABLE) {
                if (in_array($categories['categories_id'], $selectedPath)) {
                    tep_show_category3($categories['categories_id'], $cPath_new, $COLLAPSABLE, $level);
                }
            } else {
                tep_show_category3($categories['categories_id'], $cPath_new, $COLLAPSABLE, $level);
            }
        }
    }
}