52b4a7147f50c8d645ff56e61e0e1c18fabd53da
bernd Erlaube Änderung von Name u...

bernd authored 14 years ago

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_SYSTEMUSER);
8) 
bernd Benutze überall title() sta...

bernd authored 13 years ago

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

bernd authored 13 years ago

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

bernd authored 14 years ago

11) 
12) 
13) $shells = available_shells();
14) output("<p>Daten zu Ihrem Benutzeraccount:</p>");
15) $acc = get_account_details($_SESSION['userinfo']['uid'], $_SESSION['userinfo']['customerno']);
16) $shell = $shells[$acc['shell']];
17) $usedquota = get_used_quota($acc['uid']);
18) $quota = array();
19) foreach ($usedquota as $q)
20) {
bernd Quota-Berechnung auch einem...

bernd authored 13 years ago

21)       $mailbar = '';
22)       $mailstring = '';
23)       $mailpercent = round(( $q['mailquota'] / $q["systemquota"]) * 100);
24)       $mailwidth = 2 * min($mailpercent, 100);
25) 
26)       if ($q["mailquota"] > 0) {
27) 	$mailstring = "<br />(davon {$q["mailquota"]} MB für Postfächer reserviert)";
28)         $mailbar = "<div style=\"font-size: 1px; background-color: blue; height: 10px; width: {$mailwidth}px; margin: 0; padding: 0; float: left;\">&#160;</div>";
29)       }  
30) 
31)       $percent = round(( ($q["systemquota_used"]+$q["mailquota"]) / $q["systemquota"] ) * 100 );
32)       $color = ( $percent > 99 ? 'red' : ($percent > 80 ? "yellow" : "green" ));
33)       $width = 2 * min($percent, 100) - $mailwidth;
34)      
35)       $used_space = $q['systemquota_used'] + $q['mailquota'];
36)       $quota[] = "<p>Server <strong>{$q['server']}</strong><br />{$percent}%: {$used_space} MB von {$q['systemquota']} MB belegt{$mailstring}.</p> 
37)         <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>";
38) 
bernd Erlaube Änderung von Name u...

bernd authored 14 years ago

39) }
bernd Realname auch bei Nichtkund...

bernd authored 14 years ago

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