* 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 - Add New Kind of Unit
"; echo""; while ($row = mysqli_fetch_object($result)) { echo ""; } } else { echo ""; } ((mysqli_free_result($result) || (is_object($result) && (get_class($result) == "mysqli_result"))) ? true : false); ?>

Add New Kind of Unit

"; } else { if($formSubmitSave) { if(empty($formNewKindOfUnit)) { unset($formNewKindOfUnit); } if($formNewKindOfUnit=="") { echo "Please complete 'Kind of Unit'"; } if($formNewKindOfUnit!="") { $result= mysqli_query($GLOBALS["___mysqli_ston"], "SELECT ID_KindOfUnit, KindOfUnit FROM kindofunit " . "WHERE KindOfUnit = '$formNewKindOfUnit'"); if(mysqli_num_rows($result)) { echo "Kind of Unit already exists!"; } else { $NewKindOfUnit = addslashes($formNewKindOfUnit); $KindOfUnitRemarks = addslashes($formKindOfUnitRemarks); $sql = "INSERT INTO kindofunit (KindOfUnit, KindOfUnitRemarks, Created_Who)" . "VALUES ('$NewKindOfUnit','$KindOfUnitRemarks','$log')"; $result = mysqli_query($GLOBALS["___mysqli_ston"], $sql); #######################################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) { $NewKindOfUnit = addslashes($formNewKindOfUnit); $NewKindOfUnitRemarks = addslashes($formKindOfUnitRemarks); $ID_KindOfUnit = $_POST['ID_KindOfUnit']; $Current_Date = date('Y-m-d H:i:s'); $sql = "UPDATE kindofunit SET KindOfUnit = '$NewKindOfUnit', KindOfUnitRemarks = '$NewKindOfUnitRemarks', Updated_Who = '$log', Updated_When = '$Current_Date' WHERE ID_KindOfUnit = '$ID_KindOfUnit'"; $result = mysqli_query($GLOBALS["___mysqli_ston"], $sql); #######################################Error 2############################################################### if(!$result) { $msg = $result."\n"; $msg .= "####Error 2####"; 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 types of kind of unit related to you 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 ''; } } else { ?>

Edit Kind of Unit
Kind of Unit*
Kind of Unit Remarks
Add new KindOfUnit
Kind of Unit*
KindOfUnit Remarks
* Mandatory field
"; if($num_rows > 0) { echo "

Kind of UnitCreated
".$row->KindOfUnit.""; echo "".$row->Created_Who." (".$row->Created_When.")
No kind of unit entries found.