Execute($categories_query_all); while (!$categories->EOF) { $root_first=$root_first+1; $content_root_b='
  • '; $content_root_e='
  • '; $category_link=$categories->fields['categories_id']; $category_name=$categories->fields['categories_name']; //$content_see_all.=''.$category_name.''; //Ŀ¼ ڵ ˵ $content_root= ''.$category_name.''.zen_count_products_in_category($category_link).''; $categories_child_query = "select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = cd.categories_id and c.categories_status=1 and c.parent_id='" . $category_link . "' and cd.language_id = '" . (int)$_SESSION['languages_id'] ."' order by c.parent_id,c.sort_order, cd.categories_name"; $categories_child = $db->Execute($categories_child_query); if (zen_has_category_subcategories($category_link)){ $content_dd_b='
      '; $content_dd_e='
    '; $content_center_c=''; $content_left_c=''; $j=1; $i=01; while (!$categories_child->EOF) { $category_link1 = $categories_child->fields['categories_id']; $category_name1 = $categories_child->fields['categories_name']; $categories_child2_query = "select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = cd.categories_id and c.categories_status=1 and c.parent_id='" . $category_link1 ."' and cd.language_id = '" . (int)$_SESSION['languages_id'] ."' order by c.parent_id,c.sort_order, cd.categories_name"; $categories_child2 = $db->Execute($categories_child2_query); if (zen_has_category_subcategories($category_link1)){//˵ѯ $content_left_count=$content_left_count+1; $content_child2=''; $content_child2_e=''; $content_child2_b='
  • '.$i.''. $category_name1.''.zen_count_products_in_category($category_link1).'
  • '; //
  • $i=1; while (!$categories_child2->EOF) { $category_link2=$categories_child2->fields['categories_id']; $category_name2=$categories_child2->fields['categories_name']; $content_child2.='
    '. $category_name2.'
    '; //
    if ($i==5){ break; } $i=$i+1; $categories_child2->MoveNext(); } $content_child2=$content_child2.'
    View All
    '; $content_left_c.=$content_child2_b.$content_child2_e; //$content_left_c.=$content_child2; } else{ if ($j==1) { $content_left_c.='
  • '.$i.''.$categories_child->fields['categories_name'].''.zen_count_products_in_category($categories_child->fields['categories_id']).'
  • ';} else { $content_left_c.='
  • '.$i.''.$categories_child->fields['categories_name'].''.zen_count_products_in_category($categories_child->fields['categories_id']).'
  • ';} // $j.=1; } $i++; $categories_child->MoveNext(); } if ($content_center_c=='') { $content_child=$content_left_b.$content_left_c.$content_left_e; } else { $content_child=$content_left_b.$content_left_c.$content_left_e.$content_center_b.$content_center_c.$content_center_e; } $content.=$content_root_b.$content_root.$content_dd_b.$content_child.$content_dd_e.$content_root_e; }else{ $content.=$content_root_b.$content_root.$content_root_e; } $categories->MoveNext(); } ?>