echo "<input type=\"file\" name=\"synonim\" id=\"synonim\" />"; echo "<input type=\"submit\" name=\"submit\" value=\""; if (file_exists($info["gdir"] . "/synonim.txt")) { echo "Update synonym file"; } else { echo "Load a synonym file"; } echo "\"/>"; echo "<br /><br />"; echo "<a href=\"..\">"; echo "Go to main page</a>"; } if (isadmin()) { // Main if (isset($_GET["id"])) { $info = genome_load_info($_GET["id"]); } else { if (isset($_GET["code"])) { $info = genome_load_info_code($_GET["code"]); } else { clus_head(); show_menu(); echo "Please refer to the genome you want to load"; echo " with a valid id or code field"; echo "<FORM><INPUT TYPE=\"BUTTON\" VALUE=\"Go Back\""; echo " ONCLICK=\"history.go(-1)\">"; echo "</FORM>"; clus_end(); exit(0); } }
function genome_load_info_code($code) { global $dbh; $query = sprintf("SELECT rec_id FROM genomes WHERE code=%s", $dbf->quote($code)); $result = $dbh->query($query); $linfo = $result->fetchColumn(); return genome_load_info($linfo); }