5bc11a997260d5032ac755916565c266f93ab56d
Bernd Wurst Zeige Benutzeraccount-Stamm...

Bernd Wurst authored 10 years ago

1) <?php
2) /*
3) This file belongs to the Webinterface of schokokeks.org Hosting
4) 
5) Written 2008-2014 by schokokeks.org Hosting, namely
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 
Hanno Böck URLs von http nach https

Hanno Böck authored 7 years ago

12) https://creativecommons.org/publicdomain/zero/1.0/
Bernd Wurst Zeige Benutzeraccount-Stamm...

Bernd Wurst authored 10 years ago

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) 
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) 
24) /* diese Datei wird auf der startseite eingebunden */
25) 
26) $acc = get_account_details($_SESSION['userinfo']['uid'], $_SESSION['userinfo']['customerno']);
27) $usedquota = get_used_quota($acc['uid']);
28) $quota = array();
29) $multiserver = count($usedquota) > 1;
30) foreach ($usedquota as $q)
31) {
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)";
39)         $mailbar = "<div style=\"font-size: 1px; background-color: blue; height: 10px; width: {$mailwidth}px; margin: 0; padding: 0; float: left;\">&#160;</div>";
40)       }  
41) 
42)       $percent = round(( ($q["systemquota_used"]+$q["mailquota"]) / $q["systemquota"] ) * 100 );
43)       $color = ( $percent > 99 ? 'red' : ($percent > 80 ? "yellow" : "green" ));
44)       $width = 2 * min($percent, 100) - $mailwidth;
45)      
46)       $used_space = $q['systemquota_used'] + $q['mailquota'];
47)       $msg = "";
48)       if ($multiserver) {
49)         $msg = "<p>Server <strong>{$q['server']}</strong><br />";
50)       }
51)       $quota[] = $msg."{$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) 
54) }
55) $customer = get_customer_info($_SESSION['userinfo']['customerno']);
56) $quotastring = implode('', $quota);
57) output("<h5>Stammdaten</h5>
58) <div style=\"margin-left: 2em;\">
59) <p>Benutzername: <strong>{$acc['username']}</strong></p>
60) <p>Servername".($multiserver ? " (primär)" : '').": <strong>".get_server_by_id($acc['server'])."</strong></p>
Hanno Böck URLs von http nach https

Hanno Böck authored 7 years ago

61) <p>Tipp: <a href=\"https://wiki.schokokeks.org/Dateizugriff\">Wiki-Anleitung zum Dateizugriff bzw. zum Ändern der Dateien Ihrer Website.</a></p>