exit;
            }
            $_GET['action'] = 'm_rights';
            break;
    }
}
switch ($_GET['action']) {
    case 'm_rights':
        if (!Rsys::item_allow($_GET['item_id'], 'm_rights')) {
            die('No Access!');
        }
        switch ($_GET['subaction']) {
            case 'edit':
                $item = Rsys::get_item($_GET['item_id']);
                $classDB = Rsys::get_class_group($_GET['class_id']);
                $item_rights = Rsys::get_item_rights($_GET['item_id'], $_GET['class_id']);
                $interbreadcrumb[] = array("url" => "m_item.php", "name" => $tool_name);
                $interbreadcrumb[] = array("url" => "m_item.php?&action=m_rights&id=" . $item['id'], "name" => str_replace('#ITEM#', $item['name'], get_lang('MItemRights')));
                Display::display_header(get_lang('EditRight'));
                api_display_tool_title(get_lang('EditRight'));
                $form = new FormValidator('itemright', 'post', "m_item.php?id=" . $item['id'] . "&action=m_rights&subaction=edit");
                $form->add_textfield('classn', get_lang('LangClass'), true, array('readonly' => 'readonly'));
                $form->addElement('checkbox', 'edit_right', get_lang('EditRight'));
                $form->addElement('checkbox', 'delete_right', get_lang('DeleteRight'));
                $form->addElement('checkbox', 'm_reservation', get_lang('MReservationRight'));
                $form->addElement('hidden', 'item_id', $item['id']);
                $form->addElement('hidden', 'class_id', $_GET['class_id']);
                $item_right['classn'] = $classDB[0]['name'];
                $item_right['edit_right'] = $item_rights[0]['edit_right'];
                $item_right['delete_right'] = $item_rights[0]['delete_right'];
                $item_right['m_reservation'] = $item_rights[0]['m_reservation'];