Пример #1
0
    $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);
    } elseif ($action == "Submit Common Name Edits") {
        $editVernArr = array();
        $editVernArr["vid"] = $_REQUEST["vid"];
        if ($_REQUEST["vernacularname"]) {
            $editVernArr["vernacularname"] = str_replace("\"", "-", $_REQUEST["vernacularname"]);
        }
        if ($_REQUEST["language"]) {
            $editVernArr["language"] = $_REQUEST["language"];
        }
        $editVernArr["notes"] = str_replace("\"", "-", $_REQUEST["notes"]);
        $editVernArr["source"] = $_REQUEST["source"];
        if ($_REQUEST["sortsequence"]) {
            $editVernArr["sortsequence"] = $_REQUEST["sortsequence"];
        }
        $editVernArr["username"] = $paramsArr["un"];