modules/domains/update.php
6f5cde19
 <?php
 /*
 This file belongs to the Webinterface of schokokeks.org Hosting
 
 Written 2008-2018 by schokokeks.org Hosting, namely
   Bernd Wurst <bernd@schokokeks.org>
   Hanno Böck <hanno@schokokeks.org>
 
 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.
 
2626dd47
 You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see
6f5cde19
 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);
 
90ec121d
 if (!isset($_REQUEST['action'])) {
     system_failure("Falscher Aufruf");
b7ec211c
 }
6f5cde19
 
90ec121d
 if ($_REQUEST['action'] == 'chguser') {
     change_user((int)$_REQUEST['id'], $_REQUEST['domainuser']);
     redirect('detail?id='.(int)$_REQUEST['id']);
6f5cde19
 }
9086c9ad
 
90ec121d
 if ($_REQUEST['action'] == 'ownerchange') {
     if (!(isset($_POST['accept']) && $_POST['accept'] == '1')) {
         redirect('detail?error=1');
5bd1e31b
     }
a9f83204
     check_form_token('domains_update');
cca397e5
     $dom = new Domain($_SESSION['domains_detail_domainname']);
90ec121d
     if (!$dom) {
         system_failure("Keine Domain gewählt!");
5bd1e31b
     }
6f5cde19
 
90ec121d
     DEBUG($dom);
cca397e5
     domain_ownerchange($_SESSION['domains_detail_domainname'], $_SESSION['domains_detail_owner'], $_SESSION['domains_detail_admin_c']);
6f5cde19
 
 
cca397e5
     unset($_SESSION['domains_detail_domainname']);
     unset($_SESSION['domains_detail_owner']);
     unset($_SESSION['domains_detail_admin_c']);
     unset($_SESSION['domains_detail_detach']);
6f5cde19
 
90ec121d
     redirect('domains');
 }