RETURN Search Result in MSCD

Your input=
$seq

Please click links in blast result to get the homologous sequences

"; if ($fp1 = fopen("tmp/input", "w")) { fputs($fp1, ">Your input\n");fputs($fp1, $seq); fclose($fp1);} else { echo "No space for running, try another time."; exit(); } unlink("tmp/list"); $out1=system("/usr/local/genome/bin/blastall -p blastn -i tmp/input -d /users/txie/akr/all -e 0.001 >tmp/list"); //echo("blastall -p blastn -i tmp/input -d /users/txie/akr/all -e 0.001 > tmp/list"); if ($fp = fopen("tmp/list", "r")) { printf ("
");
    		while ($buffer = fgets($fp, 4096)) {
    		        
    		        if (eregi("^>", $buffer)){ $signal=0;}//echo "HAHO";}
    		        
			if ($signal) {
				$linkblast= explode(" ", $buffer);
				$linkblast[0]="est.php?acc=".$linkblast[0];
				printf ("%s",$linkblast[0],$buffer);
			}
			else printf ("%s",$buffer);
			printf ("
"); if (eregi("Sequences producing", $buffer)){ $signal=1; }//echo "HAHA";} } printf ("
"); fclose($fp); } exit(); } else { echo "No matched records in the MySQL database, BACK

"; exit(); } $num=mysql_numrows($result); if (!$num){ echo "No matched records in the MySQL database, when you input $hit$name BACK

"; exit(); } echo " Here are $num matched records in the MySQL database:

"; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; $i=0; while ($i<$num) : $id=mysql_result($result,$i,"id"); $name=mysql_result($result,$i,"name"); $acc=mysql_result($result,$i,"acc"); $hit=mysql_result($result,$i,"hit"); $sc=mysql_result($result,$i,"sc"); $ev=mysql_result($result,$i,"ev"); $i++; $linkid="../cgi/showest.php?id=".$name; $linkhit="../cgi/showest2.php?id=".$name; if ($name ==$lastname) { $name='';$linkid='';$id='';} else $lastname=$name; echo ""; echo ""; echo ""; endwhile; echo "
#No.AccBest BLAST HitScoreE Value
$i $id$acc$hit$sc$ev
"; ?>