<? chdir("../forums"); require("global.php"); $cats = $DB_site->query("SELECT * FROM classified_cat WHERE parent = '0' ORDER BY displayorder, title"); while ($cat = $DB_site->fetch_array($cats)) { eval("\$catbit .= \"".gettemplate("classifieds_indexbit_level1")."\";"); $subcats = $DB_site->query("SELECT * FROM classified_cat WHERE parent = '".$cat[id]."' ORDER BY displayorder, name"); while ($subcat = $DB_site->fetch_array($subcats)) { eval("\$catbit .= \"".gettemplate("classifieds_indexbit_level2")."\";"); } } echo $catbit; eval("dooutput(\"".gettemplate("classifieds_index")."\");"); ?>