bernd commited on 2007-11-22 09:14:31
Zeige 2 geänderte Dateien mit 9 Einfügungen und 4 Löschungen.
git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@795 87cf0b9e-d624-0410-a070-f6ee81989793
| ... | ... |
@@ -25,7 +25,7 @@ else {
|
| 25 | 25 |
} |
| 26 | 26 |
|
| 27 | 27 |
|
| 28 |
-$is_forward = ($mailbox['type'] == 'forward'); |
|
| 28 |
+$is_forward = ($account['type'] == 'forward'); |
|
| 29 | 29 |
$is_mailbox = ( ! $is_forward); |
| 30 | 30 |
|
| 31 | 31 |
output("<script type=\"text/javascript\">
|
| ... | ... |
@@ -95,7 +95,7 @@ if ($is_mailbox and ($account['data'] != '')) |
| 95 | 95 |
|
| 96 | 96 |
$form .= "<p> |
| 97 | 97 |
<input type=\"radio\" id=\"forward\" name=\"type\" value=\"forward\" ".($is_forward ? 'checked="checked" ' : '')." onclick=\"selectForwarding()\" /><label for=\"forward\"> Weiterleitung an andere E-Mail-Adresse</label></p> |
| 98 |
- <p style=\"margin-left: 2em; ".($is_mailbox ? 'display: none' : '')."\" id=\"forward_options\">Weiterleitung an: <input type=\"text\" id=\"forward_to\" name=\"forward_to\" value=\"".($is_forward ? $account['data'] : '')."\" /></p> |
|
| 98 |
+ <p style=\"margin-left: 2em; ".($is_mailbox ? 'display: none' : '')."\" id=\"forward_options\">Weiterleitung an: <textarea id=\"forward_to\" name=\"forward_to\">".($is_forward ? str_replace(' ', "\n", $account['data']) : '')."</textarea><br />Sie können mehrere Adressen eingeben. trennen Sie diese bitte mit Zeilenumbrüchen oder Leerzeichen.</p>
|
|
| 99 | 99 |
<p><input type=\"radio\" id=\"mailbox\" name=\"type\" value=\"mailbox\" ".($is_mailbox ? 'checked="checked" ' : '')." onclick=\"selectMailbox()\" /><label for=\"mailbox\"> In Mailbox speichern</label></p> |
| 100 | 100 |
<p style=\"margin-left: 2em; ".($is_forward ? 'display: none' : '')."\" id=\"mailbox_options\">Passwort für Abruf: <input type=\"password\" id=\"password\" name=\"password\" value=\"\" />{$password_message}</p>";
|
| 101 | 101 |
|
| ... | ... |
@@ -144,9 +144,14 @@ function save_vmail_account($account) |
| 144 | 144 |
switch ($account['type']) |
| 145 | 145 |
{
|
| 146 | 146 |
case 'forward': |
| 147 |
- $account['data'] = filter_input_general($account['data']); |
|
| 148 |
- if (! check_emailaddr($account['data'])) |
|
| 147 |
+ $forward_to = preg_split("/[\s,]+/", $account['data']);
|
|
| 148 |
+ foreach ($forward_to as $addr) |
|
| 149 |
+ {
|
|
| 150 |
+ $addr = filter_input_general($addr); |
|
| 151 |
+ if (! check_emailaddr($addr)) |
|
| 149 | 152 |
system_failure('Das Weiterleitungs-Ziel ist keine E-Mail-Adresse!');
|
| 153 |
+ } |
|
| 154 |
+ $account['data'] = implode(' ', $forward_to);
|
|
| 150 | 155 |
$type = 'forward'; |
| 151 | 156 |
break; |
| 152 | 157 |
case 'mailbox': |
| 153 | 158 |