Ejemplo n.º 1
0
    $gBitUser->verifyTicket();
    if ($result = $gContent->storeCopyright($_REQUEST)) {
        $statusCode = 200;
        $gBitSmarty->assign_by_ref('copyrightInfo', $result);
    }
    //Check if this to remove from a set, or to delete completely
} elseif (!empty($_REQUEST["remove_copyright"])) {
    $gBitUser->verifyTicket();
    if ($gContent->removeCopyrightFromTilelayer($_REQUEST)) {
        $gBitSmarty->assign('removeSucces', true);
    } else {
        $XMLContent = tra("Sorry, there was an unknown error trying to remove the copyright.");
    }
} elseif (!empty($_REQUEST["expunge_copyright"])) {
    $gBitUser->verifyTicket();
    if ($gContent->expungeCopyright($_REQUEST)) {
        $statusCode = 200;
        $gBitSmarty->assign('expungeSucces', true);
    } else {
        $XMLContent = tra("Sorry, there was an unknown error trying to delete the copyright.");
    }
} else {
    if (isset($_REQUEST["copyright_id"])) {
        $copyright = $gContent->getCopyright($_REQUEST["copyright_id"]);
    }
    if (isset($_REQUEST["copyright_id"])) {
        $copyright['copyright_id'] = $_REQUEST["copyright_id"];
    }
    $gBitSmarty->assign_by_ref('copyrightInfo', $copyright);
    $gBitSystem->display('bitpackage:gmap/edit_copyright.tpl', NULL, array('format' => 'center_only', 'display_mode' => 'edit'));
    die;