Hanno Böck To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide. This software is distributed without any warranty. You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see http://creativecommons.org/publicdomain/zero/1.0/ Nevertheless, in case you use a significant part of this code, we ask (but not require, see the license) that you keep the authors' names in place and return your changes to the public. We would be especially happy if you tell us what you're going to do with this code. */ require_once('inc/debug.php'); require_once('inc/icons.php'); require_once('class/domain.php'); require_once('domains.php'); require_role(ROLE_CUSTOMER); use_module('contacts'); require_once('contacts.php'); $dom = NULL; if (isset($_REQUEST['id'])) { $dom = new Domain( (int) $_REQUEST['id']); if ($dom->provider == 'external' || $dom->provider != 'terions') { system_failure("

Diese Domain ist extern registriert!

"); } $_SESSION['domains_update_domainname'] = $dom->fqdn; $_SESSION['domains_update_owner'] = $dom->owner; $_SESSION['domains_update_admin_c'] = $dom->admin_c; } else { $dom = new Domain($_SESSION['domains_update_domainname']); } if (!$dom) { system_failure("Keine Domain gewählt!"); } if ($_SESSION['domains_update_admin_c'] == $dom->admin_c && $_SESSION['domains_update_owner'] != $dom->owner && (!isset($_SESSION['domains_update_detach']) || $_SESSION['domains_update_detach'] == 0)) { // Wenn der Owner geändert wurde, der Admin aber nicht und das detach-Flag // nicht gesetzt ist, dann wird der Admin gleich dem Owner gesetzt $_SESSION['domains_update_admin_c'] = $_SESSION['domains_update_owner']; } if (isset($_GET['admin_c']) && $_GET['admin_c'] == 'none') { $_SESSION['domains_update_admin_c'] = $_SESSION['domains_update_owner']; unset($_SESSION['domains_update_detach']); } title("Änderung der Domain {$dom->fqdn}"); $section = 'domains_domains'; output('

Legen Sie hier einen neuen Inhaber für diese Domain fest.

'); $changed = false; $owner = get_contact($_SESSION['domains_update_owner']); $admin_c = get_contact($_SESSION['domains_update_admin_c']); $function = 'Inhaber'; if ($owner['id'] == $admin_c['id']) { $function .= ' und Verwalter'; } $cssclass = ''; if ($owner['id'] != $dom->owner) { $cssclass = 'modified'; $changed = true; } output('

'.$function.':

'.display_contact($owner, '', $cssclass)); addnew('choose', 'Neuen Inhaber wählen', "type=owner"); if ($owner['id'] != $admin_c['id']) { $cssclass = ''; if ($admin_c['id'] != $dom->admin_c) { $cssclass = 'modified'; $changed = true; } output('

Verwalter:

'.display_contact($admin_c, '', $cssclass)); addnew('choose', 'Neuen Inhaber wählen', "type=admin_c"); output('

'.internal_link('update', 'Keinen separaten Verwalter festlegen', 'admin_c=none').'

'); } else { addnew('choose', 'Einen separaten Verwalter wählen', "type=admin_c&detach=1"); } if ($changed) { if (isset($_GET['error']) && $_GET['error'] == '1') { input_error('Sie müssen der Übertragung explizit zustimmen!'); } $form = '

Es sind Änderungen vorgenommen worden, die noch nicht gespeichert wurden

'; $form .= '

'; $form .= '

'; output(html_form('domains_update', 'update_save', "id=".$dom->id, $form)); } output('

'.internal_link('domains', 'Ohne Änderungen zurück').'

');