2626dd47daad110c63a82c0560b134e2364eeac3
Bernd Wurst Transfer-Freigabe und Kündi...

Bernd Wurst authored 6 years ago

1) <?php
2) /*
3) This file belongs to the Webinterface of schokokeks.org Hosting
4) 
5) Written 2008-2018 by schokokeks.org Hosting, namely
6)   Bernd Wurst <bernd@schokokeks.org>
7)   Hanno Böck <hanno@schokokeks.org>
8) 
9) 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.
10) 
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

11) You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see
Bernd Wurst Transfer-Freigabe und Kündi...

Bernd Wurst authored 6 years ago

12) http://creativecommons.org/publicdomain/zero/1.0/
13) 
14) 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.
15) */
16) 
17) require_once("class/domain.php");
18) require_once("domains.php");
19) require_once("domainapi.php");
20) require_role(ROLE_CUSTOMER);
21) 
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

22) $dom = new Domain((int) $_REQUEST['domain']);
Bernd Wurst Transfer-Freigabe und Kündi...

Bernd Wurst authored 6 years ago

23) $dom->ensure_customerdomain();
24) 
25) $domain_in_use = mailman_subdomains($dom->id) || mail_in_use($dom->id) || web_in_use($dom->id) || $dom->jabber == 1;
26) if ($_REQUEST['action'] == 'delete') {
27)     if ($domain_in_use || !($dom->status == 'prereg' || $dom->status == 'pretransfer' || $dom->status == 'transferfailed' || $dom->status == 'external')) {
28)         system_failure("Diese Domain ist noch in Benutzung. Bitte Postfächer und Websites löschen sowie Eintragungen in Mailinglisten oder Jabber-Server löschen lassen.");
29)     }
30)     $sure = user_is_sure();
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

31)     if ($sure === null) {
Bernd Wurst Transfer-Freigabe und Kündi...

Bernd Wurst authored 6 years ago

32)         are_you_sure("action=delete&domain={$dom->id}", "Möchten Sie die Domain »{$dom->fqdn}« wirklich löschen?");
33)     } elseif ($sure === true) {
34)         delete_domain($dom->id);
35)         redirect('domains');
36)     } elseif ($sure === false) {
37)         redirect('detail?id='.$dom->id);
38)     }
39) } elseif ($_REQUEST['action'] == 'cancel') {
40)     $info = api_download_domain($dom->id);
41)     $sure = user_is_sure();
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

42)     if ($sure === null) {