Beispiel #1
0
$tid = array_key_exists("tid", $_REQUEST) ? $_REQUEST["tid"] : 0;
$taxon = array_key_exists("taxon", $_REQUEST) ? $_REQUEST["taxon"] : "";
$lang = array_key_exists("lang", $_REQUEST) ? $_REQUEST["lang"] : "";
$action = array_key_exists("action", $_REQUEST) ? $_REQUEST["action"] : "";
$tabIndex = array_key_exists("tabindex", $_REQUEST) ? $_REQUEST["tabindex"] : 0;
$tEditor;
if ($tabIndex == 1 || $tabIndex == 2) {
    $tEditor = new TPImageEditorManager();
} elseif ($tabIndex == 4) {
    $tEditor = new TPDescEditorManager();
} else {
    $tEditor = new TPEditorManager();
}
$tid = $tEditor->setTid($tid ? $tid : $taxon);
if ($lang) {
    $tEditor->setLanguage($lang);
}
$statusStr = "";
$editable = false;
if ($isAdmin || array_key_exists("TaxonProfile", $userRights)) {
    $editable = true;
}
if ($editable && $action) {
    if ($action == "Edit Synonym Sort Order") {
        $synSortArr = array();
        foreach ($_REQUEST as $sortKey => $sortValue) {
            if ($sortValue && substr($sortKey, 0, 4) == "syn-") {
                $synSortArr[substr($sortKey, 4)] = $sortValue;
            }
        }
        $statusStr = $tEditor->editSynonymSort($synSortArr);