c42127d3cab5c78430e578a07038f54f8cdff459
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) 
Bernd Wurst Copyright year update

Bernd Wurst authored 6 years ago

5) Written 2008-2018 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) 
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) 
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

11) You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see
Bernd Wurst Added license tags for CC0,...

Bernd Wurst authored 12 years ago

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) 
bernd Erlaube Änderung von Name u...

bernd authored 14 years ago

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

bernd authored 14 years ago

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

bernd authored 14 years ago

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

bernd authored 14 years ago

26) 
27) 
28) $shells = available_shells();
29) output("<p>Daten zu Ihrem Benutzeraccount:</p>");
30) $acc = get_account_details($_SESSION['userinfo']['uid'], $_SESSION['userinfo']['customerno']);
31) $shell = $shells[$acc['shell']];
32) $usedquota = get_used_quota($acc['uid']);
33) $quota = array();
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

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

bernd authored 13 years ago

42)         $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

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

bernd authored 13 years ago

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

Hanno authored 6 years ago

45)     $percent = round((($q["systemquota_used"]+$q["mailquota"]) / $q["systemquota"]) * 100);
46)     $color = ($percent > 99 ? 'red' : ($percent > 80 ? "yellow" : "green"));
47)     $width = 2 * min($percent, 100) - $mailwidth;
Hanno remove whitespace in empty...

Hanno authored 6 years ago

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

Hanno authored 6 years ago

49)     $used_space = $q['systemquota_used'] + $q['mailquota'];
50)     $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

51)         <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

52) }
bernd Realname auch bei Nichtkund...

bernd authored 14 years ago

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

bernd authored 14 years ago

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

Bernd Wurst authored 5 years ago

56) 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

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

Hanno authored 6 years ago

60)