This file belongs to the Webinterface of Hosting
 Written 2008-2018 by Hosting, namely
   Bernd Wurst <>
   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
 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.
 if (! (isset($_SESSION['domains_domainreg_owner']) && $_SESSION['domains_domainreg_owner']) || 
     ! (isset($_SESSION['domains_domainreg_admin_c']) && $_SESSION['domains_domainreg_admin_c']) || 
     ! (isset($_SESSION['domains_domainreg_domainname']) && $_SESSION['domains_domainreg_domainname'])) {
     system_failure("Fehler im Programmablauf!");
 if (! (isset($_REQUEST['domain']) && $_REQUEST['domain']) ||
     $_REQUEST['domain'] != $_SESSION['domains_domainreg_domainname']) {
     system_failure("Fehler im Programmablauf!");
 $dom = new Domain((string) $_REQUEST['domain']);
 // Speichere Kontakte
 domain_ownerchange($dom->fqdn, $_SESSION['domains_domainreg_owner'], $_SESSION['domains_domainreg_admin_c']);
 $authinfo = NULL;
 if ($dom->status == 'pretransfer') {
     if (! (isset($_REQUEST['authinfo']) && $_REQUEST['authinfo'])) {
         system_failure("Kein Auth-Info-Code angegeben!");
     $authinfo = chop($_REQUEST['authinfo']);
 api_register_domain($dom->fqdn, $authinfo);
 success_msg('Die Registrierung wurde in Auftrag gegeben. Der Domain-Status sollte sich in den nächsten Minuten entsprechend ändern.');