354c05a4ddd678c49bcbba458bffa7d13482139a
bernd Systemuser-Modul hinzugefügt

bernd authored 17 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) 
Hanno Böck Change license from CC0 to...

Hanno Böck authored 2 years ago

modules/systemuser/account.php   5) Written 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) 
Hanno Böck Change license from CC0 to...

Hanno Böck authored 2 years ago

modules/systemuser/account.php   9) This code is published under a 0BSD license.
Bernd Wurst Added license tags for CC0,...

Bernd Wurst authored 12 years ago

modules/systemuser/account.php  10) 
modules/systemuser/account.php  11) 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  12) */
modules/systemuser/account.php  13) 
bernd Überarbeitetes Systemuser-M...

bernd authored 14 years ago

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

bernd authored 17 years ago

modules/systemuser/accounts.php 16) 
modules/systemuser/accounts.php 17) require_once('useraccounts.php');
modules/systemuser/accounts.php 18) 
modules/systemuser/accounts.php 19) require_role(ROLE_CUSTOMER);
modules/systemuser/accounts.php 20) 
bernd Benutze überall title() sta...

bernd authored 14 years ago

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

bernd authored 17 years ago

modules/systemuser/accounts.php 22) 
modules/systemuser/accounts.php 23) 
Hanno Böck Fix not operator (!) spaces

Hanno Böck authored 1 year ago

modules/systemuser/account.php  24) if (!customer_may_have_useraccounts()) {
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/systemuser/account.php  25)     warning("Sie haben bisher keine Benutzeraccounts. Der erste (»Stamm-«)Account muss von einem Administrator angelegt werden.");
modules/systemuser/account.php  26) } else {
modules/systemuser/account.php  27)     $accounts = list_useraccounts();
modules/systemuser/account.php  28)     $shells = available_shells();
modules/systemuser/account.php  29) 
modules/systemuser/account.php  30)     output("<p>Folgende Benutzeraccounts haben Sie bisher:</p>");
modules/systemuser/account.php  31)     output("<table><tr><th>Benutzeraccount</th><th>Speicherplatz<sup>*</sup></th><th>Aktionen</th></tr>");
modules/systemuser/account.php  32)     foreach ($accounts as $acc) {
modules/systemuser/account.php  33)         $shell = $shells[$acc['shell']];
modules/systemuser/account.php  34)         $usedquota = get_used_quota($acc['uid']);
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 3 years ago

modules/systemuser/account.php  35)         $quota = [];
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/systemuser/account.php  36)         foreach ($usedquota as $q) {
modules/systemuser/account.php  37)             $mailbar = '';
modules/systemuser/account.php  38)             $mailstring = '';
modules/systemuser/account.php  39)             $mailpercent = round(($q['mailquota'] / $q["systemquota"]) * 100);
modules/systemuser/account.php  40)             $mailwidth = 2 * min($mailpercent, 100);
modules/systemuser/account.php  41) 
modules/systemuser/account.php  42)             if ($q["mailquota"] > 0) {
modules/systemuser/account.php  43)                 $mailstring = "<br />(davon {$q["mailquota"]} MB für Postfächer reserviert)";
modules/systemuser/account.php  44)                 $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  45)             }
modules/systemuser/account.php  46) 
Hanno Böck codingstyle, spaces between...

Hanno Böck authored 1 year ago

modules/systemuser/account.php  47)             $percent = round((($q["systemquota_used"] + $q["mailquota"]) / $q["systemquota"]) * 100);
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/systemuser/account.php  48)             $color = ($percent > 99 ? 'red' : ($percent > 80 ? "yellow" : "green"));
modules/systemuser/account.php  49)             $width = 2 * min($percent, 100) - $mailwidth;
Hanno remove whitespace in empty...

Hanno authored 6 years ago

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

Hanno authored 6 years ago

modules/systemuser/account.php  51)             $used_space = $q['systemquota_used'] + $q['mailquota'];
modules/systemuser/account.php  52)             $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 13 years ago

modules/systemuser/account.php  53)         <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 6 years ago

modules/systemuser/account.php  54)         }
modules/systemuser/account.php  55)         $realname = $acc['name'] ? $acc['name'] : $_SESSION['customerinfo']['name'];
modules/systemuser/account.php  56)         $quotastring = implode('', $quota);
Hanno Böck Spaces between string conca...

Hanno Böck authored 1 year ago

modules/systemuser/account.php  57)         output("<tr><td><p><strong>{$acc['username']}</strong> - " . filter_output_html($realname) . "</p><p style=\"color: #555;\">Existiert seit {$acc['erstellungsdatum']}<br />Verwendete Shell: {$shell}</p></td>");
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/systemuser/account.php  58)         output("<td>{$quotastring}</td>");
Hanno Böck Spaces between string conca...

Hanno Böck authored 1 year ago

modules/systemuser/account.php  59)         output("<td>" . internal_link('edit', other_icon('user_edit.png', 'Bearbeiten'), "uid={$acc['uid']}"));
Hanno remove whitespace in empty...

Hanno authored 6 years ago

modules/systemuser/account.php  60) 
Hanno Böck Fix not operator (!) spaces

Hanno Böck authored 1 year ago

modules/systemuser/account.php  61)         if (!customer_useraccount($acc['uid'])) {
Hanno Böck Spaces between string conca...

Hanno Böck authored 1 year ago

modules/systemuser/account.php  62)             output(" &#160; " . internal_link('pwchange', icon_pwchange('Passwort neu setzen'), "uid={$acc['uid']}"));
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/systemuser/account.php  63)             #output(" &#160; ".internal_link('deluser', other_icon('user_delete.png', 'Benutzer löschen'), "uid={$acc['uid']}"));
modules/systemuser/account.php  64)         }
modules/systemuser/account.php  65)         output("</td></tr>\n");
bernd Überarbeitetes Systemuser-M...

bernd authored 14 years ago

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

Hanno authored 6 years ago

modules/systemuser/account.php  67)     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  68)     $customerquota = get_customer_quota();
modules/systemuser/account.php  69)     $freequota = $customerquota['max'] - $customerquota['assigned'];
modules/systemuser/account.php  70)     if ($freequota > 10) { // Gewisse Unschärfe
Bernd Wurst Zeige dem Kunden an, wie vi...

Bernd Wurst authored 5 years ago

modules/systemuser/account.php  71)         $percent = round(($customerquota['assigned'] / $customerquota['max']) * 100);
modules/systemuser/account.php  72)         $width = 5 * min($percent, 100);
modules/systemuser/account.php  73)         $color = ($percent > 99 ? 'red' : ($percent > 80 ? "yellow" : "green"));
Hanno Böck Spaces between string conca...

Hanno Böck authored 1 year ago

modules/systemuser/account.php  74)         $maxstr = ($customerquota['max'] > 1024) ? number_format($customerquota['max'] / 1024, 1, ',', '.') . ' GB' : $customerquota['max'] . ' MB';
modules/systemuser/account.php  75)         $assignedstr = ($customerquota['assigned'] > 1024) ? number_format($customerquota['assigned'] / 1024, 1, ',', '.') . ' GB' : $customerquota['assigned'] . ' MB';
modules/systemuser/account.php  76)         $freestr = ($freequota > 1024) ? number_format($freequota / 1024, 1, ',', '.') . ' GB' : $freequota . ' MB';
modules/systemuser/account.php  77)         output('<p>Ihrem Kundenaccount stehen insgesamt ' . $maxstr . ' zur Verfügung, davon sind ' . $assignedstr . ' den Benutzerkonten zugewiesen und noch ' . $freestr . ' frei verfügbar.</p>');
Bernd Wurst Zeige dem Kunden an, wie vi...

Bernd Wurst authored 5 years ago

modules/systemuser/account.php  78)         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 6 years ago

modules/systemuser/account.php  79)         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  80)     } else {
Bernd Wurst Zeige dem Kunden an, wie vi...

Bernd Wurst authored 5 years ago

modules/systemuser/account.php  81)         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 6 years ago

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

Bernd Wurst authored 7 years ago

modules/systemuser/account.php  85)     }