Logged in as: "; $log = $_SESSION['log']; echo $log; echo ". "; if(isset($_COOKIE['test']) or $_COOKIE['test']) { include ("shop.php"); } echo "
";} ?>

"; include("Advanced.php"); } // Number of records per site $pagesize = 50; if(!$page || $page<1 || !is_numeric($page)) { $page = 1; } // elseif ($page > 50) // { $page = 50; } elseif($page<1) $page = 1; elseif(!is_numeric($page)) unset($page); $sql = ""; $sqlcreate = "CREATE TEMPORARY TABLE tmpDnaIDs TYPE=HEAP "; if($_REQUEST['page']!= "") { $sqllimit = "LIMIT " . (($page-1) * $pagesize) . "," . (($page * $pagesize) + 1); } else { $sqllimit = "LIMIT " . ($pagesize + 1); } /* FEHLERMELDUNG AUSGEBEN $result = mysql_query($sql) or die($sql.'
'.mysql_error()); */ if($formSubmitShop or ($_GET['check'] == 'shop')) { $check == 'shop'; if(isset($_SESSION['login']) or $_SESSION['login']) { $ShopTest = "true"; } } if(!empty($formYearFrom) and (strlen($formYearFrom) != 4) or preg_match('/[^0-9]/', $formYearFrom)) { $YearTest = "true"; $Error = "true"; } if(!empty($formYearTo) and (strlen($formYearTo) != 4) or preg_match('/[^0-9]/', $formYearTo)) { $YearTest = "true"; $Error = "true"; } if(!empty($formYearFrom) and !empty($formYearTo) and ($formYearFrom > $formYearTo)) { $YearTest2 = "true"; $Error = "true"; } if(!empty($formLatitudeFrom) or !empty($formLatitudeTo) or !empty($formLongitudeFrom) or !empty($formLongitudeTo)) { if(preg_match('/[^0-9.-]/', $formLatitudeFrom) or preg_match('/[^0-9.-]/', $formLatitudeTo) or preg_match('/[^0-9.-]/', $formLongitudeFrom) or preg_match('/[^0-9.-]/', $formLongitudeTo)) { $CoordinateTest = "true"; $Error = "true"; } if(($formLatitudeFrom > 90.0) or ($formLatitudeFrom < -90.0) or ($formLatitudeTo > 90.0) or ($formLatitudeTo < -90.0)) { $CoordinateTest2 = "true"; $Error = "true"; } if(($formLongitudeFrom > 180.0) or ($formLongitudeFrom < -180.0) or ($formLongitudeTo > 180.0) or ($formLongitudeTo < -180.0)) { $CoordinateTest3 = "true"; $Error = "true"; } } if($Error == "true") { echo ""; echo ""; echo ""; echo "
New SearchChange search

"; if($YearTest == "true") { echo "Collection year not valid! Please enter a four-digit year.
"; } if($YearTest2 == "true") { echo "First collection year has to be smaller than the second.
"; } if($CoordinateTest == "true") { echo "Coordinates not valid, comma not permitted! Please enter a decimal coordinate.
"; } if($CoordinateTest2 == "true") { echo "Coordinates not valid. Latitude must no be smaller than -90.0 or bigger than 90.0!
"; } if($CoordinateTest3 == "true") { echo "Coordinates not valid. Longitude must no be smaller than -180.0 or bigger than 180.0!
"; } echo "
"; } /******************************************************************************************************* * Suchabfrage für Schlagwortsuche oder Erweiterte Suche * * * *******************************************************************************************************/ if($_GET['sqlType'] != "Detail" and !$formSubmitShopDetail and $Error != "true" and ($formSubmitSearch or $_REQUEST['hitlist'] == "true" or $ShopTest == 'true' or $_GET['UnitIDS'] != "")) { $tr = "="; $no = "!="; $lk = "like"; $bt = ">="; $st = "<="; if($_REQUEST['hitlist'] == "true" or $ShopTest == "true") {$parr = $_COOKIE; } if($_REQUEST['hitlist'] == "" and $ShopTest != "true") {$parr = $_POST; } if($_GET['UnitIDS'] != "" and $_GET['sqlType'] != "Detail") {$parr = $_GET; } array($parr); foreach ($parr as $var) { $i ++; if(preg_match('/[<>]/', $var)) { $testhtml = true; echo "Incorrect character (<,>). Please change your entry!"; } if($testhtml != true) { if(!empty($var) and $var!="Search" and key($parr)!="PHPSESSID" and $var!="test" and $var!="Yes") { switch (key($parr)) { case 'formSearch': $last = substr($var,-1,1); $test = strlen($var); $count = $test-1; $search = substr($var,0,$count); if($last == '*' and $test > 1) { $str = "(tablecachetaxonidentified.NameAuthorYear ".$lk." '".addslashes($search)."%' OR "; $str .= "tablecache.UnitID_DNA ".$lk." '".addslashes($search)."%' OR "; $str .= "tablecache.UnitID_Specimen ".$lk." '".addslashes($search)."%' OR "; $str .= "tablecache.CountryName ".$lk." '".addslashes($search)."%' OR "; $str .= "tablecachehighertaxa.Family ".$lk." '".addslashes($search)."%') AND "; } if($last != '*') { $str = "(tablecachetaxonidentified.NameAuthorYear ".$lk." '".addslashes($var)."%' OR "; $str .= "tablecache.UnitID_DNA ".$lk." '".addslashes($var)."' OR "; $str .= "tablecache.UnitID_Specimen ".$lk." '".addslashes($var)."' OR "; $str .= "tablecache.CountryName ".$lk." '".addslashes($var)."' OR "; $str .= "tablecachehighertaxa.Family ".$lk." '".addslashes($var)."') AND "; } $description = " Search key = "; if($_POST['formSearch']) { $value = $formSearch; } else {$value = $_COOKIE['formSearch']; } break; case 'formHigherTaxon': $str = "tablecachehighertaxa.Family ".$tr." '".addslashes($var)."' AND "; $description = " Family = "; if($_POST['formHigherTaxon']) {$value = $formHigherTaxon; } else {$value = $_COOKIE['formHigherTaxon'];} break; case 'formTaxonName': $last = substr($var,-1,1); $test = strlen($var); $count = $test-1; $search = substr($var,0,$count); if($last == '*' and $test > 1) { $str = "tablecachetaxonidentified.NameAuthorYear ".$lk." '".addslashes($search)."%' AND "; } if($last != '*') { $str = "tablecachetaxonidentified.NameAuthorYear ".$tr." '".addslashes($var)."' AND "; } $description = " Species = "; if($_POST['formTaxonName']) {$value = $formTaxonName; } else {$value = $_COOKIE['formTaxonName'];} break; case 'formNCBI': $str = "tablecachetaxonidentified.Tax_ID_NCBI ".$tr." '".addslashes($var)."' AND "; $description = " Taxonomy ID (NCBI) = "; if($_POST['formNCBI']) {$value = $formNCBI; } else {$value = $_COOKIE['formNCBI'];} break; case 'formCountryList': $str = "tablecache.CountryName ".$tr." '".addslashes($var)."' AND "; $description = " Country = "; if($_POST['formCountryList']) {$value = $formCountryList; } else {$value = $_COOKIE['formCountryList'];} break; case 'formContinentList': $str = "tablecountry_continent.Continent ".$tr." '".addslashes($var)."' AND "; $description = " Continent = "; if($_POST['formContinentList']) {$value = $formContinentList; } else {$value = $_COOKIE['formContinentList'];} break; case 'formSeaList': $str = "tablecache.Seas ".$tr." '".addslashes($var)."' AND "; $description = " Sea = "; if($_POST['formSeaList']) {$value = $formSeaList; } else {$value = $_COOKIE['formSeaList'];} break; case 'formOceanList': $str = "tablecache.Ocean ".$tr." '".addslashes($var)."' AND "; $description = " Ocean = "; if($_POST['formOceanList']) {$value = $formOceanList; } else {$value = $_COOKIE['formOceanList'];} break; case 'formLongitudeFrom': $str = "tablecache.LongitudeDecimal ".$bt." '".addslashes($var)."' AND "; $description = " Longitude >= "; if($_POST['formLongitudeFrom']) {$value = $formLongitudeFrom; } else {$value = $_COOKIE['formLongitudeFrom'];} break; case 'formLongitudeTo': $str = "tablecache.LongitudeDecimal ".$st." '".addslashes($var)."' AND "; $description = " Longitude <= "; if($_POST['formLongitudeTo']) {$value = $formLongitudeTo; } else {$value = $_COOKIE['formLongitudeTo'];} break; case 'formLatitudeFrom': $str = "tablecache.LatitudeDecimal ".$bt." '".addslashes($var)."' AND "; $description = " Latitude >= "; if($_POST['formLatitudeFrom']) {$value = $formLatitudeFrom; } else {$value = $_COOKIE['formLatitudeFrom'];} break; case 'formLatitudeTo': $str = "tablecache.LatitudeDecimal ".$st." '".addslashes($var)."' AND "; $description = " Latitude <= "; if($_POST['formLatitudeTo']) {$value = $formLatitudeTo; } else {$value = $_COOKIE['formLatitudeTo'];} break; case 'formYearFrom': $str = "tablecache.CollectionYear ".$bt." '".addslashes($var)."' AND "; $description = " Collection Year >= "; if($_POST['formYearFrom']) {$value = $formYearFrom; } else {$value = $_COOKIE['formYearFrom'];} break; case 'formYearTo': $str = "tablecache.CollectionYear ".$st." '".addslashes($var)."' AND "; $description = " Collection Year <= "; if($_POST['formYearTo']) {$value = $formYearTo; } else {$value = $_COOKIE['formYearTo'];} break; case 'formCollector': $str = "tablecache.Collector ".$lk." '%".addslashes($var)."%' AND "; $description = " Collector = "; if($_POST['formCollector']) {$value = $formCollector; } else {$value = $_COOKIE['formCollector'];} break; case 'formCollectorsNo': $str = "tablecache.CollectorsNo ".$lk." '%".addslashes($var)."%' AND "; $description = " Collector's No = "; if($_POST['formCollectorsNo']) {$value = $formCollectorsNo; } else {$value = $_COOKIE['formCollectorsNo'];} break; case 'formType': $str = "tablecache.TypeStatus ".$no." '' AND "; $description = " Type Status = "; $value = "true"; break; case 'formImage': $str = "tablecache.Image_Available ".$tr."'1' AND "; $description = " Images = "; $value = "available"; break; case 'formSpecUnitID': $str = "tablecache.UnitID_Specimen ".$tr." '".addslashes($var)."' AND "; $description = " UnitID (Specimen) = "; if($_POST['formSpecUnitID']) {$value = $formSpecUnitID; } else {$value = $_COOKIE['formSpecUnitID'];} break; case 'formQuality': $str = "tablecache.DNA_Quality ".$tr." '".addslashes($var)."' AND "; $description = " DNA Quality = "; if($_POST['formQuality']) {$value = $formQuality; } else {$value = $_COOKIE['formQuality'];} break; case 'formTissueList': $str = "tablecache.Tissue ".$tr." '".addslashes($var)."' AND "; $description = " Tissue = "; if($_POST['formTissueList']) {$value = $formTissueList; } else {$value = $_COOKIE['formTissueList'];} break; case 'formDnaBankNumber': $str = "tablecache.UnitID_DNA ".$tr." '".addslashes($var)."' AND "; $description = " DNA Bank No = "; if($_POST['formDnaBankNumber']) {$value = $formDnaBankNumber; } else {$value = $_COOKIE['formDnaBankNumber'];} break; case 'formGenBankNumber': $str = "tablecachegenbanknumbers.GenBankNumber ".$tr." '".addslashes($var)."' AND "; $description = " GenBank Accession Number = "; if($_POST['formGenBankNumber']) {$value = $formGenBankNumber; } else {$value = $_COOKIE['formGenBankNumber'];} break; case 'formDNAbank': $str = "tablecache.ID_Dataset_DNA ".$tr." '".addslashes($var)."' AND "; $description = " DNA Bank = "; $result = mysql_query("SELECT InstitutionCode_DNA FROM tablecache WHERE ID_Dataset_DNA ".$tr." '".$var."'"); while($row = mysql_fetch_object($result)) {$value = $row->InstitutionCode_DNA; } break; case 'UnitIDS': $str = "tablecache.UnitID_Specimen ".$tr." '".addslashes($var)."' AND "; $description = " UnitID Specimen = "; if($_GET['UnitIDS']) {$value = $_GET['UnitIDS']; } else {$value = $_COOKIE['UnitIDS'];} break; case 'CollCodeS': $str = "tablecache.CollectionCode_Specimen ".$tr." '".addslashes($var)."' AND "; $description = " Collection Code Specimen = "; if($_GET['CollCodeS']) {$value = $_GET['CollCodeS']; } else {$value = $_COOKIE['CollCodeS'];} break; case 'InstCodeS': $str = "tablecache.InstitutionCode_Specimen ".$tr." '".addslashes($var)."' AND "; $description = " Institution Code Specimen = "; if($_GET['InstCodeS']) {$value = $_GET['InstCodeS']; } else {$value = $_COOKIE['InstCodeS'];} break; case 'page': break; } $where[$i] = $str; $descriptionall[$i] = $description; $valueall[$i] = $value; } next($parr); }} if(empty($str)) { echo ""; echo ""; echo "
New Search

No search key entered.
"; } else { foreach($where AS $a) $string .= $a; $l=strlen ($string); $max = $l-4; $where_str = substr($string, 0, $max); $wherestr = ' WHERE ' . $where_str; /******************************************************************************************************* * SQL-Befehl wird zusammengebaut aus den verschiedenen Such-Feldern der Formulare, * * Ansichtstyp "DNA" wird festgelegt (Trefferliste) * *******************************************************************************************************/ //abfrage mysql_query("DROP TABLE IF EXISTS tmpDnaIDs"); $sqlType = "Dna"; $sql = $sqlcreate . $sql = "SELECT DISTINCT tablecache.ID_Cache FROM tablecache LEFT JOIN tablecachetaxonidentified ON tablecache.ID_Cache = tablecachetaxonidentified.ID_Cache LEFT JOIN tablecachehighertaxa ON tablecachetaxonidentified.ID_TaxonIdentified = tablecachehighertaxa.ID_CacheTaxonidentified LEFT JOIN tablecachegenbanknumbers ON tablecache.ID_Cache = tablecachegenbanknumbers.ID_Cache LEFT JOIN tablecountry_continent ON tablecache.ID_Country = tablecountry_continent.ID_Country " . $wherestr." ORDER BY tablecachetaxonidentified.NameAuthorYear, tablecache.CountryName ".$sqllimit; //echo $sql; $result = mysql_query($sql); $sqlcount = "SELECT DISTINCT tablecache.ID_Cache FROM tablecache LEFT JOIN tablecachetaxonidentified ON tablecache.ID_Cache = tablecachetaxonidentified.ID_Cache LEFT JOIN tablecachehighertaxa ON tablecachetaxonidentified.ID_TaxonIdentified = tablecachehighertaxa.ID_CacheTaxonidentified LEFT JOIN tablecachegenbanknumbers ON tablecache.ID_Cache = tablecachegenbanknumbers.ID_Cache LEFT JOIN tablecountry_continent ON tablecache.ID_Country = tablecountry_continent.ID_Country " . $wherestr; $resultcount = mysql_query($sqlcount); $gesamt = mysql_num_rows($resultcount); //echo $sqlcount; $log = addslashes($where_str); $sqllog = "INSERT INTO tablelog (Query, Resultcount) VALUES ('$log','$gesamt')"; $resultlog = mysql_query($sqllog); } } //if($_GET['sqlType'] != "Detail" and !$formSubmitShopDetail and ($formSubmitSearch or $_REQUEST['hitlist'] == "true" or $ShopTest == "true")) /******************************************************************************************************* * SQL-Befehl wird zusammengebaut für Detail-Ansicht der DNA/Specimen-Sample * * (2 Triple-IDs als Abfragewerte) * *******************************************************************************************************/ if($_GET['sqlType'] == "Detail") { mysql_query("DROP TABLE IF EXISTS tmpDnaIDs"); $sqlType = "Detail"; $UnitIDS = $_GET['UnitIDS']; $CollCodeS = $_GET['CollCodeS']; $InstCodeS = $_GET['InstCodeS']; $UnitID = $_GET['UnitID']; $CollCode = $_GET['CollCode']; $InstCode = $_GET['InstCode']; $ID_Cache = $_GET['ID_Cache']; $sql = $sqlcreate; if($UnitID == "Unknown") {$sql .= "SELECT DISTINCT tablecache.ID_Cache FROM tablecache " . "LEFT JOIN tablecachetaxonidentified ON tablecache.ID_Cache = tablecachetaxonidentified.ID_Cache LEFT JOIN tablecachehighertaxa ON tablecachetaxonidentified.ID_TaxonIdentified = tablecachehighertaxa.ID_CacheTaxonIdentified "; if($_GET['check'] == "query" and $ID_Cache != "") { $sql .= "WHERE tablecache.ID_Cache = '$ID_Cache' " . $sqllimit; } else { $sql .= "WHERE tablecache.UnitID_Specimen = '$UnitIDS' " . " AND tablecache.CollectionCode_Specimen = '$CollCodeS' " . " AND tablecache.InstitutionCode_Specimen = '$InstCodeS' " . " AND tablecache.UnitID_DNA IS NULL " . " AND tablecache.CollectionCode_DNA IS NULL " . " AND tablecache.InstitutionCode_DNA = '$InstCode' " . $sqllimit; } } //echo $sql; if($UnitID != "Unknown") { $sql .= "SELECT DISTINCT tablecache.ID_Cache FROM tablecache " . "LEFT JOIN tablecachetaxonidentified ON tablecache.ID_Cache = tablecachetaxonidentified.ID_Cache LEFT JOIN tablecachehighertaxa ON tablecachetaxonidentified.ID_TaxonIdentified = tablecachehighertaxa.ID_CacheTaxonIdentified "; if($_GET['check'] == "query" and $ID_Cache != "") { $sql .= "WHERE tablecache.ID_Cache = '$ID_Cache' " . $sqllimit; } else { $sql .= "WHERE tablecache.UnitID_Specimen = '$UnitIDS' " . " AND tablecache.CollectionCode_Specimen = '$CollCodeS' " . " AND tablecache.InstitutionCode_Specimen = '$InstCodeS' " . " AND tablecache.UnitID_DNA = '$UnitID' " . " AND tablecache.CollectionCode_DNA = '$CollCode' " . " AND tablecache.InstitutionCode_DNA = '$InstCode' " . $sqllimit; } } // } } /******************************************************************************************************* * SQL-Befehl wird zusammengebaut für Shop-Ansicht (sieht aus wie normale Trefferliste, jedoch mit * * Möglichkeit, Einträge aus Warenkorb zu entfernen * *******************************************************************************************************/ if($formSubmitShopDetail or $formSubmitShopDelete) { mysql_query("DROP TABLE IF EXISTS tmpDnaIDs"); $sqlType = "Shop"; $sql = $sqlcreate . $sql .= "SELECT DISTINCT tablecache.ID_Cache FROM tablecache LEFT JOIN tablecachetaxonidentified ON tablecache.ID_Cache = tablecachetaxonidentified.ID_Cache LEFT JOIN tablecachehighertaxa ON tablecachetaxonidentified.ID_TaxonIdentified = tablecachehighertaxa.ID_CacheTaxonidentified LEFT JOIN tablecachegenbanknumbers ON tablecache.ID_Cache = tablecachegenbanknumbers.ID_Cache LEFT JOIN tablecountry_continent ON tablecache.ID_Country = tablecountry_continent.ID_Country LEFT JOIN tablecart ON tablecache.ID_Cache = tablecart.ID_Cache " . "WHERE tablecart.Session = '$SID' AND tablecart.ID_User = '$UserID' ". " ORDER BY tablecachetaxonidentified.NameAuthorYear, tablecache.CountryName, LENGTH(tablecache.UnitID_DNA), tablecache.UnitID_DNA"; $result = mysql_query($sql); } /******************************************************************************************************* * SQL-Befehl wird zusammengebaut für Bestell-Übersichten (Warenkorb), keine Möglichkeit mehr, Dinge * * aus dem Warenkorb zu entfernen * *******************************************************************************************************/ if($formSubmitOrder or $formSubmitOrder2) { mysql_query("DROP TABLE IF EXISTS tmpDnaIDs"); $sqlInstCode = "SELECT DISTINCT tablecache.InstitutionCode_DNA AS InstCodeDNA FROM tablecache LEFT JOIN tablecachetaxonidentified ON tablecache.ID_Cache = tablecachetaxonidentified.ID_Cache LEFT JOIN tablecachehighertaxa ON tablecachetaxonidentified.ID_TaxonIdentified = tablecachehighertaxa.ID_CacheTaxonidentified LEFT JOIN tablecachegenbanknumbers ON tablecache.ID_Cache = tablecachegenbanknumbers.ID_Cache LEFT JOIN tablecountry_continent ON tablecache.ID_Country = tablecountry_continent.ID_Country LEFT JOIN tablecart ON tablecache.ID_Cache = tablecart.ID_Cache " . "WHERE tablecart.Session = '$SID' AND tablecart.ID_User = '$UserID' ". "GROUP BY tablecache.InstitutionCode_DNA"; $resultInstCode = mysql_query($sqlInstCode); while($row = mysql_fetch_object($resultInstCode)) { $InstCodeDNA[] = $row->InstCodeDNA; } } $Dnacount=0; if(!empty($sql) or ($check == "shop" and $ShopTest == "true") or !empty($sqlInstCode)) { // just in case it is still here: drop tmpDnaIDs mysql_query("DROP TABLE IF EXISTS tmpDnaIDs"); mysql_query($sql); if(!mysql_affected_rows()) { if($ID_Cache != "") { #######################################Error 1############################################################### $msg = "Try to find results for:\n"; $msg .= "ID_Cache: ".$ID_Cache."\n"; $msg .= $sql; trigger_error($msg, E_USER_ERROR); ############################################################################################################# } /******************************************************************************************************* * Trefferliste wird erzeugt, Anzeige für "No hits" * * * *******************************************************************************************************/ if($sqlType=="Dna") { echo ""; echo ""; echo ""; echo ""; echo ""; } if($sqlType=="Detail" and !$formSubmitShop) { echo ""; } } /******************************************************************************************************* * Anzeige der Kundendaten * * * *******************************************************************************************************/ if($formSubmitOrder) { echo ""; echo ""; echo ""; echo $Institut_Delivery || $Division_Delivery || $Street_Delivery || $City_Delivery || $Postal_Code_Delivery || $Country_Delivery ? "" : ""; echo ""; echo ''; } if($formSubmitOrder2) { $mesg = "
New SearchChange search

No hits found for: "; foreach($descriptionall as $index => $descriptiontest) { $valuetest = $valueall[$index]; echo $descriptiontest."[".$valuetest."]"; } echo ".


Nothing found?

Please note! The query boxes (e.g. species or family name) offer suggestion lists while the search term is being typed. If no list appears, no specimen is available in our DNA or tissue collection.

If you search for DNA of a certain species which is not listed here please contact one of the curators see below. The partner institutions of the network hold major specimen collections. May be on-demand DNA extractions can be made available.
Plants, Algae
Microorganisms
Fungi, Animals
Animals
Holger Zetzsche (BGBM)
Cathrin Sproeer (DSMZ)
Thomas Knebelsberger (ZSM)
Harald Letsch (ZFMK)
"; echo ""; echo ""; echo ""; } echo "
New SearchChange search

No hits found! Please change your current search!
"; } else { if(isset($InstCodeDNA)) { $sqlType = "Shop"; /******************************************************************************************************* * Trefferliste für Warenkorb/Bestellung erzeugt * * Übersicht nach DNA-Banken sortiert, also Bestellungen bei DNA Bank 1, Bestellungen bei DNA Bank 2 * *******************************************************************************************************/ if(($formSubmitOrder or $formSubmitOrder2) and $sqlType=="Shop") { echo "

Your Shopping Cart

"; if(!isset($_COOKIE['test']) or !$_COOKIE['test']) { echo "Please enable Cookies! Otherwise search will not work properly.
";} echo ""; echo "
New searchChange search"; echo "

"; if($formSubmitOrder) { echo "Please check your data."; if($sum > 1) { echo "You will order DNA from ".$sum." different DNA banks"; } echo "
"; } $sum = sizeof($InstCodeDNA); echo ""; if($formSubmitOrder2) { echo ""; echo ""; } foreach ($InstCodeDNA as $InstCode) { mysql_query("DROP TABLE IF EXISTS tmpDnaIDs"); // $sql = $sqlcreate . $sql = "CREATE TEMPORARY TABLE tmpDnaIDs TYPE=HEAP SELECT DISTINCT tablecache.ID_Cache FROM tablecache LEFT JOIN tablecachetaxonidentified ON tablecache.ID_Cache = tablecachetaxonidentified.ID_Cache LEFT JOIN tablecachehighertaxa ON tablecachetaxonidentified.ID_TaxonIdentified = tablecachehighertaxa.ID_CacheTaxonidentified LEFT JOIN tablecachegenbanknumbers ON tablecache.ID_Cache = tablecachegenbanknumbers.ID_Cache LEFT JOIN tablecountry_continent ON tablecache.ID_Country = tablecountry_continent.ID_Country LEFT JOIN tablecart ON tablecache.ID_Cache = tablecart.ID_Cache " . "WHERE tablecart.Session = '$SID' AND tablecart.ID_User = '$UserID' ". " AND tablecache.InstitutionCode_DNA = '$InstCode' " . " ORDER BY tablecachetaxonidentified.NameAuthorYear, tablecache.CountryName, LENGTH(tablecache.UnitID_DNA), tablecache.UnitID_DNA ".$sqllimit; $result = mysql_query($sql); include("Query-Shop.php"); if($formSubmitOrder2) { echo $message; $test[] = $message; $mesgDNABank = "
Dear ".$log.".
Thank you very much for your request of DNA samples from the DNA Bank Network.
Your inquiry has been forwarded to the DNA bank(s) in authority of the requested samples. Shortly you will receive an email offer of these DNA bank(s) including binding sample prices and shipping fee(s).

Sincerely,
The DNA Bank Network Team

"; $mesgDNABank .= $message; //Taxa und DNA-Nummern $mesgDNABank .= ""; $mesgDNABank .= ""; $mesgDNABank .= ""; $mesgDNABank .= $Phone ? "" : ""; $mesgDNABank .= ""; $mesgDNABank .= $Institut_Delivery || $Division_Delivery || $Street_Delivery || $City_Delivery || $Postal_Code_Delivery || $Country_Delivery ? "" : ""; $mesgDNABank .= ""; $mesgDNABank .= "
Dear ".$InstitutionCode." DNA Bank.
"; $mesgDNABank .= "The customer ".$Forename." ".$Surname." preconfirmed ".$gesamt." DNA "; if($gesamt == 1) { $mesgDNABank .= "sample"; } if($gesamt > 1) { $mesgDNABank .= "samples"; } $mesgDNABank .= " of your DNA bank. Please check if the "; if($gesamt == 1) { $mesgDNABank .= "sample is"; } if($gesamt > 1) { $mesgDNABank .= "samples are"; } $mesgDNABank .= " available and send an email offer containing binding prices and shipping fees to the customer.

Customer details:
Name"; $mesgDNABank .= $Title ? $Title." " : ""; $mesgDNABank .= $FormOfAddress ? $FormOfAddress." " : ""; $mesgDNABank .= $Forename." ".$Surname."
Email".$Email."
Phone".$Phone."
Address"; $mesgDNABank .= $Institut ? $Institut."
" : ""; $mesgDNABank .= $Division ? $Division."
" : ""; $mesgDNABank .= $Street ? $Street."
" : ""; $mesgDNABank .= $Postal_Code ? $Postal_Code." " : ""; $mesgDNABank .= $City ? $City."
" : "
"; $mesgDNABank .= $Country ? $Country."" : ""; $mesgDNABank .= "
Delivery Address".$Institut_Delivery."
".$Division_Delivery."
".$Street_Delivery."
".$Postal_Code_Delivery." ".$City_Delivery."
".$Country_Delivery."
Notes".$formNotes."
"; $fromDNABank = "From: contact@dnabank-network.org\n"; $fromDNABank .= "Content-Type: text/html\n"; mail($ContactEmail, "DNA Bank Network - Order Request", htmlspecialchars_decode($mesgDNABank), $fromDNABank); } if($formSubmitOrder) { echo "


Customer details:

Name

"; echo $Title ? $Title." " : ""; echo $FormOfAddress ? $FormOfAddress." " : ""; echo $Forename." ".$Surname."
Address"; echo $Institut ? $Institut."
" : ""; echo $Division ? $Division."
" : ""; echo $Street ? $Street."
" : ""; echo $Postal_Code ? $Postal_Code." " : ""; echo $City ? $City."
" : "
"; echo $Country ? $Country."" : ""; echo "
Delivery Address".$Institut_Delivery."
".$Division_Delivery."
".$Street_Delivery."
".$Postal_Code_Delivery." ".$City_Delivery."
".$Country_Delivery."


Notes


Your order will be directed to the DNA bank(s) in authority of requested samples. Every DNA bank only receives its relevant order information. Subsequently a confirmation email will be send to you by the DNA bank(s) in question. An offer including binding prices will than be made within a separate email.

"; foreach($test as $ausgabe) { $mesg .= $ausgabe; } $mesg .= ""; $mesg .= "
Dear ".$Forename." ".$Surname.".
"; $mesg .= "Thank you very much for your request of DNA samples from the DNA Bank Network. You preconfirmed ".$items; if($gesamt == 1) { $mesg .= " sample "; } if($gesamt > 1) { $mesg .= " samples "; } $mesg .= "from ".$sum; if($sum == 1) { $mesg .= " DNA bank"; } if($sum > 1) { $mesg .= " DNA banks"; } $mesg .= ".

Your inquiry has been forwarded to the DNA bank(s) in authority of the requested samples. Shortly you will receive an email offer of these DNA bank(s) including binding sample prices and shipping fees.

Thank you for your interest.


Sincerely,
The DNA Bank Network Team
"; $from = "From: contact@dnabank-network.org\n"; $from .= "Content-Type: text/html\n"; mail($Email, "DNA Bank Network - Order Confirmation", htmlspecialchars_decode($mesg), $from); $sqldelete = "DELETE FROM tablecart WHERE ID_User = '$UserID' and Session = '$SID'"; $resultdelete = mysql_query($sqldelete); } echo ""; echo "

"; } } else { if($SID) { /******************************************************************************************************* * Zusammenbauen der Ergebnisse allgemein * * * *******************************************************************************************************/ // Abfrage für TableDnaBankNumbers $result1 = mysql_query ("SELECT tablecache.ID_Cache AS ID_Cache, " . " tablecache.ID_Dataset_Specimen AS ID_Dataset_Specimen, " . " tablecache.UnitID_Specimen AS UnitID_Specimen, " . " tablecache.CollectionCode_Specimen AS CollectionCode_Specimen, " . " tablecache.InstitutionCode_Specimen AS InstitutionCode_Specimen, " . // " tablecache.Continent AS Continent, " . " tablecache.CountryName AS CountryName, " . // " tablecache.CountryISO2 AS CountryISO2, " . // " tablecache.Collector AS Collector, " . // " tablecache.CollectionDate AS CollectionDate, " . // " tablecache.CollectorsNo AS CollectorsNo, " . // " tablecache.LocalityText AS LocalityText, " . // " tablecache.Altitude AS Altitude, " . // " tablecache.LongitudeDecimal AS LongitudeDecimal, " . // " tablecache.LatitudeDecimal AS LatitudeDecimal, " . " tablecache.UnitID_DNA AS UnitID_DNA, " . " tablecache.CollectionCode_DNA AS CollectionCode_DNA, " . " tablecache.InstitutionCode_DNA AS InstitutionCode_DNA, " . " tablecache.Blocked_Until AS Blocked_Until " . " FROM tablecache JOIN tmpDnaIDs " . " WHERE tablecache.ID_Cache = tmpDnaIDs.ID_Cache"); if(!$result1) { echo ""; echo ""; echo ""; } else { $result2 = mysql_query ("SELECT tablecachetaxonidentified.ID_Cache, " . " tablecachetaxonidentified.NameAuthorYear AS NameAuthorYear, " . " tablecachetaxonidentified.PreferredFlag AS PreferredFlag " . " FROM tablecachetaxonidentified, tmpDnaIDs " . " WHERE tablecachetaxonidentified.ID_Cache = tmpDnaIDs.ID_Cache"); // $result = mysql_query($result3) or die($result3.'
'.mysql_error()); while($row = mysql_fetch_object($result2)) { if(isset($PreferredFlag[$row->ID_Cache])) { $Flag = $PreferredFlag[$row->ID_Cache]; if($Flag == 'true' or $Flag == '1') {$Preferred = "(preferred species name)";} else {$Preferred = ""; } } else { $PreferredFlag[$row->ID_Cache] = ""; } if(isset($NameAuthorYear[$row->ID_Cache])) { $NameAuthorYear[$row->ID_Cache] .= " " . $Preferred . ", Other Identifications: "; } else { $NameAuthorYear[$row->ID_Cache] = ""; } $tmp = $row->NameAuthorYear; $NameAuthorYear[$row->ID_Cache] .= $tmp; $tmp2 = $row->PreferredFlag; $PreferredFlag[$row->ID_Cache] .= $tmp2; } $result3 = mysql_query ("SELECT tablecache.ID_Cache, " . " tablecachetaxonidentified.ID_TaxonIdentified, " . " tablecachehighertaxa.Family AS Family, " . " tablecachehighertaxa.TaxonRank AS TaxonRank " . " FROM tablecache, tablecachetaxonidentified, tablecachehighertaxa, tmpDnaIDs " . " WHERE tablecachehighertaxa.ID_CacheTaxonIdentified = tablecachetaxonidentified.ID_TaxonIdentified " . " AND tablecachetaxonidentified.ID_Cache = tablecache.ID_Cache " . " AND tablecache.ID_Cache = tmpDnaIDs.ID_Cache " . " AND (tablecachehighertaxa.TaxonRank = 'familia' OR " . " tablecachehighertaxa.TaxonRank = 'family' OR " . " tablecachehighertaxa.TaxonRank = 'familie')"); while($row = mysql_fetch_object($result3)) { if(isset($TaxonRank[$row->ID_Cache])) { $TaxonRank[$row->ID_Cache] .= "
"; } else { $TaxonRank[$row->ID_Cache] = ""; } if(isset($Family[$row->ID_Cache])) { $Family[$row->ID_Cache] .= "
"; } else { $Family[$row->ID_Cache] = ""; } $tmp = $row->Family; $Family[$row->ID_Cache] .= $tmp; $tmp2 = $row->TaxonRank; $TaxonRank[$row->ID_Cache] .= $tmp2; } if($sqlType=="Detail") { $result4 = mysql_query ("SELECT tablecache.ID_Cache, " . " tabledataset.ID_Dataset AS ID_Dataset, " . " tableschema.QueryPart1b AS QueryPart1b, " . " tableschema.QueryPart1_1 AS QueryPart1_1, " . " tableschema.QueryPart1_2b AS QueryPart1_2b, " . " tableschema.QueryPart2 AS QueryPart2, " . " tableschema.QueryPart3 AS QueryPart3, " . " tableschema.QueryPart4 AS QueryPart4, " . " tableschema.QueryPart5 AS QueryPart5, " . " tableprovider.Provider AS Provider, " . " tabledataset.Digir_Resource AS Digir_Resource, " . " tabledataset.Digir_Source AS Digir_Source, " . " tabledataset.bioRecordResourceKey AS ResourceKey, " . " tabledataset.Uuid AS Uuid, " . " tableprovider.Provider AS Provider, " . " tableprovider.ID_Schema AS ID_Schema " . " FROM tablecache, tabledataset, tableschema, tableprovider, tmpDnaIDs " . " WHERE tableprovider.ID_Schema = tableschema.ID_Schema " . " AND tabledataset.ID_Provider = tableprovider.ID_Provider " . " AND tablecache.ID_Dataset_Specimen = tabledataset.ID_Dataset " . " AND tablecache.ID_Cache = tmpDnaIDs.ID_Cache"); while($row = mysql_fetch_object($result4)) { $ID_Dataset = $row->ID_Dataset_Specimen; $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_Resource = $row->Digir_Resource; $Digir_Source = $row->Digir_Source; $ResourceKey = $row->ResourceKey; //gilt nur für die Specimens!! $ID_Schema = $row->ID_Schema; $Uuid = $row->Uuid; } //while $row $result1 $sqlType="Detail" $result5 = mysql_query ("SELECT tablecache.ID_Cache, " . " tabledataset.ID_Dataset AS ID_Dataset2, " . " tabledataset.ContactName AS ContactName, " . " tabledataset.ContactEmail AS ContactEmail, " . " tableschema.QueryPart1b AS QueryPart1b2, " . " tableschema.QueryPart1_1 AS QueryPart1_12, " . " tableschema.QueryPart1_2b AS QueryPart1_2b2, " . " tableschema.QueryPart2 AS QueryPart22, " . " tableschema.QueryPart3 AS QueryPart32, " . " tableschema.QueryPart4 AS QueryPart42, " . " tableschema.QueryPart5 AS QueryPart52, " . " tableprovider.Provider AS Provider2, " . " tabledataset.Digir_Resource AS Digir_Resource2, " . " tabledataset.Digir_Source AS Digir_Source2, " . " tableprovider.Provider AS Provider2, " . " tableprovider.ID_Schema AS ID_Schema2 " . " FROM tablecache, tabledataset, tableschema, tableprovider, tmpDnaIDs " . " WHERE tableprovider.ID_Schema = tableschema.ID_Schema " . " AND tabledataset.ID_Provider = tableprovider.ID_Provider " . " AND tablecache.ID_Dataset_DNA = tabledataset.ID_Dataset " . " AND tablecache.ID_Cache = tmpDnaIDs.ID_Cache"); //$result5 = mysql_query($test2) or die($test2.'
'.mysql_error()); while($row = mysql_fetch_object($result5)) { $ID_Dataset2 = $row->ID_Dataset_Specimen2; $ContactName = $row->ContactName; $ContactEmail = $row->ContactEmail; $Provider2 = $row->Provider2; $QueryPart1b2 = $row->QueryPart1b2; $QueryPart1_12 = $row->QueryPart1_12; $QueryPart1_2b2 = $row->QueryPart1_2b2; $QueryPart22 = $row->QueryPart22; $QueryPart32 = $row->QueryPart32; $QueryPart42 = $row->QueryPart42; $QueryPart52 = $row->QueryPart52; $Digir_Resource2 = $row->Digir_Resource2; $Digir_Source2 = $row->Digir_Source2; $ID_Schema2 = $row->ID_Schema2; } //while $row $result1 $sqlType="Detail" */ if($_GET['link'] != "") { $result6 = mysql_query ("SELECT tablecache.ID_Cache, " . " tableannotations.Replace_TaxonName " . " FROM tablecache, tableannotations, tmpDnaIDs " . " WHERE tablecache.UnitID_Specimen = tableannotations.UnitID_Specimen " . " AND tablecache.CollectionCode_Specimen = tableannotations.CollectionCode_Specimen " . " AND tablecache.InstitutionCode_Specimen = tableannotations.InstitutionCode_Specimen " . " AND tablecache.ID_Cache = tmpDnaIDs.ID_Cache"); while($row = mysql_fetch_object($result6)) { $ReplaceTaxonName = $row->Replace_TaxonName; } //while $row $result1 $sqlType="Detail" */ } } } } /******************************************************************************************************* * Zusammenbauen der Ergebnisse normale Trefferliste * * * *******************************************************************************************************/ if($sqlType=="Dna") { echo "
New Search
Change search
No hits found! Please change your current search!
"; if((!isset($_COOKIE['test']) or !$_COOKIE['test']) and $_GET['UnitIDS'] = "") { echo "Please enable Cookies! Otherwise search will not work properly.
";} echo ""; if(!isset($_SESSION['login']) or !$_SESSION['login']) {echo '
New search "; echo "Change searchPlease login to add DNA samples to

'; } if(isset($_SESSION['login']) or $_SESSION['login']) {echo '
'; echo '

'; } echo ""; $pagegesamt = mysql_num_rows($result1); echo ""; include("pages.php"); echo ""; $Dnacount=0; echo ""; echo ""; if(isset($_SESSION['login']) or $_SESSION['login']) { echo ""; } for ($i=1; $i<=$pagegesamt; $i++) { $row=mysql_fetch_array($result1); { $Dnacount++; if($Dnacount<=$pagesize) { $ID = $row['ID_Cache']; if(empty($row['UnitID_DNA'])) { $UnitIDDNA = "Unknown"; } else {$UnitIDDNA = $row['UnitID_DNA']; } if(empty($row['CollectionCode_DNA'])) { $CollCodeDNA = "Unknown"; } else {$CollCodeDNA = $row['CollectionCode_DNA']; } $UnitIDS = $row['UnitID_Specimen']; $CollCodeS = $row['CollectionCode_Specimen']; $InstCodeS = $row['InstitutionCode_Specimen']; $InstCodeDNA = $row['InstitutionCode_DNA']; $CountryName = $row['CountryName']; $Blocked_Until = $row['Blocked_Until']; echo ""; if(isset($_SESSION['login']) or $_SESSION['login']) { if($Blocked_Until == "" OR $Blocked_Until == "0000-00-00 00:00:00") { echo "";} if($Blocked_Until != "" AND $Blocked_Until != "0000-00-00 00:00:00") { echo "";} } echo ""; } } } echo ""; include("pages.php"); echo "
".$gesamt; if($gesamt == 1) {echo " entry "; } else { echo " entries ";} echo "found for:"; foreach($descriptionall as $index => $descriptiontest) { $valuetest = $valueall[$index]; echo $descriptiontest."[".$valuetest."]"; if ($formNCBI != "" or ($_COOKIE['formNCBI'] != "" and $_GET['hitlist'] == "true")) { $NCBI_Test = "true"; $NCBI_Number = $valuetest; } } echo ". "; if($NCBI_Test == "true") { echo " Check ID in "; } echo "

SpeciesFamilyCountryDNA BankDNA No.Specimen No.
"; if((!isset($_COOKIE['test']) or !$_COOKIE['test']) and !isset($_GET['UnitIDS'])) { echo $NameAuthorYear[$row['ID_Cache']]; } if(empty($row['UnitID_DNA']) and (isset($_COOKIE['test']) or $_COOKIE['test'] or isset($_GET['UnitIDS']))) { $LinkSpecimen = "sqlType=Detail&UnitID=Unknown&CollCode=Unknown&InstCode=$InstCodeDNA&UnitIDS=$UnitIDS&CollCodeS=$CollCodeS&InstCodeS=$InstCodeS&ID_Cache=$ID"; } if(!empty($row['UnitID_DNA']) and (isset($_COOKIE['test']) or $_COOKIE['test'] or isset($_GET['UnitIDS']))) { $LinkSpecimen = "sqlType=Detail&UnitID=$UnitIDDNA&CollCode=$CollCodeDNA&InstCode=$InstCodeDNA&UnitIDS=$UnitIDS&CollCodeS=$CollCodeS&InstCodeS=$InstCodeS&ID_Cache=$ID"; } if($_GET['page'] > 1) { $LinkSpecimen .= "&Page=".$_GET['page']; } echo build_hrefhitlist("Query.php", $LinkSpecimen, " ".$NameAuthorYear[$row['ID_Cache']]); echo "".$Family[$row['ID_Cache']]."".$CountryName." " . $row['InstitutionCode_DNA'] . "" . $row['UnitID_DNA'] . "".$row['UnitID_Specimen']."X

"; echo ""; } /******************************************************************************************************* * Zusammenbauen der Ergebnisse Detailansicht, Wrapper-Abfragen für Specimen und DNA-Daten * * * *******************************************************************************************************/ if($sqlType=="Detail") { while($row = mysql_fetch_object($result1)) { echo ""; echo ""; echo ""; echo ""; if(!isset($_SESSION['login']) or !$_SESSION['login']) { echo '
New searchChange searchBack to hitlist"; echo "Please login to add DNA samples to .

'; } if(isset($_SESSION['login']) or $_SESSION['login']) { if($row->Blocked_Until == "") {echo '
';} if($row->Blocked_Until != "") {echo 'Sorry, this DNA sample is blocked and can not be ordered until '.$row->Blocked_Until.'.
Please contact the '.$row->InstitutionCode_DNA.' for further details!
';} } $UnitID_Specimen = $row->UnitID_Specimen; $CollectionCode_Specimen = $row->CollectionCode_Specimen; $InstitutionCode_Specimen = $row->InstitutionCode_Specimen; $UnitID_DNA = $row->UnitID_DNA; $CollectionCode_DNA = $row->CollectionCode_DNA; $InstitutionCode_DNA = $row->InstitutionCode_DNA; $ID = $row->ID_Cache; $UUID = $row->Uuid; } $Digir_Resource1 = urlencode($Digir_Resource); $Digir_Source1 = urlencode($Digir_Source); $Specimen_UnitID = urlencode($UnitID_Specimen); $Specimen_CollectionCode = urlencode($CollectionCode_Specimen); $Specimen_InstitutionCode = urlencode($InstitutionCode_Specimen); $Digir_Resource12 = urlencode($Digir_Resource2); $Digir_Source12 = urlencode($Digir_Source2); $DNA_UnitID = urlencode($UnitID_DNA); $DNA_CollectionCode = urlencode($CollectionCode_DNA); $DNA_InstitutionCode = urlencode($InstitutionCode_DNA); $sqllogdetails = "INSERT INTO tablelogdetails (UnitID_Specimen, CollectionCode_Specimen, InstitutionCode_Specimen, UnitID_DNA, CollectionCode_DNA, InstitutionCode_DNA) VALUES ('$UnitID_Specimen','$CollectionCode_Specimen','$InstitutionCode_Specimen','$UnitID_DNA','$CollectionCode_DNA','$InstitutionCode_DNA')"; $resultlogdetails = mysql_query($sqllogdetails); $file1 = $Provider.$QueryPart1b.$Digir_Resource1.$QueryPart1_1.$Digir_Source1.$QueryPart1_2b.$Specimen_UnitID.$QueryPart3.$Specimen_InstitutionCode.$QueryPart4.$Specimen_CollectionCode.$QueryPart5; //echo $file1; if($DNA_UnitID != "") {$file2 = $Provider2.$QueryPart1b2.$Digir_Resource12.$QueryPart1_12.$Digir_Source12.$QueryPart1_2b2.$DNA_UnitID.$QueryPart32.$DNA_InstitutionCode.$QueryPart42.$DNA_CollectionCode.$QueryPart52; } //echo $file2; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo "
"; echo ""; if($DNA_UnitID != "") { include ("verify2.php"); } if($DNA_UnitID == "") { echo "
On-demand DNA extraction is possible for this specimen. Please use the order function to it. Your on-demand extraction request will then be forwarded to the ".$InstitutionCode_DNA. ".
"; } echo "

"; if($ID_Schema == 1) { $format = urlencode("http://www.tdwg.org/schemas/abcd/1.2"); $schema = urlencode("abcd1.2"); } if($ID_Schema == 2) { $format = urlencode("http://www.tdwg.org/schemas/abcd/2.06"); $schema = urlencode("abcd2.06"); } if($ID_Schema == 3) { $format = urlencode("http://digir.net/schema/conceptual/darwin/2003/1.0"); $schema = urlencode("http://digir.net/schema/conceptual/darwin/2003/1.0"); } if($ID_Schema == 4) { $format = urlencode("http://www.tdwg.org/schemas/abcd/2.05"); $schema = urlencode("http://www.tdwg.org/schemas/abcd/2.05"); } echo ""; if($Uuid != "") { $file3 = "http://search.biocase.org/annotation/all/".$Uuid."?instid=".$Specimen_InstitutionCode."&format=".$format."&collid=".$Specimen_CollectionCode."&unitid=".$Specimen_UnitID; } if($_GET['anno'] == "true") { echo "

Annotations for these specimen data:

"; echo ""; } include("CheckAnnotation.php"); if($_GET['anno'] == "true") { echo "
DateTitleAuthorSchema

"; } if($testcurrent == "true" and $_GET['anno'] != "true" and empty($_GET['link'])) { echo "
For these specimen data annotations are available. See annotations
"; } $implode = "http://search.biocase.org/world/search/units/annotation/compareHTMLonly?url="; $implode .= urlencode($_GET['link']); $implode .= "&schema=".$format; // $implode .= "&schema=http%3A%2F%2Fwww.tdwg.org%2Fschemas%2Fabcd%2F1.2"; //echo $implode; echo "
"; if($_GET['link'] != "") { echo "See original specimen data from provider.
"; $Anno = implode('', file($implode)); echo '
'.utf8_decode($Anno).'
'; } if($_GET['link'] == "") { include ("verify.php"); } echo "
"; } // if($SID) } } } /******************************************************************************************************* * Zusammenbauen der Ergebnisse Warenkorb * * * *******************************************************************************************************/ if(($formSubmitShopDetail or $formSubmitShopDelete) and $sqlType=="Shop") { if(!empty($result1)) { $gesamt = mysql_num_rows($result1); } echo "

Your Shopping Cart

"; if($gesamt != 0) { if(!isset($_COOKIE['test']) or !$_COOKIE['test']) { echo "Please enable Cookies! Otherwise search will not work properly.
";} echo ""; echo ""; echo '
"; echo "New searchChange search"; echo "

'; } echo ""; if($gesamt != 0) { echo ""; } if($gesamt == 0) { echo "";} if($gesamt != 0) { echo ""; $Dnacount=0; echo ""; } for ($i=1; $i<=$gesamt; $i++) { $row=mysql_fetch_array($result1); { $Dnacount++; if($Dnacount<=$pagesize) { $ID = $row['ID_Cache']; if(empty($row['UnitID_DNA'])) { $UnitIDDNA = "Unknown"; } else {$UnitIDDNA = $row['UnitID_DNA']; } if(empty($row['CollectionCode_DNA'])) { $CollCodeDNA = "Unknown"; } else {$CollCodeDNA = $row['CollectionCode_DNA']; } $UnitIDS = $row['UnitID_Specimen']; $CollCodeS = $row['CollectionCode_Specimen']; $InstCodeS = $row['InstitutionCode_Specimen']; $InstCodeDNA = $row['InstitutionCode_DNA']; $CountryName = $row['CountryName']; echo ""; } } } if($gesamt != 0) { echo ''; } echo "
You have ".$gesamt; if($gesamt == 1) {echo " item "; } else { echo " items ";} echo "in your shopping cart.
You have no items in your shopping cart.

SpeciesFamilyCountryDNA BankDNA No.Specimen No.
"; if(!isset($_COOKIE['test']) or !$_COOKIE['test']) { echo $NameAuthorYear[$row['ID_Cache']]; } if(empty($row['UnitID_DNA']) and (isset($_COOKIE['test']) or $_COOKIE['test'])) { echo build_hrefhitlist("Query.php", "sqlType=Detail&UnitID=Unknown&CollCode=Unknown&InstCode=$InstCodeDNA&UnitIDS=$UnitIDS&CollCodeS=$CollCodeS&InstCodeS=$InstC odeS", " ".$NameAuthorYear[$row['ID_Cache']]); } if(!empty($row['UnitID_DNA']) and (isset($_COOKIE['test']) or $_COOKIE['test'])) { echo build_hrefhitlist("Query.php", "sqlType=Detail&UnitID=$UnitIDDNA&CollCode=$CollCodeDNA&InstCode=$InstCodeDNA&UnitIDS=$UnitIDS&CollCodeS=$CollCodeS&InstCodeS=$InstCodeS", " ".$NameAuthorYear[$row['ID_Cache']]); } echo "".$Family[$row['ID_Cache']]."".$CountryName." " . $row['InstitutionCode_DNA'] . "" . $row['UnitID_DNA'] . "".$row['UnitID_Specimen']."


"; echo ""; } ?>