Exemplo n.º 1
0
include_once '../../config/symbini.php';
include_once $SERVER_ROOT . '/classes/KeyMassUpdate.php';
header("Content-Type: text/html; charset=" . $charset);
if (!$SYMB_UID) {
    header('Location: ../../profile/index.php?refurl=../ident/tools/massupdate.php?' . $_SERVER['QUERY_STRING']);
}
$clid = $_REQUEST['clid'];
$taxonFilter = array_key_exists("tf", $_REQUEST) ? $_REQUEST["tf"] : '';
$generaOnly = array_key_exists("generaonly", $_POST) ? $_POST["generaonly"] : 0;
$cidValue = array_key_exists("cid", $_REQUEST) ? $_REQUEST["cid"] : '';
$removeAttrs = array_key_exists("r", $_REQUEST) ? $_REQUEST["r"] : "";
$addAttrs = array_key_exists("a", $_REQUEST) ? $_REQUEST["a"] : "";
$langValue = array_key_exists("lang", $_REQUEST) ? $_REQUEST["lang"] : "";
$muManager = new KeyMassUpdate();
$muManager->setClid($clid);
if ($langValue) {
    $muManager->setLang($langValue);
}
if ($cidValue) {
    $muManager->setCid($cidValue);
}
$isEditor = false;
if ($isAdmin || array_key_exists("KeyEditor", $userRights) || array_key_exists("KeyAdmin", $userRights)) {
    $isEditor = true;
}
if ($isEditor) {
    if ($removeAttrs || $addAttrs) {
        $muManager->processAttributes($removeAttrs, $addAttrs);
    }
}