5effc2bd7685822df276c1372dab480cff321941
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 Lizenzinfos in eigenes Modu...

Bernd Wurst authored 10 years ago

5) Written 2008-2014 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) 
11) You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see 
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();
34) foreach ($usedquota as $q)
35) {
bernd Quota-Berechnung auch einem...

bernd authored 13 years ago

36)       $mailbar = '';
37)       $mailstring = '';
38)       $mailpercent = round(( $q['mailquota'] / $q["systemquota"]) * 100);
39)       $mailwidth = 2 * min($mailpercent, 100);
40) 
41)       if ($q["mailquota"] > 0) {
42) 	$mailstring = "<br />(davon {$q["mailquota"]} MB für Postfächer reserviert)";
43)         $mailbar = "<div style=\"font-size: 1px; background-color: blue; height: 10px; width: {$mailwidth}px; margin: 0; padding: 0; float: left;\">&#160;</div>";
44)       }  
45) 
46)       $percent = round(( ($q["systemquota_used"]+$q["mailquota"]) / $q["systemquota"] ) * 100 );
47)       $color = ( $percent > 99 ? 'red' : ($percent > 80 ? "yellow" : "green" ));
48)       $width = 2 * min($percent, 100) - $mailwidth;
49)      
50)       $used_space = $q['systemquota_used'] + $q['mailquota'];
51)       $quota[] = "<p>Server <strong>{$q['server']}</strong><br />{$percent}%: {$used_space} MB von {$q['systemquota']} MB belegt{$mailstring}.</p> 
52)         <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>";
53) 
bernd Erlaube Änderung von Name u...

bernd authored 14 years ago

54) }
bernd Realname auch bei Nichtkund...

bernd authored 14 years ago

55) $customer = get_customer_info($_SESSION['userinfo']['customerno']);
56) $realname = $acc['name'] ? $acc['name'] : $customer['name'];