";
}
} // if(!mysql_affected_rows($resultcheckTripleID))
else { // if(mysql_affected_rows($resultcheckTripleID)) = Check for Triple ID was fine
if($sqlTypeStatus == '') { $sqlTypeStatus2 = 'IS NULL'; } else {$sqlTypeStatus2 = "= '".$sqlTypeStatus."'"; }
$sqlcheckCollectingEvent = "SELECT * FROM cachecollection WHERE (CountryName = '$sqlCountryName' OR CountryISO2 = '$sqlISO2') AND Collectors = '$sqlPersonName'
AND (CollectionDate = '$sqlCollectionDate' OR CollectionDateMin = '$sqlCollectionDateMin' OR CollectionDateMax = '$sqlCollectionDateMax') AND CollectorsNo = '$sqlCollectorsNo'
AND Locality = '$sqlLocality' AND Altitude = '$sqlAltitude' AND Longitude = '$sqlLongitude' AND Latitude = '$sqlLatitude' AND TypeStatus = '$sqlTypeStatus2' AND ID_Cache = '$ID_Cache'";
$resultcheckCollectingEvent = mysqli_query($GLOBALS["___mysqli_ston"], $sqlcheckCollectingEvent);
if(mysqli_affected_rows($GLOBALS["___mysqli_ston"]))
{ echo "Specimen record collecting event data or type status differ from cached version! Do you want to update the cached specimen record?";
if(mysqli_num_rows($test) > 0) // information coming from query.php line 2261
{ echo " This specimen record is related to ".mysqli_num_rows($test)." other DNA samples. (see below for list of samples)"; }
$sqlCollectingEvent = "SELECT * FROM cachecollection WHERE ID_Cache = '$ID_Cache'";
$resultCollectingEvent = mysqli_query($GLOBALS["___mysqli_ston"], $sqlCollectingEvent);
while($row = mysqli_fetch_object($resultCollectingEvent))
{
echo "
Parameter
Cache Data
Current Provider Data
";
echo "
Country Name
";
if ($row->CountryName != $sqlCountryName) { echo "".$row->CountryName."
";
}
} // if(!mysql_affected_rows($resultcheckCollectingEvent))
else { // if(mysql_affected_rows($resultcheckCollectingEvent)) = Check for Collecting Data and Type Status was fine
if($sqlNameAuthorYearString != "") {
foreach ($sqlNameAuthorYearString as $index => $NameAuthorYear)
{ $PreferredFlag = $sqlPreferredIdentificationFlag[$index];
$Genus = $sqlGenus[$index];
$Subgenus = $sqlSubgenus[$index];
$FirstEpithet = $sqlFirstEpithet[$index];
$SecondEpithet = $sqlSecondEpithet[$index];
if($PreferredFlag == '' and $PreferredFlag != '0') { $PreferredFlag = '1'; }
if($sqlPreferredIdentificationFlag[$index] == '1' or $sqlPreferredIdentificationFlag[$index] == 'true') {
$sqlCheckIdentification = "SELECT * FROM cachetaxonidentified WHERE Genus = '$Genus' AND Subgenus = '$Subgenus' AND FirstEpithet = '$FirstEpithet' AND
SecondEpithet = '$SecondEpithet' AND NameAuthorYear = '$NameAuthorYear' AND (PreferredFlag = '1' OR PreferredFlag = 'true') AND FK_Cache = '$ID_Cache'";
$resultCheckIdentification = mysqli_query($GLOBALS["___mysqli_ston"], $sqlCheckIdentification);
if(!mysqli_affected_rows($GLOBALS["___mysqli_ston"]))
{ echo "Preferred identification data differ from cached version! Do you want to update the cached specimen record?
";
if(mysqli_num_rows($test) > 0) // information coming from query.php line 2261
{ echo " This specimen record is related to ".mysqli_num_rows($test)." other DNA samples. (see below for list of samples)"; }
$sqlIdentification = "SELECT * FROM cachetaxonidentified WHERE FK_Cache = '$ID_Cache' AND (PreferredFlag = '1' OR PreferredFlag = 'true')";
$resultIdentification = mysqli_query($GLOBALS["___mysqli_ston"], $sqlIdentification);
while($row = mysqli_fetch_object($resultIdentification))
{
echo "
";
if ($PreferredFlag = '1' or $PreferredFlag = 'true') {
echo "
";
} // if ($PreferredFlag = '1' or $PreferredFlag = 'true')
} // while($row = mysql_fetch_object($resultIdentification))
} //if(!mysql_affected_rows($resultCheckIdentification))
else { //if(mysql_affected_rows($resultCheckIdentification))
if(isset($sqlFileURI)) {
foreach($sqlFileURI as $FileURI)
{ $sqlCheckMultimedia = "SELECT * FROM cachemultimedia WHERE Multimedia = '$FileURI' AND FK_Cache = '$ID_Cache'";
$resultCheckMultimedia = mysqli_query($GLOBALS["___mysqli_ston"], $sqlCheckMultimedia);
} }// foreach($sqlFileURI as $FileURI)
if(!mysqli_affected_rows($GLOBALS["___mysqli_ston"]))
{ echo "Multimedia urls differ from cached version! Do you want to update the cached specimen record?
";
if(mysqli_num_rows($test) > 0) // information coming from query.php line 2261
{ echo " This specimen record is related to ".mysqli_num_rows($test)." other DNA samples. (see below for list of samples)"; }
$sqlMultimedia = "SELECT * FROM cachemultimedia WHERE FK_Cache = '$ID_Cache'";
$resultMultimedia = mysqli_query($GLOBALS["___mysqli_ston"], $sqlMultimedia);
echo "
";
}
} // if(!mysql_affected_rows())
else {
echo "Checked successfully: Original provider data are in accordance with cached data, updating not required.";
}
} //if(mysql_affected_rows($resultCheckIdentification)) = Check for Identification Data was fine
} // if($sqlPreferredIdentificationFlag[$index] == '1' or $sqlPreferredIdentificationFlag[$index] == 'true')
} // foreach ($sqlNameAuthorYearString as $NameAuthorYears => $index)
} //if($sqlNameAuthorYearString != "")
else {
$sqlCheckIdentification = "SELECT * FROM cachetaxonidentified WHERE Genus = '$Genus1' AND Subgenus = '$Subgenus1' AND FirstEpithet = '$FirstEpithet1' AND
SecondEpithet = '$SecondEpithet1' AND NameAuthorYear = '$NameAuthorYear1' AND (PreferredFlag = '1' OR PreferredFlag = 'true') AND FK_Cache = '$ID_Cache'";
//echo $sqlCheckIdentification;
$resultCheckIdentification = mysqli_query($GLOBALS["___mysqli_ston"], $sqlCheckIdentification);
if(mysqli_affected_rows($GLOBALS["___mysqli_ston"]))
{ echo "Preferred identification data differ from cached version! Do you want to update the cached specimen record?
";
if(mysqli_num_rows($test) > 0) // information coming from query.php line 2261
{ echo " This specimen record is related to ".mysqli_num_rows($test)." other DNA samples. (see below for list of samples)"; }
$sqlIdentification = "SELECT * FROM cachetaxonidentified WHERE FK_Cache = '$ID_Cache' AND (PreferredFlag = '1' OR PreferredFlag = 'true')";
$resultIdentification = mysqli_query($GLOBALS["___mysqli_ston"], $sqlIdentification);
while($row = mysqli_fetch_object($resultIdentification))
{
echo "
";
if ($PreferredFlag = '1' or $PreferredFlag = 'true') {
echo "
";
} // if ($PreferredFlag = '1' or $PreferredFlag = 'true')
} // while($row = mysql_fetch_object($resultIdentification))
} //if(mysql_affected_rows($resultCheckIdentification)) = Check for Identification Data was fine
else { //if(mysql_affected_rows($resultCheckIdentification))
echo "Checked successfully: GBIF provider data are in accordance with cached data, updating not required.";
}
}
} // if(mysql_affected_rows($resultcheckCollectingEvent)) = Check for Collecting Data was fine
} // if(mysql_affected_rows($resultcheckTripleID)) = Check for Triple ID was fine
?>