" target="_blank"> |
Add New Reference |
|
| |
With this tool you can handle your references, it is not a literature management tool. The goal was to keep it simple but useful.
You can enter a lab protocol with pdf as well as a reference (including link to file), related to your samples or specimens. The list below green box shows you all references 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($formReferenceText) and empty($formReferenceShort))
{ unset($formReferenceText);
unset($formReferenceShort); }
if($formReferenceText == "" and $formReferenceAbbreviation == "")
{ echo "Please complete either 'Full Citation Format' or 'Reference Abbreviation'"; }
if($formReferenceText != "" or $formReferenceAbbreviation != "")
{
$result= mysqli_query($GLOBALS["___mysqli_ston"], "SELECT ID_References, ReferenceText, ReferenceShort FROM reference " .
"WHERE ReferenceText = '$formReferenceText' or (ReferenceShort = '$formReferenceShort' AND ReferenceShort != '')");
if(mysqli_num_rows($result))
{
echo "Reference already exists!";
}
else
{
$NewReferenceText = addslashes($formReferenceText);
$NewReferenceShort = addslashes($formReferenceShort);
$NewReferenceUrl = addslashes($formReferenceUrl);
$sql = "INSERT INTO reference (ReferenceText, ReferenceShort, ReferenceUrl, Created_Who)" .
"VALUES ('$NewReferenceText','$NewReferenceShort','$NewReferenceUrl','$log')";
$result = mysqli_query($GLOBALS["___mysqli_ston"], $sql);
#######################################Error 1###############################################################
if(!$result)
{ $msg = $result."\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)
{
$NewReferenceText = addslashes($formReferenceText);
$NewReferenceShort = addslashes($formReferenceShort);
$NewReferenceUrl = addslashes($formReferenceUrl);
$ID_Reference = $_POST['ID_Reference'];
$sql = "UPDATE reference SET ReferenceText = '$NewReferenceText', ReferenceShort = '$NewReferenceShort', ReferenceUrl = '$NewReferenceUrl' WHERE ID_References = '$ID_Reference'";
$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"Reference Citation | Reference Short | Created | | ";
while ($row = mysqli_fetch_object($result))
{
echo "";
echo $row->ReferenceUrl ? build_href1($row->ReferenceUrl, $row->ReferenceText) : $row->ReferenceText;
echo " | ";
echo $row->ReferenceUrl ? build_href1($row->ReferenceUrl, $row->ReferenceShort) : $row->referenceShort;
echo " | ".$row->Created_Who." (".$row->Created_When.") | |
";
echo "
|
";
}}
else { echo "No reference entries found. |
"; }
((mysqli_free_result($result) || (is_object($result) && (get_class($result) == "mysqli_result"))) ? true : false);
?>