function olc_show_category($counter, $img = '') { global $foo, $categories_string, $id; $current_entry = $foo[$counter]; if ($current_entry['parent'] == 0) { $cPath_new = $counter; } else { $cPath_new = $current_entry['path']; } $cPath_new = 'cPath=' . $cPath_new; $two_blank = HTML_NBSP . HTML_NBSP; for ($a = 0; $a < $current_entry['level']; $a++) { $indent = $two_blank; } $link = olc_href_link(FILENAME_DEFAULT, $cPath_new); $link = HTML_A_START . $link . '" title="' . $current_entry['title'] . '">'; $make_bold = $id && in_array($counter, $id); if ($make_bold) { $link .= HTML_B_START; } // display category name $link .= $current_entry['name']; if ($make_bold) { $link .= HTML_B_END; } $link .= HTML_A_END; if (SHOW_COUNTS == TRUE_STRING_S) { $products_in_category = olc_count_products_in_category($counter, false); if ($products_in_category > 0) { $link .= HTML_NBSP . ltrim(LPAREN) . $products_in_category . RPAREN; } } if (strlen($categories_string) > 0) { $categories_string .= HTML_BR; } $categories_string .= $indent . $img . $link; $file = CURRENT_TEMPLATE_IMG . 'img_underline.gif'; if (is_file(DIR_FS_CATALOG . $file)) { $categories_string .= HTML_BR . olc_image($file); } $next_id = $current_entry['next_id']; if ($next_id) { olc_show_category($next_id, $img); } }
</tr> '; } else { $underline = EMPTY_STRING; } define('CATEGORY_LINE', ' <tr> <td valign="top"> ' . BULLET . ' </td> <td class="infoBoxContents" valign="top"> # </td> </tr> ' . $underline); olc_show_category($first_element); /* if ($all_categories_string) { $all_categories_string.=HTML_BR; } $all_categories_string.=$categories_string; */ $all_categories_string = ' <table width="100%" border="0" cellpadding="0" cellspacing="0"> ' . $all_categories_string . $categories_string . ' </table> '; } $cPath = $realcPath; $box_smarty->assign('BOX_CONTENT', $all_categories_string);