Exemplo n.º 1
0
if (!is_numeric($collid)) {
    $collid = 0;
}
if (!is_numeric($obsUid)) {
    $obsUid = 0;
}
if ($target && !preg_match('/^[a-z]+$/', $target)) {
    $target = '';
}
if ($mode && !preg_match('/^[a-z]+$/', $mode)) {
    $mode = '';
}
if ($action && !preg_match('/^[a-zA-Z\\s]+$/', $action)) {
    $action = '';
}
$cleanManager = new OccurrenceCleaner();
if ($collid) {
    $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) {
Exemplo n.º 2
0
<?php

include_once '../../config/symbini.php';
include_once $serverRoot . '/classes/OccurrenceCleaner.php';
header("Content-Type: text/html; charset=" . $charset);
$collId = array_key_exists('collid', $_REQUEST) ? $_REQUEST['collid'] : 0;
$obsUid = array_key_exists('obsuid', $_REQUEST) ? $_REQUEST['obsuid'] : '';
$action = array_key_exists('action', $_REQUEST) ? $_REQUEST['action'] : '';
$function = array_key_exists('fn', $_REQUEST) ? $_REQUEST['fn'] : '';
$start = array_key_exists('start', $_REQUEST) ? $_REQUEST['start'] : 0;
$limit = array_key_exists('limit', $_REQUEST) ? $_REQUEST['limit'] : 200;
if (!$symbUid) {
    header('Location: ../../profile/index.php?refurl=../collections/cleaning/occurrencecleaner.php?' . $_SERVER['QUERY_STRING']);
}
$cleanManager = new OccurrenceCleaner();
if ($collId) {
    $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 == 'listdupscatalog') {
    $limit = 500;
Exemplo n.º 3
0
<?php

include_once '../../../config/symbini.php';
include_once $serverRoot . '/classes/OccurrenceCleaner.php';
header("Content-Type: text/html; charset=UTF-8");
$collid = $_REQUEST['collid'];
$oldSciname = $_REQUEST['oldsciname'];
$tid = $_REQUEST['tid'];
$newSciname = $_REQUEST['newsciname'];
$status = "0";
if ($collid && $oldSciname && $tid && $newSciname) {
    $cleanerManager = new OccurrenceCleaner();
    if ($cleanerManager->remapOccurrenceTaxon($collid, $oldSciname, $tid, $newSciname)) {
        $status = 1;
    }
}
echo $status;
$obsUid = array_key_exists('obsuid', $_REQUEST) ? $_REQUEST['obsuid'] : '';
$action = array_key_exists('action', $_REQUEST) ? $_REQUEST['action'] : '';
if (!$symbUid) {
    header('Location: ../../profile/index.php?refurl=../collections/cleaning/fieldstandardization.php?' . $_SERVER['QUERY_STRING']);
}
//Sanitation
if (!is_numeric($collid)) {
    $collid = 0;
}
if (!is_numeric($obsUid)) {
    $obsUid = 0;
}
if ($action && !preg_match('/^[a-zA-Z0-9\\s_]+$/', $action)) {
    $action = '';
}
$cleanManager = new OccurrenceCleaner();
if ($collid) {
    $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);
}
?>
Exemplo n.º 5
0
if (!is_numeric($obsUid)) {
    $obsUid = 0;
}
if ($action && !preg_match('/^[a-zA-Z0-9\\s_]+$/', $action)) {
    $action = '';
}
if ($function && !preg_match('/^[a-zA-Z0-9\\s_]+$/', $function)) {
    $function = '';
}
if (!is_numeric($start)) {
    $start = 0;
}
if (!is_numeric($limit)) {
    $limit = 0;
}
$cleanManager = new OccurrenceCleaner();
if ($collId) {
    $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 == 'listdupscatalog') {
Exemplo n.º 6
0
<?php

include_once '../../config/symbini.php';
include_once $serverRoot . '/classes/OccurrenceCleaner.php';
header("Content-Type: text/html; charset=" . $charset);
if (!$SYMB_UID) {
    header('Location: ../../profile/index.php?refurl=../collections/cleaning/taxonomycleaner.php?' . $_SERVER['QUERY_STRING']);
}
$collid = $_REQUEST["collid"];
$start = array_key_exists('start', $_REQUEST) ? $_REQUEST['start'] : 0;
$limit = array_key_exists('limit', $_REQUEST) ? $_REQUEST['limit'] : 5;
$cleanManager = new OccurrenceCleaner();
$cleanManager->setCollId($collid);
$collMap = $cleanManager->getCollMap();
$isEditor = false;
if ($isAdmin) {
    $isEditor = true;
} else {
    if ($collid) {
        if (array_key_exists("CollAdmin", $userRights) && in_array($collid, $userRights["CollAdmin"])) {
            $isEditor = true;
        }
    }
}
?>
<html>
	<head>
		<title><?php 
echo $defaultTitle;
?>
 Occurrence Taxon Cleaner</title>