7f815276981e366df7e6f3b6ccb92ebeca624fb3
bernd Systemuser-Modul hinzugefügt

bernd authored 16 years ago

modules/systemuser/accounts.php  1) <?php
Bernd Wurst Added license tags for CC0,...

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

Bernd Wurst authored 6 years ago

modules/systemuser/account.php   5) Written 2008-2018 by schokokeks.org Hosting, namely
Bernd Wurst Added license tags for CC0,...

Bernd Wurst authored 12 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) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

modules/systemuser/account.php  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

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) 
bernd Überarbeitetes Systemuser-M...

bernd authored 13 years ago

modules/systemuser/accounts.php 17) require_once('inc/base.php');
modules/systemuser/accounts.php 18) require_once('inc/icons.php');
bernd Systemuser-Modul hinzugefügt

bernd authored 16 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) 
bernd Benutze überall title() sta...

bernd authored 13 years ago

modules/systemuser/accounts.php 24) title("System-Benutzeraccounts");
bernd Systemuser-Modul hinzugefügt

bernd authored 16 years ago

modules/systemuser/accounts.php 25) 
modules/systemuser/accounts.php 26) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

modules/systemuser/account.php  27) if (! customer_may_have_useraccounts()) {
modules/systemuser/account.php  28)     warning("Sie haben bisher keine Benutzeraccounts. Der erste (»Stamm-«)Account muss von einem Administrator angelegt werden.");
modules/systemuser/account.php  29) } else {
modules/systemuser/account.php  30)     $accounts = list_useraccounts();
modules/systemuser/account.php  31)     $shells = available_shells();
modules/systemuser/account.php  32) 
modules/systemuser/account.php  33)     output("<p>Folgende Benutzeraccounts haben Sie bisher:</p>");
modules/systemuser/account.php  34)     output("<table><tr><th>Benutzeraccount</th><th>Speicherplatz<sup>*</sup></th><th>Aktionen</th></tr>");
modules/systemuser/account.php  35)     foreach ($accounts as $acc) {
modules/systemuser/account.php  36)         $shell = $shells[$acc['shell']];
modules/systemuser/account.php  37)         $usedquota = get_used_quota($acc['uid']);
modules/systemuser/account.php  38)         $quota = array();
modules/systemuser/account.php  39)         foreach ($usedquota as $q) {
modules/systemuser/account.php  40)             $mailbar = '';
modules/systemuser/account.php  41)             $mailstring = '';
modules/systemuser/account.php  42)             $mailpercent = round(($q['mailquota'] / $q["systemquota"]) * 100);
modules/systemuser/account.php  43)             $mailwidth = 2 * min($mailpercent, 100);
modules/systemuser/account.php  44) 
modules/systemuser/account.php  45)             if ($q["mailquota"] > 0) {
modules/systemuser/account.php  46)                 $mailstring = "<br />(davon {$q["mailquota"]} MB für Postfächer reserviert)";
modules/systemuser/account.php  47)                 $mailbar = "<div style=\"font-size: 1px; background-color: blue; height: 10px; width: {$mailwidth}px; margin: 0; padding: 0; float: left;\">&#160;</div>";
modules/systemuser/account.php  48)             }
modules/systemuser/account.php  49) 
modules/systemuser/account.php  50)             $percent = round((($q["systemquota_used"]+$q["mailquota"]) / $q["systemquota"]) * 100);
modules/systemuser/account.php  51)             $color = ($percent > 99 ? 'red' : ($percent > 80 ? "yellow" : "green"));
modules/systemuser/account.php  52)             $width = 2 * min($percent, 100) - $mailwidth;
Hanno remove whitespace in empty...

Hanno authored 5 years ago

modules/systemuser/account.php  53) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

modules/systemuser/account.php  54)             $used_space = $q['systemquota_used'] + $q['mailquota'];
modules/systemuser/account.php  55)             $quota[] = "<p>Server <strong>{$q['server']}</strong><br />{$percent}%: {$used_space} MB von {$q['systemquota']} MB belegt{$mailstring}.</p> 
bernd Mailaccount-Quota auch bei...

bernd authored 12 years ago

modules/systemuser/account.php  56)         <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>";
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

modules/systemuser/account.php  57)         }
modules/systemuser/account.php  58)         $realname = $acc['name'] ? $acc['name'] : $_SESSION['customerinfo']['name'];
modules/systemuser/account.php  59)         $quotastring = implode('', $quota);
modules/systemuser/account.php  60)         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/account.php  61)         output("<td>{$quotastring}</td>");
modules/systemuser/account.php  62)         output("<td>".internal_link('edit', other_icon('user_edit.png', 'Bearbeiten'), "uid={$acc['uid']}"));
Hanno remove whitespace in empty...

Hanno authored 5 years ago

modules/systemuser/account.php  63) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

modules/systemuser/account.php  64)         if (! customer_useraccount($acc['uid'])) {
modules/systemuser/account.php  65)             output(" &#160; ".internal_link('pwchange', icon_pwchange('Passwort neu setzen'), "uid={$acc['uid']}"));
modules/systemuser/account.php  66)             #output(" &#160; ".internal_link('deluser', other_icon('user_delete.png', 'Benutzer löschen'), "uid={$acc['uid']}"));
modules/systemuser/account.php  67)         }
modules/systemuser/account.php  68)         output("</td></tr>\n");
bernd Überarbeitetes Systemuser-M...

bernd authored 13 years ago

modules/systemuser/accounts.php 69)     }
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

modules/systemuser/account.php  70)     output("</table><p><sup>*</sup>) Die Werte für den verbrauchten Speicherplatz werden periodisch eingelesen und hier erst verspätet angezeigt!</p>");
modules/systemuser/account.php  71)     $customerquota = get_customer_quota();
modules/systemuser/account.php  72)     $freequota = $customerquota['max'] - $customerquota['assigned'];
modules/systemuser/account.php  73)     if ($freequota > 10) { // Gewisse Unschärfe
Bernd Wurst Zeige dem Kunden an, wie vi...

Bernd Wurst authored 5 years ago

modules/systemuser/account.php  74)         $percent = round(($customerquota['assigned'] / $customerquota['max']) * 100);
modules/systemuser/account.php  75)         $width = 5 * min($percent, 100);
modules/systemuser/account.php  76)         $color = ($percent > 99 ? 'red' : ($percent > 80 ? "yellow" : "green"));
modules/systemuser/account.php  77)         $maxstr = ($customerquota['max'] > 1024) ? number_format($customerquota['max'] / 1024, 1, ',', '.').' GB' : $customerquota['max'].' MB';
modules/systemuser/account.php  78)         $assignedstr = ($customerquota['assigned'] > 1024) ? number_format($customerquota['assigned'] / 1024, 1, ',', '.').' GB' : $customerquota['assigned'].' MB';
modules/systemuser/account.php  79)         $freestr = ($freequota > 1024) ? number_format($freequota / 1024, 1, ',', '.').' GB' : $freequota.' MB';
modules/systemuser/account.php  80)         output('<p>Ihrem Kundenaccount stehen insgesamt '.$maxstr.' zur Verfügung, davon sind '.$assignedstr.' den Benutzerkonten zugewiesen und noch '.$freestr.' frei verfügbar.</p>');
modules/systemuser/account.php  81)         output("<div style=\"margin: 0; padding: 0; width: 500px; border: 1px solid black;\"><div style=\"font-size: 1px; background-color: {$color}; height: 10px; width: {$width}px; margin: 0; margin-left: 0; padding: 0;\">&#160;</div></div>");
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

modules/systemuser/account.php  82)         output('<p class="warning"><b>Hinweis:</b><br/>Ihnen steht mehr Speicherplatz zur Verfügung als Ihren Benutzeraccounts zugewiesen ist. Sie können den Speicherplatz der einzelnen Benutzerkonten noch erhöhen.</p>');
modules/systemuser/account.php  83)     } else {
Bernd Wurst Zeige dem Kunden an, wie vi...

Bernd Wurst authored 5 years ago

modules/systemuser/account.php  84)         output('<p>Der für Sie reservierte Speicherplatz ist vollständig auf Ihre Benutzeraccounts verteilt.</p>');
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

modules/systemuser/account.php  85)         if (have_module('invoice')) {
modules/systemuser/account.php  86)             addnew('../invoice/more_storage?section=systemuser_account', 'Mehr Speicherplatz bestellen');
modules/systemuser/account.php  87)         }
Bernd Wurst Zwischenversion

Bernd Wurst authored 7 years ago

modules/systemuser/account.php  88)     }