templatedir/header.phtml"); include("templates/site_map.phtml"); include("$CFG->templatedir/footer.phtml"); /****************************************************************************** * FUNCTIONS *****************************************************************************/ function get_sub_categories($catid=0) { /* get the name and description of all the sub-categories under this one */ $qid = mysql_query("SELECT id, name, description FROM categories WHERE parent_id = $catid AND id > 0"); return $qid; } function get_products($category_id=0) { /* get all the products under this category */ $qid = mysql_query(" SELECT p.id ,p.name ,p.description ,p.color ,p.sku1 ,p.size1 ,p.sku2 ,p.size2 ,pc.category_id FROM products p ,products_categories pc WHERE p.id = pc.product_id AND pc.category_id = $category_id "); return $qid; } ?>