67d3ffab626b1f3cd94864ec65b8e26b41567d94
bernd Systemuser-Modul hinzugefügt

bernd authored 16 years ago

modules/systemuser/accounts.php  1) <?php
bernd Überarbeitetes Systemuser-M...

bernd authored 14 years ago

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

bernd authored 16 years ago

modules/systemuser/accounts.php  4) 
modules/systemuser/accounts.php  5) require_once('useraccounts.php');
modules/systemuser/accounts.php  6) 
modules/systemuser/accounts.php  7) require_role(ROLE_CUSTOMER);
modules/systemuser/accounts.php  8) 
bernd Benutze überall title() sta...

bernd authored 13 years ago

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

bernd authored 16 years ago

modules/systemuser/accounts.php 10) 
modules/systemuser/accounts.php 11) 
modules/systemuser/accounts.php 12) if (! customer_may_have_useraccounts())
modules/systemuser/accounts.php 13) {
modules/systemuser/accounts.php 14)   warning("Sie haben bisher keine Benutzeraccounts. Der erste (»Stamm-«)Account muss von einem Administrator angelegt werden.");
modules/systemuser/accounts.php 15) }
modules/systemuser/accounts.php 16) else
modules/systemuser/accounts.php 17) {
modules/systemuser/accounts.php 18)   $accounts = list_useraccounts();
bernd Überarbeitetes Systemuser-M...

bernd authored 14 years ago

modules/systemuser/accounts.php 19)   $shells = available_shells();
bernd Systemuser-Modul hinzugefügt

bernd authored 16 years ago

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

bernd authored 14 years ago

modules/systemuser/accounts.php 21)   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 22)   foreach ($accounts as $acc)
modules/systemuser/accounts.php 23)   {
bernd Überarbeitetes Systemuser-M...

bernd authored 14 years ago

modules/systemuser/accounts.php 24)     $shell = $shells[$acc['shell']];
modules/systemuser/accounts.php 25)     $usedquota = get_used_quota($acc['uid']);
modules/systemuser/accounts.php 26)     $quota = array();
modules/systemuser/accounts.php 27)     foreach ($usedquota as $q)
modules/systemuser/accounts.php 28)     {
bernd Mailaccount-Quota auch bei...

bernd authored 13 years ago

modules/systemuser/account.php  29)       $mailbar = '';
modules/systemuser/account.php  30)       $mailstring = '';
modules/systemuser/account.php  31)       $mailpercent = round(( $q['mailquota'] / $q["systemquota"]) * 100);
modules/systemuser/account.php  32)       $mailwidth = 2 * min($mailpercent, 100);
modules/systemuser/account.php  33) 
modules/systemuser/account.php  34)       if ($q["mailquota"] > 0) {
modules/systemuser/account.php  35) 	$mailstring = "<br />(davon {$q["mailquota"]} MB für Postfächer reserviert)";
modules/systemuser/account.php  36)         $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  37)       }  
modules/systemuser/account.php  38) 
modules/systemuser/account.php  39)       $percent = round(( ($q["systemquota_used"]+$q["mailquota"]) / $q["systemquota"] ) * 100 );
bernd Überarbeitetes Systemuser-M...

bernd authored 14 years ago

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

bernd authored 13 years ago

modules/systemuser/account.php  41)       $width = 2 * min($percent, 100) - $mailwidth;
modules/systemuser/account.php  42)      
modules/systemuser/account.php  43)       $used_space = $q['systemquota_used'] + $q['mailquota'];
modules/systemuser/account.php  44)       $quota[] = "<p>Server <strong>{$q['server']}</strong><br />{$percent}%: {$used_space} MB von {$q['systemquota']} MB belegt{$mailstring}.</p> 
modules/systemuser/account.php  45)         <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 14 years ago

modules/systemuser/accounts.php 46) 
modules/systemuser/accounts.php 47)     }
modules/systemuser/accounts.php 48)     $realname = $acc['name'] ? $acc['name'] : $_SESSION['customerinfo']['name'];
modules/systemuser/accounts.php 49)     $quotastring = implode('', $quota);
modules/systemuser/accounts.php 50)     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 51)     output("<td>{$quotastring}</td>");
modules/systemuser/accounts.php 52)     output("<td>".internal_link('edit', other_icon('user_edit.png', 'Bearbeiten'), "uid={$acc['uid']}"));
modules/systemuser/accounts.php 53)     
modules/systemuser/accounts.php 54)     if (! customer_useraccount($acc['uid']))
modules/systemuser/accounts.php 55)     {
modules/systemuser/accounts.php 56)       output(" &#160; ".internal_link('pwchange', icon_pwchange('Passwort neu setzen'), "uid={$acc['uid']}"));
modules/systemuser/accounts.php 57)       #output(" &#160; ".internal_link('deluser', other_icon('user_delete.png', 'Benutzer löschen'), "uid={$acc['uid']}"));
modules/systemuser/accounts.php 58)     }
modules/systemuser/accounts.php 59)     output("</td></tr>\n");
bernd Systemuser-Modul hinzugefügt

bernd authored 16 years ago

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

bernd authored 14 years ago

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