Bernd Wurst commited on 2018-01-24 10:34:58
Zeige 4 geänderte Dateien mit 87 Einfügungen und 6 Löschungen.
... | ... |
@@ -75,7 +75,11 @@ $html .= '<tr class="even"><td> </td><td><input type="submit" value="Speich |
75 | 75 |
$html .= '</table>'; |
76 | 76 |
|
77 | 77 |
|
78 |
-output(html_form('contacts_edit', 'save', 'id='.$_REQUEST['id'], $html)); |
|
78 |
+$back = 'list'; |
|
79 |
+if (isset($_REQUEST['back'])) { |
|
80 |
+ $back = urldecode($_REQUEST['back']); |
|
81 |
+} |
|
82 |
+output(html_form('contacts_edit', 'save', 'id='.$_REQUEST['id']."&back=".urlencode($back), $html)); |
|
79 | 83 |
|
80 | 84 |
|
81 | 85 |
?> |
... | ... |
@@ -24,6 +24,11 @@ require_once('session/start.php'); |
24 | 24 |
require_role(array(ROLE_CUSTOMER)); |
25 | 25 |
$section = 'contacts_list'; |
26 | 26 |
|
27 |
+$back = 'list'; |
|
28 |
+if (isset($_REQUEST['back'])) { |
|
29 |
+ $back = urldecode($_REQUEST['back']); |
|
30 |
+} |
|
31 |
+ |
|
27 | 32 |
if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'delete') { |
28 | 33 |
$contact = get_contact($_REQUEST['id']); |
29 | 34 |
|
... | ... |
@@ -32,18 +37,18 @@ if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'delete') { |
32 | 37 |
$sure = user_is_sure(); |
33 | 38 |
if ($sure === NULL) |
34 | 39 |
{ |
35 |
- are_you_sure("action=delete&id={$contact['id']}", "Möchten Sie diese Adresse wirklich löschen? {$contact_string}"); |
|
40 |
+ are_you_sure("action=delete&id={$contact['id']}&back=".urlencode($back), "Möchten Sie diese Adresse wirklich löschen? {$contact_string}"); |
|
36 | 41 |
} |
37 | 42 |
elseif ($sure === true) |
38 | 43 |
{ |
39 | 44 |
delete_contact($contact['id']); |
40 | 45 |
if (! $debugmode) |
41 |
- header("Location: list"); |
|
46 |
+ header("Location: ".$back); |
|
42 | 47 |
} |
43 | 48 |
elseif ($sure === false) |
44 | 49 |
{ |
45 | 50 |
if (! $debugmode) |
46 |
- header("Location: list"); |
|
51 |
+ header("Location: ".$back); |
|
47 | 52 |
} |
48 | 53 |
|
49 | 54 |
|
... | ... |
@@ -150,5 +155,5 @@ if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'delete') { |
150 | 155 |
|
151 | 156 |
|
152 | 157 |
if (! $debugmode) |
153 |
- header("Location: list"); |
|
158 |
+ header("Location: ".$back); |
|
154 | 159 |
} |
... | ... |
@@ -0,0 +1,68 @@ |
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'); |
|
22 |
+require_once('modules/contacts/include/contacts.php'); |
|
23 |
+ |
|
24 |
+require_role(ROLE_CUSTOMER); |
|
25 |
+ |
|
26 |
+if (!isset($_REQUEST['id'])) { |
|
27 |
+ system_failure("Ungültiger Aufruf!"); |
|
28 |
+} |
|
29 |
+ |
|
30 |
+ |
|
31 |
+$dom = new Domain( (int) $_REQUEST['id']); |
|
32 |
+ |
|
33 |
+title("Domain {$dom->fqdn}"); |
|
34 |
+$section = 'domains_domains'; |
|
35 |
+ |
|
36 |
+if ($dom->provider == 'external') { |
|
37 |
+ output("<p>Diese Domain ist extern registriert!</p>"); |
|
38 |
+} |
|
39 |
+if ($dom->provider == 'terions') { |
|
40 |
+ output("<p>Folgende Informationen sind bei dieser Domain hinterlegt:</p>"); |
|
41 |
+ if ($dom->owner && $dom->admin_c) { |
|
42 |
+ $descr = 'Inhaber (OWNER)'; |
|
43 |
+ if ($dom->owner == $dom->admin_c) { |
|
44 |
+ $descr = 'Inhaber'; |
|
45 |
+ } |
|
46 |
+ $owner = get_contact($dom->owner); |
|
47 |
+ $name = nl2br(filter_input_general($owner['name'])); |
|
48 |
+ if ($owner['company']) { |
|
49 |
+ $name = nl2br(filter_input_general($owner['company']))."<br>\n".$name; |
|
50 |
+ } |
|
51 |
+ output("<p>{$descr}:<br><strong>{$name}</strong><br>(Adresse #{$owner['id']})<br>".internal_link("../contacts/edit", icon_edit()." Adresse bearbeiten", "back=".urlencode('../domains/detail?id='.$dom->id)."&id=".$owner['id'])."</p>"); |
|
52 |
+ |
|
53 |
+ if ($dom->owner != $dom->admin_c) { |
|
54 |
+ $admin_c = get_contact($dom->admin_c); |
|
55 |
+ $name = nl2br(filter_input_general($admin_c['name'])); |
|
56 |
+ if ($admin_c['company']) { |
|
57 |
+ $name = nl2br(filter_input_general($admin_c['company']))."<br>\n".$name; |
|
58 |
+ } |
|
59 |
+ output("<p>Verwalter (ADMIN_C):<br><strong>{$name}</strong><br>(Adresse #{$admin_c['id']})<br>".internal_link("../contacts/edit", icon_edit()." Adresse bearbeiten", "back=".urlencode('../domains/detail?id='.$dom->id)."&id=".$admin_c['id'])."</p>"); |
|
60 |
+ } |
|
61 |
+ |
|
62 |
+ #addnew("ownchange", "Inhaber dieser Domain ändern", "id=".$dom->id."&back=".urlencode('detail?id='.$dom->id)); |
|
63 |
+ |
|
64 |
+ } else { |
|
65 |
+ output('<p>Die Inhaberdaten dieser Domain können nicht ausgelesen werden. Bitte wenden Sie sich für Änderungen an den Support!</p>'); |
|
66 |
+ } |
|
67 |
+} |
|
68 |
+output(""); |
... | ... |
@@ -74,7 +74,11 @@ foreach ($user_domains as $domain) |
74 | 74 |
} else { |
75 | 75 |
$punycode = ''; |
76 | 76 |
} |
77 |
- output(" <tr><td>{$domain->fqdn}{$punycode}</td><td>{$regdate}</td><td>{$features}</td></tr>\n"); |
|
77 |
+ $domainname = "{$domain->fqdn}{$punycode}"; |
|
78 |
+ if ($_SESSION['role'] & ROLE_CUSTOMER) { |
|
79 |
+ $domainname = internal_link('detail', $domainname, 'id='.$domain->id); |
|
80 |
+ } |
|
81 |
+ output(" <tr><td>{$domainname}</td><td>{$regdate}</td><td>{$features}</td></tr>\n"); |
|
78 | 82 |
} |
79 | 83 |
output('</table>'); |
80 | 84 |
output("<br />"); |
81 | 85 |