* @version 2.0 * @package Data_Cleaning * @copyright Copyright © 2011 DNA Bank Network http://www.dnabank-network.org
The contents of this file are subject to the Mozilla Public License Version 1.1 * @filesource * @license http://www.mozilla.org/MPL/ MPL */ /** * calling connection to database */ include ("../config/head.php"); /** * calling authorisation script */ include ("../auth.php"); /******************************************************************************************** * Setting cookies after submitting search query * *********************************************************************************************/ if($formSubmitSearch) {setcookie("formSpecimenNumber", ""); setcookie("formProviderIntern", ""); setcookie("formProviderExtern", ""); setcookie("formHigherTaxon", ""); setcookie("formTaxonName", ""); setcookie("formGenus", ""); setcookie("formSpecificEpithet", ""); setcookie("formCountryList", ""); setcookie("formCountryListISO", ""); setcookie("formContinent", ""); setcookie("formLocality", ""); setcookie("formLatFrom", ""); setcookie("formLatTo", ""); setcookie("formLongFrom", ""); setcookie("formLongTo", ""); setcookie("formDnaBankNumber", ""); setcookie("formRelation", ""); setcookie("formType", ""); setcookie("formPreservation", ""); setcookie("formTissue", ""); setcookie("formExtractionMethod", ""); setcookie("formExtractionDate", ""); setcookie("formExtractionDateFrom", ""); setcookie("formExtractionDateTo", ""); setcookie("formExtractionStaff", ""); setcookie("formPurificationMethod", ""); setcookie("formAbsorbance280", ""); setcookie("formAbsorbance230", ""); setcookie("formAbsorbance280From", ""); setcookie("formAbsorbance280To", ""); setcookie("formAbsorbance230From", ""); setcookie("formAbsorbance230To", ""); setcookie("formConcentration", ""); setcookie("formConcentrationFrom", ""); setcookie("formConcentrationTo", ""); setcookie("formDegradation", ""); setcookie("formCheckDate", ""); setcookie("formCheckDateFrom", ""); setcookie("formCheckDateTo", ""); setcookie("formNumberAliquots", ""); setcookie("formQuantityAliquotsFrom", ""); setcookie("formQuantityAliquotsTo", ""); setcookie("formGeneticLocus", ""); setcookie("formGenBankNumber", ""); setcookie("formGenBankNumberA", ""); setcookie("formGenBankNumberB", ""); setcookie("formGenBankNumberC", ""); setcookie("formGenBankNumberD", ""); setcookie("formGenBankLink", ""); setcookie("formGenBankLinkA", ""); setcookie("formGenBankLinkB", ""); setcookie("formGenBankLinkC", ""); setcookie("formGenBankLinkD", ""); setcookie("radioGenBank", ""); setcookie("formStock", ""); setcookie("formStockFridge", ""); setcookie("formStockRack", ""); setcookie("formStockBox", ""); setcookie("formProvider", ""); setcookie("formAliquotsFridge", ""); setcookie("formAliquotsRack", ""); setcookie("formAliquotsBox", ""); setcookie("radioSource", ""); setcookie("radioStock", ""); setcookie("radioBackup", ""); setcookie("formBlockDateFrom", ""); setcookie("formBlockDateTo", ""); setcookie("formBlockGeneral", ""); setcookie("formRequest", ""); setcookie("formNotes", ""); setcookie("formBarcodeAliquot", ""); setcookie("formPositionAliquot", ""); setcookie("formBarcodeStock", ""); setcookie("formPositionStock", ""); setcookie("formNoVoucherData", ""); setcookie("formSpecimenNumber", $formSpecimenNumber); setcookie("formProviderIntern", $formProviderIntern); setcookie("formProviderExtern", $formProviderExtern); setcookie("formHigherTaxon", $formHigherTaxon); setcookie("formTaxonName", $formTaxonName); setcookie("formGenus", $formGenus); setcookie("formSpecificEpithet", $formSpecificEpithet); setcookie("formCountryList", $formCountryList); setcookie("formCountryListISO", $formCountryListISO); setcookie("formContinent", $formContinent); setcookie("formLocality", $formLocality); setcookie("formLatFrom", $formLatFrom); setcookie("formLatTo", $formLatTo); setcookie("formLongFrom", $formLongFrom); setcookie("formLongTo", $formLongTo); setcookie("formDnaBankNumber", $formDnaBankNumber); setcookie("formRelation", $formRelation); setcookie("formType", $formType); setcookie("formPreservation", $formPreservation); setcookie("formTissue", $formTissue); setcookie("formExtractionMethod", $formExtractionMethod); setcookie("formExtractionDate", $formExtractionDate); setcookie("formExtractionDateFrom", $formExtractionDateFrom); setcookie("formExtractionDateTo", $formExtractionDateTo); setcookie("formExtractionStaff", $formExtractionStaff); setcookie("formPurificationMethod", $formPurificationMethod); setcookie("formAbsorbance280", $formAbsorbance280); setcookie("formAbsorbance230", $formAbsorbance230); setcookie("formAbsorbance280From", $formAbsorbance280From); setcookie("formAbsorbance280To", $formAbsorbance280To); setcookie("formAbsorbance230From", $formAbsorbance230From); setcookie("formAbsorbance230To", $formAbsorbance230To); setcookie("formConcentration", $formConcentration); setcookie("formConcentrationFrom", $formConcentrationFrom); setcookie("formConcentrationTo", $formConcentrationTo); setcookie("formDegradation", $formDegradation); setcookie("formCheckDate", $formCheckDate); setcookie("formCheckDateFrom", $formCheckDateFrom); setcookie("formCheckDateTo", $formCheckDateTo); setcookie("formNumberAliquots", $formNumberAliquots); setcookie("formQuantityAliquotsFrom", $formQuantityAliquotsFrom); setcookie("formQuantityAliquotsTo", $formQuantityAliquotsTo); setcookie("formGeneticLocus", $formGeneticLocus); setcookie("formGenBankNumber", $formGenBankNumber); setcookie("formGenBankNumberA", $formGenBankNumberA); setcookie("formGenBankNumberB", $formGenBankNumberB); setcookie("formGenBankNumberC", $formGenBankNumberC); setcookie("formGenBankNumberD", $formGenBankNumberD); setcookie("formGenBankLink", $formGenBankLink); setcookie("formGenBankLinkA", $formGenBankLinkA); setcookie("formGenBankLinkB", $formGenBankLinkB); setcookie("formGenBankLinkC", $formGenBankLinkC); setcookie("formGenBankLinkD", $formGenBankLinkD); setcookie("radioGenBank", $radioGenBank); setcookie("formStock", $formStock); setcookie("formStockFridge", $formStockFridge); setcookie("formStockRack", $formStockRack); setcookie("formStockBox", $formStockBox); setcookie("formProvider", $formProvider); setcookie("formAliquotsFridge", $formAliquotsFridge); setcookie("formAliquotsRack", $formAliquotsRack); setcookie("formAliquotsBox", $formAliquotsBox); setcookie("radioSource", $radioSource); setcookie("radioStock", $radioStock); setcookie("radioBackup", $radioBackup); setcookie("formBlockDateFrom", $formBlockDateFrom); setcookie("formBlockDateTo", $formBlockDateTo); setcookie("formBlockGeneral", $formBlockGeneral); setcookie("formRequest", $formRequest); setcookie("formNotes", $formNotes); setcookie("formBarcodeAliquot", $formBarcodeAliquot); setcookie("formPositionAliquot", $formPositionAliquot); setcookie("formBarcodeStock", $formBarcodeStock); setcookie("formPositionStock", $formBarcodeAliquot); setcookie("formNoVoucherData", $formNoVoucherData); } ?> DNA Module - Data Cleaning Results
"; } } //END if(!mysql_affected_rows()) else { $sql1 = "SELECT dnabanknumbers.ID_DNA, " . " dnabanknumbers.FK_Cache, " . " dnabanknumbers.DNA_Bank_Number, " . " dnabanknumbers.Extraction_Date, " . " dnabanknumbers.NoExtractDate, " . " dnabanknumbers.Absorbance280, " . " dnabanknumbers.Absorbance230, " . " dnabanknumbers.Concentration, " . " dnabanknumbers.Quality_Check_Date, " . " dnabanknumbers.Created_Who, " . " dnabanknumbers.Created_When, " . " dnabanknumbers.Stock_Gone, " . " dnabanknumbers.Source_Gone, " . " dnabanknumbers.Blocked_Until, " . " dnabanknumbers.Blocked_For_Loaning, " . " dnabanknumbers.Blocked_For_Publishing, " . " dnabanknumbers.Loan_Conditions, " . " dnabanknumbers.Notes, " . " dnabanknumbers.Notes_Intern, " . " dnabanknumbers.Backup_Aliquot, " . " dnabanknumbers.GUID, " . " dnabanknumbers.Update_Who, " . " dnabanknumbers.Update_When, " . " relation.Relation, " . " dnatype.Type, " . " preservations.Preservation, " . " tissue.Tissue, " . " methods.Method, " . //" purification.Method, " . //" purification.Company, " . " cachecollection.FK_Dataset_Specimen, " . " cachecollection.UnitID_Specimen, " . " cachecollection.CollectionCode_Specimen, " . " cachecollection.InstitutionCode_Specimen, " . " cachecollection.ContinentOrOcean, " . " cachecollection.CountryName, " . " cachecollection.CountryISO2, " . " cachecollection.Collectors, " . " cachecollection.CollectionDate, " . " cachecollection.CollectorsNo, " . " cachecollection.Locality, " . " cachecollection.Altitude, " . " cachecollection.Longitude, " . " cachecollection.Latitude, " . " cachecollection.CollectionInfo_Other, " . " cachecollection.TypeStatus, " . " dataset.Display AS SpecimenDatabase, " . " dataset.ID_Dataset, " . " schemata.QueryPart1b, " . " schemata.QueryPart1_1, " . " schemata.QueryPart1_2b, " . " schemata.QueryPart2, " . " schemata.QueryPart3, " . " schemata.QueryPart4, " . " schemata.QueryPart5, " . " provider.Provider, " . " dataset.Digir_Resource, " . " dataset.Digir_Source, " . " dataset.Protocol, " . " dataset.FK_Provider, " . " provider.Provider, " . " provider.FK_Schema, " . " gelimages.FileURI, " . " gelimages.GelRemarks, " . " gelimages.GelVoltage, " . " gelimages.GelConcentration, " . " gelimages.GelDuration, " . " gelimages.GelLadder " . " FROM dnabanknumbers JOIN tmpDnaIDs " . " LEFT JOIN cachecollection ON dnabanknumbers.FK_Cache = cachecollection.ID_Cache " . " LEFT JOIN relation ON dnabanknumbers.FK_Relation = relation.ID_Relation " . " LEFT JOIN dnatype ON dnabanknumbers.FK_Type = dnatype.ID_Type " . " LEFT JOIN preservations ON dnabanknumbers.FK_Preservation = preservations.ID_Preservation " . " LEFT JOIN tissue ON dnabanknumbers.FK_Tissue = tissue.ID_Tissue " . " LEFT JOIN methods ON dnabanknumbers.FK_Extraction_Method = methods.ID_Method " . // " LEFT JOIN purification ON dnabanknumbers.FK_Purification_Method = purification.ID_Purification_Method " . " LEFT JOIN people ON dnabanknumbers.FK_Extraction_Staff = people.ID_People " . " LEFT JOIN dataset ON cachecollection.FK_Dataset_Specimen = dataset.ID_Dataset " . " LEFT JOIN provider ON dataset.FK_Provider = provider.ID_Provider " . " LEFT JOIN schemata ON provider.FK_Schema = schemata.ID_Schema " . " LEFT JOIN gelimages ON dnabanknumbers.FK_GelImage = gelimages.ID_Images " . " WHERE dnabanknumbers.ID_DNA = tmpDnaIDs.ID_DNA"; $result1 = mysqli_query($GLOBALS["___mysqli_ston"], $sql1); $result2 = mysqli_query($GLOBALS["___mysqli_ston"], "SELECT dnabanknumbers.ID_DNA AS ID_DNA, " . " dnabanknumbers.FK_Cache, " . " cachecollection.ID_Cache, " . " cachetaxonidentified.NameAuthorYear AS NameAuthorYear1, " . " cachetaxonidentified.PreferredFlag AS PreferredFlag1 " . " FROM cachecollection, cachetaxonidentified, dnabanknumbers, tmpDnaIDs " . " WHERE cachetaxonidentified.FK_Cache = cachecollection.ID_Cache " . " AND cachecollection.ID_Cache = dnabanknumbers.FK_Cache " . " AND cachetaxonidentified.PreferredFlag != '' " . " AND dnabanknumbers.ID_DNA = tmpDnaIDs.ID_DNA"); while($row = mysqli_fetch_object($result2)) { if(isset($PreferredFlag1[$row->ID_DNA])) { $Flag = $PreferredFlag1[$row->ID_DNA]; if($Flag == 'true' or $Flag == '1') {$PrefFlag = "(preferred species name)";} else {$PrefFlag = ""; } } else { $PreferredFlag[$row->ID_DNA] = ""; } if(isset($NameAuthorYear1[$row->ID_DNA])) { $NameAuthorYear1[$row->ID_DNA] .= " " . $PrefFlag . ", Other Identifications: "; } else { $NameAuthorYear1[$row->ID_DNA] = ""; } $tmp = $row->NameAuthorYear1; $NameAuthorYear1[$row->ID_DNA] .= $tmp; $tmp2 = $row->PreferredFlag1; $PreferredFlag1[$row->ID_DNA] .= $tmp2; } $result3 = mysqli_query($GLOBALS["___mysqli_ston"], "SELECT dnabanknumbers.ID_DNA AS ID_DNA, " . " dnabanknumbers.FK_Cache, " . " cachecollection.ID_Cache, " . " cachetaxonidentified.ID_TaxonIdentified, " . " cachehighertaxa.HigherTaxon AS HigherTaxon2, " . " cachehighertaxa.TaxonRank AS TaxonRank2 " . " FROM cachecollection, cachetaxonidentified, cachehighertaxa, dnabanknumbers, tmpDnaIDs " . " WHERE cachehighertaxa.FK_CacheTaxonIdentified = cachetaxonidentified.ID_TaxonIdentified " . " AND cachetaxonidentified.FK_Cache = cachecollection.ID_Cache " . " AND cachecollection.ID_Cache = dnabanknumbers.FK_Cache " . " AND dnabanknumbers.ID_DNA = tmpDnaIDs.ID_DNA"); while($row = mysqli_fetch_object($result3)) { if(isset($TaxonRank2[$row->ID_DNA])) { $TaxonRank2[$row->ID_DNA] .= "
"; } else { $TaxonRank2[$row->ID_DNA] = ""; } if(isset($HigherTaxon2[$row->ID_DNA])) { $HigherTaxon2[$row->ID_DNA] .= "
"; } else { $HigherTaxon2[$row->ID_DNA] = ""; } $tmp = $row->HigherTaxon2; $HigherTaxon2[$row->ID_DNA] .= $tmp; $tmp2 = $row->TaxonRank2; $TaxonRank2[$row->ID_DNA] .= $tmp2; } $result3a = mysqli_query($GLOBALS["___mysqli_ston"], "SELECT dnabanknumbers.ID_DNA AS ID_DNA, " . " dnabanknumbers.FK_Cache, " . " cachemultimedia.FK_Cache, " . " cachemultimedia.Multimedia " . " FROM cachemultimedia, dnabanknumbers, tmpDnaIDs " . " WHERE cachemultimedia.FK_Cache = dnabanknumbers.FK_Cache " . " AND dnabanknumbers.ID_DNA = tmpDnaIDs.ID_DNA"); while($row = mysqli_fetch_object($result3a)) { if(isset($MultimediaLink[$row->ID_DNA])) { $MultimediaLink .= build_href1($row->Multimedia,$row->Multimedia) . "
"; } else {$MultimediaLink .= build_href1($row->Multimedia,$row->Multimedia) . "
"; } } $result5 = mysqli_query($GLOBALS["___mysqli_ston"], "SELECT dnabanknumbers.ID_DNA, " . " people.Name_All AS Name_All_Extraction " . " FROM dnabanknumbers,people, tmpDnaIDs " . " WHERE dnabanknumbers.FK_Extraction_Staff = people.ID_People " . " AND dnabanknumbers.ID_DNA = tmpDnaIDs.ID_DNA"); while($row = mysqli_fetch_object($result5)) { $Extraction_Staff = $row->Name_All_Extraction; } $result6 = mysqli_query($GLOBALS["___mysqli_ston"], "SELECT dnabanknumbers.ID_DNA, " . " people.Name_All AS Name_All_Provided_By " . " FROM dnabanknumbers,people, tmpDnaIDs " . " WHERE dnabanknumbers.FK_AcquiredFrom = people.ID_People " . " AND dnabanknumbers.ID_DNA = tmpDnaIDs.ID_DNA"); while($row = mysqli_fetch_object($result6)) { $AcquiredFrom = $row->Name_All_Provided_By; } /* $result7 = mysqli_query($GLOBALS["___mysqli_ston"], "SELECT dnabanknumbers.ID_DNA, " . " amplifications.GenBankNumber AS GenBankNumber, " . " amplifications.Link AS Link, " . " geneticlocus.GeneticLocus AS GeneticLocus " . " FROM dnabanknumbers JOIN tmpDnaIDs " . " LEFT JOIN amplifications ON dnabanknumbers.ID_DNA = amplifications.FK_DNA " . " LEFT JOIN geneticlocus ON amplifications.FK_GeneticLocus = geneticlocus.ID_GeneticLocus " . " WHERE dnabanknumbers.ID_DNA = tmpDnaIDs.ID_DNA"); while($row = mysqli_fetch_object($result7)) { if(isset($Link[$row->ID_DNA])) { if($formSubmitSave) {} else { $Link[$row->ID_DNA] .= ""; } $Link2 .= build_href1($row->Link,$row->GenBankNumber) . "
"; } else { $Link[$row->ID_DNA] = ""; $Link2 .= build_href1($row->Link,$row->GenBankNumber) . "
"; } if(empty($row->Link)) { $Link2 = ""; } if(isset($GeneticLocus[$row->ID_DNA])) { $GeneticLocus[$row->ID_DNA] .= "
"; } else { $GeneticLocus[$row->ID_DNA] = ""; } if($formSubmitSave) {} else { $tmp = $row->Link; $Link[$row->ID_DNA] .= $tmp; } $tmp = $row->GeneticLocus; $GeneticLocus[$row->ID_DNA] .= $tmp; } */ $result8 = mysqli_query($GLOBALS["___mysqli_ston"], "SELECT dnabanknumbers.ID_DNA, " . " stock_box.Stock_Box, " . " stock_rack.Stock_Rack, " . " stock_fridge.Stock_Fridge, " . " location_stock.Origin_Quantity AS Location_Volume, " . " location_stock.Rest_Quantity AS Location_Rest, " . " location_stock.Stock_Barcode, " . " location_stock.Stock_Position " . " FROM dnabanknumbers JOIN tmpDnaIDs " . " LEFT JOIN location_stock ON dnabanknumbers.FK_Location_Stock = location_stock.ID_Location_Stock " . " LEFT JOIN stock_box ON stock_box.ID_Stock_Box = location_stock.FK_Stock_Box " . " LEFT JOIN stock_rack ON stock_rack.ID_Stock_Rack = location_stock.FK_Stock_Rack " . " LEFT JOIN stock_fridge ON stock_fridge.ID_Stock_Fridge = location_stock.FK_Stock_Fridge " . " WHERE dnabanknumbers.ID_DNA = tmpDnaIDs.ID_DNA"); while($row = mysqli_fetch_object($result8)) { $Location_Box = $row->Stock_Box; $Location_Rack = $row->Stock_Rack; $Location_Fridge = $row->Stock_Fridge; $Location_Volume = $row->Location_Volume; $Location_Rest = $row->Location_Rest; $Stock_Barcode = $row->Stock_Barcode; $Stock_Position = $row->Stock_Position; } $result9 = mysqli_query($GLOBALS["___mysqli_ston"], "SELECT dnabanknumbers.ID_DNA, " . " aliquots_box.Aliquots_Box, " . " aliquots_rack.Aliquots_Rack, " . " aliquots_fridge.Aliquots_Fridge, " . " aliquots.Aliquot_Number, " . " aliquots.Origin_Quantity AS Aliquot_Origin, " . " aliquots.Rest_Quantity AS Aliquot_Rest, " . " aliquots.Aliquot_Barcode, " . " aliquots.Aliquot_Position, " . " aliquots.Price, " . " aliquots.Currency " . " FROM dnabanknumbers JOIN tmpDnaIDs " . " LEFT JOIN aliquots ON dnabanknumbers.ID_DNA = aliquots.FK_DNA " . " LEFT JOIN aliquots_box ON aliquots_box.ID_Aliquots_Box = aliquots.FK_Aliquots_Box " . " LEFT JOIN aliquots_rack ON aliquots_rack.ID_Aliquots_Rack = aliquots.FK_Aliquots_Rack " . " LEFT JOIN aliquots_fridge ON aliquots_fridge.ID_Aliquots_Fridge = aliquots.FK_Aliquots_Fridge " . " WHERE dnabanknumbers.ID_DNA = tmpDnaIDs.ID_DNA " . " ORDER BY aliquots.Aliquot_Number"); $result10 = mysqli_query($GLOBALS["___mysqli_ston"], "SELECT dnabanknumbers.ID_DNA, " . " request.Request_Date, " . " request.Request_Number_Aliquots, " . " request.Request_Notes, " . " people.Name_All AS Customer " . " FROM dnabanknumbers JOIN tmpDnaIDs " . " LEFT JOIN request ON dnabanknumbers.ID_DNA = request.FK_DNA " . " LEFT JOIN people ON request.FK_People = people.ID_People " . " WHERE dnabanknumbers.ID_DNA = tmpDnaIDs.ID_DNA"); while($row = mysqli_fetch_object($result10)) { if(isset($Request_Date[$row->ID_DNA])) { $Request_Date[$row->ID_DNA] .= ""; $DateRequest .= $row->Request_Date . "
"; } else { $Request_Date[$row->ID_DNA] = ""; $DateRequest .= $row->Request_Date . "
"; } if(isset($Request_Number_Aliquots[$row->ID_DNA])) { $Request_Number_Aliquots[$row->ID_DNA] .= "
"; } else { $Request_Number_Aliquots[$row->ID_DNA] = ""; } if(isset($Request_Notes[$row->ID_DNA])) { $Request_Notes[$row->ID_DNA] .= "
"; } else { $Request_Notes[$row->ID_DNA] = ""; } if(isset($Customer[$row->ID_DNA])) { $Customer[$row->ID_DNA] .= "
"; } else { $Customer[$row->ID_DNA] = ""; } $tmp = $row->Request_Date; $Request_Date[$row->ID_DNA] .= $tmp; $tmp = $row->Request_Number_Aliquots; $Request_Number_Aliquots[$row->ID_DNA] .= $tmp; $tmp = $row->Request_Notes; $Request_Notes[$row->ID_DNA] .= $tmp; $tmp = $row->Customer; $Customer[$row->ID_DNA] .= $tmp; } /* $result11 = mysqli_query($GLOBALS["___mysqli_ston"], "SELECT publications_amplifications.FK_DNA, " . " publications_amplifications.Paper_Cache, " . " publications_amplifications.GeneticLocus AS GeneticLocusPub, " . " publications.Link AS LinkPub " . " FROM publications_amplifications JOIN tmpDnaIDs " . " LEFT JOIN publications ON publications_amplifications.FK_Publications = publications.ID_Publications " . " WHERE publications_amplifications.FK_DNA = tmpDnaIDs.ID_DNA"); while($row = mysqli_fetch_object($result11)) { if(isset($Paper_Cache[$row->ID_DNA])) { $Paper_Cache[$row->ID_DNA] .= "
"; } else { $Paper_Cache[$row->ID_DNA] = ""; } if(isset($GeneticLocusPub[$row->ID_DNA])) { $GeneticLocusPub[$row->ID_DNA] .= "
"; } else { $GeneticLocusPub[$row->ID_DNA] = ""; } if(isset($LinkPub[$row->ID_DNA])) { if($formSubmitSave) {} else { $LinkPub[$row->ID_DNA] .= ""; } $LinkPub2 .= build_href1($row->LinkPub,"document") . "
"; } else { $LinkPub[$row->ID_DNA] = ""; $LinkPub2 .= build_href1($row->LinkPub,"document") . "
"; } $tmp = $row->Paper_Cache; $Paper_Cache[$row->ID_DNA] .= $tmp; $tmp = $row->GeneticLocusPub; $GeneticLocusPub[$row->ID_DNA] .= $tmp; if($formSubmitSave) {} else { $tmp = $row->LinkPub; $LinkPub[$row->ID_DNA] .= $tmp; } } */ /******************************************************************************************** * Show hitlist ($sqlType == "Dna") * * START * *********************************************************************************************/ if($sqlType=="Dna") { echo ""; $pagesum = mysqli_num_rows($result1); echo ""; /** * paging hitlist */ include("pages.php"); echo "
New Search.
".$sum; if($sum == 1) {echo " entry "; } else { echo " entries ";} echo "found for:"; foreach($descriptionall as $index => $descriptiontest) { $valuetest = $valueall[$index]; echo $descriptiontest."[".$valuetest."]"; } echo ".

"; $Dnacount=0; echo ""; echo ""; echo ""; for ($i=1; $i<=$pagesum; $i++) { $row=mysqli_fetch_array($result1); { $Dnacount++; if($Dnacount<=$pagesize) { $ID = $row['ID_DNA']; $LinkSpecimen = "sqlType=Detail&ID_DNA=".$ID; if($_GET['page'] > 1) { $LinkSpecimen .= "&Page=".$_GET['page']; } $number = ($page-1)*$pagesize+$i; echo ""; } } } // for ($i=1; $i<=$pagesum; $i++) echo "
DNA Bank NoUnitID/Specimen NoCollectionInstitutionTaxon

".$number.".".build_href("query_clean.php", $LinkSpecimen, $row['DNA_Bank_Number']) . "".$row['UnitID_Specimen']."".$row['CollectionCode_Specimen']."".$row['InstitutionCode_Specimen'].""; echo $NameAuthorYear1[$row['ID_DNA']]; echo "
"; } // if($sqlType=="Dna") /******************************************************************************************** * Show hitlist ($sqlType == "Dna") * * END * *********************************************************************************************/ /******************************************************************************************** * Show details of a single record ($sqlType == "Detail") * * 1. Selecting DNA data from database * * 2. Selecting reference to specimen record * * 3. Getting specimen data live from original provider * * 3a. When specimen provider is not available, show specimen data from cache tables * * 3b. When specimen data recorded in Specimen Tool and not yet available via wrapper use * * another script (see line 1894) * * START * *********************************************************************************************/ if($sqlType=="Detail") { echo ""; if($formSubmitSave) { echo ""; if ($test1 == 'false1' or $test1 == 'false2'){ echo ""; } else { echo ""; } echo "
Back to Data Cleaning OverviewBack to Hitlist"; /** * calling Error message */ include("../config/Errorreport.php"); } if ($test1 != 'false1' and $test1 != 'false2') { echo "
Changes accepted.
"; } echo "
Back to Hitlist
"; /******************************************************************************************** * Building table for DNA details * * START * *********************************************************************************************/ echo ""; $Dnacount=0; while($row = mysqli_fetch_object($result1)) { $Dnacount++; $ID_Cache = $row->FK_Cache; /******************************************************************************************** * Select further DNA samples from same voucher ($test) * * See also line 1960 * *********************************************************************************************/ $test = mysqli_query($GLOBALS["___mysqli_ston"], "SELECT dnabanknumbers.ID_DNA, dnabanknumbers.DNA_Bank_Number, " . "dnabanknumbers.Extraction_Date FROM dnabanknumbers, tmpDnaIDs " . "WHERE dnabanknumbers.FK_Cache = '$ID_Cache' " . " AND dnabanknumbers.ID_DNA != tmpDnaIDs.ID_DNA " . "ORDER BY LENGTH(dnabanknumbers.DNA_Bank_Number),dnabanknumbers.DNA_Bank_Number"); if($Dnacount<=$pagesize) { if($row->NoExtractDate == '1') { $NoExtractDate = "No Extraction Date available."; } echo "", "", "", $row->Type ? "" : "", "", "", $row->Tissue ? "" : "", $row->Source_Gone ? "" : "", "", $row->Preservation ? "" : "", "", $row->Extraction_Date || $row->NoExtractDate ? "" : "", "", $row->Extraction_Method ? "" : "", $Extraction_Staff ? "" : "", "", $row->Absorbance280 || $row->Absorbance230 || $row->Concentration || $row->Purification_Method || $row->Degradation || $row->Quality_Check_Date ?"" : "", $row->Absorbance280 || $row->Absorbance230 ? "" : "", $row->Absorbance280 ? "" : "", $row->Absorbance230 ? "" : "", $row->Absorbance280 || $row->Absorbance230 ? "" : "", "", $row->Concentration ? "" : "", // $row->Purification_Method ? "" : "", "", "", $row->Degradation ? "" : "", $row->Quality_Check_Date ? "" : "", "", $Link2 || $GeneticLocus[$row->ID_DNA] ? "" : "", "", $GeneticLocus[$row->ID_DNA] ? "" : "", "", $Link2 ? "" : "", $AcquiredFrom || $row->Block_Until || $row->Block_General || $row->Notes ? "" : "", $AcquiredFrom ? "" : "", "", $row->Block_Until ? "" : "", $row->Block_General ? "" : "", "", "", $row->Notes ? "" : ""; if ((isset($_SESSION['guest']) && $_SESSION['guest']) || ((isset($_SESSION['project']) || $_SESSION['project']) && $row->Created_Who != $log) ) {} else { echo $row->Notes_Intern ? "" : ""; } echo ""; if ((isset($_SESSION['guest']) && $_SESSION['guest']) || ((isset($_SESSION['project']) || $_SESSION['project']) && $row->Created_Who != $log) ) {} else { echo "", $row->Stock_Gone ? "" : "", $Location_Fridge || $Location_Rack || $Location_Box || $Location_Volume || $Stock_Barcode || $Stock_Position ? "" : ""; while($row2 = mysqli_fetch_object($result9)) { $Test4[] = $row2->Aliquots_Box; $Test5[] = $row2->Aliquots_Rack; $Test6[] = $row2->Aliquots_Fridge; $Test7[] = $row2->Aliquot_Number; $Test9[] = $row2->Aliquot_Origin; $Test10[] = $row2->Aliquot_Rest; $Test11[] = $row2->Aliquot_Barcode; $Test12[] = $row2->Aliquot_Position; $Test13[] = $row2->Price." ".$row2->Currency; } foreach($Test7 as $index => $NumberTest) { $RackTest = $Test5[$index]; $FridgeTest = $Test6[$index]; $BoxTest = $Test4[$index]; $SourceQuantity = $Test9[$index]; $RestQuantity = $Test10[$index]; $Barcode = $Test11[$index]; $Position = $Test12[$index]; $Price = $Test13[$index]; echo ""; } } // END if (!isset($_SESSION['guest']) && !$_SESSION['guest']) echo $row->Backup_Aliquot ? "" : ""; echo $Paper_Cache[$row->ID_DNA] ? "" : "", $LinkPub[$row->ID_DNA] && $Paper_Cache[$row->ID_DNA] ? "" : ""; if (!isset($_SESSION['guest']) && !$_SESSION['guest'] && !isset($_SESSION['project']) && !$_SESSION['project']) { echo $Customer[$row->ID_DNA] ? "" : ""; } echo "

DNA details
Extraction No" . $row->DNA_Bank_Number . "DNA Type" . $row->Type . "

Relation to voucher

" . $row->Relation . "

Tissue" . $row->Tissue . "Tissue source material goneYes
Preservation" . $row->Preservation . "

Extraction

Extraction Date" . $row->Extraction_Date . $NoExtractDate . "
Extraction Method" . $row->Extraction_Method . "Extraction Staff" . $Extraction_Staff . "

Quality

Ratio of Absorbance" . $row->Absorbance280 . " OD260nm/OD280nm" . $row->Absorbance230 . " OD260nm/OD230nm
Concentration" . $row->Concentration . " ng/μlPurification Method" . $row->Purification_Method . "
Quality" . $row->Degradation . "Quality Check Date" . $row->Quality_Check_Date . "

GenBank Entries

Genetic Locus" . $GeneticLocus[$row->ID_DNA] . "
GenBank Acc.No/
BOLD Process ID
" .$Link2 . "

Notes

DNA Sample Provided By" . $AcquiredFrom . "
Blocked Until" . $row->Block_Until . "Blocked in GeneralYes
Remarks for Customers" . $row->Notes . "
Internal Remarks" . $row->Notes_Intern . "

Stock/Aliquots

Fridge/Rack/Box

Barcode

Position

Source (µl)

Remaining (µl)

Price

Stock material goneYes
Stock ".$row->DNA_Bank_Number."   " . $Location_Fridge . "/" . $Location_Rack . " /" . $Location_Box . " ".$Stock_Barcode."".$Stock_Position."" .$Location_Volume . "" . $Location_Rest . "
Stock ".$row->DNA_Bank_Number."   No Stock made
Aliquot ".$NumberTest."".$FridgeTest."/".$RackTest."/".$BoxTest; echo "".$Barcode."".$Position."".$SourceQuantity."".$RestQuantity."".$Price."
Backup Aliquot madeYes
Backup Aliquot madeNo

Publications

Genetic Locus
" . $GeneticLocusPub[$row->ID_DNA] . "
Publication
" . $Paper_Cache[$row->ID_DNA] . "

" . $LinkPub2 ."

Requests

Customer
" . $Customer[$row->ID_DNA] . "
Date
" . $DateRequest . "
Aliquot No
" . $Request_Number_Aliquots[$row->ID_DNA] . "<(span>
Notes
" . $Request_Notes[$row->ID_DNA] . "
"; /******************************************************************************************** * Building table for DNA details * * END * *********************************************************************************************/ /******************************************************************************************** * Building table for specimen/voucher details * * START * *********************************************************************************************/ echo ""; echo "", "", "", "", "", $HigherTaxon[$row->ID_DNA] ? "" : "", "", "", $row->CountryName ? "" : "", $row->CountryISO2 ? "" : "", "", "", $row->ContinentOrOcean ? "" : "", $row->Locality ? "" : "", "", "", $row->Longitude || $row->Latitude ? "" : "", $row->Altitude ? "" : "", "", "", $row->Collectors ? "" : "", $row->CollectionDate ? "" : "", "", "", $row->CollectorsNo ? "" : "", $row->CollectionInfo_Other ? "" : "", "", $MultimediaLink ? "" : "", $row->TypeStatus ? "" : ""; } // if($ProviderCheck == true) } //data availabe via wrapper echo "
"; $ID_Dataset = $row->ID_Dataset; $Provider = $row->Provider; $QueryPart1b = $row->QueryPart1b; $QueryPart1_1 = $row->QueryPart1_1; $QueryPart1_2b = $row->QueryPart1_2b; $QueryPart2 = $row->QueryPart2; $QueryPart3 = $row->QueryPart3; $QueryPart4 = $row->QueryPart4; $QueryPart5 = $row->QueryPart5; $Digir_Resource1 = urlencode($row->Digir_Resource); $Digir_Source1 = urlencode($row->Digir_Source); $ID_Schema = $row->FK_Schema; $SourceUnitID = urlencode($row->UnitID_Specimen); $SourceInstitutionCode = urlencode($row->InstitutionCode_Specimen); $SourceCode = urlencode($row->CollectionCode_Specimen); if($ID_Dataset == '1' and $Provider == '') { /** * when specimen data are recorded in Specimen Tool ($ID_Dataset == '1') and this data are * not yet available via wrapper ($Provider == '') include another script */ include ("../sptool/sptool.php"); } else { //data availabe via wrapper $searchform = true; /** * calling script verify.php for getting specimen data from original data provider * sending parameter $searchform = true in opposite to calling same script during Input package * see script verify.php for more details */ include ("../input/verify.php"); if($ProviderCheck == true) { echo "
Specimen details (voucher)
Specimen Number/UnitID" . $row->UnitID_Specimen . "Specimen database" . $row->SpecimenDatabase . "
Collection Code" . $row->CollectionCode_Specimen . "Institution Code" . $row->InstitutionCode_Specimen . "

Identifications

Taxon Name "; echo $NameAuthorYear[$row->ID_DNA]; echo "Higher Taxon" . $HigherTaxon[$row->ID_DNA] . "" . $TaxonRank[$row->ID_DNA] . "

Gathering

Country" . $row->CountryName . "Country ISO Code" . $row->CountryISO2 . "
Continent/Ocean" . $row->ContinentOrOcean . "Locality" . $row->Locality . "
Long | Lat " . $row->Longitude . " | ".$row->Latitude."Altitude" . $row->Altitude . "
Collector(s)" . $row->Collectors . "Collection Date" . $row->CollectionDate . "
Collectors' Number" . $row->CollectorsNo . "Collection" . $row->CollectionInfo_Other . "
Multimedia" . $MultimediaLink . "
Type Status" . $row->TypeStatus . "

"; /******************************************************************************************** * Building table for specimen/voucher details * * END * *********************************************************************************************/ /******************************************************************************************** * Building table for related DNA samples (source = same voucher/specimen) and details about * * creation date and staff of record and date and staff of last edit process * * START * *********************************************************************************************/ echo ""; if(mysqli_num_rows($test) > 0) { echo ""; while($roww = mysqli_fetch_object($test)) { $Test_ID = $roww->ID_DNA; echo ""; } echo ""; } echo "", "", $row->Update_Who ? "" : "", ""; } if($TestWho != "") { $TestWhen2 = $TestWhen + "0000-00-00 00:30:00"; if($TestWhen2 >= $Current_Date) { if($TestWho != $log) {echo "Dataset temporarily not editable."; } } if($TestWhen2 < $Current_Date or $TestWho == $log) { $sql11 = "UPDATE dnabanknumbers SET Lock_Who = '', Lock_When = '' WHERE dnabanknumbers.ID_DNA = '$ID_DNA'"; $result11 = mysqli_query($GLOBALS["___mysqli_ston"], $sql11); echo ""; }} } } echo "
Other DNA Samples from this voucher
Extraction No".build_href("query_clean.php","sqlType=Detail&ID_DNA=$Test_ID",$roww->DNA_Bank_Number)."

Dataset

Created by" . $row->Created_Who . " (" . $row->Created_When . ")
Last modified by" . $row->Update_Who . " (" . $row->Update_When . ")
"; if($formSubmitSave) {$sql0 = "UPDATE dnabanknumbers SET Lock_Who = '', Lock_When = '' WHERE dnabanknumbers.ID_DNA = '$ID_DNA'"; $result0 = mysqli_query($GLOBALS["___mysqli_ston"], $sql0);} else { if ((isset($_SESSION['guest']) && $_SESSION['guest']) || ((isset($_SESSION['project']) || $_SESSION['project']) && $row->Created_Who != $log) ) {} else { /******************************************************************************************** * Locking record if another user is editing the same record at the same time * * see also update_clean.php line 29 * *********************************************************************************************/ $sql10 = "SELECT ID_DNA, Lock_Who, Lock_When FROM dnabanknumbers WHERE ID_DNA = '$ID_DNA'"; $result10 = mysqli_query($GLOBALS["___mysqli_ston"], $sql10); while($row = mysqli_fetch_object($result10)) { $TestWho = $row->Lock_Who; $TestWhen = $ow->Lock_When;} if($TestWho == "") { echo "
"; /******************************************************************************************** * Building table for related DNA samples (source = same voucher/specimen) and details about * * creation date and staff of record and date and staff of last edit process * * END * *********************************************************************************************/ } // if($Dnacount<=$pagesize) } //$Dnacount=0; while($row = mysql_fetch_object($result1)) } // if($sqlType=="Detail") /******************************************************************************************** * Show details of a single record ($sqlType == "Detail") * * END * *********************************************************************************************/ mysqli_query($GLOBALS["___mysqli_ston"], "DROP TABLE IF EXISTS tmpDnaIDs"); } //user has access to data } //if(!empty($sql)) } /******************************************************************************************** * Saving edited record * * END * *********************************************************************************************/ ?>