" target="_blank"> |
Add New Genetic Locus |
|
| |
With this tool you can administer all different genetic loci related to your DNA 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! | "; }
else {
if($formSubmitSave)
{
if(empty($formNewGeneticLocus))
{ unset($formNewGeneticLocus); }
if($formNewGeneticLocus=="")
{ echo "Please complete 'Genetic Locus'"; }
if($formNewGeneticLocus!="")
{
$result= mysqli_query($GLOBALS["___mysqli_ston"], "SELECT ID_GeneticLocus, GeneticLocus FROM geneticlocus " .
"WHERE GeneticLocus = '$formNewGeneticLocus'");
if(mysqli_num_rows($result))
{
echo "Genetic Locus already exists!";
}
else
{
$NewGeneticLocus = addslashes($formNewGeneticLocus);
$NewGeneticLocusRemarks = addslashes($formGeneticLocusRemarks);
$sql = "INSERT INTO geneticlocus (GeneticLocus, GeneticLocusRemarks, Created_Who)" .
"VALUES ('$NewGeneticLocus','$NewGeneticLocusRemarks','$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)
{
$NewGeneticLocus = addslashes($formNewGeneticLocus);
$NewGeneticLocusRemarks = addslashes($formGeneticLocusRemarks);
$ID_GeneticLocus = $_POST['ID_GeneticLocus'];
$Current_Date = date('Y-m-d H:i:s');
$sql = "UPDATE geneticlocus SET Geneticlocus = '$NewGeneticLocus', GeneticLocusRemarks = '$NewGeneticLocusRemarks', Updated_Who = '$log', Updated_When = '$Current_Date' WHERE ID_GeneticLocus = '$ID_GeneticLocus'";
$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)
?>
";
if($num_rows > 0) {
echo " |
|
";
echo"GeneticLocus | Remarks | Created | | ";
while ($row = mysqli_fetch_object($result))
{
echo "".$row->GeneticLocus." | ".$row->GeneticLocusRemarks." | ";
echo "".$row->Created_Who." (".$row->Created_When.") | |
";
}}
else { echo "No entries found. |
"; }
((mysqli_free_result($result) || (is_object($result) && (get_class($result) == "mysqli_result"))) ? true : false);
?>