You are on page 1of 2

<?

php
require("do_components.php");
do_header();
?>
<?php
if ($_POST['SearchGenbank']) {
?>
<div id="page">
<hr/><h3>GenBank Database</h3><hr/>
<?php
$id = $_POST['id'];
$acc = $_POST['acc'];
$gi = $_POST['gi'];
$query = $_POST['orgn']."[ORGN] AND ".$_POST['titl']."[TITL] AND ".$_POST['s
len_start'].":".$_POST['slen_end']."[SLEN]";
if (strlen($gi)!= 0 ) {
//echo $gi;
$result = shell_exec("C:\Perl\bin\perl.exe genbank.pl $gi NULL NULL");
echo $result;
}
else if (strlen($id) != 0) {
//echo $id;
$result = shell_exec("C:\Perl\bin\perl.exe genbank.pl NULL $id NULL");
echo $result;
}
else if (strlen($acc) != 0) {
//echo $acc;
$result = shell_exec("C:\Perl\bin\perl.exe genbank.pl NULL NULL $acc");
echo $result;
}
?>
<br/><br/>
<a href="genbank.php"> << Back</a>
</div>
<?php
} //end if
else { //if (!$_POST['SearchGenbank'])
?>
<div id="page">
<hr/><h3>GenBank Database</h3><hr/>
<form action="<?php print $_SERVER['PHP_SELF']; ?>" method=POST name="genban
k">
<table border=0>
<tr><th colspan="2">GenBank GI Number: </th>
<td><input type="text" name="gi"/></td></tr>
<tr><th colspan=3><center>OR</center></th></tr>
<tr><th colspan="2">Unique ID: </th>
<td><input type="text" name="id"/></td></tr>
<tr><th colspan=3><center>OR</center></th></tr>
<tr><th colspan="2">Accession Number: </th>
<td><input type="text" name="acc"/></td></tr>
<tr><td colspan=3><input type="submit" value="Search GenBank" name="
SearchGenbank"/></td></tr>
</table>
</form>
</div>
<?php

}//end else
?>
<?php
do_footer();
?>

You might also like