function olc_get_categoriesstatus_for_product($product_id)
{
    $categorie_query = olc_db_query("\n\tSELECT\n\tcategories_id\n\tFROM " . TABLE_PRODUCTS_TO_CATEGORIES . "\n\tWHERE products_id=" . $product_id);
    while ($categorie_data = olc_db_fetch_array($categorie_query)) {
        return olc_check_categories_status($categorie_data['categories_id']) >= 1;
    }
}
Customers Status v3.x  (c) 2002-2003 Copyright Elari elari@free.fr | www.unlockgsm.com/dload-osc/ | CVS : http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/elari/?sortby=date#dirlist
(c) 2004      XT - Commerce; www.xt-commerce.com

Released under the GNU General Public License
---------------------------------------------------------------------------------------*/
if (!$ajax_init) {
    olc_smarty_init($default_smarty, $cacheid);
    $default_smarty->assign('session', session_id());
    $main_content = EMPTY_STRING;
    // include needed functions
    require_once DIR_FS_INC . 'olc_customer_greeting.inc.php';
    require_once DIR_FS_INC . 'olc_get_path.inc.php';
    require_once DIR_FS_INC . 'olc_draw_hidden_field.inc.php';
    require_once DIR_FS_INC . 'olc_check_categories_status.inc.php';
    require_once DIR_FS_INC . 'olc_image_button.inc.php';
    if (olc_check_categories_status($current_category_id) >= 1) {
        $error = CATEGORIE_NOT_FOUND;
        include DIR_WS_MODULES . FILENAME_ERROR_HANDLER;
    } else {
        if (DO_GROUP_CHECK) {
            $group_check_c = " and c." . SQL_GROUP_CONDITION;
            $group_check_p = " and p." . SQL_GROUP_CONDITION;
        }
        $manufacturers_id = $_GET['manufacturers_id'];
        $filter_id = $_GET['filter_id'];
        $is_nested = $category_depth == 'nested';
        //if ((true || $is_nested) && $current_category_id)
        if ($is_nested) {
            $category_query = olc_db_query("\n\t\t\tselect\n      c.categories_image,\n      c.categories_template,\n      cd.categories_name,\n      cd.categories_description,\n      cd.categories_heading_title\n      from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd\n      where\n      c.categories_id = " . $current_category_id . "\n      and cd.categories_id = " . $current_category_id . $group_check_c . "\n      and cd.language_id =" . SESSION_LANGUAGE_ID);
            $category = olc_db_fetch_array($category_query);
            $cat_image_dir = DIR_WS_IMAGES . 'categories/';