Beispiel #1
0
<?php

include_once '../../config/symbini.php';
include_once $SERVER_ROOT . '/classes/KeyEditorManager.php';
header("Cache-control: private; Content-Type: text/html; charset=" . $charset);
if (!$SYMB_UID) {
    header('Location: ../../profile/index.php?refurl=../ident/tools/editor.php?' . $_SERVER['QUERY_STRING']);
}
$action = array_key_exists("action", $_POST) ? $_POST["action"] : "";
$langValue = array_key_exists("lang", $_REQUEST) ? $_REQUEST["lang"] : "";
$charValue = array_key_exists("char", $_REQUEST) ? $_REQUEST["char"] : "";
$childrenStr = array_key_exists("children", $_REQUEST) ? $_REQUEST["children"] : "";
$tid = array_key_exists("tid", $_REQUEST) ? $_REQUEST["tid"] : "";
$editorManager = new KeyEditorManager();
if (!$tid && $childrenStr) {
    $childrenArr = explode(',', $childrenStr);
    $tid = array_pop($childrenArr);
    $childrenStr = implode(',', $childrenArr);
}
$editorManager->setLanguage($langValue);
$editorManager->setTid($tid);
$isEditor = false;
if ($isAdmin || array_key_exists("KeyEditor", $userRights) || array_key_exists("KeyAdmin", $userRights)) {
    $isEditor = true;
}
if ($isEditor && $action) {
    if ($action == "Submit Changes") {
        $addArr = array_key_exists('add', $_POST) ? $_POST['add'] : null;
        $removeArr = array_key_exists('remove', $_POST) ? $_POST['remove'] : null;
        $editorManager->processTaxa($addArr, $removeArr);
    }
Beispiel #2
0
include_once $serverRoot . '/classes/KeyEditorManager.php';
header("Cache-control: private; Content-Type: text/html; charset=" . $charset);
$addValues = array();
$removeValues = array();
$action = array_key_exists("action", $_REQUEST) ? $_REQUEST["action"] : "";
$langValue = array_key_exists("lang", $_REQUEST) ? $_REQUEST["lang"] : "";
$charValue = array_key_exists("char", $_REQUEST) ? $_REQUEST["char"] : "";
$child1Value = array_key_exists("child1", $_REQUEST) ? $_REQUEST["child1"] : "";
$child2Value = array_key_exists("child2", $_REQUEST) ? $_REQUEST["child2"] : "";
$clValue = array_key_exists("cl", $_REQUEST) ? $_REQUEST["cl"] : "";
$tQueryValue = array_key_exists("tquery", $_REQUEST) ? $_REQUEST["tquery"] : "";
$tidValue = array_key_exists("tid", $_REQUEST) ? $_REQUEST["tid"] : "";
$taxonValue = array_key_exists("taxon", $_REQUEST) ? $_REQUEST["taxon"] : "";
$addValues = array_key_exists("add", $_REQUEST) ? $_REQUEST["add"] : "";
$removeValues = array_key_exists("remove", $_REQUEST) ? $_REQUEST["remove"] : "";
$editorManager = new KeyEditorManager();
if ($langValue) {
    $editorManager->setLanguage($langValue);
}
$editable = false;
if ($isAdmin || array_key_exists("KeyEditor", $userRights) || array_key_exists("KeyAdmin", $userRights)) {
    $editable = true;
}
?>

<html>
<head>
	<title><?php 
echo $defaultTitle;
?>
 Identification Character Editor</title>