.css" rel="stylesheet" type="text/css">
saveToDB($results_view); // Save queries in searches table (returns true if OK, false otherwise) } // Get results set $rs = new ResultSet($query); $r = $rs->getResults(); // For search box. Query may have been modified if "Get Random" if ($query->getSubmitType() == 'Get Random' && (isset($r[0]->figNum))) { $q = $query->getQueryString(); $q = $q." fig:".$r[0]->figNum; // Lets us display random result as query in search box } } // Search form $q = ( $results_view == "endgame" ) ? '' : $q; # don't show query in search box for endgame (ugly "pmid:" string) require_once("search.php"); // Show after query generation in case modified queryString // Search results if (isset($r)) { // Header summary ?>
getGroupedResults($r); $numInGroups = 0; foreach ($groupedResults as $key => $value) { $numInGroups += count($value); } if ($numInGroups == 0) {?>

    grouped results found

0) { require("result_group.php"); } } // Non-groups views } else { foreach ($r as $res) { if ($results_view == "tables") { require("result_tables.php"); } else if ($results_view == "list") { require("result_list.php"); } else if ($results_view == "abstract") { require("result_abstract.php"); } else if ($results_view == "grid") { require("result_grid.php"); } else if ($results_view == "endgame") { require("result_endgame.php"); } else { require("result.php"); } // Labels if ($app_type == "label") { require("labels.php"); } } } // Footer summary (only display if there are results) if ($rs->getNumResults() > 0) { ?>