$statusStr = 'Image added successfully'; $tabTarget = 2; } if ($occManager->getErrorStr()) { $statusStr .= $occManager->getErrorStr(); } } elseif ($action == "Delete Image") { $removeImg = array_key_exists("removeimg", $_POST) ? $_POST["removeimg"] : 0; if ($occManager->deleteImage($_POST["imgid"], $removeImg)) { $statusStr = 'Image deleted successfully'; $tabTarget = 2; } else { $statusStr = $occManager->getErrorStr(); } } elseif ($action == "Remap Image") { $statusStr = $occManager->remapImage($_POST["imgid"], $_POST["occid"]); } elseif ($action == "Apply Determination") { $makeCurrent = 0; if (array_key_exists('makecurrent', $_POST)) { $makeCurrent = 1; } $statusStr = $occManager->applyDetermination($_POST['detid'], $makeCurrent); $tabTarget = 1; } elseif ($action == "Make Determination Current") { $statusStr = $occManager->makeDeterminationCurrent($_POST['detid']); $tabTarget = 1; } elseif ($action == "Submit Verification Edits") { $statusStr = $occManager->editIdentificationRanking($_POST['confidenceranking'], $_POST['notes']); $tabTarget = 1; } elseif ($action == 'editgeneticsubmit') { $statusStr = $occManager->editGeneticResource($_POST);
$statusStr = 'Image added successfully'; $tabTarget = 2; } if ($occManager->getErrorStr()) { $statusStr .= $occManager->getErrorStr(); } } elseif ($action == "Delete Image") { $removeImg = array_key_exists("removeimg", $_POST) ? $_POST["removeimg"] : 0; if ($occManager->deleteImage($_POST["imgid"], $removeImg)) { $statusStr = 'Image deleted successfully'; $tabTarget = 2; } else { $statusStr = $occManager->getErrorStr(); } } elseif ($action == "Remap Image") { if ($occManager->remapImage($_POST["imgid"], $_POST["targetoccid"])) { $statusStr = 'SUCCESS: Image remapped to record <a href="occurrenceeditor.php?occid=' . $_POST["targetoccid"] . '" target="_blank">' . $_POST["targetoccid"] . '</a>'; } else { $statusStr = 'ERROR linking image to new specimen: ' . $occManager->getErrorStr(); } } elseif ($action == "Disassociate Image") { if ($occManager->remapImage($_POST["imgid"])) { $statusStr = 'SUCCESS disassociating image <a href="../../imagelib/imgdetails.php?imgid=' . $_POST["imgid"] . '" target="_blank">#' . $_POST["imgid"] . '</a>'; } else { $statusStr = 'ERROR disassociating image: ' . $occManager->getErrorStr(); } } elseif ($action == "Apply Determination") { $makeCurrent = 0; if (array_key_exists('makecurrent', $_POST)) { $makeCurrent = 1; }