if ($delete == 'true') {
    $service->delete();
    $oPage->redirect('host.php?host_id=' . $host->getId());
    exit;
}
if ($service->getOwnerID() != $oUser->getMyKey()) {
    if ($service->fork($host)) {
        $oUser->addStatusMessage(_('Služba jiného vlastníka byla odvozena jako vlastní'), 'success');
    } else {
        $oUser->addStatusMessage(_('Služba nebyla odvozena'), 'error');
    }
}
$delhost = $oPage->getGetValue('delhost');
if ($delhost) {
    $service->delMember('host_name', $oPage->getGetValue('host_id', 'int'), $delhost);
    $service->saveToMySql();
}
$addhost = $oPage->getGetValue('addhost');
if ($addhost) {
    $service->addMember('host_name', $oPage->getGetValue('host_id', 'int'), $addhost);
    $service->saveToMySql();
}
$delcnt = $oPage->getGetValue('delcontact');
if ($delcnt) {
    $service->delMember('contacts', $oPage->getGetValue('contact_id', 'int'), $delcnt);
    $service->saveToMySql();
}
$addcnt = $oPage->getGetValue('addcontact');
if ($addcnt) {
    $service->addMember('contacts', $oPage->getGetValue('contact_id', 'int'), $addcnt);
    $service->saveToMySql();