Example #1
0
    $cleanManager->setCollId($collid);
}
$collMap = $cleanManager->getCollMap();
$statusStr = '';
$isEditor = 0;
if ($isAdmin || array_key_exists("CollAdmin", $userRights) && in_array($collid, $userRights["CollAdmin"]) || $collMap['colltype'] == 'General Observations') {
    $isEditor = 1;
}
//If collection is a general observation project, limit to User
if ($collMap['colltype'] == 'General Observations' && $obsUid !== 0) {
    $obsUid = $symbUid;
    $cleanManager->setObsUid($obsUid);
}
if ($action && $isEditor) {
    if ($action == 'Replace Country') {
        if (!$cleanManager->updateCountry($_POST['badcountry'], $_POST['newcountry'])) {
            $statusStr = $cleanManager->getErrorStr();
        }
    } elseif ($action == 'Assign Country') {
        if (!$cleanManager->updateCountry('--ISNULL--', $_POST['country'], array('stateprovince' => $_POST['stateprovince']))) {
            $statusStr = $cleanManager->getErrorStr();
        }
    } elseif ($action == 'Replace State') {
        if (!$cleanManager->updateState($_POST['badstate'], $_POST['newstate'])) {
            $statusStr = $cleanManager->getErrorStr();
        }
    } elseif ($action == 'Assign State') {
        if (!$cleanManager->updateState('--ISNULL--', $_POST['state'], array('county' => $_POST['county']))) {
            $statusStr = $cleanManager->getErrorStr();
        }
    } elseif ($action == 'Replace County') {