* Access for all users 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 - Add New Dataset
"; echo""; while ($row = mysqli_fetch_object($result)) { echo ""; if($row->Internal_External == 1) { echo "";} else { echo "";} echo ""; echo ""; } } else { echo ""; } ((mysqli_free_result($result) || (is_object($result) && (get_class($result) == "mysqli_result"))) ? true : false); ?>

Add New Dataset

"; } else { if($formSubmitSave) { if(empty($formDisplay)) { unset($formDisplay); } if($formDisplay=="") { echo "Please complete 'Display'"; } if($formProtocol == "BIOCASE" and $formProvider == "") { echo "Please add BioCASE Access Point"; $TestProtocol = "false"; } if($formDisplay!="" and $TestProtocol != "false") { $result= mysqli_query($GLOBALS["___mysqli_ston"], "SELECT ID_Dataset, Display FROM dataset " . "WHERE Display = '$formDisplay'"); if(mysqli_num_rows($result)) { echo "Dataset already exists!"; } else { $NewDisplay = addslashes($formDisplay); $NewInternExtern = addslashes($formInternExtern); $NewInstitutionCode = addslashes($formInstitutionCode); $NewDatasetKey = addslashes($formDatasetKey); $NewProtocol = addslashes($formProtocol); $NewProvider = addslashes($formProvider); $sql = "INSERT INTO dataset (Display, FK_Provider, Internal_External, DatasetKey_GBIF, Protocol, InstitutionCode, Created_Who)" . "VALUES ('$NewDisplay',NULL,'$NewInternExtern','$NewDatasetKey','$NewProtocol','$NewInstitutionCode','$log')"; $result = mysqli_query($GLOBALS["___mysqli_ston"], $sql); $ID_Dataset = ((is_null($___mysqli_res = mysqli_insert_id($GLOBALS["___mysqli_ston"]))) ? false : $___mysqli_res); if($NewProvider != "" and $NewProtocol == "BIOCASE") { $file = $NewProvider; $dom = new DOMDocument(); $dom->Load($file); $Schema = $dom->getElementsByTagName('SupportedSchemas'); foreach ($Schema as $Schema) { $ABCD = $Schema->getAttribute('namespace'); if($ABCD == "http://www.tdwg.org/schemas/abcd/2.06") { $FK_Schema = "'2'"; } else { $FK_Schema = NULL; } $sqlprovider = "INSERT INTO provider (Provider, FK_Schema, Created_Who) VALUES ('$Endpoint',$FK_Schema,'$log')"; $resultprovider = mysqli_query($GLOBALS["___mysqli_ston"], $sqlprovider); $IDProvider=((is_null($___mysqli_res = mysqli_insert_id($GLOBALS["___mysqli_ston"]))) ? false : $___mysqli_res); } $sqlupdate = "UPDATE dataset SET FK_Provider = '$IDProvider' WHERE ID_Dataset = '$ID_Dataset'"; $resultupdate = mysqli_query($GLOBALS["___mysqli_ston"], $sqlupdate); } #######################################Error 1############################################################### if(!$result) { $msg = $sql."\n"; $msg .= "####Error 1####"; if($debug == '1') echo $msg; trigger_error($msg, E_USER_ERROR); /** * calling Error message */ include ("../config/Errorreport.php"); } ############################################################################################################# else { include("../config/DataSaved.php"); } } } }//if ($formSubmitSave) if($formSubmitUpdate) { $NewDisplay = addslashes($formDisplay); $NewInternExtern = addslashes($formInternExtern); $NewInstitutionCode = addslashes($formInstitutionCode); $NewDatasetKey = addslashes($formDatasetKey); $NewProtocol = addslashes($formProtocol); $NewProvider = addslashes($formProvider); $ID_Dataset = $_POST['ID_Dataset']; $Current_Date = date('Y-m-d H:i:s'); $sqlcheck = "SELECT FK_Provider FROM dataset where ID_Dataset = '$ID_Dataset'"; $resultcheck = mysqli_query($GLOBALS["___mysqli_ston"], $sqlcheck); if($resultcheck) { $sql = "UPDATE dataset, provider SET dataset.Display = '$NewDisplay', dataset.Internal_External = '$NewInternExtern', dataset.InstitutionCode = '$NewInstitutionCode', dataset.Protocol = '$NewProtocol', dataset.DatasetKey_GBIF = '$NewDatasetKey', dataset.Updated_Who = '$log', dataset.Updated_When = '$Current_Date', provider.Updated_Who = '$log', provider.Updated_When = '$Current_Date', provider.Provider = '$NewProvider' WHERE dataset.ID_Dataset = '$ID_Dataset'"; $result = mysqli_query($GLOBALS["___mysqli_ston"], $sql); } else { $sql = "UPDATE dataset SET Display = '$NewDisplay', Internal_External = '$NewInternExtern', InstitutionCode = '$NewInstitutionCode', Protocol = '$NewProtocol', DatasetKey_GBI = '$NewDatasetKey', Updated_Who = '$log', Updated_When = '$Current_Date'"; $result = mysqli_query($GLOBALS["___mysqli_ston"], $sql); } #######################################Error 2############################################################### if(!$result) { $msg = $result."\n"; $msg .= "####Error 2####"; $msg .= $sql; if($debug == '1') echo $msg; trigger_error($msg, E_USER_ERROR); /** * calling Error message */ include ("../config/Errorreport.php"); } ############################################################################################################# else { include("../config/ChangesAccepted.php"); } } //if ($formSubmitUpdate) ?>
With this tool you can administer all different datasets related to your DNA or tissue samples. Below the green box you can see all records found in the database. It is not possible to delete entries here. To do so please ask your administrator for assistance. After finishing your entries please close this window and reload (F5) the input or search mask to get the updated list from database.
Sorry, as a guest you don't have permission for entering new data! If you want to search for existing DNA data please use the Search function!
'; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; } } else { ?>

Edit Dataset
Display* Please read the wiki carefully before editing this data
Internal/External
Institution Code
Dataset Key (GBIF)
Protocol
Provider
Add new Dataset
Display*
Internal/External
Institution Code
Dataset Key (GBIF)
Protocol
BioCASE/DiGIR Access Point
* Mandatory field
"; if($num_rows > 0) { echo "

DisplayProviderInternal/ExternalCreated
".$row->Display."".build_href1($row->Provider, $row->Provider)."InternalExternal".$row->Created_Who." (".$row->Created_When.")

No entries found.