Exemplo n.º 1
0
            include 'includes/config/occurVarDefault.php';
        }
    }
    if (isset($ACTIVATE_EXSICCATI) && $ACTIVATE_EXSICCATI) {
        $occManager->setExsiccatiMode(true);
    }
    if ($isAdmin || $collid && array_key_exists("CollAdmin", $userRights) && in_array($collid, $userRights["CollAdmin"])) {
        $isEditor = 1;
    } else {
        if (array_key_exists("CollEditor", $userRights) && in_array($collid, $userRights["CollEditor"])) {
            $isEditor = 2;
        }
    }
    if ($isEditor) {
        if ($action == 'Add Record') {
            $statusStr = $occManager->addOccurrence($_REQUEST);
        }
    }
}
?>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=<?php 
echo $charset;
?>
">
	<title><?php 
echo $defaultTitle;
?>
 Occurrence Editor</title>
	<link href="../../css/jquery-ui.css?<?php 
Exemplo n.º 2
0
    $occManager->setSymbUid($SYMB_UID);
    $occManager->setCollId($collid);
    $collMap = $occManager->getCollMap();
    if ($collMap && $collMap['colltype'] == 'General Observations') {
        $isGenObs = 1;
    }
    if ($isAdmin || $collid && array_key_exists("CollAdmin", $USER_RIGHTS) && in_array($collid, $USER_RIGHTS["CollAdmin"])) {
        $isEditor = 1;
    } else {
        if (array_key_exists("CollEditor", $USER_RIGHTS) && in_array($collid, $USER_RIGHTS["CollEditor"])) {
            $isEditor = 2;
        }
    }
    if ($isEditor) {
        if ($action == 'Add Record') {
            $statusStr = $occManager->addOccurrence($_POST);
        }
    }
}
?>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=<?php 
echo $charset;
?>
">
	<title><?php 
echo $DEFAULT_TITLE;
?>
 Occurrence Editor</title>
	<link href="../../css/jquery-ui.css?<?php 
Exemplo n.º 3
0
 if ($isEditor) {
     //Available to full editors and taxon editors
     if ($action == "Add New Determination") {
         $statusStr = $occManager->addDetermination($_POST, $isEditor);
         $tabTarget = 1;
     } elseif ($action == "Submit Determination Edits") {
         $statusStr = $occManager->editDetermination($_POST);
         $tabTarget = 1;
     } elseif ($action == "Delete Determination") {
         $statusStr = $occManager->deleteDetermination($_POST['detid']);
         $tabTarget = 1;
     }
     //Only full editors can perform following actions
     if ($isEditor == 1 || $isEditor == 2) {
         if ($action == 'Add Record') {
             if ($occManager->addOccurrence($_POST)) {
                 $occManager->setQueryVariables();
                 $qryCnt = $occManager->getQueryRecordCount();
                 $qryCnt++;
                 if ($goToMode) {
                     //Go to new record
                     $occIndex = $qryCnt;
                 } else {
                     //Stay on record and get $occId
                     $occId = $occManager->getOccId();
                 }
             } else {
                 $statusStr = $occManager->getErrorStr();
             }
         } elseif ($action == 'Delete Occurrence') {
             if ($occManager->deleteOccurrence($occId)) {