get(); // // if ($terms) // { // $search->toForm($lines); // // $criteria_numbers = getAllCriteria(); // $total = count($criteria_numbers); // $criteria = openCriteria($criteria_numbers); // // // $lines[] = "

Search terms are: $terms

"; // $ccc = searchCriteria($terms, $criteria); // $lines[] = "

found " . count($ccc) . " of $total total.

"; // toCriteriaTable($lines, $ccc, $terms); // } // else // { // $search->toForm($lines); // } //} function browse(&$lines, $tab = ' ') { echo "a\n"; $browser = new Browser(); $tab .= ' '; $browser->toForm($lines, $tab); if (1) $lines[] = "
"; $browser->toDisplay($lines, $tab); $terms = $search->get(); $selections = $select->get(); echo "d\n"; if ($selections) { $sets = filterSetsByNames($selections); $criteria_set = mergeCriteriaSets($sets); } else { $criteria_set = getCriteriaSet(); } $total = $criteria_set->getCount(); $search->toForm($lines); echo "g $terms / $total \n"; $criteria = $criteria_set->getCriteria(); if ($terms) { // $criteria = openCriteria($criteria_numbers); // $lines[] = "

Search terms are: $terms

"; $ccc = searchCriteria($terms, $criteria); $lines[] = "

found " . count($ccc) . " of $total total.

"; toCriteriaTable($lines, $ccc, $terms); } else if ($selections) { $lines[] = "

selected $total total.

"; toCriteriaTable($lines, $criteria); } else { toCriteriaNumbers($lines, $criteria_numbers); } echo "z\n"; } function toCriteriaTable(&$lines, $criteria, $terms = '') { $lines[] = TABLE; $lines[] = ""; if ($terms) $terms = fixUpTerms($terms); foreach ($criteria as $i => $cn) { $cn->toTR2($lines, $terms); } $lines[] = ""; $lines[] = UNTABLE; $lines[] = ""; } ?>