Systemuser-Modul hinzugefügt
bernd authored 17 years ago
|
modules/systemuser/accounts.php 1) <?php
|
Added license tags for CC0,...
Bernd Wurst authored 13 years ago
|
modules/systemuser/account.php 2) /*
modules/systemuser/account.php 3) This file belongs to the Webinterface of schokokeks.org Hosting
modules/systemuser/account.php 4)
|
Updated copyright notice (2...
Bernd Wurst authored 12 years ago
|
modules/systemuser/account.php 5) Written 2008-2013 by schokokeks.org Hosting, namely
|
Added license tags for CC0,...
Bernd Wurst authored 13 years ago
|
modules/systemuser/account.php 6) Bernd Wurst <bernd@schokokeks.org>
modules/systemuser/account.php 7) Hanno Böck <hanno@schokokeks.org>
modules/systemuser/account.php 8)
modules/systemuser/account.php 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.
modules/systemuser/account.php 10)
modules/systemuser/account.php 11) You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see
modules/systemuser/account.php 12) http://creativecommons.org/publicdomain/zero/1.0/
modules/systemuser/account.php 13)
modules/systemuser/account.php 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.
modules/systemuser/account.php 15) */
modules/systemuser/account.php 16)
|
Überarbeitetes Systemuser-M...
bernd authored 14 years ago
|
modules/systemuser/accounts.php 17) require_once('inc/base.php');
modules/systemuser/accounts.php 18) require_once('inc/icons.php');
|
Systemuser-Modul hinzugefügt
bernd authored 17 years ago
|
modules/systemuser/accounts.php 19)
modules/systemuser/accounts.php 20) require_once('useraccounts.php');
modules/systemuser/accounts.php 21)
modules/systemuser/accounts.php 22) require_role(ROLE_CUSTOMER);
modules/systemuser/accounts.php 23)
|
Benutze überall title() sta...
bernd authored 14 years ago
|
modules/systemuser/accounts.php 24) title("System-Benutzeraccounts");
|
Systemuser-Modul hinzugefügt
bernd authored 17 years ago
|
modules/systemuser/accounts.php 25)
modules/systemuser/accounts.php 26)
modules/systemuser/accounts.php 27) if (! customer_may_have_useraccounts())
modules/systemuser/accounts.php 28) {
modules/systemuser/accounts.php 29) warning("Sie haben bisher keine Benutzeraccounts. Der erste (»Stamm-«)Account muss von einem Administrator angelegt werden.");
modules/systemuser/accounts.php 30) }
modules/systemuser/accounts.php 31) else
modules/systemuser/accounts.php 32) {
modules/systemuser/accounts.php 33) $accounts = list_useraccounts();
|
Überarbeitetes Systemuser-M...
bernd authored 14 years ago
|
modules/systemuser/accounts.php 34) $shells = available_shells();
|
Systemuser-Modul hinzugefügt
bernd authored 17 years ago
|
modules/systemuser/accounts.php 35) output("<p>Folgende Benutzeraccounts haben Sie bisher:</p>");
|
Überarbeitetes Systemuser-M...
bernd authored 14 years ago
|
modules/systemuser/accounts.php 36) output("<table><tr><th>Benutzeraccount</th><th>Speicherplatz<sup>*</sup></th><th>Aktionen</th></tr>");
|
Systemuser-Modul hinzugefügt
bernd authored 17 years ago
|
modules/systemuser/accounts.php 37) foreach ($accounts as $acc)
modules/systemuser/accounts.php 38) {
|
Überarbeitetes Systemuser-M...
bernd authored 14 years ago
|
modules/systemuser/accounts.php 39) $shell = $shells[$acc['shell']];
modules/systemuser/accounts.php 40) $usedquota = get_used_quota($acc['uid']);
modules/systemuser/accounts.php 41) $quota = array();
modules/systemuser/accounts.php 42) foreach ($usedquota as $q)
modules/systemuser/accounts.php 43) {
|
Mailaccount-Quota auch bei...
bernd authored 13 years ago
|
modules/systemuser/account.php 44) $mailbar = '';
modules/systemuser/account.php 45) $mailstring = '';
modules/systemuser/account.php 46) $mailpercent = round(( $q['mailquota'] / $q["systemquota"]) * 100);
modules/systemuser/account.php 47) $mailwidth = 2 * min($mailpercent, 100);
modules/systemuser/account.php 48)
modules/systemuser/account.php 49) if ($q["mailquota"] > 0) {
modules/systemuser/account.php 50) $mailstring = "<br />(davon {$q["mailquota"]} MB für Postfächer reserviert)";
modules/systemuser/account.php 51) $mailbar = "<div style=\"font-size: 1px; background-color: blue; height: 10px; width: {$mailwidth}px; margin: 0; padding: 0; float: left;\"> </div>";
modules/systemuser/account.php 52) }
modules/systemuser/account.php 53)
modules/systemuser/account.php 54) $percent = round(( ($q["systemquota_used"]+$q["mailquota"]) / $q["systemquota"] ) * 100 );
|
Überarbeitetes Systemuser-M...
bernd authored 14 years ago
|
modules/systemuser/accounts.php 55) $color = ( $percent > 99 ? 'red' : ($percent > 80 ? "yellow" : "green" ));
|
Mailaccount-Quota auch bei...
bernd authored 13 years ago
|
modules/systemuser/account.php 56) $width = 2 * min($percent, 100) - $mailwidth;
modules/systemuser/account.php 57)
modules/systemuser/account.php 58) $used_space = $q['systemquota_used'] + $q['mailquota'];
modules/systemuser/account.php 59) $quota[] = "<p>Server <strong>{$q['server']}</strong><br />{$percent}%: {$used_space} MB von {$q['systemquota']} MB belegt{$mailstring}.</p>
modules/systemuser/account.php 60) <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;\"> </div></div>";
|
Überarbeitetes Systemuser-M...
bernd authored 14 years ago
|
modules/systemuser/accounts.php 61)
modules/systemuser/accounts.php 62) }
modules/systemuser/accounts.php 63) $realname = $acc['name'] ? $acc['name'] : $_SESSION['customerinfo']['name'];
modules/systemuser/accounts.php 64) $quotastring = implode('', $quota);
modules/systemuser/accounts.php 65) output("<tr><td><p><strong>{$acc['username']}</strong> - {$realname}</p><p style=\"color: #555;\">Existiert seit {$acc['erstellungsdatum']}<br />Verwendete Shell: {$shell}</p></td>");
modules/systemuser/accounts.php 66) output("<td>{$quotastring}</td>");
modules/systemuser/accounts.php 67) output("<td>".internal_link('edit', other_icon('user_edit.png', 'Bearbeiten'), "uid={$acc['uid']}"));
modules/systemuser/accounts.php 68)
modules/systemuser/accounts.php 69) if (! customer_useraccount($acc['uid']))
modules/systemuser/accounts.php 70) {
modules/systemuser/accounts.php 71) output("   ".internal_link('pwchange', icon_pwchange('Passwort neu setzen'), "uid={$acc['uid']}"));
modules/systemuser/accounts.php 72) #output("   ".internal_link('deluser', other_icon('user_delete.png', 'Benutzer löschen'), "uid={$acc['uid']}"));
modules/systemuser/accounts.php 73) }
modules/systemuser/accounts.php 74) output("</td></tr>\n");
|
Systemuser-Modul hinzugefügt
bernd authored 17 years ago
|
modules/systemuser/accounts.php 75) }
|
Überarbeitetes Systemuser-M...
bernd authored 14 years ago
|
modules/systemuser/accounts.php 76) output("</table><p><sup>*</sup>) Die Werte für den verbrauchten Speicherplatz werden periodisch eingelesen und hier erst verspätet angezeigt!</p>");
|