$result2 = mysql_query($qstr_struc) or die("Query failed! (4a_struc)"); $line2 = mysql_fetch_row($result2); $struc = $line2[0]; $struc = str_replace("\n", "\r\n", $struc); $struc = str_replace("\r\r\n", "\r\n", $struc); $strucmatch = matchmolrxn($safemol, $struc, $options); if ($strucmatch == TRUE) { $hits++; $hits_r++; // output of the hits, if they are not too many... if ($hits > $maxhits) { echo "</table>\n<hr>\n"; echo "<br>Too many hits (>{$maxhits})! Aborting....<br>\n</body></html>\n"; exit; } showHitRxn($rxn_id, ""); if ($enable_download == "y" && $hits_r <= $download_limit) { if (strlen($hitlist_r) > 0) { $hitlist_r .= ","; } $hitlist_r .= $db_id . ":" . $rxn_id; } } } // while line } while ($n_cand >= $sqlbs); //=============== end outer loop (LIMIT) $hits_sum = $hits_sum + $hits; $total_cand_sum = $total_cand_sum + $total_cand; $n_structures_sum = $n_structures_sum + $n_structures; }
echo "</body>\n"; echo "</html>\n"; exit; } if ($dbtype == 1) { showHit($item_id, ""); if ($enable_download == "y" && $hits_s <= $download_limit) { $hits_s++; if (strlen($hitlist_s) > 0) { $hitlist_s .= ","; } $hitlist_s .= $db_id . ":" . $item_id; } } if ($dbtype == 2) { showHitRxn($item_id, ""); if ($enable_download == "y" && $hits_r <= $download_limit) { $hits_r++; if (strlen($hitlist_r) > 0) { $hitlist_r .= ","; } $hitlist_r .= $db_id . ":" . $item_id; } } } // end while($line)... mysql_free_result($result); echo "</table>\n<hr>\n"; echo "<a href=\"{$myname}?db={$dbstr}&mode=3\">New search</a><p></p>\n"; $time_end = getmicrotime(); if ($enable_download == "y" && $hits_s > 0) {