RecordCount(); $row = 0; $col = 0; $list_box_contents = ''; if ($num_categories > 0) { if ($num_categories < MAX_DISPLAY_CATEGORIES_PER_ROW || MAX_DISPLAY_CATEGORIES_PER_ROW == 0) { $col_width = floor(100/$num_categories); } else { $col_width = floor(100/MAX_DISPLAY_CATEGORIES_PER_ROW); } while (!$categories->EOF) { if (!$categories->fields['categories_image']) !$categories->fields['categories_image'] = 'pixel_trans.gif'; $cPath_new = zen_get_path($categories->fields['categories_id']); // strip out 0_ from top level cats $cPath_new = str_replace('=0_', '=', $cPath_new); // $categories->fields['products_name'] = zen_get_products_name($categories->fields['products_id']); $list_box_contents[$row][$col] = array('params' => 'class="categoryListBoxContents"' . ' ' . 'style="width:' . $col_width . '%;"', 'text' => '' . zen_image(DIR_WS_IMAGES . $categories->fields['categories_image'], $categories->fields['categories_name'], SUBCATEGORY_IMAGE_WIDTH, SUBCATEGORY_IMAGE_HEIGHT) . '
' . $categories->fields['categories_name'] . '
'); $col ++; if ($col > (MAX_DISPLAY_CATEGORIES_PER_ROW -1)) { $col = 0; $row ++; } $categories->MoveNext(); } } ?>