Exemplo n.º 1
0
<?php

include_once '../../../config/symbini.php';
include_once $serverRoot . '/classes/OccurrenceEditorManager.php';
$collId = $_REQUEST['collid'];
$fieldName = $_REQUEST['fieldname'];
$oldValue = $_REQUEST['oldvalue'];
$buMatch = array_key_exists('bumatch', $_REQUEST) ? $_REQUEST['bumatch'] : 0;
$ouid = array_key_exists('ouid', $_REQUEST) ? $_REQUEST['ouid'] : 0;
$retCnt = '';
if ($fieldName) {
    $occManager = new OccurrenceEditorManager();
    $occManager->setCollId($collId);
    if ($ouid) {
        $occManager->setQueryVariables(array('ouid' => $ouid));
    } else {
        $occManager->setQueryVariables();
    }
    $occManager->setSqlWhere();
    $retCnt = $occManager->getBatchUpdateCount($fieldName, $oldValue, $buMatch);
}
echo $retCnt;
Exemplo n.º 2
0
//If not editor, edits will be submitted to omoccuredits table but not applied to omoccurrences
$displayQuery = 0;
$isGenObs = 0;
$collMap = array();
$occArr = array();
$imgArr = array();
$specImgArr = array();
$fragArr = array();
$qryCnt = false;
$statusStr = '';
$navStr = '';
if ($symbUid) {
    //Set variables
    $occManager->setSymbUid($symbUid);
    $occManager->setOccId($occId);
    $occManager->setCollId($collId);
    $collMap = $occManager->getCollMap();
    if ($occId && !$collId && !$crowdSourceMode) {
        $collId = $collMap['collid'];
    }
    if ($collMap && $collMap['colltype'] == 'General Observations') {
        $isGenObs = 1;
    }
    //Bring in config variables
    if ($isGenObs) {
        if (file_exists('includes/config/occurVarGenObs' . $symbUid . '.php')) {
            //Specific to particular collection
            include 'includes/config/occurVarGenObs' . $symbUid . '.php';
        } elseif (file_exists('includes/config/occurVarGenObsDefault.php')) {
            //Specific to Default values for portal
            include 'includes/config/occurVarGenObsDefault.php';