DNA Bank Network - Importtool Specimen Data
Logout
.
Please fill out UnitIDs AND select a Specimen database!"; } else { $result1 = "SELECT tabledataset.ID_Dataset AS ID_Dataset, " . " tableprovider.Provider AS Provider, " . " tableprovider.ID_Schema AS ID_Schema " . " FROM tabledataset " . " LEFT JOIN tableprovider ON tabledataset.ID_Provider = tableprovider.ID_Provider " . " WHERE tabledataset.ID_Dataset = '$formProviderIntern'"; $sql1 = mysql_query($result1); while($row = mysql_fetch_object($sql1)) { $ID_Dataset = $row->ID_Dataset; $Provider = $row->Provider; $ID_Schema = $row->ID_Schema; } #######################################Error 1############################################################### if(!$sql1) { $msg = $result1."\n"; $msg .= "####Error 1####"; trigger_error($msg, E_USER_ERROR); include ("Errorreport.php"); } ############################################################################################################# if($ID_Schema == 1) { $file = $Provider."&query=%3C%3Fxml+version%3D%221.0%22+encoding%3D%22UTF-8%22%3F%3E%3Crequest+xmlns%3D%22http%3A%2F%2Fwww.biocase.org%2Fschemas%2Fprotocol%2F1.3%22%3E%3Cheader%3E%3Ctype%3Esearch%3C%2Ftype%3E%3C%2Fheader%3E%3Csearch%3E%3CrequestFormat%3Ehttp%3A%2F%2Fwww.tdwg.org%2Fschemas%2Fabcd%2F1.2%3C%2FrequestFormat%3E%3CresponseFormat+start%3D%220%22%3Ehttp%3A%2F%2Fwww.tdwg.org%2Fschemas%2Fabcd%2F1.2%3C%2FresponseFormat%3E%3Cfilter%3E%3Cor%3E"; } if($ID_Schema == 2) { $file = $Provider."&query=%3C%3Fxml+version%3D%221.0%22+encoding%3D%22UTF-8%22%3F%3E%3Crequest+xmlns%3D%22http%3A%2F%2Fwww.biocase.org%2Fschemas%2Fprotocol%2F1.3%22%3E%3Cheader%3E%3Ctype%3Esearch%3C%2Ftype%3E%3C%2Fheader%3E%3Csearch%3E%3CrequestFormat%3Ehttp%3A%2F%2Fwww.tdwg.org%2Fschemas%2Fabcd%2F2.06%3C%2FrequestFormat%3E%3CresponseFormat+start%3D%220%22%3Ehttp%3A%2F%2Fwww.tdwg.org%2Fschemas%2Fabcd%2F2.06%3C%2FresponseFormat%3E%3Cfilter%3E%3Cor%3E"; } if($ID_Schema == 4) { $file = $Provider."&query=%3C%3Fxml+version%3D%221.0%22+encoding%3D%22UTF-8%22%3F%3E%3Crequest+xmlns%3D%22http%3A%2F%2Fwww.biocase.org%2Fschemas%2Fprotocol%2F1.3%22%3E%3Cheader%3E%3Ctype%3Esearch%3C%2Ftype%3E%3C%2Fheader%3E%3Csearch%3E%3CrequestFormat%3Ehttp%3A%2F%2Fwww.tdwg.org%2Fschemas%2Fabcd%2F2.05%3C%2FrequestFormat%3E%3CresponseFormat+start%3D%220%22%3Ehttp%3A%2F%2Fwww.tdwg.org%2Fschemas%2Fabcd%2F2.05%3C%2FresponseFormat%3E%3Cfilter%3E%3Cor%3E"; } $Test = explode("\n", $_POST["formNotes"]); // "\n" ist ein Zeilenumbruchszeichen if ($Test[0] and !$Test[1]) { $file .= "%3Clike+path%3D%22%2FDataSets%2FDataSet%2FUnits%2FUnit%2FUnitID%22%3E".urlencode($Test[0])."%3C%2Flike%3E";} if ($Test[0] and $Test[1]) foreach ($Test as $ausgabe) { $file .= "%3Cor%3E%3Clike+path%3D%22%2FDataSets%2FDataSet%2FUnits%2FUnit%2FUnitID%22%3E".urlencode($ausgabe)."%3C%2Flike%3E%3C%2For%3E"; } $file .= "%3C%2For%3E%3C%2Ffilter%3E%3Ccount%3Efalse%3C%2Fcount%3E%3C%2Fsearch%3E%3C%2Frequest%3E"; //echo $file."
"; if($ID_Schema == 1) { if ($version < 5) {include ("Import_ABCD1.2_php4.php"); } if ($version > 5) {$dom = new DOMDocument(); $dom->Load($file); include ("Import_ABCD1.2.php");} } if($ID_Schema == 2) { if ($version < 5) {include ("Import_ABCD2.06_php4.php"); } if ($version > 5) {$dom = new DOMDocument(); $dom->Load($file); include ("Import_ABCD2.06.php");} } if($ID_Schema == 4) { if ($version < 5) {include ("Import_ABCD2.05_php4.php"); } if ($version > 5) {$dom = new DOMDocument(); $dom->Load($file); include ("Import_ABCD2.05.php");} } } //else foreach ($Test as $view) { $view2 = trim($view); $result = "SELECT ID_Cache FROM tablecache WHERE UnitID_Specimen = '$view2' AND ID_Dataset_Specimen = '$formProviderIntern'"; $sql = mysql_query($result); if(!mysql_num_rows($sql)) { echo "
UnitID ".$view2." konnte nicht importiert werden.
"; } } } //if($formSubmitSave) echo '
Please insert the UnitIDs and select a database!
'; echo '
Note: Import for Digir-Provider is currently not available!
'; echo '
Example (UnitIDs separated by enter key/word-wrap):
12435 45642 34562
'; echo '
UnitIDs:
'; if($formSubmitSave) { echo $_POST['formNotes']; } echo '
Specimen database:
'; build_select_list("formProviderIntern", "SELECT tabledataset.ID_Dataset, tabledataset.View FROM tabledataset " . "LEFT JOIN tableprovider ON tabledataset.ID_Provider = tableprovider.ID_Provider " . "WHERE ID_Dataset != '1' " . " AND ID_Schema != '3' " . "ORDER BY View", $formProviderIntern); echo '
'; ?>