示例#1
0
    $traitID = 0;
}
$isEditor = 0;
if ($SYMB_UID) {
    if ($IS_ADMIN) {
        $isEditor = 1;
    } elseif ($collid) {
        //If a page related to collections, one maight want to...
        if (array_key_exists("CollAdmin", $USER_RIGHTS) && in_array($collid, $USER_RIGHTS["CollAdmin"])) {
            $isEditor = 1;
        } elseif (array_key_exists("CollEditor", $USER_RIGHTS) && in_array($collid, $USER_RIGHTS["CollEditor"])) {
            $isEditor = 1;
        }
    }
}
$attrManager = new OccurrenceAttributes();
$statusStr = '';
if ($isEditor) {
    if ($submitForm == 'Batch Assign State') {
        if ($collid && $fieldName) {
            $fieldValue = array_key_exists('fieldvalue', $_POST) ? $_POST['fieldvalue'] : '';
            if (!is_array($fieldValue)) {
                $fieldValue = array($fieldValue);
            }
            $stateID = array_key_exists('stateid', $_POST) ? $_POST['stateid'] : '';
            $notes = $_POST['notes'];
            if (!is_array($stateID)) {
                $stateID = array($stateID);
            }
            if ($stateID && $fieldValue) {
                foreach ($fieldValue as $fValue) {
示例#2
0
    $paneY = '';
}
$isEditor = 0;
if ($SYMB_UID) {
    if ($IS_ADMIN) {
        $isEditor = 2;
    } elseif ($collid) {
        //If a page related to collections, one maight want to...
        if (array_key_exists("CollAdmin", $USER_RIGHTS) && in_array($collid, $USER_RIGHTS["CollAdmin"])) {
            $isEditor = 2;
        } elseif (array_key_exists("CollEditor", $USER_RIGHTS) && in_array($collid, $USER_RIGHTS["CollEditor"])) {
            $isEditor = 1;
        }
    }
}
$attrManager = new OccurrenceAttributes();
if ($tidFilter) {
    $attrManager->setTidFilter($tidFilter);
}
if ($collid) {
    $attrManager->setCollid($collid);
}
$statusStr = '';
if ($isEditor) {
    if ($submitForm == 'Save and Next') {
        $stateID = $_POST['stateid'];
        $targetOccid = $_POST['targetoccid'];
        $notes = $_POST['notes'];
        if (is_array($stateID)) {
            foreach ($stateID as $id) {
                if (!$attrManager->saveAttributes($id, $targetOccid, $notes, $SYMB_UID)) {
示例#3
0
<?php

include_once '../../../config/symbini.php';
include_once $SERVER_ROOT . '/classes/OccurrenceAttributes.php';
header("Content-Type: application/json; charset=" . $CHARSET);
$exact = isset($_REQUEST['exact']) && $_REQUEST['exact'] ? true : false;
$attrManager = new OccurrenceAttributes('readonly');
echo $attrManager->getTaxonFilterSuggest($_REQUEST['term'], $exact);