0) { $category_depth = 'products'; // display products } else { $category_parent_query = "select count(*) as total from ".TABLE_CATEGORIES." where parent_id = '".$current_category_id."'"; $category_parent_query = xtDBquery($category_parent_query); $category_parent = xtc_db_fetch_array($category_parent_query, true); if ($category_parent['total'] > 0) { $category_depth = 'nested'; // navigate through the categories } else { $category_depth = 'products'; // category has no products, but display the 'no products' message } } } require (DIR_WS_INCLUDES.'header.php'); include (DIR_WS_MODULES.'default.php'); $smarty->assign('language', $_SESSION['language']); $smarty->caching = 0; if (!defined(RM)) $smarty->load_filter('output', 'note'); $smarty->display(CURRENT_TEMPLATE.'/index.html'); include ('includes/application_bottom.php'); ?>