Ermögliche das Ändern eines...
Bernd Wurst authored 7 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)
11) You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see
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('inc/debug.php');
18) require_once('inc/icons.php');
19)
20) require_once('class/domain.php');
21) require_once('domains.php');
|
Alle Domain-Details auf ein...
Bernd Wurst authored 7 years ago
|
22) require_once('domainapi.php');
|
Ermögliche das Ändern eines...
Bernd Wurst authored 7 years ago
|
23)
24) require_role(ROLE_CUSTOMER);
25)
|
Alle Domain-Details auf ein...
Bernd Wurst authored 7 years ago
|
26) $dom = NULL;
27) if (isset($_REQUEST['id'])) {
28) $dom = new Domain( (int) $_REQUEST['id']);
|
Erste Vorbereitungen für Do...
Bernd Wurst authored 7 years ago
|
29) $_SESSION['domains_detail_domainname'] = $dom->fqdn;
30) } elseif (isset($_SESSION['domains_detail_domainname'])) {
31) $dom = new Domain($_SESSION['domains_detail_domainname']);
|
Alle Domain-Details auf ein...
Bernd Wurst authored 7 years ago
|
32) } else {
33) system_failure("Keine Domain angegeben");
|
Ermögliche das Ändern eines...
Bernd Wurst authored 7 years ago
|
34) }
|
Alle Domain-Details auf ein...
Bernd Wurst authored 7 years ago
|
35) if (!$dom) {
36) system_failure("Keine Domain gewählt!");
37) }
38) $dom->ensure_customerdomain();
|
Ermögliche das Ändern eines...
Bernd Wurst authored 7 years ago
|
39)
40) title("Domain {$dom->fqdn}");
41) $section = 'domains_domains';
42)
|
Alle Domain-Details auf ein...
Bernd Wurst authored 7 years ago
|
43) // Block zuständiger Useraccount
44)
45) $useraccounts = list_useraccounts();
46) if ($_SESSION['role'] & ROLE_CUSTOMER && count($useraccounts) > 1) {
47) // Mehrere User vorhanden
48) $options = array();
49) foreach ($useraccounts as $u) {
50) $options[$u['uid']] = $u['username'];
51) }
52) if (!array_key_exists($dom->useraccount, $options)) {
53) $options[$dom->useraccount] = $dom->useraccount;
54) }
55) output('<h4>Zuständiges Benutzerkonto</h4>');
56) $form = '<p>Diese Domain nutzen im Benutzerkonto '.html_select('domainuser', $options, $dom->useraccount).' <input type="submit" name="submit" value="Änderung speichern"></p>';
57) output(html_form('update-user', 'update', 'action=chguser&id='.$dom->id, $form));
|
Ermögliche das Ändern eines...
Bernd Wurst authored 7 years ago
|
58) }
|
Alle Domain-Details auf ein...
Bernd Wurst authored 7 years ago
|
59)
60)
61) // Block Domain-Inhaber
62)
63) if ($dom->provider == 'terions' && ($dom->cancel_date === NULL || $dom->cancel_date > date('Y-m-d'))) {
64) use_module('contacts');
65) require_once('contacts.php');
66)
67) output('<h4>Inhaberwechsel der Domain</h4>');
68) output('<p>Legen Sie hier einen neuen Inhaber für diese Domain fest.</p>');
69)
70) if (isset($_REQUEST['id'])) {
71) api_download_domain($_REQUEST['id']);
|
Erste Vorbereitungen für Do...
Bernd Wurst authored 7 years ago
|
72) $_SESSION['domains_detail_domainname'] = $dom->fqdn;
73) $_SESSION['domains_detail_owner'] = $dom->owner;
74) $_SESSION['domains_detail_admin_c'] = $dom->admin_c;
|
Alle Domain-Details auf ein...
Bernd Wurst authored 7 years ago
|
75) }
76) if (!update_possible($dom->id)) {
77) warning("Diese Domain verwendet eine unübliche Endung. Daher kann der Inhaber nicht auf diesem Weg verändert werden. Bitte kontaktieren Sie den Support.");
78) } else {
79)
|
Erste Vorbereitungen für Do...
Bernd Wurst authored 7 years ago
|
80) if ($_SESSION['domains_detail_admin_c'] == $dom->admin_c &&
81) $_SESSION['domains_detail_owner'] != $dom->owner &&
82) (!isset($_SESSION['domains_detail_detach']) || $_SESSION['domains_detail_detach'] == 0)) {
|
Alle Domain-Details auf ein...
Bernd Wurst authored 7 years ago
|
83) // Wenn der Owner geändert wurde, der Admin aber nicht und das detach-Flag
84) // nicht gesetzt ist, dann wird der Admin gleich dem Owner gesetzt
|
Erste Vorbereitungen für Do...
Bernd Wurst authored 7 years ago
|
85) $_SESSION['domains_detail_admin_c'] = $_SESSION['domains_detail_owner'];
|
Ermögliche das Ändern eines...
Bernd Wurst authored 7 years ago
|
86) }
|
Alle Domain-Details auf ein...
Bernd Wurst authored 7 years ago
|
87)
88) if (isset($_GET['admin_c']) && $_GET['admin_c'] == 'none') {
|
Erste Vorbereitungen für Do...
Bernd Wurst authored 7 years ago
|
89) $_SESSION['domains_detail_admin_c'] = $_SESSION['domains_detail_owner'];
90) unset($_SESSION['domains_detail_detach']);
|
Ermögliche das Ändern eines...
Bernd Wurst authored 7 years ago
|
91) }
92)
|
Erste Vorbereitungen für Do...
Bernd Wurst authored 7 years ago
|
93) $owner = get_contact($_SESSION['domains_detail_owner']);
94) $admin_c = get_contact($_SESSION['domains_detail_admin_c']);
|
Alle Domain-Details auf ein...
Bernd Wurst authored 7 years ago
|
95) $function = 'Inhaber';
96) if ($owner['id'] == $admin_c['id']) {
97) $function .= ' und Verwalter';
98) }
99) $cssclass = '';
100) if ($owner['id'] != $dom->owner) {
101) $cssclass = 'modified';
102) }
103) output('<p><strong>'.$function.':</strong></p>'.display_contact($owner, '', $cssclass));
104) addnew('choose', 'Neuen Inhaber wählen', "type=owner");
105) if ($owner['id'] != $admin_c['id']) {
106) $cssclass = '';
107) if ($admin_c['id'] != $dom->admin_c) {
108) $cssclass = 'modified';
|
Ermögliche das Ändern eines...
Bernd Wurst authored 7 years ago
|
109) }
|
Alle Domain-Details auf ein...
Bernd Wurst authored 7 years ago
|
110) output('<p><strong>Verwalter:</strong></p>'.display_contact($admin_c, '', $cssclass));
111) addnew('choose', 'Neuen Verwalter wählen', "type=admin_c");
|
Erste Vorbereitungen für Do...
Bernd Wurst authored 7 years ago
|
112) output('<p class="delete">'.internal_link('', 'Keinen separaten Verwalter festlegen', 'admin_c=none').'</p>');
|
Alle Domain-Details auf ein...
Bernd Wurst authored 7 years ago
|
113) } else {
114) addnew('choose', 'Einen separaten Verwalter wählen', "type=admin_c&detach=1");
|
Ermögliche das Ändern eines...
Bernd Wurst authored 7 years ago
|
115) }
116)
117)
|
Alle Domain-Details auf ein...
Bernd Wurst authored 7 years ago
|
118) if ($owner['id'] != $dom->owner || $admin_c['id'] != $dom->admin_c) {
119) if (isset($_GET['error']) && $_GET['error'] == '1') {
120) input_error('Sie müssen der Übertragung explizit zustimmen!');
121) }
122) $form = '<p>Es sind Änderungen vorgenommen worden, die noch nicht gespeichert wurden</p>';
123) $form .= '<p><input type="checkbox" name="accept" value="1" id="accept"><label for="accept"> Ich bestätige, dass ich die nachfolgenden Hinweise zur Kenntnis genommen habe.</p>
124) <p>Mit Speichern dieser Änderungen führen Sie möglicherweise einen Inhaberwechsel bei der Domain '.$dom->fqdn.' aus. Inhaberwechsel sind bei einigen Domainendungen (z.B. com/net/org) zustimmungspflichtig vom alten und vom neuen Inhaber. Die Registrierungsstelle kann nach eigenem Ermessen diese Zustimmung per separater E-Mail einfordern. Wird diese Zustimmung nicht oder verspätet erteilt, kann eine Domain gesperrt werden. Dieser Vorgang wird nicht von '.config('company_name').' kontrolliert.</p>
125) <p>Sie sind ferner darüber informiert, dass die Adresse des Domaininhabers öffentlich abrufbar ist.</p>';
126) $form .= '<p><input type="submit" name="sumbit" value="Änderungen speichern und Domaininhaber ändern"></p>';
127) output(html_form('domains_update', 'update', "action=ownerchange&id=".$dom->id, $form));
128) }
|
Ermögliche das Ändern eines...
Bernd Wurst authored 7 years ago
|
129) }
130) }
|
Alle Domain-Details auf ein...
Bernd Wurst authored 7 years ago
|
131)
132) // Block Externe Domain umziehen
133)
|
Erste Vorbereitungen für Do...
Bernd Wurst authored 7 years ago
|
134) if ($dom->status == 'prereg') {
135) output('<h4>Domain-Registrierung abschließen</h4>
136) <p>'.internal_link('domainreg', 'Domain registrieren', "domain={$dom->fqdn}").'</p>');
137) } elseif ($dom->status == 'pretransfer') {
138) output('<h4>Domain-Umzug ausführen</h4>
139) <p>'.internal_link('domainreg', 'Umzugsautrag (ggf. nochmals) erteilen', "domain={$dom->fqdn}").'</p>');
140) } elseif ($dom->provider != 'terions') {
|
Alle Domain-Details auf ein...
Bernd Wurst authored 7 years ago
|
141) output('<h4>Domain-Transfer ausführen</h4>
142) <p>'.internal_link('domainreg', 'Domain-Transfer ausführen', "domain={$dom->fqdn}").'</p>');
143) }
144)
145) // Block Domain bestätigen
146)
|
Erste Vorbereitungen für Do...
Bernd Wurst authored 7 years ago
|
147) if ($dom->mailserver_lock == 1 && $dom->status != 'prereg') {
|
Alle Domain-Details auf ein...
Bernd Wurst authored 7 years ago
|
148) if (has_own_ns($dom->domainname, $dom->tld)) {
149) unset_mailserver_lock($dom);
150) success_msg("Die Domain {$dom->fqdn} wurde erfolgreich bestätigt und kann nun in vollem Umfang verwendet werden.");
151) redirect("");
152) }
153) output('<h3>Mailserver-Sperre aktiv</h3>
154) <p>Bisher ist für diese Domain die Nutzung als Mail-Domain eingeschränkt, da wir noch keine Gewissheit haben, ob Sie der rechtmäßige Nutzer der Domain sind. Eine Domain, die für E-Mail-Aktivität genutzt werden soll, muss entweder die DNS-Server von '.config('company_name').' verwenden oder die Inhaberschaft muss durch einen passend gesetzten DNS-Record nachgewiesen werden. Nachfolgend werden die Möglichkeiten im Detail vorgestellt.</p>');
155) if (!$dom->secret) {
156) create_domain_secret($dom);
157) }
158)
159) $TXT = get_txt_record('_schokokeks', $dom->domainname, $dom->tld);
160) if ($TXT == $dom->secret) {
161) unset_mailserver_lock($dom);
162) success_msg("Die Domain {$dom->fqdn} wurde erfolgreich bestätigt und kann nun in vollem Umfang verwendet werden.");
|
Lasse die API bestimmen was...
Bernd Wurst authored 7 years ago
|
163) redirect("");
|