require_once ("common_db.php");
function getDescription($targetid, &$localId, &$globalId, &$orgFullName)
{
     $query = "SELECT organism.name,gi, rosie_id FROM target, gene, organism ".
		"WHERE target.id=".$targetid." AND ".
		"base_gene_id=gene.id AND organism_id=organism.id";
	// echo $query. "
Target Status for ".$rosieId. " ";
	echo "GI = ".$Gi. ", From: " . $orgName. "You are updating target $rosie. ");
echo ("This target is gi number $gi  from $organism .\n");
 echo ("Click ");
 openTargetInfoLink($targetID);
 echo ("here for more info on $rosie.
\n
";
        $tdb = " ";
	echo ("\n");
        echo "Experiment Result User Experiment Date $tdb$aDispName[$i]$tda$dispVal$tda$aUserName[$i]$tda$aExpDate[$i] ";
        }
        echo "
";
}
// return the latest actionID in action2 and its values.
function getLatestActId($TID, &$value)
{
        $journalTable = "target_update2";
        $iRet =0;
        $value = "";
        $query = "SELECT id,user_id,action_id,exp_date,DATE_FORMAT(edit_datetime,'%Y-%m-%d')";
        $query.= " FROM $journalTable WHERE target_id= $TID ORDER BY action_id DESC,edit_datetime DESC";
        $result2 = mysql_query ($query) or die ("Query failed to get results from $journalTable.\n");
        $JID = $AID = 0;
        while ($line = mysql_fetch_array($result2))
        {
                $JID = $line[0];
                $AID = $line[2];
                if (isCanceled($JID) || 1 == $AID)  // cancel record or a cancelled record
                        continue;
                $actName = getActionName($AID, $dtTable, $dispName);
                $tmpValue = "";
                if ($AID>=2)
                {
                        if (strlen($dtTable)>0)
                                $tmpValue = getDetailRes($JID, $dtTable);
                        else
                                $tmpValue ="X";
                }
                $value = $tmpValue;
                $iRet= $AID;
                break;
        } // end of parse this TID
        return $iRet;
}
?>
Target Info