Bernd Wurst commited on 2019-04-05 15:39:51
Zeige 2 geänderte Dateien mit 11 Einfügungen und 2 Löschungen.
... | ... |
@@ -62,6 +62,11 @@ if (have_role(ROLE_CUSTOMER) && count($useraccounts) > 1) { |
62 | 62 |
output('<h4>Zuständiges Benutzerkonto</h4>'); |
63 | 63 |
$form = '<p>Diese Domain nutzen im Benutzerkonto '.html_select('domainuser', $options, $dom->useraccount).' <input type="submit" name="submit" value="Änderung speichern"></p>'; |
64 | 64 |
output(html_form('update-user', 'update', 'action=chguser&id='.$dom->id, $form)); |
65 |
+} else if (have_role(ROLE_SYSTEMUSER) && $dom->useraccount != $_SESSION['userinfo']['uid']) { |
|
66 |
+ // Kunde hat keine mehreren User, Domain ist trotzdem in einem anderen Useraccount |
|
67 |
+ $is_current_user = false; |
|
68 |
+ output('<h4>Zuständiges Benutzerkonto</h4>'); |
|
69 |
+ output('<p>Diese Domain wird im Benutzerkonto mit der User-ID #'.$dom->useraccount.' verwendet.</p>'); |
|
65 | 70 |
} |
66 | 71 |
|
67 | 72 |
|
... | ... |
@@ -23,7 +23,7 @@ require_once('domains.php'); |
23 | 23 |
|
24 | 24 |
require_role(array(ROLE_SYSTEMUSER, ROLE_CUSTOMER)); |
25 | 25 |
|
26 |
-if (have_role(ROLE_CUSTOMER)) { |
|
26 |
+if (have_role(ROLE_CUSTOMER) && !have_role(ROLE_SYSTEMUSER)) { |
|
27 | 27 |
$user_domains = get_domain_list($_SESSION['customerinfo']['customerno']); |
28 | 28 |
} else { |
29 | 29 |
$user_domains = get_domain_list($_SESSION['userinfo']['customerno'], $_SESSION['userinfo']['uid']); |
... | ... |
@@ -79,6 +79,10 @@ foreach ($user_domains as $domain) { |
79 | 79 |
if ($domain->cancel_date && $domain->cancel_date < date('Y-m-d')) { |
80 | 80 |
$status = 'cancelled'; |
81 | 81 |
} |
82 |
+ if (isset($_SESSION['customerinfo']['customerno']) && $domain->kunde != $_SESSION['customerinfo']['customerno']) { |
|
83 |
+ $status = 'foreign'; |
|
84 |
+ $regdate = '<em>Zuständige Kundennummer: '.$domain->kunde.'</em>'; |
|
85 |
+ } |
|
82 | 86 |
|
83 | 87 |
$features = array(); |
84 | 88 |
if ($domain->dns == 1) { |
... | ... |
@@ -113,7 +117,7 @@ foreach ($user_domains as $domain) { |
113 | 117 |
$punycode = ''; |
114 | 118 |
} |
115 | 119 |
$domainname = "{$domain->fqdn}{$punycode}"; |
116 |
- if (have_role(ROLE_CUSTOMER)) { |
|
120 |
+ if (have_role(ROLE_CUSTOMER) && $status != 'foreign') { |
|
117 | 121 |
$domainname = internal_link('detail', $domainname, 'id='.$domain->id); |
118 | 122 |
} |
119 | 123 |
output(" <div class=\"domain-item {$status} {$locked}\"><p class=\"domainname\">{$domainname}</p><p class=\"regdate\">{$regdate}</p><p class=\"domain-usage\">Verwendung: {$features}{$mailserver_lock}</p></div>\n"); |
120 | 124 |