828df758a7b28057a552c24fe6034a44ea344ae2
bernd Erlaube Änderung von Name u...

bernd authored 14 years ago

1) <?php
Bernd Wurst Added license tags for CC0,...

Bernd Wurst authored 12 years ago

2) /*
3) This file belongs to the Webinterface of schokokeks.org Hosting
4) 
Hanno Böck Change license from CC0 to...

Hanno Böck authored 2 years ago

5) Written by schokokeks.org Hosting, namely
Bernd Wurst Added license tags for CC0,...

Bernd Wurst authored 12 years ago

6)   Bernd Wurst <bernd@schokokeks.org>
7)   Hanno Böck <hanno@schokokeks.org>
8) 
Hanno Böck Change license from CC0 to...

Hanno Böck authored 2 years ago

9) This code is published under a 0BSD license.
Bernd Wurst Added license tags for CC0,...

Bernd Wurst authored 12 years ago

10) 
11) 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.
12) */
13) 
bernd Erlaube Änderung von Name u...

bernd authored 14 years ago

14) require_once('inc/base.php');
15) require_once('inc/icons.php');
16) 
17) require_once('useraccounts.php');
18) 
19) require_role(ROLE_SYSTEMUSER);
20) 
bernd Benutze überall title() sta...

bernd authored 14 years ago

21) title("Ihr Benutzeraccount");
bernd Systemuser-Modul sollte übe...

bernd authored 14 years ago

22) $section = "systemuser_account";
bernd Erlaube Änderung von Name u...

bernd authored 14 years ago

23) 
24) 
25) $shells = available_shells();
26) output("<p>Daten zu Ihrem Benutzeraccount:</p>");
27) $acc = get_account_details($_SESSION['userinfo']['uid'], $_SESSION['userinfo']['customerno']);
28) $shell = $shells[$acc['shell']];
29) $usedquota = get_used_quota($acc['uid']);
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 3 years ago

30) $quota = [];
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

31) foreach ($usedquota as $q) {
32)     $mailbar = '';
33)     $mailstring = '';
34)     $mailpercent = round(($q['mailquota'] / $q["systemquota"]) * 100);
35)     $mailwidth = 2 * min($mailpercent, 100);
36) 
37)     if ($q["mailquota"] > 0) {
38)         $mailstring = "<br />(davon {$q["mailquota"]} MB für Postfächer reserviert)";
bernd Quota-Berechnung auch einem...

bernd authored 13 years ago

39)         $mailbar = "<div style=\"font-size: 1px; background-color: blue; height: 10px; width: {$mailwidth}px; margin: 0; padding: 0; float: left;\">&#160;</div>";
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

40)     }
bernd Quota-Berechnung auch einem...

bernd authored 13 years ago

41) 
Hanno Böck codingstyle, spaces between...

Hanno Böck authored 1 year ago

42)     $percent = round((($q["systemquota_used"] + $q["mailquota"]) / $q["systemquota"]) * 100);
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

43)     $color = ($percent > 99 ? 'red' : ($percent > 80 ? "yellow" : "green"));
44)     $width = 2 * min($percent, 100) - $mailwidth;
Hanno remove whitespace in empty...

Hanno authored 6 years ago

45) 
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

46)     $used_space = $q['systemquota_used'] + $q['mailquota'];
47)     $quota[] = "<p>Server <strong>{$q['server']}</strong><br />{$percent}%: {$used_space} MB von {$q['systemquota']} MB belegt{$mailstring}.</p> 
bernd Quota-Berechnung auch einem...

bernd authored 13 years ago

48)         <div style=\"margin: 0; padding: 0; width: 200px; border: 1px solid black;\">{$mailbar}<div style=\"font-size: 1px; background-color: {$color}; height: 10px; width: {$width}px; margin: 0; margin-left: {$mailwidth}px; padding: 0;\">&#160;</div></div>";
bernd Erlaube Änderung von Name u...

bernd authored 14 years ago

49) }
bernd Realname auch bei Nichtkund...

bernd authored 14 years ago

50) $customer = get_customer_info($_SESSION['userinfo']['customerno']);
51) $realname = $acc['name'] ? $acc['name'] : $customer['name'];
bernd Erlaube Änderung von Name u...

bernd authored 14 years ago

52) $quotastring = implode('', $quota);
Bernd Wurst Umstellung von filter_input...

Bernd Wurst authored 5 years ago

53) output("<h5>Stammdaten</h5><div style=\"margin-left: 2em;\"><p>Benutzername: <strong>{$acc['username']}</strong></p><p>Name: ".filter_output_html($realname)."</p><p>Existiert seit {$acc['erstellungsdatum']}</p><p>Verwendete Shell: {$shell}</p>");
bernd Erlaube Änderung von Name u...

bernd authored 14 years ago

54) output("<p>".internal_link('edit', other_icon('user_edit.png', 'Bearbeiten').' Daten bearbeiten').'</p>');
55) output("</div>\n");
56) output("<h5>Speicherplatz</h5><div style=\"margin-left: 2em;\">{$quotastring}</div>");
Hanno remove whitespace in empty...

Hanno authored 6 years ago

57)