git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@1830 87cf0b9e-d624-0410-a070-f6ee81989793
1 | 1 |
deleted file mode 100644 |
... | ... |
@@ -1,53 +0,0 @@ |
1 |
-<?php |
|
2 |
-require_once('inc/base.php'); |
|
3 |
-require_once('inc/icons.php'); |
|
4 |
- |
|
5 |
-require_once('useraccounts.php'); |
|
6 |
- |
|
7 |
-require_role(ROLE_CUSTOMER); |
|
8 |
- |
|
9 |
-title("System-Benutzeraccounts"); |
|
10 |
- |
|
11 |
- |
|
12 |
-if (! customer_may_have_useraccounts()) |
|
13 |
-{ |
|
14 |
- warning("Sie haben bisher keine Benutzeraccounts. Der erste (»Stamm-«)Account muss von einem Administrator angelegt werden."); |
|
15 |
-} |
|
16 |
-else |
|
17 |
-{ |
|
18 |
- $accounts = list_useraccounts(); |
|
19 |
- $shells = available_shells(); |
|
20 |
- output("<p>Folgende Benutzeraccounts haben Sie bisher:</p>"); |
|
21 |
- output("<table><tr><th>Benutzeraccount</th><th>Speicherplatz<sup>*</sup></th><th>Aktionen</th></tr>"); |
|
22 |
- foreach ($accounts as $acc) |
|
23 |
- { |
|
24 |
- $shell = $shells[$acc['shell']]; |
|
25 |
- $usedquota = get_used_quota($acc['uid']); |
|
26 |
- $quota = array(); |
|
27 |
- foreach ($usedquota as $q) |
|
28 |
- { |
|
29 |
- $percent = round(( $q["used"] / $q["quota"] ) * 100 ); |
|
30 |
- $color = ( $percent > 99 ? 'red' : ($percent > 80 ? "yellow" : "green" )); |
|
31 |
- $width = 2 * min($percent, 100); |
|
32 |
- $quota[] = "<p>Server <strong>{$q['server']}</strong><br />{$percent}%: {$q['used']} MB von {$q['quota']} MB belegt.</p> |
|
33 |
- <div style=\"margin: 0; padding: 0; width: 200px; border: 1px solid black;\"><div style=\"font-size: 1px; background-color: {$color}; height: 10px; width: {$width}px; margin: 0; padding: 0;\"> </div></div>"; |
|
34 |
- |
|
35 |
- } |
|
36 |
- $realname = $acc['name'] ? $acc['name'] : $_SESSION['customerinfo']['name']; |
|
37 |
- $quotastring = implode('', $quota); |
|
38 |
- output("<tr><td><p><strong>{$acc['username']}</strong> - {$realname}</p><p style=\"color: #555;\">Existiert seit {$acc['erstellungsdatum']}<br />Verwendete Shell: {$shell}</p></td>"); |
|
39 |
- output("<td>{$quotastring}</td>"); |
|
40 |
- output("<td>".internal_link('edit', other_icon('user_edit.png', 'Bearbeiten'), "uid={$acc['uid']}")); |
|
41 |
- |
|
42 |
- if (! customer_useraccount($acc['uid'])) |
|
43 |
- { |
|
44 |
- output("   ".internal_link('pwchange', icon_pwchange('Passwort neu setzen'), "uid={$acc['uid']}")); |
|
45 |
- #output("   ".internal_link('deluser', other_icon('user_delete.png', 'Benutzer löschen'), "uid={$acc['uid']}")); |
|
46 |
- } |
|
47 |
- output("</td></tr>\n"); |
|
48 |
- } |
|
49 |
- output("</table><p><sup>*</sup>) Die Werte für den verbrauchten Speicherplatz werden periodisch eingelesen und hier erst verspätet angezeigt!</p>"); |
|
50 |
-} |
|
51 |
- |
|
52 |
- |
|
53 |
-?> |
git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@1812 87cf0b9e-d624-0410-a070-f6ee81989793
... | ... |
@@ -6,11 +6,9 @@ require_once('useraccounts.php'); |
6 | 6 |
|
7 | 7 |
require_role(ROLE_CUSTOMER); |
8 | 8 |
|
9 |
-$title = "System-Benutzeraccounts"; |
|
9 |
+title("System-Benutzeraccounts"); |
|
10 | 10 |
|
11 | 11 |
|
12 |
-output("<h3>System-Benutzeraccounts</h3>"); |
|
13 |
- |
|
14 | 12 |
if (! customer_may_have_useraccounts()) |
15 | 13 |
{ |
16 | 14 |
warning("Sie haben bisher keine Benutzeraccounts. Der erste (»Stamm-«)Account muss von einem Administrator angelegt werden."); |
git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@1718 87cf0b9e-d624-0410-a070-f6ee81989793
... | ... |
@@ -1,6 +1,6 @@ |
1 | 1 |
<?php |
2 |
- |
|
3 |
-require_once('session/start.php'); |
|
2 |
+require_once('inc/base.php'); |
|
3 |
+require_once('inc/icons.php'); |
|
4 | 4 |
|
5 | 5 |
require_once('useraccounts.php'); |
6 | 6 |
|
... | ... |
@@ -18,19 +18,37 @@ if (! customer_may_have_useraccounts()) |
18 | 18 |
else |
19 | 19 |
{ |
20 | 20 |
$accounts = list_useraccounts(); |
21 |
+ $shells = available_shells(); |
|
21 | 22 |
output("<p>Folgende Benutzeraccounts haben Sie bisher:</p>"); |
22 |
- output("<table><tr><th>Benutzername</th><th>Name</th><th>Erstellt am</th><th>Speicherplatz</th></tr>"); |
|
23 |
+ output("<table><tr><th>Benutzeraccount</th><th>Speicherplatz<sup>*</sup></th><th>Aktionen</th></tr>"); |
|
23 | 24 |
foreach ($accounts as $acc) |
24 | 25 |
{ |
25 |
- |
|
26 |
- output("<tr><td>"); |
|
27 |
- if (customer_useraccount($acc->uid)) |
|
28 |
- output($acc->username); |
|
29 |
- else |
|
30 |
- output(internal_link('edit', $acc->username, "uid={$acc->uid}")); |
|
31 |
- output("</td><td>{$acc->name}</td><td>{$acc->erstellungsdatum}</td><td>{$acc->quota} MB</td></tr>"); |
|
26 |
+ $shell = $shells[$acc['shell']]; |
|
27 |
+ $usedquota = get_used_quota($acc['uid']); |
|
28 |
+ $quota = array(); |
|
29 |
+ foreach ($usedquota as $q) |
|
30 |
+ { |
|
31 |
+ $percent = round(( $q["used"] / $q["quota"] ) * 100 ); |
|
32 |
+ $color = ( $percent > 99 ? 'red' : ($percent > 80 ? "yellow" : "green" )); |
|
33 |
+ $width = 2 * min($percent, 100); |
|
34 |
+ $quota[] = "<p>Server <strong>{$q['server']}</strong><br />{$percent}%: {$q['used']} MB von {$q['quota']} MB belegt.</p> |
|
35 |
+ <div style=\"margin: 0; padding: 0; width: 200px; border: 1px solid black;\"><div style=\"font-size: 1px; background-color: {$color}; height: 10px; width: {$width}px; margin: 0; padding: 0;\"> </div></div>"; |
|
36 |
+ |
|
37 |
+ } |
|
38 |
+ $realname = $acc['name'] ? $acc['name'] : $_SESSION['customerinfo']['name']; |
|
39 |
+ $quotastring = implode('', $quota); |
|
40 |
+ output("<tr><td><p><strong>{$acc['username']}</strong> - {$realname}</p><p style=\"color: #555;\">Existiert seit {$acc['erstellungsdatum']}<br />Verwendete Shell: {$shell}</p></td>"); |
|
41 |
+ output("<td>{$quotastring}</td>"); |
|
42 |
+ output("<td>".internal_link('edit', other_icon('user_edit.png', 'Bearbeiten'), "uid={$acc['uid']}")); |
|
43 |
+ |
|
44 |
+ if (! customer_useraccount($acc['uid'])) |
|
45 |
+ { |
|
46 |
+ output("   ".internal_link('pwchange', icon_pwchange('Passwort neu setzen'), "uid={$acc['uid']}")); |
|
47 |
+ #output("   ".internal_link('deluser', other_icon('user_delete.png', 'Benutzer löschen'), "uid={$acc['uid']}")); |
|
48 |
+ } |
|
49 |
+ output("</td></tr>\n"); |
|
32 | 50 |
} |
33 |
- output("</table><br />"); |
|
51 |
+ output("</table><p><sup>*</sup>) Die Werte für den verbrauchten Speicherplatz werden periodisch eingelesen und hier erst verspätet angezeigt!</p>"); |
|
34 | 52 |
} |
35 | 53 |
|
36 | 54 |
|
git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@1128 87cf0b9e-d624-0410-a070-f6ee81989793
... | ... |
@@ -27,7 +27,7 @@ else |
27 | 27 |
if (customer_useraccount($acc->uid)) |
28 | 28 |
output($acc->username); |
29 | 29 |
else |
30 |
- output(internal_link('edit.php', $acc->username, "uid={$acc->uid}")); |
|
30 |
+ output(internal_link('edit', $acc->username, "uid={$acc->uid}")); |
|
31 | 31 |
output("</td><td>{$acc->name}</td><td>{$acc->erstellungsdatum}</td><td>{$acc->quota} MB</td></tr>"); |
32 | 32 |
} |
33 | 33 |
output("</table><br />"); |
git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@819 87cf0b9e-d624-0410-a070-f6ee81989793
... | ... |
@@ -28,7 +28,7 @@ else |
28 | 28 |
output($acc->username); |
29 | 29 |
else |
30 | 30 |
output(internal_link('edit.php', $acc->username, "uid={$acc->uid}")); |
31 |
- output("</td><td>{$acc->name}</td><td>{$acc->erstellungsdatum}</td><td>{$acc->softquota} MB</td></tr>"); |
|
31 |
+ output("</td><td>{$acc->name}</td><td>{$acc->erstellungsdatum}</td><td>{$acc->quota} MB</td></tr>"); |
|
32 | 32 |
} |
33 | 33 |
output("</table><br />"); |
34 | 34 |
} |
git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@618 87cf0b9e-d624-0410-a070-f6ee81989793
... | ... |
@@ -17,7 +17,6 @@ if (! customer_may_have_useraccounts()) |
17 | 17 |
} |
18 | 18 |
else |
19 | 19 |
{ |
20 |
- $primary = primary_useraccount(); |
|
21 | 20 |
$accounts = list_useraccounts(); |
22 | 21 |
output("<p>Folgende Benutzeraccounts haben Sie bisher:</p>"); |
23 | 22 |
output("<table><tr><th>Benutzername</th><th>Name</th><th>Erstellt am</th><th>Speicherplatz</th></tr>"); |
... | ... |
@@ -25,7 +24,7 @@ else |
25 | 24 |
{ |
26 | 25 |
|
27 | 26 |
output("<tr><td>"); |
28 |
- if ($acc->uid == $primary) |
|
27 |
+ if (customer_useraccount($acc->uid)) |
|
29 | 28 |
output($acc->username); |
30 | 29 |
else |
31 | 30 |
output(internal_link('edit.php', $acc->username, "uid={$acc->uid}")); |
git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@566 87cf0b9e-d624-0410-a070-f6ee81989793
... | ... |
@@ -17,12 +17,19 @@ if (! customer_may_have_useraccounts()) |
17 | 17 |
} |
18 | 18 |
else |
19 | 19 |
{ |
20 |
+ $primary = primary_useraccount(); |
|
20 | 21 |
$accounts = list_useraccounts(); |
21 | 22 |
output("<p>Folgende Benutzeraccounts haben Sie bisher:</p>"); |
22 | 23 |
output("<table><tr><th>Benutzername</th><th>Name</th><th>Erstellt am</th><th>Speicherplatz</th></tr>"); |
23 | 24 |
foreach ($accounts as $acc) |
24 | 25 |
{ |
25 |
- output("<tr><td>".internal_link('edit.php', $acc->username, "uid={$acc->uid}")."</td><td>{$acc->name}</td><td>{$acc->erstellungsdatum}</td><td>{$acc->softquota} MB</td></tr>"); |
|
26 |
+ |
|
27 |
+ output("<tr><td>"); |
|
28 |
+ if ($acc->uid == $primary) |
|
29 |
+ output($acc->username); |
|
30 |
+ else |
|
31 |
+ output(internal_link('edit.php', $acc->username, "uid={$acc->uid}")); |
|
32 |
+ output("</td><td>{$acc->name}</td><td>{$acc->erstellungsdatum}</td><td>{$acc->softquota} MB</td></tr>"); |
|
26 | 33 |
} |
27 | 34 |
output("</table><br />"); |
28 | 35 |
} |
git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@563 87cf0b9e-d624-0410-a070-f6ee81989793
1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,31 @@ |
1 |
+<?php |
|
2 |
+ |
|
3 |
+require_once('session/start.php'); |
|
4 |
+ |
|
5 |
+require_once('useraccounts.php'); |
|
6 |
+ |
|
7 |
+require_role(ROLE_CUSTOMER); |
|
8 |
+ |
|
9 |
+$title = "System-Benutzeraccounts"; |
|
10 |
+ |
|
11 |
+ |
|
12 |
+output("<h3>System-Benutzeraccounts</h3>"); |
|
13 |
+ |
|
14 |
+if (! customer_may_have_useraccounts()) |
|
15 |
+{ |
|
16 |
+ warning("Sie haben bisher keine Benutzeraccounts. Der erste (»Stamm-«)Account muss von einem Administrator angelegt werden."); |
|
17 |
+} |
|
18 |
+else |
|
19 |
+{ |
|
20 |
+ $accounts = list_useraccounts(); |
|
21 |
+ output("<p>Folgende Benutzeraccounts haben Sie bisher:</p>"); |
|
22 |
+ output("<table><tr><th>Benutzername</th><th>Name</th><th>Erstellt am</th><th>Speicherplatz</th></tr>"); |
|
23 |
+ foreach ($accounts as $acc) |
|
24 |
+ { |
|
25 |
+ output("<tr><td>".internal_link('edit.php', $acc->username, "uid={$acc->uid}")."</td><td>{$acc->name}</td><td>{$acc->erstellungsdatum}</td><td>{$acc->softquota} MB</td></tr>"); |
|
26 |
+ } |
|
27 |
+ output("</table><br />"); |
|
28 |
+} |
|
29 |
+ |
|
30 |
+ |
|
31 |
+?> |