Bernd Wurst commited on 2014-02-08 14:24:06
Zeige 4 geänderte Dateien mit 79 Einfügungen und 3 Löschungen.
... | ... |
@@ -24,13 +24,15 @@ require_once('common.php'); |
24 | 24 |
|
25 | 25 |
$forced_spamfilter_domains = array( |
26 | 26 |
't-online.de', 'gmx.de', 'gmx.net', 'web.de', 'gmail.com', 'googlemail.com', |
27 |
- 'gmail.com', 'googlemail.de', 'freenet.de', 'aol.com', 'yahoo.com' |
|
27 |
+ 'gmail.com', 'googlemail.de', 'freenet.de', 'aol.com', 'yahoo.com', 'gmx.at', |
|
28 |
+ 'ymail.com', 'hotmail.com', 'mail.de', 'email.de', 'online.de', 'outlook.com', |
|
29 |
+ 'me.com' |
|
28 | 30 |
); |
29 | 31 |
|
30 | 32 |
|
31 | 33 |
function forward_type($target) { |
32 | 34 |
global $forced_spamfilter_domains; |
33 |
- list($l, $d) = explode('@', $target, 2); |
|
35 |
+ list($l, $d) = explode('@', strtolower($target), 2); |
|
34 | 36 |
DEBUG('Weiterleitung an '.$l.' @ '.$d); |
35 | 37 |
if (in_array($d, $forced_spamfilter_domains)) { |
36 | 38 |
// Domain in der Liste => Spam darf nicht weiter geleitet werden |
... | ... |
@@ -97,6 +97,11 @@ foreach ($my_shortcuts as $shortcut) { |
97 | 97 |
} |
98 | 98 |
output('</div>'); |
99 | 99 |
|
100 |
+if (have_module('systemuser') && $_SESSION['role'] & ROLE_SYSTEMUSER) { |
|
101 |
+ ini_set('include_path', ini_get('include_path').':modules/systemuser/include'); |
|
102 |
+ include('modules/systemuser/overview.php'); |
|
103 |
+} |
|
104 |
+ |
|
100 | 105 |
|
101 | 106 |
if (have_module('email') && $_SESSION['role'] & ROLE_VMAIL_ACCOUNT) { |
102 | 107 |
include('modules/email/vmailoverview.php'); |
... | ... |
@@ -77,7 +77,7 @@ function get_account_details($uid, $customerno=0) |
77 | 77 |
if ($customerno == 0) |
78 | 78 |
$customerno = $_SESSION['customerinfo']['customerno']; |
79 | 79 |
$args = array(":uid" => $uid, ":customerno" => $customerno); |
80 |
- $result = db_query("SELECT uid,username,name,shell,quota,erstellungsdatum FROM system.useraccounts WHERE kunde=:customerno AND uid=:uid", $args); |
|
80 |
+ $result = db_query("SELECT uid,username,name,shell,server,quota,erstellungsdatum FROM system.useraccounts WHERE kunde=:customerno AND uid=:uid", $args); |
|
81 | 81 |
if ($result->rowCount() == 0) |
82 | 82 |
system_failure("Cannot find the requestes useraccount (for this customer)."); |
83 | 83 |
return $result->fetch(); |
... | ... |
@@ -0,0 +1,69 @@ |
1 |
+<?php |
|
2 |
+/* |
|
3 |
+This file belongs to the Webinterface of schokokeks.org Hosting |
|
4 |
+ |
|
5 |
+Written 2008-2014 by schokokeks.org Hosting, namely |
|
6 |
+ Bernd Wurst <bernd@schokokeks.org> |
|
7 |
+ Hanno Böck <hanno@schokokeks.org> |
|
8 |
+ |
|
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. |
|
10 |
+ |
|
11 |
+You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see |
|
12 |
+http://creativecommons.org/publicdomain/zero/1.0/ |
|
13 |
+ |
|
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. |
|
15 |
+*/ |
|
16 |
+ |
|
17 |
+require_once('inc/base.php'); |
|
18 |
+require_once('inc/icons.php'); |
|
19 |
+ |
|
20 |
+require_once('useraccounts.php'); |
|
21 |
+ |
|
22 |
+require_role(ROLE_SYSTEMUSER); |
|
23 |
+ |
|
24 |
+/* diese Datei wird auf der startseite eingebunden */ |
|
25 |
+ |
|
26 |
+$acc = get_account_details($_SESSION['userinfo']['uid'], $_SESSION['userinfo']['customerno']); |
|
27 |
+$usedquota = get_used_quota($acc['uid']); |
|
28 |
+$quota = array(); |
|
29 |
+$multiserver = count($usedquota) > 1; |
|
30 |
+foreach ($usedquota as $q) |
|
31 |
+{ |
|
32 |
+ $mailbar = ''; |
|
33 |
+ $mailstring = ''; |
|
34 |
+ $mailpercent = round(( $q['mailquota'] / $q["systemquota"]) * 100); |
|
35 |
+ $mailwidth = 2 * min($mailpercent, 100); |
|
36 |
+ |
|
37 |
+ if ($q["mailquota"] > 0) { |
|
38 |
+ $mailstring = "<br />(davon {$q["mailquota"]} MB für Postfächer reserviert)"; |
|
39 |
+ $mailbar = "<div style=\"font-size: 1px; background-color: blue; height: 10px; width: {$mailwidth}px; margin: 0; padding: 0; float: left;\"> </div>"; |
|
40 |
+ } |
|
41 |
+ |
|
42 |
+ $percent = round(( ($q["systemquota_used"]+$q["mailquota"]) / $q["systemquota"] ) * 100 ); |
|
43 |
+ $color = ( $percent > 99 ? 'red' : ($percent > 80 ? "yellow" : "green" )); |
|
44 |
+ $width = 2 * min($percent, 100) - $mailwidth; |
|
45 |
+ |
|
46 |
+ $used_space = $q['systemquota_used'] + $q['mailquota']; |
|
47 |
+ $msg = ""; |
|
48 |
+ if ($multiserver) { |
|
49 |
+ $msg = "<p>Server <strong>{$q['server']}</strong><br />"; |
|
50 |
+ } |
|
51 |
+ $quota[] = $msg."{$percent}%: {$used_space} MB von {$q['systemquota']} MB belegt{$mailstring}.</p> |
|
52 |
+ <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;\"> </div></div>"; |
|
53 |
+ |
|
54 |
+} |
|
55 |
+$customer = get_customer_info($_SESSION['userinfo']['customerno']); |
|
56 |
+$quotastring = implode('', $quota); |
|
57 |
+output("<h5>Stammdaten</h5> |
|
58 |
+<div style=\"margin-left: 2em;\"> |
|
59 |
+<p>Benutzername: <strong>{$acc['username']}</strong></p> |
|
60 |
+<p>Servername".($multiserver ? " (primär)" : '').": <strong>".get_server_by_id($acc['server'])."</strong></p> |
|
61 |
+<p>Tipp: <a href=\"http://wiki.schokokeks.org/Dateizugriff\">Wiki-Anleitung zum Dateizugriff bzw. zum Ändern der Dateien Ihrer Website.</a></p> |
|
62 |
+"); |
|
63 |
+output("</div>\n"); |
|
64 |
+output("<h5>Speicherplatz</h5><div style=\"margin-left: 2em;\">{$quotastring}</div>"); |
|
65 |
+ |
|
66 |
+output("<p>Die Werte für den verbrauchten Speicherplatz werden periodisch eingelesen und hier verzögert angezeigt!</p>"); |
|
67 |
+ |
|
68 |
+ |
|
69 |
+?> |
|
0 | 70 |