df4393ed3a05f97cf243500eb36be872679284e6
bernd Systemuser-Modul hinzugefügt

bernd authored 18 years ago

modules/systemuser/accounts.php  1) <?php
Hanno Böck Add newlines before comment...

Hanno Böck authored 1 year ago

modules/systemuser/account.php   2) 
Bernd Wurst Added license tags for CC0,...

Bernd Wurst authored 14 years ago

modules/systemuser/account.php   3) /*
modules/systemuser/account.php   4) This file belongs to the Webinterface of schokokeks.org Hosting
modules/systemuser/account.php   5) 
Hanno Böck Change license from CC0 to...

Hanno Böck authored 3 years ago

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

Bernd Wurst authored 14 years ago

modules/systemuser/account.php   7)   Bernd Wurst <bernd@schokokeks.org>
modules/systemuser/account.php   8)   Hanno Böck <hanno@schokokeks.org>
modules/systemuser/account.php   9) 
Hanno Böck Change license from CC0 to...

Hanno Böck authored 3 years ago

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

Bernd Wurst authored 14 years ago

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

bernd authored 16 years ago

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

bernd authored 18 years ago

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

bernd authored 15 years ago

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

bernd authored 18 years ago

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

Hanno Böck authored 2 years ago

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

Hanno authored 7 years ago

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

Hanno Böck authored 4 years ago

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

Hanno authored 7 years ago

modules/systemuser/account.php  37)         foreach ($usedquota as $q) {
modules/systemuser/account.php  38)             $mailbar = '';
modules/systemuser/account.php  39)             $mailstring = '';
Hanno Böck update codingstyle

Hanno Böck authored 1 year ago

modules/systemuser/account.php  40)             $mailpercent = round(($q['mailquota'] / max($q["systemquota"], 1)) * 100);
Hanno Fix coding style with php-c...

Hanno authored 7 years ago

modules/systemuser/account.php  41)             $mailwidth = 2 * min($mailpercent, 100);
modules/systemuser/account.php  42) 
modules/systemuser/account.php  43)             if ($q["mailquota"] > 0) {
modules/systemuser/account.php  44)                 $mailstring = "<br />(davon {$q["mailquota"]} MB für Postfächer reserviert)";
modules/systemuser/account.php  45)                 $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  46)             }
modules/systemuser/account.php  47) 
Hanno Böck update codingstyle

Hanno Böck authored 1 year ago

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

Hanno authored 7 years ago

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

Hanno authored 7 years ago

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

Hanno authored 7 years ago

modules/systemuser/account.php  52)             $used_space = $q['systemquota_used'] + $q['mailquota'];
Bernd Wurst Set translate=no to several...

Bernd Wurst authored 11 months ago

modules/systemuser/account.php  53)             $quota[] = "<p>Server <strong translate=\"no\">{$q['server']}</strong><br />{$percent}%: {$used_space} MB von {$q['systemquota']} MB belegt{$mailstring}.</p> 
bernd Mailaccount-Quota auch bei...

bernd authored 15 years ago

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

modules/systemuser/account.php  55)         }
modules/systemuser/account.php  56)         $realname = $acc['name'] ? $acc['name'] : $_SESSION['customerinfo']['name'];
modules/systemuser/account.php  57)         $quotastring = implode('', $quota);
Bernd Wurst Set translate=no to several...

Bernd Wurst authored 11 months ago

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

Hanno authored 7 years ago

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

Hanno Böck authored 2 years ago

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

Hanno authored 7 years ago

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

Hanno Böck authored 2 years ago

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

Hanno Böck authored 2 years ago

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

Hanno authored 7 years ago

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

bernd authored 16 years ago

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

Hanno authored 7 years ago

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

Bernd Wurst authored 7 years ago

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

Hanno Böck authored 2 years ago

modules/systemuser/account.php  75)         $maxstr = ($customerquota['max'] > 1024) ? number_format($customerquota['max'] / 1024, 1, ',', '.') . ' GB' : $customerquota['max'] . ' MB';
modules/systemuser/account.php  76)         $assignedstr = ($customerquota['assigned'] > 1024) ? number_format($customerquota['assigned'] / 1024, 1, ',', '.') . ' GB' : $customerquota['assigned'] . ' MB';
modules/systemuser/account.php  77)         $freestr = ($freequota > 1024) ? number_format($freequota / 1024, 1, ',', '.') . ' GB' : $freequota . ' MB';
modules/systemuser/account.php  78)         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 7 years ago

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

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

Bernd Wurst authored 7 years ago

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

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

Bernd Wurst authored 9 years ago

modules/systemuser/account.php  86)     }