Bernd Wurst commited on 2018-02-20 11:35:38
Zeige 2 geänderte Dateien mit 92 Einfügungen und 12 Löschungen.
... | ... |
@@ -16,7 +16,7 @@ Nevertheless, in case you use a significant part of this code, we ask (but not r |
16 | 16 |
|
17 | 17 |
require_once('inc/debug.php'); |
18 | 18 |
|
19 |
-require_once('session/start.php'); |
|
19 |
+require_once('inc/icons.php'); |
|
20 | 20 |
|
21 | 21 |
require_once('class/domain.php'); |
22 | 22 |
require_once('domains.php'); |
... | ... |
@@ -28,29 +28,43 @@ if ($_SESSION['role'] & ROLE_CUSTOMER) |
28 | 28 |
else |
29 | 29 |
$user_domains = get_domain_list($_SESSION['userinfo']['customerno'], $_SESSION['userinfo']['uid']); |
30 | 30 |
|
31 |
+$useraccounts = array(); |
|
32 |
+if ($_SESSION['role'] & ROLE_CUSTOMER) { |
|
33 |
+ $useraccounts = list_useraccounts(); |
|
34 |
+} |
|
35 |
+ |
|
31 | 36 |
title("Domains"); |
32 | 37 |
|
33 |
-output('<p>In Ihrem Account werden die folgenden Domains verwaltet:</p> |
|
34 |
-<table> |
|
35 |
-<tr><th>Domainname</th><th>Status</th><th>Funktionen</th></tr> |
|
36 |
-'); |
|
38 |
+output('<p>In Ihrem Account werden die folgenden Domains verwaltet:</p>'); |
|
39 |
+ |
|
40 |
+output('<div class="domain-list">'); |
|
37 | 41 |
foreach ($user_domains as $domain) |
38 | 42 |
{ |
43 |
+ $status = 'regular'; |
|
44 |
+ $locked = ''; |
|
39 | 45 |
$mailserver_lock = ''; |
40 | 46 |
if ($domain->mail != 'none' && $domain->mailserver_lock == 1) { |
47 |
+ $locked = 'locked'; |
|
41 | 48 |
$mailserver_lock = '<br><strong>Mail-Verarbeitung eingeschränkt!</strong>'.footnote('Diese Domain ist extern registriert und wurde noch nicht bestätigt. Momentan ist daher der Mail-Empfang auf dieser Domain nicht möglich.'); |
42 | 49 |
} |
43 | 50 |
$regdate = $domain->reg_date; |
44 |
- if ($domain->provider != 'terions') |
|
51 |
+ if ($domain->provider != 'terions') { |
|
52 |
+ $status = 'external'; |
|
45 | 53 |
$regdate = '<em>Extern registriert</em>'; |
46 |
- elseif ($domain->reg_date == NULL) |
|
54 |
+ } elseif ($domain->reg_date == NULL) { |
|
55 |
+ $status = 'pretransfer'; |
|
47 | 56 |
$regdate = '<em>Umzug bevorstehend</em>'; |
48 |
- else |
|
57 |
+ } else { |
|
58 |
+ $status = 'regular'; |
|
49 | 59 |
$regdate = 'Registriert seit '.$regdate; |
50 |
- |
|
60 |
+ } |
|
51 | 61 |
if ($domain->cancel_date) { |
62 |
+ $status = 'cancel-scheduled'; |
|
52 | 63 |
$regdate .= '<br />Gekündigt zum '.$domain->cancel_date; |
53 | 64 |
} |
65 |
+ if ($domain->cancel_date && $domain->cancel_date < date('Y-m-d')) { |
|
66 |
+ $status = 'cancelled'; |
|
67 |
+ } |
|
54 | 68 |
|
55 | 69 |
$features = array(); |
56 | 70 |
if ($domain->dns == 1) { |
... | ... |
@@ -74,7 +88,7 @@ foreach ($user_domains as $domain) |
74 | 88 |
$features = '<em>unbenutzt</em>'; |
75 | 89 |
$punycode = $domain->punycode; |
76 | 90 |
if ($domain->is_idn) { |
77 |
- $punycode = "<br/>($punycode)"; |
|
91 |
+ $punycode = "<br/><span class=\"punycode\">($punycode)</span>"; |
|
78 | 92 |
} else { |
79 | 93 |
$punycode = ''; |
80 | 94 |
} |
... | ... |
@@ -84,9 +98,23 @@ foreach ($user_domains as $domain) |
84 | 98 |
} elseif ($_SESSION['role'] & ROLE_CUSTOMER && $domain->mailserver_lock == 1) { |
85 | 99 |
$domainname = internal_link('verify', $domainname, 'id='.$domain->id); |
86 | 100 |
} |
87 |
- output(" <tr><td>{$domainname}</td><td>{$regdate}</td><td>{$features}{$mailserver_lock}</td></tr>\n"); |
|
101 |
+ $domainuser = ''; |
|
102 |
+ if ($_SESSION['role'] & ROLE_CUSTOMER && count($useraccounts) > 1) { |
|
103 |
+ // Mehrere User vorhanden |
|
104 |
+ $username = ''; |
|
105 |
+ foreach ($useraccounts as $u) { |
|
106 |
+ if ($u['uid'] == $domain->useraccount) { |
|
107 |
+ $username = $u['username']; |
|
108 |
+ } |
|
109 |
+ } |
|
110 |
+ if (!$username) { |
|
111 |
+ $username = '<em>unbekannt</em>'; |
|
112 |
+ } |
|
113 |
+ $domainuser = '<p class="domain-user">Verfügbar für Benutzer <strong>'.$username.'</strong> '.internal_link('chguser', icon_edit().' Ändern', "id={$domain->id}").'</p>'; |
|
114 |
+ } |
|
115 |
+ output(" <div class=\"domain-item {$status} {$locked}\"><p class=\"domainname\">{$domainname}</p><p class=\"regdate\">{$regdate}</p>".$domainuser."<p class=\"domain-usage\">Verwendung: {$features}{$mailserver_lock}</p></div>\n"); |
|
88 | 116 |
} |
89 |
-output('</table>'); |
|
117 |
+output('</div>'); |
|
90 | 118 |
output("<br />"); |
91 | 119 |
addnew('adddomain', 'Neue Domain bestellen / hinzufügen'); |
92 | 120 |
|
... | ... |
@@ -1,3 +1,55 @@ |
1 |
+div.domain-list { |
|
2 |
+ display: flex; |
|
3 |
+ flex-direction: row; |
|
4 |
+ flex-wrap: wrap; |
|
5 |
+} |
|
6 |
+ |
|
7 |
+div.domain-item { |
|
8 |
+ width: 25em; |
|
9 |
+ border-left: 5px solid black; |
|
10 |
+ background-color: #f5f5f5; |
|
11 |
+ padding: 4px; |
|
12 |
+ margin: 10px; |
|
13 |
+} |
|
14 |
+ |
|
15 |
+div.domain-item.regular, div.domain-item.regular a { |
|
16 |
+ border-color: #0a0; |
|
17 |
+ background-color: #dfd; |
|
18 |
+} |
|
19 |
+ |
|
20 |
+div.domain-item.external, div.domain-item.external a { |
|
21 |
+ border-color: #00a; |
|
22 |
+ background-color: #ddf; |
|
23 |
+} |
|
24 |
+ |
|
25 |
+div.domain-item.cancel-scheduled, div.domain-item.cancel-scheduled a { |
|
26 |
+ border-color: red; |
|
27 |
+ background-color: #fdd; |
|
28 |
+ padding: 4px; |
|
29 |
+} |
|
30 |
+div.cancel-scheduled p.regdate { |
|
31 |
+ color: red; |
|
32 |
+} |
|
33 |
+ |
|
34 |
+div.domain-item.cancelled, div.domain-item.cancelled a { |
|
35 |
+ color: #555; |
|
36 |
+ border-color: #555; |
|
37 |
+ background-color: #f5f5f5; |
|
38 |
+} |
|
39 |
+ |
|
40 |
+div.domain-item p.domainname { |
|
41 |
+ margin: 0; |
|
42 |
+ padding: 0; |
|
43 |
+ font-size: 130%; |
|
44 |
+ font-weight: bold; |
|
45 |
+ word-wrap: break-word; |
|
46 |
+} |
|
47 |
+p.domainname .punycode { |
|
48 |
+ font-size: 80%; |
|
49 |
+ word-wrap: break-word; |
|
50 |
+} |
|
51 |
+ |
|
52 |
+ |
|
1 | 53 |
|
2 | 54 |
p.domain-unavailable { |
3 | 55 |
padding: 1em; |
4 | 56 |