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

bernd authored 13 years ago

modules/systemuser/accounts.php 34)   $shells = available_shells();
Bernd Wurst Zwischenversion

Bernd Wurst authored 7 years ago

modules/systemuser/account.php  35) 
bernd Systemuser-Modul hinzugefügt

bernd authored 16 years ago

modules/systemuser/accounts.php 36)   output("<p>Folgende Benutzeraccounts haben Sie bisher:</p>");
bernd Überarbeitetes Systemuser-M...

bernd authored 13 years ago

modules/systemuser/accounts.php 37)   output("<table><tr><th>Benutzeraccount</th><th>Speicherplatz<sup>*</sup></th><th>Aktionen</th></tr>");
bernd Systemuser-Modul hinzugefügt

bernd authored 16 years ago

modules/systemuser/accounts.php 38)   foreach ($accounts as $acc)
modules/systemuser/accounts.php 39)   {
bernd Überarbeitetes Systemuser-M...

bernd authored 13 years ago

modules/systemuser/accounts.php 40)     $shell = $shells[$acc['shell']];
modules/systemuser/accounts.php 41)     $usedquota = get_used_quota($acc['uid']);
modules/systemuser/accounts.php 42)     $quota = array();
modules/systemuser/accounts.php 43)     foreach ($usedquota as $q)
modules/systemuser/accounts.php 44)     {
bernd Mailaccount-Quota auch bei...

bernd authored 12 years ago

modules/systemuser/account.php  45)       $mailbar = '';
modules/systemuser/account.php  46)       $mailstring = '';
modules/systemuser/account.php  47)       $mailpercent = round(( $q['mailquota'] / $q["systemquota"]) * 100);
modules/systemuser/account.php  48)       $mailwidth = 2 * min($mailpercent, 100);
modules/systemuser/account.php  49) 
modules/systemuser/account.php  50)       if ($q["mailquota"] > 0) {
modules/systemuser/account.php  51) 	$mailstring = "<br />(davon {$q["mailquota"]} MB für Postfächer reserviert)";
modules/systemuser/account.php  52)         $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  53)       }  
modules/systemuser/account.php  54) 
modules/systemuser/account.php  55)       $percent = round(( ($q["systemquota_used"]+$q["mailquota"]) / $q["systemquota"] ) * 100 );
bernd Überarbeitetes Systemuser-M...

bernd authored 13 years ago

modules/systemuser/accounts.php 56)       $color = ( $percent > 99 ? 'red' : ($percent > 80 ? "yellow" : "green" ));
bernd Mailaccount-Quota auch bei...

bernd authored 12 years ago

modules/systemuser/account.php  57)       $width = 2 * min($percent, 100) - $mailwidth;
modules/systemuser/account.php  58)      
modules/systemuser/account.php  59)       $used_space = $q['systemquota_used'] + $q['mailquota'];
modules/systemuser/account.php  60)       $quota[] = "<p>Server <strong>{$q['server']}</strong><br />{$percent}%: {$used_space} MB von {$q['systemquota']} MB belegt{$mailstring}.</p> 
modules/systemuser/account.php  61)         <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>";
bernd Überarbeitetes Systemuser-M...

bernd authored 13 years ago

modules/systemuser/accounts.php 62) 
modules/systemuser/accounts.php 63)     }
modules/systemuser/accounts.php 64)     $realname = $acc['name'] ? $acc['name'] : $_SESSION['customerinfo']['name'];
modules/systemuser/accounts.php 65)     $quotastring = implode('', $quota);
modules/systemuser/accounts.php 66)     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 67)     output("<td>{$quotastring}</td>");
modules/systemuser/accounts.php 68)     output("<td>".internal_link('edit', other_icon('user_edit.png', 'Bearbeiten'), "uid={$acc['uid']}"));
modules/systemuser/accounts.php 69)     
modules/systemuser/accounts.php 70)     if (! customer_useraccount($acc['uid']))
modules/systemuser/accounts.php 71)     {
modules/systemuser/accounts.php 72)       output(" &#160; ".internal_link('pwchange', icon_pwchange('Passwort neu setzen'), "uid={$acc['uid']}"));
modules/systemuser/accounts.php 73)       #output(" &#160; ".internal_link('deluser', other_icon('user_delete.png', 'Benutzer löschen'), "uid={$acc['uid']}"));
modules/systemuser/accounts.php 74)     }
modules/systemuser/accounts.php 75)     output("</td></tr>\n");
bernd Systemuser-Modul hinzugefügt

bernd authored 16 years ago

modules/systemuser/accounts.php 76)   }
bernd Überarbeitetes Systemuser-M...

bernd authored 13 years ago

modules/systemuser/accounts.php 77)   output("</table><p><sup>*</sup>) Die Werte für den verbrauchten Speicherplatz werden periodisch eingelesen und hier erst verspätet angezeigt!</p>");
Bernd Wurst Zwischenversion

Bernd Wurst authored 7 years ago

modules/systemuser/account.php  78)   $customerquota = get_customer_quota();
modules/systemuser/account.php  79)   $freequota = $customerquota['max'] - $customerquota['assigned'];
modules/systemuser/account.php  80)   if ($freequota > 10) { // Gewisse Unschärfe
modules/systemuser/account.php  81)     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  82)   } else {
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)     }
modules/systemuser/account.php  86)   }