Query(" SELECT Id, rubric_title FROM " . PREFIX . "_rubrics "); echo ""; while($result = $sql->FetchRow()){ echo ""; }; } if (isset($_POST['2'])) { global $AVE_DB; $sql = $AVE_DB->Query(" SELECT Id, rubric_title FROM " . PREFIX . "_rubrics "); echo ""; while($result = $sql->FetchRow()){ echo ""; }; } if (isset($_POST['a'])) { global $AVE_DB; $sql = $AVE_DB->Query(" SELECT Id, document_alias, document_title, document_published, document_meta_description FROM " . PREFIX . "_documents WHERE rubric_id = '" . $_POST['b'] . "' AND Id > 2 "); $u_sel_doc = array(); while ($row = $sql->FetchAssocArray()) { array_push($u_sel_doc, $row); } foreach ( $u_sel_doc as $k=>$v ) { echo ""."".$v['Id'].""."".$v['document_title'].""."".$v['document_published'] = pretty_date(strftime(TIME_FORMAT, $v['document_published'])).""; } } ?>