} $download_cat_table_string = ""; foreach ($dlcat->cat_tree as $dlrow) { // Display main category headings, then sub-categories, optionally with sub-sub categories expanded $download_cat_table_string .= $tp->parseTemplate($DOWNLOAD_CAT_PARENT_TABLE, TRUE, $download_shortcodes); foreach ($dlrow['subcats'] as $dlsubrow) { $download_cat_table_string .= $tp->parseTemplate($DOWNLOAD_CAT_CHILD_TABLE, TRUE, $download_shortcodes); foreach ($dlsubrow['subsubcats'] as $dlsubsubrow) { $download_cat_table_string .= $tp->parseTemplate($DOWNLOAD_CAT_SUBSUB_TABLE, TRUE, $download_shortcodes); } } } $dl_text = $tp->parseTemplate($DOWNLOAD_CAT_TABLE_START, TRUE, $download_shortcodes); $dl_text .= $download_cat_table_string; $dl_text .= $tp->parseTemplate($DOWNLOAD_CAT_TABLE_END, TRUE, $download_shortcodes); $dlbreadcrumb = $dl->getBreadcrumb(array(LAN_dl_18)); $dl_title .= $tp->parseTemplate("{BREADCRUMB=dlbreadcrumb}", TRUE, $download_shortcodes); ob_start(); $ns->tablerender($dl_title, $dl_text); $cache_data = ob_get_flush(); $e107cache->set("download_cat" . $maincatval, $cache_data); require_once FOOTERF; exit; // Add other 'cases' here } // End switch ($action) if (isset($_POST['commentsubmit'])) { if (!$sql->db_Select("download", "download_comment", "download_id = '{$id}' ")) { header("location:" . e_BASE . "index.php"); exit; } else {