* Getting specimen data from original provider via wrapper *

* Entering new DNA data, setting reference to voucher/specimen *

* Access to all user except of guests * @author Gabriele Droege, DNA Bank Network * @version 2.0 * @package Input * @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"); ?> DNA Module - Search Results
"; $jsonfile = file_get_contents('http://api.gbif.org/v0.9/occurrence/search?catalogNumber='.urlencode('B 10 0426933').'&limit=50'); // endpoint holen : http://api.gbif.org/v0.9/dataset/85714c48-f762-11e1-a439-00145eb45e9a/endpoint // die GUID is datasetKey aus der Occurrence $json_array = json_decode($jsonfile, true); foreach ($json_array as $key1 => $list1) { // Check type if ($key1 == "results" and is_array($list1)) { // Scan through inner loop echo '

DNA Data Input


'; echo '
Specimen details (voucher)
Preferred Taxon Name: '.$list1[0]["scientificName"].'
Unit ID: '.$list1[0]["catalogNumber"].'
Record Basis: '.$list1[0]["basisOfRecord"].'
'; if(isset($list1[0]["occurrenceID"])) { echo 'Unit GUID: '.$list1[0]["occurrenceID"].''; } echo '
Institution Code: '.$list1[0]["institutionCode"].'
Collection Code: '.$list1[0]["collectionCode"].'
'; echo '

Identification(s):

Name: '.$list1[0]["scientificName"].'
Identifier: '.$list1[0]["identifiedBy"].'
Taxonomy: '.$list1[0]["family"].' (familia)
'; echo '

Collection Info:

Collector(s): '.$list1[0]["recordedBy"].'
'; if(isset($list1[0]["recordNumber"])) { echo 'Field number: 2011-14
'; } echo 'Collection Date: '.$list1[0]["eventDate"].'
Locality Other info
Country: '.$list1[0]["country"].' '.$list1[0]["countryCode"].'
Locality: '.$list1[0]["locality"].'
Coordinates (Lat|Lon): '.$list1[0]["decimalLatitude"].' | '.$list1[0]["decimalLongitude"].'
'; if(isset($list1[0]["elevation"])) { echo 'Altitude: '.$list1[0]["elevation"].' m
'; } echo '
'; foreach ($list1 as $key2 => $list2) { // echo "Parameter: " . $list2 . "\n"; if (is_array($list2)) { // Scan through inner loop foreach($list2 as $key3 => $list3) { if(!is_array($list3)) { echo "Parameter: " . $key3; echo " Value: " . $list3 . ""; } else {} // nicht auflösende Arrays unterdrücken } // foreach($list2 as $key3 => $list3) } // if (is_array($list2)) } //foreach ($list1 as $key2 => $list2) } //if ($key1 == "results" and is_array($list1)) } //foreach ($json_array as $key1 => $list1) ?>