Bernd Wurst authored on24/08/2021 08:37:12
Showing1 changed files
... ...
@@ -54,7 +54,7 @@ if ($id == 0) {
54 54
     }
55 55
 }
56 56
 
57
-
57
+$has_extensions = $account['enableextensions'];
58 58
 $is_autoresponder = is_array($account['autoresponder']) && $account['autoresponder']['valid_from'] != null && ($account['autoresponder']['valid_until'] > date('Y-m-d') || $account['autoresponder']['valid_until'] == null);
59 59
 $is_forward = (count($account['forwards']) > 0);
60 60
 $is_mailbox = ($account['password'] != null  ||  $id == 0);
... ...
@@ -81,6 +81,7 @@ if (! $accountlogin) {
81 81
         $form .= "
82 82
     <p><strong>E-Mail-Adresse:</strong>&#160;<input type=\"text\" name=\"local\" id=\"local\" size=\"10\" value=\"".filter_output_html($account['local'])."\" /><strong style=\"font-size: 1.5em;\">&#160;@&#160;</strong>".domainselect($domain)."</p>";
83 83
     }
84
+    $form .= '<p><input type="checkbox" id="enableextensions" name="enableextensions" value="yes" '.($has_extensions ? 'checked="checked" ' : '').'/><label for=enableextensions">&#160;Ermögliche die Nutzung von Erweiterungsadressen (<a href="https://wiki.schokokeks.org/E-Mail/Erweiterungsadressen">Hilfe</a>)';
84 85
     $password_message = '';
85 86
     $password_value = '';
86 87
     if ($is_mailbox and ($account['password'] != '')) {
Browse code

Umstellung von filter_input_general() auf filter_output_html()

Bernd Wurst authored on21/09/2019 17:07:48
Showing1 changed files
... ...
@@ -39,7 +39,7 @@ if ($_SESSION['role'] == ROLE_VMAIL_ACCOUNT) {
39 39
     $id = get_vmail_id_by_emailaddr($_SESSION['mailaccount']);
40 40
     $account = get_account_details($id, false);
41 41
     $accountlogin = true;
42
-    $accountname = filter_input_general($_SESSION['mailaccount']);
42
+    $accountname = filter_output_html($_SESSION['mailaccount']);
43 43
 }
44 44
 
45 45
 
... ...
@@ -79,7 +79,7 @@ if (! $accountlogin) {
79 79
             $domain = (int) $_GET['domain'];
80 80
         }
81 81
         $form .= "
82
-    <p><strong>E-Mail-Adresse:</strong>&#160;<input type=\"text\" name=\"local\" id=\"local\" size=\"10\" value=\"{$account['local']}\" /><strong style=\"font-size: 1.5em;\">&#160;@&#160;</strong>".domainselect($domain)."</p>";
82
+    <p><strong>E-Mail-Adresse:</strong>&#160;<input type=\"text\" name=\"local\" id=\"local\" size=\"10\" value=\"".filter_output_html($account['local'])."\" /><strong style=\"font-size: 1.5em;\">&#160;@&#160;</strong>".domainselect($domain)."</p>";
83 83
     }
84 84
     $password_message = '';
85 85
     $password_value = '';
... ...
@@ -150,10 +150,7 @@ $form .= "<p><input type=\"radio\" name=\"ar_valid_until\" value=\"infinity\" id
150 150
   "<input type=\"text\" value=\"$enddate\" id=\"ar_enddate\" name=\"ar_enddate\" /><br/><small>(Automatische Antworten sind nur befristet erlaubt. Benötigen Sie langfristig funktionierende automatische Antworten, sprechen Sie unsere Administratoren bitte an, dann suchen wir eine Lösung.)</small></p>";
151 151
 */
152 152
 
153
-$subject = filter_input_general($ar['subject']);
154
-if ($subject == null) {
155
-    $subject = '';
156
-}
153
+$subject = filter_output_html($ar['subject']);
157 154
 $ar_subject_default_checked = ($subject == null) ? ' checked="checked"' : '';
158 155
 $ar_subject_custom_checked = ($subject) ? ' checked="checked"' : '';
159 156
 $form .= "<h4>Betreffzeile der automatischen Antwort</h4>".
... ...
@@ -162,9 +159,9 @@ $form .= "<h4>Betreffzeile der automatischen Antwort</h4>".
162 159
   "<input type=\"radio\" name=\"ar_subject\" value=\"custom\" id=\"ar_subject_custom\"{$ar_subject_custom_checked} /> ".
163 160
   "<label for=\"ar_subject_custom\">Anderer Betreff:</label> <input type=\"text\" name=\"ar_subject_value\" id=\"ar_subject_value\" value=\"{$subject}\"/></p>";
164 161
 
165
-$message = filter_input_general($ar['message']);
162
+$message = filter_output_html($ar['message']);
166 163
 $form .= "<h4>Inhalt der automatischen Antwort</h4>".
167
-  "<p><textarea cols=\"80\" rows=\"10\" name=\"ar_message\" id=\"ar_message\">".filter_input_general($ar['message'])."</textarea></p>";
164
+  "<p><textarea cols=\"80\" rows=\"10\" name=\"ar_message\" id=\"ar_message\">{$message}</textarea></p>";
168 165
 $quote = $ar['quote'];
169 166
 if (! $quote) {
170 167
     $quote = 'none';
... ...
@@ -178,7 +175,7 @@ $form .= "<p><label for=\"ar_quote\">Originalnachricht des Absenders </label>".
178 175
 
179 176
 $ar_from_default_checked = ($ar['fromname'] == null) ? ' checked="checked"' : '';
180 177
 $ar_from_custom_checked = ($ar['fromname'] != null) ? ' checked="checked"' : '';
181
-$fromname = filter_input_general($ar['fromname']);
178
+$fromname = filter_output_html($ar['fromname']);
182 179
 $form .= "<h4>Absender der automatischen Antwort</h4>".
183 180
   "<p><input type=\"radio\" name=\"ar_from\" value=\"default\" id=\"ar_from_default\"{$ar_from_default_checked} /> <label for=\"ar_from_default\">Nur E-Mail-Adresse</label><br />".
184 181
   "<input type=\"radio\" name=\"ar_from\" value=\"custom\" id=\"ar_from_custom\"{$ar_from_custom_checked} /> <label for=\"ar_from_custom\">Mit Name: </label> ".
... ...
@@ -211,7 +208,7 @@ for ($i = 0 ; $i < max($numforwards, 10) ; $i++) {
211 208
     $num = $i+1;
212 209
     $form .= "<div class=\"vmail-forward\" id=\"vmail_forward_{$num}\">
213 210
   <div style=\"float: right;\" class=\"delete_forward\">".icon_delete("Diese Weiterleitung entfernen")."</div>
214
-  <p>Weiterleiten an <input type=\"text\" id=\"forward_to_{$num}\" name=\"forward_to_{$num}\" value=\"{$account['forwards'][$i]['destination']}\" /></p>
211
+  <p>Weiterleiten an <input type=\"text\" id=\"forward_to_{$num}\" name=\"forward_to_{$num}\" value=\"".filter_output_html($account['forwards'][$i]['destination'])."\" /></p>
215 212
   </div>\n";
216 213
 }
217 214
 $form .= '</div>';
Browse code

XSS in autoreply

Hanno authored on09/03/2019 09:19:13
Showing1 changed files
... ...
@@ -164,7 +164,7 @@ $form .= "<h4>Betreffzeile der automatischen Antwort</h4>".
164 164
 
165 165
 $message = filter_input_general($ar['message']);
166 166
 $form .= "<h4>Inhalt der automatischen Antwort</h4>".
167
-  "<p><textarea cols=\"80\" rows=\"10\" name=\"ar_message\" id=\"ar_message\">".$ar['message']."</textarea></p>";
167
+  "<p><textarea cols=\"80\" rows=\"10\" name=\"ar_message\" id=\"ar_message\">".filter_input_general($ar['message'])."</textarea></p>";
168 168
 $quote = $ar['quote'];
169 169
 if (! $quote) {
170 170
     $quote = 'none';
Browse code

remove whitespace in empty lines

Hanno authored on26/06/2018 23:36:40
Showing1 changed files
... ...
@@ -87,7 +87,7 @@ if (! $accountlogin) {
87 87
         $password_message = '<span style="font-size: 80%"><br /><em>Sie haben bereits ein Passwort gesetzt. Wenn Sie dieses Feld nicht ändern, wird das bisherige Passwort beibehalten.</em></span>';
88 88
         $password_value = '**********';
89 89
     }
90
-  
90
+
91 91
     $form .= "
92 92
     <p><input class=\"option_group\" type=\"checkbox\" id=\"mailbox\" name=\"mailbox\" value=\"yes\" ".($is_mailbox ? 'checked="checked" ' : '')." /><label for=\"mailbox\">&#160;<strong>In Mailbox speichern</strong></label></p>
93 93
     <div style=\"margin-left: 2em;\" id=\"mailbox_config\" class=\"option_group\">
Browse code

Fix coding style with php-cs-checker, see https://cs.sensiolabs.org/

Hanno authored on26/06/2018 13:58:19
Showing1 changed files
... ...
@@ -8,7 +8,7 @@ Written 2008-2018 by schokokeks.org Hosting, namely
8 8
 
9 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 10
 
11
-You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see 
11
+You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see
12 12
 https://creativecommons.org/publicdomain/zero/1.0/
13 13
 
14 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.
... ...
@@ -29,82 +29,81 @@ require_role(array(ROLE_SYSTEMUSER, ROLE_VMAIL_ACCOUNT));
29 29
 $account = empty_account();
30 30
 $id = (isset($_GET['id']) ? (int) $_GET['id'] : 0);
31 31
 
32
-if ($id != 0)
33
-  $account = get_account_details($id);
32
+if ($id != 0) {
33
+    $account = get_account_details($id);
34
+}
34 35
 
35 36
 $accountlogin = false;
36 37
 if ($_SESSION['role'] == ROLE_VMAIL_ACCOUNT) {
37
-  $section = 'email_edit';
38
-  $id = get_vmail_id_by_emailaddr($_SESSION['mailaccount']);
39
-  $account = get_account_details($id, false);
40
-  $accountlogin = true;
41
-  $accountname = filter_input_general($_SESSION['mailaccount']);
38
+    $section = 'email_edit';
39
+    $id = get_vmail_id_by_emailaddr($_SESSION['mailaccount']);
40
+    $account = get_account_details($id, false);
41
+    $accountlogin = true;
42
+    $accountname = filter_input_general($_SESSION['mailaccount']);
42 43
 }
43 44
 
44 45
 
45 46
 DEBUG($account);
46 47
 if ($id == 0) {
47
-  title("E-Mail-Adresse anlegen");
48
-}
49
-else {
50
-  if ($accountlogin) {
51
-    title("Einstellungen für {$accountname}");
52
-  } else {
53
-    title("E-Mail-Adresse bearbeiten");
54
-  }
48
+    title("E-Mail-Adresse anlegen");
49
+} else {
50
+    if ($accountlogin) {
51
+        title("Einstellungen für {$accountname}");
52
+    } else {
53
+        title("E-Mail-Adresse bearbeiten");
54
+    }
55 55
 }
56 56
 
57 57
 
58
-$is_autoresponder = is_array($account['autoresponder']) && $account['autoresponder']['valid_from'] != NULL && ($account['autoresponder']['valid_until'] > date('Y-m-d') || $account['autoresponder']['valid_until'] == NULL);
58
+$is_autoresponder = is_array($account['autoresponder']) && $account['autoresponder']['valid_from'] != null && ($account['autoresponder']['valid_until'] > date('Y-m-d') || $account['autoresponder']['valid_until'] == null);
59 59
 $is_forward = (count($account['forwards']) > 0);
60
-$is_mailbox = ($account['password'] != NULL  ||  $id == 0);
60
+$is_mailbox = ($account['password'] != null  ||  $id == 0);
61 61
 $numforwards = max(count($account['forwards']), 1);
62 62
 
63 63
 $form = '';
64 64
 
65 65
 if (! $accountlogin) {
66
-  if ($id != 0) {
67
-    $domainlist = get_vmail_domains();
68
-    $domain = NULL;
69
-    foreach ($domainlist as $dom) {
70
-      if ($dom['id'] == $account['domain']) {
71
-        $domain = $dom['domainname'];
72
-      }
73
-    }
74
-    $form .= "
66
+    if ($id != 0) {
67
+        $domainlist = get_vmail_domains();
68
+        $domain = null;
69
+        foreach ($domainlist as $dom) {
70
+            if ($dom['id'] == $account['domain']) {
71
+                $domain = $dom['domainname'];
72
+            }
73
+        }
74
+        $form .= "
75 75
     <p><strong style=\"font-size: 1.5em;\">{$account['local']}@{$domain}</strong></p>";
76
-  } else {
77
-    $domain = NULL;
78
-    if (isset($_GET['domain'])) {
79
-      $domain = (int) $_GET['domain'];
80
-    }
81
-    $form .= "
76
+    } else {
77
+        $domain = null;
78
+        if (isset($_GET['domain'])) {
79
+            $domain = (int) $_GET['domain'];
80
+        }
81
+        $form .= "
82 82
     <p><strong>E-Mail-Adresse:</strong>&#160;<input type=\"text\" name=\"local\" id=\"local\" size=\"10\" value=\"{$account['local']}\" /><strong style=\"font-size: 1.5em;\">&#160;@&#160;</strong>".domainselect($domain)."</p>";
83
-  }
84
-  $password_message = '';
85
-  $password_value = '';
86
-  if ($is_mailbox and ($account['password'] != ''))
87
-  {
88
-    $password_message = '<span style="font-size: 80%"><br /><em>Sie haben bereits ein Passwort gesetzt. Wenn Sie dieses Feld nicht ändern, wird das bisherige Passwort beibehalten.</em></span>';
89
-    $password_value = '**********';
90
-  } 
83
+    }
84
+    $password_message = '';
85
+    $password_value = '';
86
+    if ($is_mailbox and ($account['password'] != '')) {
87
+        $password_message = '<span style="font-size: 80%"><br /><em>Sie haben bereits ein Passwort gesetzt. Wenn Sie dieses Feld nicht ändern, wird das bisherige Passwort beibehalten.</em></span>';
88
+        $password_value = '**********';
89
+    }
91 90
   
92
-  $form .= "
91
+    $form .= "
93 92
     <p><input class=\"option_group\" type=\"checkbox\" id=\"mailbox\" name=\"mailbox\" value=\"yes\" ".($is_mailbox ? 'checked="checked" ' : '')." /><label for=\"mailbox\">&#160;<strong>In Mailbox speichern</strong></label></p>
94 93
     <div style=\"margin-left: 2em;\" id=\"mailbox_config\" class=\"option_group\">
95 94
     <p>Passwort für Abruf:&#160;<input style=\"color: #aaa;\" type=\"password\" id=\"password\" name=\"password\" value=\"{$password_value}\" />{$password_message}</p>";
96 95
 
97
-  $quota = config('vmail_basequota');
98
-  if ($is_mailbox and $account['quota']) {
99
-    $quota = $account['quota'];
100
-  }
101
-  $form .= "<p class=\"quota_options\">Größe des Postfachs: <input type=\"text\" id=\"quota\" name=\"quota\" value=\"{$quota}\" /> MB<br /><span style=\"font-size: 80%\"><em>Hinweis: Die Differenz zwischen dem hier gesetzten Wert und dem Sockelbetrag von ".config('vmail_basequota')." MB wird vom Speicherplatz Ihres Benutzer-Kontos abgezogen.</em></span></p>";
96
+    $quota = config('vmail_basequota');
97
+    if ($is_mailbox and $account['quota']) {
98
+        $quota = $account['quota'];
99
+    }
100
+    $form .= "<p class=\"quota_options\">Größe des Postfachs: <input type=\"text\" id=\"quota\" name=\"quota\" value=\"{$quota}\" /> MB<br /><span style=\"font-size: 80%\"><em>Hinweis: Die Differenz zwischen dem hier gesetzten Wert und dem Sockelbetrag von ".config('vmail_basequota')." MB wird vom Speicherplatz Ihres Benutzer-Kontos abgezogen.</em></span></p>";
102 101
 
103
-  $quota_notify = ($account['quota_threshold'] >= 0) ? ' checked="checked" ' : '';
104
-  $quota_threshold = ($account['quota_threshold'] >= 0) ? $account['quota_threshold'] : '';
105
-  $form .= "<p class=\"quota_options\"><input type=\"checkbox\" id=\"quota_notify\" name=\"quota_notify\" value=\"1\" {$quota_notify} /><label for=\"quota_notify\">Benachrichtigung wenn weniger als</label> <input type=\"text\" name=\"quota_threshold\" id=\"quota_threshold\" value=\"{$quota_threshold}\" /> MB Speicherplatz zur Verfügung stehen.</p>";
102
+    $quota_notify = ($account['quota_threshold'] >= 0) ? ' checked="checked" ' : '';
103
+    $quota_threshold = ($account['quota_threshold'] >= 0) ? $account['quota_threshold'] : '';
104
+    $form .= "<p class=\"quota_options\"><input type=\"checkbox\" id=\"quota_notify\" name=\"quota_notify\" value=\"1\" {$quota_notify} /><label for=\"quota_notify\">Benachrichtigung wenn weniger als</label> <input type=\"text\" name=\"quota_threshold\" id=\"quota_threshold\" value=\"{$quota_threshold}\" /> MB Speicherplatz zur Verfügung stehen.</p>";
106 105
 
107
-  $form .= "</div>";
106
+    $form .= "</div>";
108 107
 }
109 108
 
110 109
 
... ...
@@ -115,35 +114,35 @@ $form .= "<div style=\"margin-left: 2em;\" id=\"autoresponder_config\" class=\"o
115 114
 
116 115
 $ar = $account['autoresponder'];
117 116
 if (! $ar) {
118
-  $ar = empty_autoresponder_config();
117
+    $ar = empty_autoresponder_config();
119 118
 }
120 119
 
121
-if ($ar['valid_until'] != NULL && $ar['valid_until'] < date('Y-m-d')) {
122
-  // Daten sind Restbestand von einem früheren Einsatz des Autoresponders
123
-  $ar['valid_from'] = NULL;
124
-  $ar['valid_until'] = NULL;
120
+if ($ar['valid_until'] != null && $ar['valid_until'] < date('Y-m-d')) {
121
+    // Daten sind Restbestand von einem früheren Einsatz des Autoresponders
122
+    $ar['valid_from'] = null;
123
+    $ar['valid_until'] = null;
125 124
 }
126
-$valid_from_now_checked = ($ar['valid_from'] <= date('Y-m-d H:i:s') || $ar['valid_from'] == NULL) ? ' checked="checked"' : '';
125
+$valid_from_now_checked = ($ar['valid_from'] <= date('Y-m-d H:i:s') || $ar['valid_from'] == null) ? ' checked="checked"' : '';
127 126
 $valid_from_future_checked = ($ar['valid_from'] > date('Y-m-d H:i:s')) ? ' checked="checked"' : '';
128 127
 $startdate = $ar['valid_from'];
129 128
 if (! $startdate || $startdate <= date('Y-m-d')) {
130
-  $startdate = date('Y-m-d', time() + 1*24*60*60);
129
+    $startdate = date('Y-m-d', time() + 1*24*60*60);
131 130
 }
132 131
 $form .= "<p><input type=\"radio\" name=\"ar_valid_from\" value=\"now\" id=\"ar_valid_from_now\"{$valid_from_now_checked} /> <label for=\"ar_valid_from_now\">Ab sofort</label><br />".
133 132
   "<input type=\"radio\" name=\"ar_valid_from\" value=\"date\" id=\"ar_valid_from_date\"{$valid_from_future_checked} /> <label for=\"ar_valid_from_date\">Erst ab dem </label>".
134 133
   "<input type=\"text\" value=\"$startdate\" id=\"ar_startdate\" name=\"ar_startdate\" /></p>";
135 134
 
136
-$valid_until_infinity_checked = ($ar['valid_until'] == NULL) ? ' checked="checked"' : '';
137
-$valid_until_date_checked = ($ar['valid_until'] != NULL) ? ' checked="checked"' : '';
135
+$valid_until_infinity_checked = ($ar['valid_until'] == null) ? ' checked="checked"' : '';
136
+$valid_until_date_checked = ($ar['valid_until'] != null) ? ' checked="checked"' : '';
138 137
 $enddate = $ar['valid_until'];
139 138
 if (! $enddate) {
140
-  $enddate = date('Y-m-d', time() + 7*24*60*60);
139
+    $enddate = date('Y-m-d', time() + 7*24*60*60);
141 140
 }
142 141
 $form .= "<h4>Deaktivierung</h4>";
143 142
 $form .= "<p><label for=\"ar_valid_until_date\">Keine Antworten mehr versenden ab dem </label>".
144 143
   "<input type=\"text\" value=\"$enddate\" id=\"ar_enddate\" name=\"ar_enddate\" /><br/>";
145 144
 if (!$accountlogin && ($id != 0)) {
146
-  $form .= "<small>(Automatische Antworten sind nur befristet erlaubt. Wenn Sie diese Adresse dauerhaft stilllegen möchten, können Sie dies am Ende dieser Seite tun.)</small></p>";
145
+    $form .= "<small>(Automatische Antworten sind nur befristet erlaubt. Wenn Sie diese Adresse dauerhaft stilllegen möchten, können Sie dies am Ende dieser Seite tun.)</small></p>";
147 146
 }
148 147
 /*
149 148
 $form .= "<p><input type=\"radio\" name=\"ar_valid_until\" value=\"infinity\" id=\"ar_valid_until_infinity\"{$valid_until_infinity_checked} /> <label for=\"ar_valid_until_infinity\">Unbefristet</label><br />".
... ...
@@ -152,9 +151,10 @@ $form .= "<p><input type=\"radio\" name=\"ar_valid_until\" value=\"infinity\" id
152 151
 */
153 152
 
154 153
 $subject = filter_input_general($ar['subject']);
155
-if ($subject == NULL)
156
-  $subject = '';
157
-$ar_subject_default_checked = ($subject == NULL) ? ' checked="checked"' : '';
154
+if ($subject == null) {
155
+    $subject = '';
156
+}
157
+$ar_subject_default_checked = ($subject == null) ? ' checked="checked"' : '';
158 158
 $ar_subject_custom_checked = ($subject) ? ' checked="checked"' : '';
159 159
 $form .= "<h4>Betreffzeile der automatischen Antwort</h4>".
160 160
   "<p><input type=\"radio\" name=\"ar_subject\" value=\"default\" id=\"ar_subject_default\"{$ar_subject_default_checked} /> ".
... ...
@@ -166,17 +166,18 @@ $message = filter_input_general($ar['message']);
166 166
 $form .= "<h4>Inhalt der automatischen Antwort</h4>".
167 167
   "<p><textarea cols=\"80\" rows=\"10\" name=\"ar_message\" id=\"ar_message\">".$ar['message']."</textarea></p>";
168 168
 $quote = $ar['quote'];
169
-if (! $quote) 
170
-  $quote = 'none';
169
+if (! $quote) {
170
+    $quote = 'none';
171
+}
171 172
 $form .= "<p><label for=\"ar_quote\">Originalnachricht des Absenders </label>".
172
-  html_select('ar_quote', array("none" => 'nicht in Antwort einschließen', 
173
-                                "teaser" => 'anreißen (erste 10 Zeilen)', 
173
+  html_select('ar_quote', array("none" => 'nicht in Antwort einschließen',
174
+                                "teaser" => 'anreißen (erste 10 Zeilen)',
174 175
                                 "inline" => 'zitieren (max. 50 Zeilen)'), $quote)."</p>";
175 176
                                 //"attach" => 'vollständig als Anhang beifügen'), $quote)."</p>";
176 177
 
177 178
 
178
-$ar_from_default_checked = ($ar['fromname'] == NULL) ? ' checked="checked"' : '';
179
-$ar_from_custom_checked = ($ar['fromname'] != NULL) ? ' checked="checked"' : '';
179
+$ar_from_default_checked = ($ar['fromname'] == null) ? ' checked="checked"' : '';
180
+$ar_from_custom_checked = ($ar['fromname'] != null) ? ' checked="checked"' : '';
180 181
 $fromname = filter_input_general($ar['fromname']);
181 182
 $form .= "<h4>Absender der automatischen Antwort</h4>".
182 183
   "<p><input type=\"radio\" name=\"ar_from\" value=\"default\" id=\"ar_from_default\"{$ar_from_default_checked} /> <label for=\"ar_from_default\">Nur E-Mail-Adresse</label><br />".
... ...
@@ -200,16 +201,15 @@ $form .= "<div style=\"margin-left: 2em;\" id=\"forward_config\" class=\"option_
200 201
 $form .= '<div id="forward_entries">
201 202
 ';
202 203
 if (! isset($account['forwards'][0])) {
203
-  $account['forwards'][0] = array('destination' => '');
204
+    $account['forwards'][0] = array('destination' => '');
204 205
 }
205 206
 while (count($account['forwards']) < 10) {
206
-  // Dummy-Einträge für Leute ohne JavaScript
207
-  $account['forwards'][] = array('destination' => '');
207
+    // Dummy-Einträge für Leute ohne JavaScript
208
+    $account['forwards'][] = array('destination' => '');
208 209
 }
209
-for ($i = 0 ; $i < max($numforwards,10) ; $i++)
210
-{
211
-  $num = $i+1;
212
-  $form .= "<div class=\"vmail-forward\" id=\"vmail_forward_{$num}\">
210
+for ($i = 0 ; $i < max($numforwards, 10) ; $i++) {
211
+    $num = $i+1;
212
+    $form .= "<div class=\"vmail-forward\" id=\"vmail_forward_{$num}\">
213 213
   <div style=\"float: right;\" class=\"delete_forward\">".icon_delete("Diese Weiterleitung entfernen")."</div>
214 214
   <p>Weiterleiten an <input type=\"text\" id=\"forward_to_{$num}\" name=\"forward_to_{$num}\" value=\"{$account['forwards'][$i]['destination']}\" /></p>
215 215
   </div>\n";
... ...
@@ -221,15 +221,12 @@ $form .= '<p><a href="#" id="more_forwards">'.icon_add().' Weiteren Empfänger h
221 221
 
222 222
 $target = 'vmail';
223 223
 if ($accountlogin) {
224
-  $target = '../index/index';
224
+    $target = '../index/index';
225 225
 }
226 226
 $form .= '<p><input id="submit" type="submit" value="Speichern" />&#160;&#160;&#160;&#160;'.internal_link($target, 'Abbrechen').'</p>';
227 227
 
228 228
 output(html_form('vmail_edit_mailbox', 'save', 'action=edit'.($id != 0 ? '&id='.$id : ''), $form));
229 229
 
230 230
 if (! $accountlogin && ($id != 0)) {
231
-  output("<p>".internal_link('suspend', 'Diese Adresse stilllegen (mit individuellem Fehlertext)', "account=".$id)."</p>");
231
+    output("<p>".internal_link('suspend', 'Diese Adresse stilllegen (mit individuellem Fehlertext)', "account=".$id)."</p>");
232 232
 }
233
-
234
-
235
-?>
Browse code

Copyright year update

Bernd Wurst authored on13/01/2018 06:07:05
Showing1 changed files
... ...
@@ -2,7 +2,7 @@
2 2
 /*
3 3
 This file belongs to the Webinterface of schokokeks.org Hosting
4 4
 
5
-Written 2008-2014 by schokokeks.org Hosting, namely
5
+Written 2008-2018 by schokokeks.org Hosting, namely
6 6
   Bernd Wurst <bernd@schokokeks.org>
7 7
   Hanno Böck <hanno@schokokeks.org>
8 8
 
Browse code

Alle Optionen bzgl. Spamfilter entfernt, der ist jetzt obligatorisch und lehnt auf SMTP-Ebene ab

Bernd Wurst authored on02/03/2017 15:52:13
Showing1 changed files
... ...
@@ -62,9 +62,7 @@ $numforwards = max(count($account['forwards']), 1);
62 62
 
63 63
 $form = '';
64 64
 
65
-if ($accountlogin) {
66
-  $form.= "<p class=\"spamfilter_options\">Unerwünschte E-Mails (Spam, Viren) in diesem Postfach ".html_select('spamfilter_action', array("none" => 'nicht filtern', "folder" => 'in Unterordner »Spam« ablegen', "tag" => 'markieren und zustellen', "delete" => 'nicht zustellen (löschen)'), $account['spamfilter'])."</p>";
67
-} else {
65
+if (! $accountlogin) {
68 66
   if ($id != 0) {
69 67
     $domainlist = get_vmail_domains();
70 68
     $domain = NULL;
... ...
@@ -96,8 +94,6 @@ if ($accountlogin) {
96 94
     <div style=\"margin-left: 2em;\" id=\"mailbox_config\" class=\"option_group\">
97 95
     <p>Passwort für Abruf:&#160;<input style=\"color: #aaa;\" type=\"password\" id=\"password\" name=\"password\" value=\"{$password_value}\" />{$password_message}</p>";
98 96
 
99
-  $form.= "<p class=\"spamfilter_options\">Unerwünschte E-Mails (Spam, Viren) in diesem Postfach ".html_select('spamfilter_action', array("none" => 'nicht filtern', "folder" => 'in Unterordner »Spam« ablegen', "tag" => 'markieren und zustellen', "delete" => 'nicht zustellen (löschen)'), $account['spamfilter'])."</p>";
100
-
101 97
   $quota = config('vmail_basequota');
102 98
   if ($is_mailbox and $account['quota']) {
103 99
     $quota = $account['quota'];
... ...
@@ -204,11 +200,11 @@ $form .= "<div style=\"margin-left: 2em;\" id=\"forward_config\" class=\"option_
204 200
 $form .= '<div id="forward_entries">
205 201
 ';
206 202
 if (! isset($account['forwards'][0])) {
207
-  $account['forwards'][0] = array('destination' => '', 'spamfilter' => 'delete');
203
+  $account['forwards'][0] = array('destination' => '');
208 204
 }
209 205
 while (count($account['forwards']) < 10) {
210 206
   // Dummy-Einträge für Leute ohne JavaScript
211
-  $account['forwards'][] = array('destination' => '', 'spamfilter' => 'delete');
207
+  $account['forwards'][] = array('destination' => '');
212 208
 }
213 209
 for ($i = 0 ; $i < max($numforwards,10) ; $i++)
214 210
 {
... ...
@@ -216,9 +212,6 @@ for ($i = 0 ; $i < max($numforwards,10) ; $i++)
216 212
   $form .= "<div class=\"vmail-forward\" id=\"vmail_forward_{$num}\">
217 213
   <div style=\"float: right;\" class=\"delete_forward\">".icon_delete("Diese Weiterleitung entfernen")."</div>
218 214
   <p>Weiterleiten an <input type=\"text\" id=\"forward_to_{$num}\" name=\"forward_to_{$num}\" value=\"{$account['forwards'][$i]['destination']}\" /></p>
219
-  <p>Spam-Mails an diese Adresse ".html_select('spamfilter_action_'.$num, array("none" => 'nicht filtern', "tag" => 'markieren und zustellen', "delete" => 'nicht zustellen'), $account['forwards'][$i]['spamfilter'])."</p>
220
-  <p class=\"warning\" style=\"display: none;\"></p>
221
-  <p>Bitte beachten Sie unsere Hinweise zu <a href=\"https://wiki.schokokeks.org/E-Mail/Weiterleitungen\">Weiterleitungen und Spamfiltern</a>.</p>
222 215
   </div>\n";
223 216
 }
224 217
 $form .= '</div>';
Browse code

URLs von http nach https

Hanno Böck authored on20/09/2016 15:12:53
Showing1 changed files
... ...
@@ -9,7 +9,7 @@ Written 2008-2014 by schokokeks.org Hosting, namely
9 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 10
 
11 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/
12
+https://creativecommons.org/publicdomain/zero/1.0/
13 13
 
14 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 15
 */
... ...
@@ -218,7 +218,7 @@ for ($i = 0 ; $i < max($numforwards,10) ; $i++)
218 218
   <p>Weiterleiten an <input type=\"text\" id=\"forward_to_{$num}\" name=\"forward_to_{$num}\" value=\"{$account['forwards'][$i]['destination']}\" /></p>
219 219
   <p>Spam-Mails an diese Adresse ".html_select('spamfilter_action_'.$num, array("none" => 'nicht filtern', "tag" => 'markieren und zustellen', "delete" => 'nicht zustellen'), $account['forwards'][$i]['spamfilter'])."</p>
220 220
   <p class=\"warning\" style=\"display: none;\"></p>
221
-  <p>Bitte beachten Sie unsere Hinweise zu <a href=\"http://wiki.schokokeks.org/E-Mail/Weiterleitungen\">Weiterleitungen und Spamfiltern</a>.</p>
221
+  <p>Bitte beachten Sie unsere Hinweise zu <a href=\"https://wiki.schokokeks.org/E-Mail/Weiterleitungen\">Weiterleitungen und Spamfiltern</a>.</p>
222 222
   </div>\n";
223 223
 }
224 224
 $form .= '</div>';
Browse code

Update auf nicht mehr so neue Rechtschreibung

Bernd Wurst authored on22/07/2014 12:23:59
Showing1 changed files
... ...
@@ -147,7 +147,7 @@ $form .= "<h4>Deaktivierung</h4>";
147 147
 $form .= "<p><label for=\"ar_valid_until_date\">Keine Antworten mehr versenden ab dem </label>".
148 148
   "<input type=\"text\" value=\"$enddate\" id=\"ar_enddate\" name=\"ar_enddate\" /><br/>";
149 149
 if (!$accountlogin && ($id != 0)) {
150
-  $form .= "<small>(Automatische Antworten sind nur befristet erlaubt. Wenn Sie diese Adresse dauerhaft stillegen möchten, können Sie dies am Ende dieser Seite tun.)</small></p>";
150
+  $form .= "<small>(Automatische Antworten sind nur befristet erlaubt. Wenn Sie diese Adresse dauerhaft stilllegen möchten, können Sie dies am Ende dieser Seite tun.)</small></p>";
151 151
 }
152 152
 /*
153 153
 $form .= "<p><input type=\"radio\" name=\"ar_valid_until\" value=\"infinity\" id=\"ar_valid_until_infinity\"{$valid_until_infinity_checked} /> <label for=\"ar_valid_until_infinity\">Unbefristet</label><br />".
... ...
@@ -235,7 +235,7 @@ $form .= '<p><input id="submit" type="submit" value="Speichern" />&#160;&#160;&#
235 235
 output(html_form('vmail_edit_mailbox', 'save', 'action=edit'.($id != 0 ? '&id='.$id : ''), $form));
236 236
 
237 237
 if (! $accountlogin && ($id != 0)) {
238
-  output("<p>".internal_link('suspend', 'Diese Adresse stillegen (mit individuellem Fehlertext)', "account=".$id)."</p>");
238
+  output("<p>".internal_link('suspend', 'Diese Adresse stilllegen (mit individuellem Fehlertext)', "account=".$id)."</p>");
239 239
 }
240 240
 
241 241
 
Browse code

SMTP-seitige Autoresponder als "Stillegung" implementiert

Bernd Wurst authored on22/07/2014 11:47:11
Showing1 changed files
... ...
@@ -145,7 +145,10 @@ if (! $enddate) {
145 145
 }
146 146
 $form .= "<h4>Deaktivierung</h4>";
147 147
 $form .= "<p><label for=\"ar_valid_until_date\">Keine Antworten mehr versenden ab dem </label>".
148
-  "<input type=\"text\" value=\"$enddate\" id=\"ar_enddate\" name=\"ar_enddate\" /><br/><small>(Automatische Antworten sind nur befristet erlaubt. Benötigen Sie langfristig funktionierende automatische Antworten, sprechen Sie unsere Administratoren bitte an, dann suchen wir eine Lösung.)</small></p>";
148
+  "<input type=\"text\" value=\"$enddate\" id=\"ar_enddate\" name=\"ar_enddate\" /><br/>";
149
+if (!$accountlogin && ($id != 0)) {
150
+  $form .= "<small>(Automatische Antworten sind nur befristet erlaubt. Wenn Sie diese Adresse dauerhaft stillegen möchten, können Sie dies am Ende dieser Seite tun.)</small></p>";
151
+}
149 152
 /*
150 153
 $form .= "<p><input type=\"radio\" name=\"ar_valid_until\" value=\"infinity\" id=\"ar_valid_until_infinity\"{$valid_until_infinity_checked} /> <label for=\"ar_valid_until_infinity\">Unbefristet</label><br />".
151 154
   "<input type=\"radio\" name=\"ar_valid_until\" value=\"date\" id=\"ar_valid_until_date\"{$valid_until_date_checked} /> <label for=\"ar_valid_until_date\">Keine Antworten mehr versenden ab dem </label>".
... ...
@@ -231,5 +234,9 @@ $form .= '<p><input id="submit" type="submit" value="Speichern" />&#160;&#160;&#
231 234
 
232 235
 output(html_form('vmail_edit_mailbox', 'save', 'action=edit'.($id != 0 ? '&id='.$id : ''), $form));
233 236
 
237
+if (! $accountlogin && ($id != 0)) {
238
+  output("<p>".internal_link('suspend', 'Diese Adresse stillegen (mit individuellem Fehlertext)', "account=".$id)."</p>");
239
+}
240
+
234 241
 
235 242
 ?>
Browse code

Autoresponder nur noch befristet auf 60 Tage möglich

Bernd Wurst authored on15/05/2014 07:34:16
Showing1 changed files
... ...
@@ -144,10 +144,13 @@ if (! $enddate) {
144 144
   $enddate = date('Y-m-d', time() + 7*24*60*60);
145 145
 }
146 146
 $form .= "<h4>Deaktivierung</h4>";
147
+$form .= "<p><label for=\"ar_valid_until_date\">Keine Antworten mehr versenden ab dem </label>".
148
+  "<input type=\"text\" value=\"$enddate\" id=\"ar_enddate\" name=\"ar_enddate\" /><br/><small>(Automatische Antworten sind nur befristet erlaubt. Benötigen Sie langfristig funktionierende automatische Antworten, sprechen Sie unsere Administratoren bitte an, dann suchen wir eine Lösung.)</small></p>";
149
+/*
147 150
 $form .= "<p><input type=\"radio\" name=\"ar_valid_until\" value=\"infinity\" id=\"ar_valid_until_infinity\"{$valid_until_infinity_checked} /> <label for=\"ar_valid_until_infinity\">Unbefristet</label><br />".
148 151
   "<input type=\"radio\" name=\"ar_valid_until\" value=\"date\" id=\"ar_valid_until_date\"{$valid_until_date_checked} /> <label for=\"ar_valid_until_date\">Keine Antworten mehr versenden ab dem </label>".
149
-  "<input type=\"text\" value=\"$enddate\" id=\"ar_enddate\" name=\"ar_enddate\" /></p>";
150
-
152
+  "<input type=\"text\" value=\"$enddate\" id=\"ar_enddate\" name=\"ar_enddate\" /><br/><small>(Automatische Antworten sind nur befristet erlaubt. Benötigen Sie langfristig funktionierende automatische Antworten, sprechen Sie unsere Administratoren bitte an, dann suchen wir eine Lösung.)</small></p>";
153
+*/
151 154
 
152 155
 $subject = filter_input_general($ar['subject']);
153 156
 if ($subject == NULL)
... ...
@@ -168,8 +171,9 @@ if (! $quote)
168 171
   $quote = 'none';
169 172
 $form .= "<p><label for=\"ar_quote\">Originalnachricht des Absenders </label>".
170 173
   html_select('ar_quote', array("none" => 'nicht in Antwort einschließen', 
171
-                                "inline" => 'zitieren (max. 50 Zeilen)', 
172
-                                "attach" => 'vollständig als Anhang beifügen'), $quote)."</p>";
174
+                                "teaser" => 'anreißen (erste 10 Zeilen)', 
175
+                                "inline" => 'zitieren (max. 50 Zeilen)'), $quote)."</p>";
176
+                                //"attach" => 'vollständig als Anhang beifügen'), $quote)."</p>";
173 177
 
174 178
 
175 179
 $ar_from_default_checked = ($ar['fromname'] == NULL) ? ' checked="checked"' : '';
Browse code

Lizenzinfos in eigenes Modul ausgelagert und Copyright auf 2014 angepasst

Bernd Wurst authored on08/02/2014 05:45:07
Showing1 changed files
... ...
@@ -2,7 +2,7 @@
2 2
 /*
3 3
 This file belongs to the Webinterface of schokokeks.org Hosting
4 4
 
5
-Written 2008-2013 by schokokeks.org Hosting, namely
5
+Written 2008-2014 by schokokeks.org Hosting, namely
6 6
   Bernd Wurst <bernd@schokokeks.org>
7 7
   Hanno Böck <hanno@schokokeks.org>
8 8
 
Browse code

Umgestellt auf JQueryUI-Datepicker

Bernd Wurst authored on08/02/2014 04:09:28
Showing1 changed files
... ...
@@ -134,8 +134,8 @@ if (! $startdate || $startdate <= date('Y-m-d')) {
134 134
   $startdate = date('Y-m-d', time() + 1*24*60*60);
135 135
 }
136 136
 $form .= "<p><input type=\"radio\" name=\"ar_valid_from\" value=\"now\" id=\"ar_valid_from_now\"{$valid_from_now_checked} /> <label for=\"ar_valid_from_now\">Ab sofort</label><br />".
137
-  "<input type=\"radio\" name=\"ar_valid_from\" value=\"future\" id=\"ar_valid_from_future\"{$valid_from_future_checked} /> <label for=\"ar_valid_from_future\">Erst ab dem </label>".
138
-  html_datepicker("ar_valid_from", strtotime($startdate))."</p>";
137
+  "<input type=\"radio\" name=\"ar_valid_from\" value=\"date\" id=\"ar_valid_from_date\"{$valid_from_future_checked} /> <label for=\"ar_valid_from_date\">Erst ab dem </label>".
138
+  "<input type=\"text\" value=\"$startdate\" id=\"ar_startdate\" name=\"ar_startdate\" /></p>";
139 139
 
140 140
 $valid_until_infinity_checked = ($ar['valid_until'] == NULL) ? ' checked="checked"' : '';
141 141
 $valid_until_date_checked = ($ar['valid_until'] != NULL) ? ' checked="checked"' : '';
... ...
@@ -146,7 +146,7 @@ if (! $enddate) {
146 146
 $form .= "<h4>Deaktivierung</h4>";
147 147
 $form .= "<p><input type=\"radio\" name=\"ar_valid_until\" value=\"infinity\" id=\"ar_valid_until_infinity\"{$valid_until_infinity_checked} /> <label for=\"ar_valid_until_infinity\">Unbefristet</label><br />".
148 148
   "<input type=\"radio\" name=\"ar_valid_until\" value=\"date\" id=\"ar_valid_until_date\"{$valid_until_date_checked} /> <label for=\"ar_valid_until_date\">Keine Antworten mehr versenden ab dem </label>".
149
-  html_datepicker("ar_valid_until", strtotime($enddate))."</p>";
149
+  "<input type=\"text\" value=\"$enddate\" id=\"ar_enddate\" name=\"ar_enddate\" /></p>";
150 150
 
151 151
 
152 152
 $subject = filter_input_general($ar['subject']);
Browse code

E-Mail-Modul auf JQuery umgestellt

Bernd Wurst authored on08/02/2014 02:30:24
Showing1 changed files
... ...
@@ -20,6 +20,9 @@ require_once('inc/icons.php');
20 20
 
21 21
 require_once('vmail.php');
22 22
 
23
+require_once('inc/jquery.php');
24
+javascript();
25
+
23 26
 $section = 'email_vmail';
24 27
 require_role(array(ROLE_SYSTEMUSER, ROLE_VMAIL_ACCOUNT));
25 28
 
... ...
@@ -57,112 +60,6 @@ $is_forward = (count($account['forwards']) > 0);
57 60
 $is_mailbox = ($account['password'] != NULL  ||  $id == 0);
58 61
 $numforwards = max(count($account['forwards']), 1);
59 62
 
60
-output("<script type=\"text/javascript\">
61
-  
62
-  var numForwards = {$numforwards};
63
-  var forwardsCounter = {$numforwards};
64
-
65
-  function moreForward()
66
-  {
67
-    numForwards += 1;
68
-    forwardsCounter += 1;
69
-
70
-    if ( document.getElementById('vmail_forward_' + forwardsCounter) ) {
71
-      document.getElementById('vmail_forward_' + forwardsCounter).style.display = ''
72
-    }
73
-
74
-    P1 = document.createElement('p');
75
-
76
-    TXT1 = document.createTextNode('Weiterleiten an ');
77
-
78
-    INPUT = document.createElement('input');
79
-    INPUT.type = 'text';
80
-    INPUT.name = 'forward_to_' + forwardsCounter;
81
-    INPUT.id = 'forward_to_' + forwardsCounter;
82
-    INPUT.value = '';
83
-
84
-    P1.appendChild(TXT1);
85
-    P1.appendChild(INPUT);
86
-
87
-    P2 = document.createElement('p');
88
-
89
-    TXT2 = document.createTextNode('Spam-Mails an diese Adresse ');
90
-
91
-    SELECT = document.createElement('select');
92
-    SELECT.id = 'spamfilter_action_' + forwardsCounter;
93
-    SELECT.name = 'spamfilter_action_' + forwardsCounter;
94
-
95
-    SELECT.options[0] = new Option('nicht filtern', 'none', 0);
96
-    SELECT.options[1] = new Option('markieren und zustellen', 'tag', 0);
97
-    SELECT.options[2] = new Option('nicht zustellen', 'delete', 1);
98
-
99
-    P2.appendChild(TXT2);
100
-    P2.appendChild(SELECT);
101
-
102
-    DIV = document.createElement('div');
103
-    DIV.className = 'vmail-forward';
104
-    DIV.id = 'vmail_forward_' + forwardsCounter;
105
-
106
-    DELETE = document.getElementById('vmail_forward_1').getElementsByTagName('div')[0].cloneNode(true);
107
-
108
-    DIV.appendChild(DELETE);
109
-    DIV.appendChild(P1);
110
-    DIV.appendChild(P2);
111
-
112
-    parent = document.getElementById('forward_entries');
113
-    parent.appendChild(DIV);
114
-  }
115
-
116
-  function removeForward(elem) 
117
-  {
118
-    div_id = elem.parentNode.parentNode.id;
119
-    div = document.getElementById(div_id);
120
-    input = div.getElementsByTagName('input')[0];
121
-    input.value = '';
122
-    select = div.getElementsByTagName('select')[0];
123
-    select.options[0].selected = 'selected';
124
-    if (numForwards >= 1) {
125
-      numForwards -= 1;
126
-    }
127
-    if (numForwards >= 1) {
128
-      div.style.display = 'none';
129
-      document.getElementById('forward_entries').removeChild(div);
130
-    }
131
-  }
132
-
133
-  function toggleDisplay(checkbox_id, item_id) 
134
-  {
135
-    if (document.getElementById(checkbox_id).checked == true) {
136
-      document.getElementById(item_id).style.display = 'block';
137
-    } else {
138
-      document.getElementById(item_id).style.display = 'none';
139
-    }
140
-  }
141
-
142
-  function clearPassword() {
143
-    var input = document.getElementById('password');
144
-    if (input.value == '**********') {
145
-      input.value = '';
146
-    }
147
-    input.style.color = '#000';
148
-    /* FIXME: Keine Ahnung, warum das notwendig ist. Mit dem und dem Aufruf in 'onclick=' tut es was es soll.  */
149
-    input.focus();
150
-  }
151
-
152
-  function refillPassword() {
153
-    var input = document.getElementById('password');
154
-    if (input.value == '') {
155
-      input.value = input.defaultValue;
156
-    }
157
-    if (input.value == '**********') {
158
-      input.style.color = '#aaa';
159
-    }
160
-  }
161
-
162
-
163
-</script>
164
-");
165
-
166 63
 $form = '';
167 64
 
168 65
 if ($accountlogin) {
... ...
@@ -195,9 +92,9 @@ if ($accountlogin) {
195 92
   } 
196 93
   
197 94
   $form .= "
198
-    <p><input onchange=\"toggleDisplay('mailbox', 'mailbox_options')\" type=\"checkbox\" id=\"mailbox\" name=\"mailbox\" value=\"yes\" ".($is_mailbox ? 'checked="checked" ' : '')." /><label for=\"mailbox\">&#160;<strong>In Mailbox speichern</strong></label></p>
199
-    <div style=\"margin-left: 2em;".($is_mailbox ? '' : ' display: none;')."\" id=\"mailbox_options\">
200
-    <p>Passwort für Abruf:&#160;<input onclick=\"clearPassword()\" onfocus=\"clearPassword()\" onblur=\"refillPassword()\" style=\"color: #aaa;\" type=\"password\" id=\"password\" name=\"password\" value=\"{$password_value}\" />{$password_message}</p>";
95
+    <p><input class=\"option_group\" type=\"checkbox\" id=\"mailbox\" name=\"mailbox\" value=\"yes\" ".($is_mailbox ? 'checked="checked" ' : '')." /><label for=\"mailbox\">&#160;<strong>In Mailbox speichern</strong></label></p>
96
+    <div style=\"margin-left: 2em;\" id=\"mailbox_config\" class=\"option_group\">
97
+    <p>Passwort für Abruf:&#160;<input style=\"color: #aaa;\" type=\"password\" id=\"password\" name=\"password\" value=\"{$password_value}\" />{$password_message}</p>";
201 98
 
202 99
   $form.= "<p class=\"spamfilter_options\">Unerwünschte E-Mails (Spam, Viren) in diesem Postfach ".html_select('spamfilter_action', array("none" => 'nicht filtern', "folder" => 'in Unterordner »Spam« ablegen', "tag" => 'markieren und zustellen', "delete" => 'nicht zustellen (löschen)'), $account['spamfilter'])."</p>";
203 100
 
... ...
@@ -216,9 +113,9 @@ if ($accountlogin) {
216 113
 
217 114
 
218 115
 
219
-$form .= "<p><input onchange=\"toggleDisplay('autoresponder', 'autoresponder_config')\" type=\"checkbox\" id=\"autoresponder\" name=\"autoresponder\" value=\"yes\" ".($is_autoresponder ? 'checked="checked" ' : '')." /><label for=\"autoresponder\">&#160;<strong>Automatische Antwort versenden</strong></label></p>";
116
+$form .= "<p><input class=\"option_group\" type=\"checkbox\" id=\"autoresponder\" name=\"autoresponder\" value=\"yes\" ".($is_autoresponder ? 'checked="checked" ' : '')." /><label for=\"autoresponder\">&#160;<strong>Automatische Antwort versenden</strong></label></p>";
220 117
 
221
-$form .= "<div style=\"margin-left: 2em;".($is_autoresponder ? '' : ' display: none;')."\" id=\"autoresponder_config\">";
118
+$form .= "<div style=\"margin-left: 2em;\" id=\"autoresponder_config\" class=\"option_group\">";
222 119
 
223 120
 $ar = $account['autoresponder'];
224 121
 if (! $ar) {
... ...
@@ -292,36 +189,41 @@ $form .= '</div>';
292 189
 
293 190
 
294 191
 
295
-$form .= "<p><input onchange=\"toggleDisplay('forward', 'forward_config')\" type=\"checkbox\" id=\"forward\" name=\"forward\" value=\"yes\" ".($is_forward ? 'checked="checked" ' : '')." /><label for=\"forward\">&#160;<strong>Weiterleitung an andere E-Mail-Adressen</strong></label></p>";
192
+$form .= "<p><input class=\"option_group\" type=\"checkbox\" id=\"forward\" name=\"forward\" value=\"yes\" ".($is_forward ? 'checked="checked" ' : '')." /><label for=\"forward\">&#160;<strong>Weiterleitung an andere E-Mail-Adressen</strong></label></p>";
296 193
 
297 194
 
298
-$form .= "<div style=\"margin-left: 2em;".($is_forward ? '' : ' display: none;')."\" id=\"forward_config\">";
195
+$form .= "<div style=\"margin-left: 2em;\" id=\"forward_config\" class=\"option_group\">";
299 196
 
300 197
 $form .= '<div id="forward_entries">
301 198
 ';
302 199
 if (! isset($account['forwards'][0])) {
303 200
   $account['forwards'][0] = array('destination' => '', 'spamfilter' => 'delete');
304 201
 }
305
-for ($i = 0 ; $i < $numforwards ; $i++)
202
+while (count($account['forwards']) < 10) {
203
+  // Dummy-Einträge für Leute ohne JavaScript
204
+  $account['forwards'][] = array('destination' => '', 'spamfilter' => 'delete');
205
+}
206
+for ($i = 0 ; $i < max($numforwards,10) ; $i++)
306 207
 {
307 208
   $num = $i+1;
308 209
   $form .= "<div class=\"vmail-forward\" id=\"vmail_forward_{$num}\">
309
-  <div style=\"float: right;\"><a href=\"#\" onclick=\"removeForward(this);\">".icon_delete("Diese Weiterleitung entfernen")."</a></div>
210
+  <div style=\"float: right;\" class=\"delete_forward\">".icon_delete("Diese Weiterleitung entfernen")."</div>
310 211
   <p>Weiterleiten an <input type=\"text\" id=\"forward_to_{$num}\" name=\"forward_to_{$num}\" value=\"{$account['forwards'][$i]['destination']}\" /></p>
311 212
   <p>Spam-Mails an diese Adresse ".html_select('spamfilter_action_'.$num, array("none" => 'nicht filtern', "tag" => 'markieren und zustellen', "delete" => 'nicht zustellen'), $account['forwards'][$i]['spamfilter'])."</p>
213
+  <p class=\"warning\" style=\"display: none;\"></p>
312 214
   <p>Bitte beachten Sie unsere Hinweise zu <a href=\"http://wiki.schokokeks.org/E-Mail/Weiterleitungen\">Weiterleitungen und Spamfiltern</a>.</p>
313 215
   </div>\n";
314 216
 }
315 217
 $form .= '</div>';
316 218
 
317
-$form .= '<p><a href="#" onclick="moreForward();">'.icon_add().' Weiteren Empfänger hinzufügen</a></p>
219
+$form .= '<p><a href="#" id="more_forwards">'.icon_add().' Weiteren Empfänger hinzufügen</a></p>
318 220
 </div>';
319 221
 
320 222
 $target = 'vmail';
321 223
 if ($accountlogin) {
322 224
   $target = '../index/index';
323 225
 }
324
-$form .= '<p><input type="submit" value="Speichern" />&#160;&#160;&#160;&#160;'.internal_link($target, 'Abbrechen').'</p>';
226
+$form .= '<p><input id="submit" type="submit" value="Speichern" />&#160;&#160;&#160;&#160;'.internal_link($target, 'Abbrechen').'</p>';
325 227
 
326 228
 output(html_form('vmail_edit_mailbox', 'save', 'action=edit'.($id != 0 ? '&id='.$id : ''), $form));
327 229
 
Browse code

Default für Weiterleitungen auf "spam nicht zustellen" und hinweis auf Wiki

Bernd Wurst authored on02/02/2014 17:55:18
Showing1 changed files
... ...
@@ -92,9 +92,9 @@ output("<script type=\"text/javascript\">
92 92
     SELECT.id = 'spamfilter_action_' + forwardsCounter;
93 93
     SELECT.name = 'spamfilter_action_' + forwardsCounter;
94 94
 
95
-    SELECT.options[0] = new Option('nicht filtern', 'none', 1);
95
+    SELECT.options[0] = new Option('nicht filtern', 'none', 0);
96 96
     SELECT.options[1] = new Option('markieren und zustellen', 'tag', 0);
97
-    SELECT.options[2] = new Option('nicht zustellen', 'delete', 0);
97
+    SELECT.options[2] = new Option('nicht zustellen', 'delete', 1);
98 98
 
99 99
     P2.appendChild(TXT2);
100 100
     P2.appendChild(SELECT);
... ...
@@ -300,7 +300,7 @@ $form .= "<div style=\"margin-left: 2em;".($is_forward ? '' : ' display: none;')
300 300
 $form .= '<div id="forward_entries">
301 301
 ';
302 302
 if (! isset($account['forwards'][0])) {
303
-  $account['forwards'][0] = array('destination' => '', 'spamfilter' => 'none');
303
+  $account['forwards'][0] = array('destination' => '', 'spamfilter' => 'delete');
304 304
 }
305 305
 for ($i = 0 ; $i < $numforwards ; $i++)
306 306
 {
... ...
@@ -309,6 +309,7 @@ for ($i = 0 ; $i < $numforwards ; $i++)
309 309
   <div style=\"float: right;\"><a href=\"#\" onclick=\"removeForward(this);\">".icon_delete("Diese Weiterleitung entfernen")."</a></div>
310 310
   <p>Weiterleiten an <input type=\"text\" id=\"forward_to_{$num}\" name=\"forward_to_{$num}\" value=\"{$account['forwards'][$i]['destination']}\" /></p>
311 311
   <p>Spam-Mails an diese Adresse ".html_select('spamfilter_action_'.$num, array("none" => 'nicht filtern', "tag" => 'markieren und zustellen', "delete" => 'nicht zustellen'), $account['forwards'][$i]['spamfilter'])."</p>
312
+  <p>Bitte beachten Sie unsere Hinweise zu <a href=\"http://wiki.schokokeks.org/E-Mail/Weiterleitungen\">Weiterleitungen und Spamfiltern</a>.</p>
312 313
   </div>\n";
313 314
 }
314 315
 $form .= '</div>';
Browse code

Fehler behoben, durch den der Autoresponder evtl. versehentlich wieder aktiviert wird.

Bernd Wurst authored on17/12/2013 14:09:23
Showing1 changed files
... ...
@@ -52,7 +52,7 @@ else {
52 52
 }
53 53
 
54 54
 
55
-$is_autoresponder = is_array($account['autoresponder']) && $account['autoresponder']['valid_from'] != NULL;
55
+$is_autoresponder = is_array($account['autoresponder']) && $account['autoresponder']['valid_from'] != NULL && ($account['autoresponder']['valid_until'] > date('Y-m-d') || $account['autoresponder']['valid_until'] == NULL);
56 56
 $is_forward = (count($account['forwards']) > 0);
57 57
 $is_mailbox = ($account['password'] != NULL  ||  $id == 0);
58 58
 $numforwards = max(count($account['forwards']), 1);
Browse code

Daten für Autoresponder bei der Ausgabe Filtern, nicht bei der Eingabe

schokokeks.org web services authored on14/09/2013 18:18:01
Showing1 changed files
... ...
@@ -252,7 +252,7 @@ $form .= "<p><input type=\"radio\" name=\"ar_valid_until\" value=\"infinity\" id
252 252
   html_datepicker("ar_valid_until", strtotime($enddate))."</p>";
253 253
 
254 254
 
255
-$subject = $ar['subject'];
255
+$subject = filter_input_general($ar['subject']);
256 256
 if ($subject == NULL)
257 257
   $subject = '';
258 258
 $ar_subject_default_checked = ($subject == NULL) ? ' checked="checked"' : '';
... ...
@@ -263,7 +263,7 @@ $form .= "<h4>Betreffzeile der automatischen Antwort</h4>".
263 263
   "<input type=\"radio\" name=\"ar_subject\" value=\"custom\" id=\"ar_subject_custom\"{$ar_subject_custom_checked} /> ".
264 264
   "<label for=\"ar_subject_custom\">Anderer Betreff:</label> <input type=\"text\" name=\"ar_subject_value\" id=\"ar_subject_value\" value=\"{$subject}\"/></p>";
265 265
 
266
-$message = $ar['message'];
266
+$message = filter_input_general($ar['message']);
267 267
 $form .= "<h4>Inhalt der automatischen Antwort</h4>".
268 268
   "<p><textarea cols=\"80\" rows=\"10\" name=\"ar_message\" id=\"ar_message\">".$ar['message']."</textarea></p>";
269 269
 $quote = $ar['quote'];
... ...
@@ -277,7 +277,7 @@ $form .= "<p><label for=\"ar_quote\">Originalnachricht des Absenders </label>".
277 277
 
278 278
 $ar_from_default_checked = ($ar['fromname'] == NULL) ? ' checked="checked"' : '';
279 279
 $ar_from_custom_checked = ($ar['fromname'] != NULL) ? ' checked="checked"' : '';
280
-$fromname = $ar['fromname'];
280
+$fromname = filter_input_general($ar['fromname']);
281 281
 $form .= "<h4>Absender der automatischen Antwort</h4>".
282 282
   "<p><input type=\"radio\" name=\"ar_from\" value=\"default\" id=\"ar_from_default\"{$ar_from_default_checked} /> <label for=\"ar_from_default\">Nur E-Mail-Adresse</label><br />".
283 283
   "<input type=\"radio\" name=\"ar_from\" value=\"custom\" id=\"ar_from_custom\"{$ar_from_custom_checked} /> <label for=\"ar_from_custom\">Mit Name: </label> ".
Browse code

Zeige User-Infos beim Login eines Mailaccount an

Bernd Wurst authored on12/03/2013 08:41:29
Showing1 changed files
... ...
@@ -316,7 +316,11 @@ $form .= '</div>';
316 316
 $form .= '<p><a href="#" onclick="moreForward();">'.icon_add().' Weiteren Empfänger hinzufügen</a></p>
317 317
 </div>';
318 318
 
319
-$form .= '<p><input type="submit" value="Speichern" />&#160;&#160;&#160;&#160;'.internal_link('vmail', 'Abbrechen').'</p>';
319
+$target = 'vmail';
320
+if ($accountlogin) {
321
+  $target = '../index/index';
322
+}
323
+$form .= '<p><input type="submit" value="Speichern" />&#160;&#160;&#160;&#160;'.internal_link($target, 'Abbrechen').'</p>';
320 324
 
321 325
 output(html_form('vmail_edit_mailbox', 'save', 'action=edit'.($id != 0 ? '&id='.$id : ''), $form));
322 326
 
Browse code

Bugfix: Adresse kann nicht mehr nachträglich in ein Postfach umgewandelt werden

Bernd Wurst authored on27/02/2013 15:52:00
Showing1 changed files
... ...
@@ -145,6 +145,8 @@ output("<script type=\"text/javascript\">
145 145
       input.value = '';
146 146
     }
147 147
     input.style.color = '#000';
148
+    /* FIXME: Keine Ahnung, warum das notwendig ist. Mit dem und dem Aufruf in 'onclick=' tut es was es soll.  */
149
+    input.focus();
148 150
   }
149 151
 
150 152
   function refillPassword() {
... ...
@@ -195,7 +197,7 @@ if ($accountlogin) {
195 197
   $form .= "
196 198
     <p><input onchange=\"toggleDisplay('mailbox', 'mailbox_options')\" type=\"checkbox\" id=\"mailbox\" name=\"mailbox\" value=\"yes\" ".($is_mailbox ? 'checked="checked" ' : '')." /><label for=\"mailbox\">&#160;<strong>In Mailbox speichern</strong></label></p>
197 199
     <div style=\"margin-left: 2em;".($is_mailbox ? '' : ' display: none;')."\" id=\"mailbox_options\">
198
-    <p>Passwort für Abruf:&#160;<input onfocus=\"clearPassword()\" onblur=\"refillPassword()\" style=\"color: #aaa;\" type=\"password\" id=\"password\" name=\"password\" value=\"{$password_value}\" />{$password_message}</p>";
200
+    <p>Passwort für Abruf:&#160;<input onclick=\"clearPassword()\" onfocus=\"clearPassword()\" onblur=\"refillPassword()\" style=\"color: #aaa;\" type=\"password\" id=\"password\" name=\"password\" value=\"{$password_value}\" />{$password_message}</p>";
199 201
 
200 202
   $form.= "<p class=\"spamfilter_options\">Unerwünschte E-Mails (Spam, Viren) in diesem Postfach ".html_select('spamfilter_action', array("none" => 'nicht filtern', "folder" => 'in Unterordner »Spam« ablegen', "tag" => 'markieren und zustellen', "delete" => 'nicht zustellen (löschen)'), $account['spamfilter'])."</p>";
201 203
 
Browse code

Passwort-Platzhalter per Javascript entfernen

Bernd Wurst authored on27/02/2013 06:59:26
Showing1 changed files
... ...
@@ -139,6 +139,25 @@ output("<script type=\"text/javascript\">
139 139
     }
140 140
   }
141 141
 
142
+  function clearPassword() {
143
+    var input = document.getElementById('password');
144
+    if (input.value == '**********') {
145
+      input.value = '';
146
+    }
147
+    input.style.color = '#000';
148
+  }
149
+
150
+  function refillPassword() {
151
+    var input = document.getElementById('password');
152
+    if (input.value == '') {
153
+      input.value = input.defaultValue;
154
+    }
155
+    if (input.value == '**********') {
156
+      input.style.color = '#aaa';
157
+    }
158
+  }
159
+
160
+
142 161
 </script>
143 162
 ");
144 163
 
... ...
@@ -176,7 +195,7 @@ if ($accountlogin) {
176 195
   $form .= "
177 196
     <p><input onchange=\"toggleDisplay('mailbox', 'mailbox_options')\" type=\"checkbox\" id=\"mailbox\" name=\"mailbox\" value=\"yes\" ".($is_mailbox ? 'checked="checked" ' : '')." /><label for=\"mailbox\">&#160;<strong>In Mailbox speichern</strong></label></p>
178 197
     <div style=\"margin-left: 2em;".($is_mailbox ? '' : ' display: none;')."\" id=\"mailbox_options\">
179
-    <p>Passwort für Abruf:&#160;<input type=\"password\" id=\"password\" name=\"password\" value=\"{$password_value}\" />{$password_message}</p>";
198
+    <p>Passwort für Abruf:&#160;<input onfocus=\"clearPassword()\" onblur=\"refillPassword()\" style=\"color: #aaa;\" type=\"password\" id=\"password\" name=\"password\" value=\"{$password_value}\" />{$password_message}</p>";
180 199
 
181 200
   $form.= "<p class=\"spamfilter_options\">Unerwünschte E-Mails (Spam, Viren) in diesem Postfach ".html_select('spamfilter_action', array("none" => 'nicht filtern', "folder" => 'in Unterordner »Spam« ablegen', "tag" => 'markieren und zustellen', "delete" => 'nicht zustellen (löschen)'), $account['spamfilter'])."</p>";
182 201
 
Browse code

Alle VMail-Domain in der Übersicht anzeigen und "Neue Adresse" Link unter jeder Domain anzeigen

Bernd Wurst authored on25/02/2013 09:33:28
Showing1 changed files
... ...
@@ -147,19 +147,23 @@ $form = '';
147 147
 if ($accountlogin) {
148 148
   $form.= "<p class=\"spamfilter_options\">Unerwünschte E-Mails (Spam, Viren) in diesem Postfach ".html_select('spamfilter_action', array("none" => 'nicht filtern', "folder" => 'in Unterordner »Spam« ablegen', "tag" => 'markieren und zustellen', "delete" => 'nicht zustellen (löschen)'), $account['spamfilter'])."</p>";
149 149
 } else {
150
-  if ($id != 0 && $is_mailbox) {
150
+  if ($id != 0) {
151 151
     $domainlist = get_vmail_domains();
152 152
     $domain = NULL;
153 153
     foreach ($domainlist as $dom) {
154
-      if ($dom->id == $account['domain']) {
155
-        $domain = $dom->domainname;
154
+      if ($dom['id'] == $account['domain']) {
155
+        $domain = $dom['domainname'];
156 156
       }
157 157
     }
158 158
     $form .= "
159 159
     <p><strong style=\"font-size: 1.5em;\">{$account['local']}@{$domain}</strong></p>";
160 160
   } else {
161
+    $domain = NULL;
162
+    if (isset($_GET['domain'])) {
163
+      $domain = (int) $_GET['domain'];
164
+    }
161 165
     $form .= "
162
-    <p><strong>E-Mail-Adresse:</strong>&#160;<input type=\"text\" name=\"local\" id=\"local\" size=\"10\" value=\"{$account['local']}\" /><strong style=\"font-size: 1.5em;\">&#160;@&#160;</strong>".domainselect($account['domain'])."</p>";
166
+    <p><strong>E-Mail-Adresse:</strong>&#160;<input type=\"text\" name=\"local\" id=\"local\" size=\"10\" value=\"{$account['local']}\" /><strong style=\"font-size: 1.5em;\">&#160;@&#160;</strong>".domainselect($domain)."</p>";
163 167
   }
164 168
   $password_message = '';
165 169
   $password_value = '';
Browse code

Updated copyright notice (2012 => 2013)

Bernd Wurst authored on19/01/2013 10:49:50
Showing1 changed files
... ...
@@ -2,7 +2,7 @@
2 2
 /*
3 3
 This file belongs to the Webinterface of schokokeks.org Hosting
4 4
 
5
-Written 2008-2012 by schokokeks.org Hosting, namely
5
+Written 2008-2013 by schokokeks.org Hosting, namely
6 6
   Bernd Wurst <bernd@schokokeks.org>
7 7
   Hanno Böck <hanno@schokokeks.org>
8 8
 
Browse code

Erlaube aber das Setzen der E-Mail-Adresse bei neuen Postfächern. :(

Bernd Wurst authored on24/07/2012 16:45:40
Showing1 changed files
... ...
@@ -147,7 +147,7 @@ $form = '';
147 147
 if ($accountlogin) {
148 148
   $form.= "<p class=\"spamfilter_options\">Unerwünschte E-Mails (Spam, Viren) in diesem Postfach ".html_select('spamfilter_action', array("none" => 'nicht filtern', "folder" => 'in Unterordner »Spam« ablegen', "tag" => 'markieren und zustellen', "delete" => 'nicht zustellen (löschen)'), $account['spamfilter'])."</p>";
149 149
 } else {
150
-  if ($is_mailbox) {
150
+  if ($id != 0 && $is_mailbox) {
151 151
     $domainlist = get_vmail_domains();
152 152
     $domain = NULL;
153 153
     foreach ($domainlist as $dom) {
Browse code

Erlaube nicht mehr das Ändern der E-Mail-Adresse wenn ein Postfach aktiv ist.

Bernd Wurst authored on24/07/2012 16:39:18
Showing1 changed files
... ...
@@ -147,9 +147,20 @@ $form = '';
147 147
 if ($accountlogin) {
148 148
   $form.= "<p class=\"spamfilter_options\">Unerwünschte E-Mails (Spam, Viren) in diesem Postfach ".html_select('spamfilter_action', array("none" => 'nicht filtern', "folder" => 'in Unterordner »Spam« ablegen', "tag" => 'markieren und zustellen', "delete" => 'nicht zustellen (löschen)'), $account['spamfilter'])."</p>";
149 149
 } else {
150
-  $form .= "
150
+  if ($is_mailbox) {
151
+    $domainlist = get_vmail_domains();
152
+    $domain = NULL;
153
+    foreach ($domainlist as $dom) {
154
+      if ($dom->id == $account['domain']) {
155
+        $domain = $dom->domainname;
156
+      }
157
+    }
158
+    $form .= "
159
+    <p><strong style=\"font-size: 1.5em;\">{$account['local']}@{$domain}</strong></p>";
160
+  } else {
161
+    $form .= "
151 162
     <p><strong>E-Mail-Adresse:</strong>&#160;<input type=\"text\" name=\"local\" id=\"local\" size=\"10\" value=\"{$account['local']}\" /><strong style=\"font-size: 1.5em;\">&#160;@&#160;</strong>".domainselect($account['domain'])."</p>";
152
-
163
+  }
153 164
   $password_message = '';
154 165
   $password_value = '';
155 166
   if ($is_mailbox and ($account['password'] != ''))
Browse code

Added license tags for CC0, README and COPYING

Bernd Wurst authored on11/03/2012 15:40:04
Showing1 changed files
... ...
@@ -1,4 +1,18 @@
1 1
 <?php
2
+/*
3
+This file belongs to the Webinterface of schokokeks.org Hosting
4
+
5
+Written 2008-2012 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
+*/
2 16
 
3 17
 require_once('inc/debug.php');
4 18
 require_once('inc/security.php');
Browse code

Index-Blöcke werden jetzt vond en Modulen selbst bereitgestellt

git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@2223 87cf0b9e-d624-0410-a070-f6ee81989793

bernd authored on08/03/2012 14:33:17
Showing1 changed files
... ...
@@ -17,6 +17,7 @@ if ($id != 0)
17 17
 
18 18
 $accountlogin = false;
19 19
 if ($_SESSION['role'] == ROLE_VMAIL_ACCOUNT) {
20
+  $section = 'email_edit';
20 21
   $id = get_vmail_id_by_emailaddr($_SESSION['mailaccount']);
21 22
   $account = get_account_details($id, false);
22 23
   $accountlogin = true;
Browse code

JavaScript-Erweiterungen: User kann Weiterleitungen direkt löschen

git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@2218 87cf0b9e-d624-0410-a070-f6ee81989793

bernd authored on05/03/2012 14:58:37
Showing1 changed files
... ...
@@ -2,6 +2,7 @@
2 2
 
3 3
 require_once('inc/debug.php');
4 4
 require_once('inc/security.php');
5
+require_once('inc/icons.php');
5 6
 
6 7
 require_once('vmail.php');
7 8
 
... ...
@@ -44,10 +45,16 @@ $numforwards = max(count($account['forwards']), 1);
44 45
 output("<script type=\"text/javascript\">
45 46
   
46 47
   var numForwards = {$numforwards};
48
+  var forwardsCounter = {$numforwards};
47 49
 
48 50
   function moreForward()
49 51
   {
50 52
     numForwards += 1;
53
+    forwardsCounter += 1;
54
+
55
+    if ( document.getElementById('vmail_forward_' + forwardsCounter) ) {
56
+      document.getElementById('vmail_forward_' + forwardsCounter).style.display = ''
57
+    }
51 58
 
52 59
     P1 = document.createElement('p');
53 60
 
... ...
@@ -55,7 +62,8 @@ output("<script type=\"text/javascript\">
55 62
 
56 63
     INPUT = document.createElement('input');
57 64
     INPUT.type = 'text';
58
-    INPUT.name = 'forward_to_' + numForwards;
65
+    INPUT.name = 'forward_to_' + forwardsCounter;
66
+    INPUT.id = 'forward_to_' + forwardsCounter;
59 67
     INPUT.value = '';
60 68
 
61 69
     P1.appendChild(TXT1);
... ...
@@ -66,7 +74,8 @@ output("<script type=\"text/javascript\">
66 74
     TXT2 = document.createTextNode('Spam-Mails an diese Adresse ');
67 75
 
68 76
     SELECT = document.createElement('select');
69
-    SELECT.name = 'spamfilter_action_' + numForwards;
77
+    SELECT.id = 'spamfilter_action_' + forwardsCounter;
78
+    SELECT.name = 'spamfilter_action_' + forwardsCounter;
70 79
 
71 80
     SELECT.options[0] = new Option('nicht filtern', 'none', 1);
72 81
     SELECT.options[1] = new Option('markieren und zustellen', 'tag', 0);
... ...
@@ -77,14 +86,35 @@ output("<script type=\"text/javascript\">
77 86
 
78 87
     DIV = document.createElement('div');
79 88
     DIV.className = 'vmail-forward';
89
+    DIV.id = 'vmail_forward_' + forwardsCounter;
90
+
91
+    DELETE = document.getElementById('vmail_forward_1').getElementsByTagName('div')[0].cloneNode(true);
80 92
 
93
+    DIV.appendChild(DELETE);
81 94
     DIV.appendChild(P1);
82 95
     DIV.appendChild(P2);
83 96
 
84
-    parent = document.getElementById('forward_config');
97
+    parent = document.getElementById('forward_entries');
85 98
     parent.appendChild(DIV);
86 99
   }
87 100
 
101
+  function removeForward(elem) 
102
+  {
103
+    div_id = elem.parentNode.parentNode.id;
104
+    div = document.getElementById(div_id);
105
+    input = div.getElementsByTagName('input')[0];
106
+    input.value = '';
107
+    select = div.getElementsByTagName('select')[0];
108
+    select.options[0].selected = 'selected';
109
+    if (numForwards >= 1) {
110
+      numForwards -= 1;
111
+    }
112
+    if (numForwards >= 1) {
113
+      div.style.display = 'none';
114
+      document.getElementById('forward_entries').removeChild(div);
115
+    }
116
+  }
117
+
88 118
   function toggleDisplay(checkbox_id, item_id) 
89 119
   {
90 120
     if (document.getElementById(checkbox_id).checked == true) {
... ...
@@ -216,26 +246,23 @@ $form .= "<p><input onchange=\"toggleDisplay('forward', 'forward_config')\" type
216 246
 
217 247
 $form .= "<div style=\"margin-left: 2em;".($is_forward ? '' : ' display: none;')."\" id=\"forward_config\">";
218 248
 
219
-if ($is_forward)
220
-{
221
-  for ($i = 0 ; $i < $numforwards ; $i++)
222
-  {
223
-    $num = $i+1;
224
-    $form .= "<div class=\"vmail-forward\">
225
-    <p>Weiterleiten an <input type=\"text\" id=\"forward_to_{$num}\" name=\"forward_to_{$num}\" value=\"{$account['forwards'][$i]['destination']}\" /></p>
226
-    <p>Spam-Mails an diese Adresse ".html_select('spamfilter_action_'.$num, array("none" => 'nicht filtern', "tag" => 'markieren und zustellen', "delete" => 'nicht zustellen'), $account['forwards'][$i]['spamfilter'])."</p>
227
-    </div>\n";
228
-  }
249
+$form .= '<div id="forward_entries">
250
+';
251
+if (! isset($account['forwards'][0])) {
252
+  $account['forwards'][0] = array('destination' => '', 'spamfilter' => 'none');
229 253
 }
230
-else
254
+for ($i = 0 ; $i < $numforwards ; $i++)
231 255
 {
232
-    $form .= "<div class=\"vmail-forward\">
233
-    <p>Weiterleiten an <input type=\"text\" id=\"forward_to_1\" name=\"forward_to_1\" value=\"\" /></p>
234
-    <p>Spam-Mails an diese Adresse ".html_select('spamfilter_action_1', array("none" => 'nicht filtern', "tag" => 'markieren und zustellen', "delete" => 'nicht zustellen'), "none")."</p>
235
-    </div>\n";
256
+  $num = $i+1;
257
+  $form .= "<div class=\"vmail-forward\" id=\"vmail_forward_{$num}\">
258
+  <div style=\"float: right;\"><a href=\"#\" onclick=\"removeForward(this);\">".icon_delete("Diese Weiterleitung entfernen")."</a></div>
259
+  <p>Weiterleiten an <input type=\"text\" id=\"forward_to_{$num}\" name=\"forward_to_{$num}\" value=\"{$account['forwards'][$i]['destination']}\" /></p>
260
+  <p>Spam-Mails an diese Adresse ".html_select('spamfilter_action_'.$num, array("none" => 'nicht filtern', "tag" => 'markieren und zustellen', "delete" => 'nicht zustellen'), $account['forwards'][$i]['spamfilter'])."</p>
261
+  </div>\n";
236 262
 }
263
+$form .= '</div>';
237 264
 
238
-$form .= '<p>[ <a href="#" onclick="moreForward();">mehr Empfänger</a> ]</p>
265
+$form .= '<p><a href="#" onclick="moreForward();">'.icon_add().' Weiteren Empfänger hinzufügen</a></p>
239 266
 </div>';
240 267
 
241 268
 $form .= '<p><input type="submit" value="Speichern" />&#160;&#160;&#160;&#160;'.internal_link('vmail', 'Abbrechen').'</p>';
Browse code

Datums-Check und Daten in umgangssprachlicher Form ausgeben

git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@2215 87cf0b9e-d624-0410-a070-f6ee81989793

bernd authored on02/03/2012 09:59:53
Showing1 changed files
... ...
@@ -152,7 +152,7 @@ if ($ar['valid_until'] != NULL && $ar['valid_until'] < date('Y-m-d')) {
152 152
 $valid_from_now_checked = ($ar['valid_from'] <= date('Y-m-d H:i:s') || $ar['valid_from'] == NULL) ? ' checked="checked"' : '';
153 153
 $valid_from_future_checked = ($ar['valid_from'] > date('Y-m-d H:i:s')) ? ' checked="checked"' : '';
154 154
 $startdate = $ar['valid_from'];
155
-if (! $startdate) {
155
+if (! $startdate || $startdate <= date('Y-m-d')) {
156 156
   $startdate = date('Y-m-d', time() + 1*24*60*60);
157 157
 }
158 158
 $form .= "<p><input type=\"radio\" name=\"ar_valid_from\" value=\"now\" id=\"ar_valid_from_now\"{$valid_from_now_checked} /> <label for=\"ar_valid_from_now\">Ab sofort</label><br />".
Browse code

VMail-User können ihre Einstellungen selbst vornehmen und bekommen eine individuelle Startseite mit den Einstellungen.

git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@2214 87cf0b9e-d624-0410-a070-f6ee81989793

bernd authored on29/02/2012 13:26:13
Showing1 changed files
... ...
@@ -6,7 +6,7 @@ require_once('inc/security.php');
6 6
 require_once('vmail.php');
7 7
 
8 8
 $section = 'email_vmail';
9
-require_role(ROLE_SYSTEMUSER);
9
+require_role(array(ROLE_SYSTEMUSER, ROLE_VMAIL_ACCOUNT));
10 10
 
11 11
 $account = empty_account();
12 12
 $id = (isset($_GET['id']) ? (int) $_GET['id'] : 0);
... ...
@@ -14,12 +14,25 @@ $id = (isset($_GET['id']) ? (int) $_GET['id'] : 0);
14 14
 if ($id != 0)
15 15
   $account = get_account_details($id);
16 16
 
17
+$accountlogin = false;
18
+if ($_SESSION['role'] == ROLE_VMAIL_ACCOUNT) {
19
+  $id = get_vmail_id_by_emailaddr($_SESSION['mailaccount']);
20
+  $account = get_account_details($id, false);
21
+  $accountlogin = true;
22
+  $accountname = filter_input_general($_SESSION['mailaccount']);
23
+}
24
+
25
+
17 26
 DEBUG($account);
18 27
 if ($id == 0) {
19 28
   title("E-Mail-Adresse anlegen");
20 29
 }
21 30
 else {
22
-  title("E-Mail-Adresse bearbeiten");
31
+  if ($accountlogin) {
32
+    title("Einstellungen für {$accountname}");
33
+  } else {
34
+    title("E-Mail-Adresse bearbeiten");
35
+  }
23 36
 }
24 37
 
25 38
 
... ...
@@ -84,37 +97,41 @@ output("<script type=\"text/javascript\">
84 97
 </script>
85 98
 ");
86 99
 
87
-$form = "
88
-    <p><strong>E-Mail-Adresse:</strong>&#160;<input type=\"text\" name=\"local\" id=\"local\" size=\"10\" value=\"{$account['local']}\" /><strong style=\"font-size: 1.5em;\">&#160;@&#160;</strong>".domainselect($account['domain'])."</p>";
100
+$form = '';
89 101
 
90
-$password_message = '';
91
-$password_value = '';
92
-if ($is_mailbox and ($account['password'] != ''))
93
-{
94
-  $password_message = '<span style="font-size: 80%"><br /><em>Sie haben bereits ein Passwort gesetzt. Wenn Sie dieses Feld nicht ändern, wird das bisherige Passwort beibehalten.</em></span>';
95
-  $password_value = '**********';
96
-} 
102
+if ($accountlogin) {
103
+  $form.= "<p class=\"spamfilter_options\">Unerwünschte E-Mails (Spam, Viren) in diesem Postfach ".html_select('spamfilter_action', array("none" => 'nicht filtern', "folder" => 'in Unterordner »Spam« ablegen', "tag" => 'markieren und zustellen', "delete" => 'nicht zustellen (löschen)'), $account['spamfilter'])."</p>";
104
+} else {
105
+  $form .= "
106
+    <p><strong>E-Mail-Adresse:</strong>&#160;<input type=\"text\" name=\"local\" id=\"local\" size=\"10\" value=\"{$account['local']}\" /><strong style=\"font-size: 1.5em;\">&#160;@&#160;</strong>".domainselect($account['domain'])."</p>";
97 107
 
98
-$form .= "
108
+  $password_message = '';
109
+  $password_value = '';
110
+  if ($is_mailbox and ($account['password'] != ''))
111
+  {
112
+    $password_message = '<span style="font-size: 80%"><br /><em>Sie haben bereits ein Passwort gesetzt. Wenn Sie dieses Feld nicht ändern, wird das bisherige Passwort beibehalten.</em></span>';
113
+    $password_value = '**********';
114
+  } 
115
+  
116
+  $form .= "
99 117
     <p><input onchange=\"toggleDisplay('mailbox', 'mailbox_options')\" type=\"checkbox\" id=\"mailbox\" name=\"mailbox\" value=\"yes\" ".($is_mailbox ? 'checked="checked" ' : '')." /><label for=\"mailbox\">&#160;<strong>In Mailbox speichern</strong></label></p>
100 118
     <div style=\"margin-left: 2em;".($is_mailbox ? '' : ' display: none;')."\" id=\"mailbox_options\">
101 119
     <p>Passwort für Abruf:&#160;<input type=\"password\" id=\"password\" name=\"password\" value=\"{$password_value}\" />{$password_message}</p>";
102 120
 
103
-$form.= "<p class=\"spamfilter_options\">Unerwünschte E-Mails (Spam, Viren) in diesem Postfach ".html_select('spamfilter_action', array("none" => 'nicht filtern', "folder" => 'in Unterordner »Spam« ablegen', "tag" => 'markieren und zustellen', "delete" => 'nicht zustellen (löschen)'), $account['spamfilter'])."</p>";
104
-
105
-$quota = config('vmail_basequota');
106
-if ($is_mailbox and $account['quota']) {
107
-  $quota = $account['quota'];
108
-}
121
+  $form.= "<p class=\"spamfilter_options\">Unerwünschte E-Mails (Spam, Viren) in diesem Postfach ".html_select('spamfilter_action', array("none" => 'nicht filtern', "folder" => 'in Unterordner »Spam« ablegen', "tag" => 'markieren und zustellen', "delete" => 'nicht zustellen (löschen)'), $account['spamfilter'])."</p>";
109 122
 
110
-$form .= "<p class=\"quota_options\">Größe des Postfachs: <input type=\"text\" id=\"quota\" name=\"quota\" value=\"{$quota}\" /> MB<br /><span style=\"font-size: 80%\"><em>Hinweis: Die Differenz zwischen dem hier gesetzten Wert und dem Sockelbetrag von ".config('vmail_basequota')." MB wird vom Speicherplatz Ihres Benutzer-Kontos abgezogen.</em></span></p>";
111
-
112
-$quota_notify = ($account['quota_threshold'] >= 0) ? ' checked="checked" ' : '';
113
-$quota_threshold = ($account['quota_threshold'] >= 0) ? $account['quota_threshold'] : '';
114
-$form .= "<p class=\"quota_options\"><input type=\"checkbox\" id=\"quota_notify\" name=\"quota_notify\" value=\"1\" {$quota_notify} /><label for=\"quota_notify\">Benachrichtigung wenn weniger als</label> <input type=\"text\" name=\"quota_threshold\" id=\"quota_threshold\" value=\"{$quota_threshold}\" /> MB Speicherplatz zur Verfügung stehen.</p>";
123
+  $quota = config('vmail_basequota');
124
+  if ($is_mailbox and $account['quota']) {
125
+    $quota = $account['quota'];
126
+  }
127
+  $form .= "<p class=\"quota_options\">Größe des Postfachs: <input type=\"text\" id=\"quota\" name=\"quota\" value=\"{$quota}\" /> MB<br /><span style=\"font-size: 80%\"><em>Hinweis: Die Differenz zwischen dem hier gesetzten Wert und dem Sockelbetrag von ".config('vmail_basequota')." MB wird vom Speicherplatz Ihres Benutzer-Kontos abgezogen.</em></span></p>";
115 128
 
116
-$form .= "</div>";
129
+  $quota_notify = ($account['quota_threshold'] >= 0) ? ' checked="checked" ' : '';
130
+  $quota_threshold = ($account['quota_threshold'] >= 0) ? $account['quota_threshold'] : '';
131
+  $form .= "<p class=\"quota_options\"><input type=\"checkbox\" id=\"quota_notify\" name=\"quota_notify\" value=\"1\" {$quota_notify} /><label for=\"quota_notify\">Benachrichtigung wenn weniger als</label> <input type=\"text\" name=\"quota_threshold\" id=\"quota_threshold\" value=\"{$quota_threshold}\" /> MB Speicherplatz zur Verfügung stehen.</p>";
117 132
 
133
+  $form .= "</div>";
134
+}
118 135
 
119 136
 
120 137
 
Browse code

Bugfix: Fehler bei neu erstellten Accounts und deren Autoresponder Kosmetik: Abgeschaltete Autoresponder werden in der Übersichtsseite nicht mehr aufgeführt

git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@2210 87cf0b9e-d624-0410-a070-f6ee81989793

bernd authored on25/02/2012 15:26:11
Showing1 changed files
... ...
@@ -23,7 +23,7 @@ else {
23 23
 }
24 24
 
25 25
 
26
-$is_autoresponder = is_array($account['autoresponder']);
26
+$is_autoresponder = is_array($account['autoresponder']) && $account['autoresponder']['valid_from'] != NULL;
27 27
 $is_forward = (count($account['forwards']) > 0);
28 28
 $is_mailbox = ($account['password'] != NULL  ||  $id == 0);
29 29
 $numforwards = max(count($account['forwards']), 1);
Browse code

Konfiguration des Autoresponders

git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@2209 87cf0b9e-d624-0410-a070-f6ee81989793

bernd authored on25/02/2012 15:16:45
Showing1 changed files
... ...
@@ -23,6 +23,7 @@ else {
23 23
 }
24 24
 
25 25
 
26
+$is_autoresponder = is_array($account['autoresponder']);
26 27
 $is_forward = (count($account['forwards']) > 0);
27 28
 $is_mailbox = ($account['password'] != NULL  ||  $id == 0);
28 29
 $numforwards = max(count($account['forwards']), 1);
... ...
@@ -70,6 +71,16 @@ output("<script type=\"text/javascript\">
70 71
     parent = document.getElementById('forward_config');
71 72
     parent.appendChild(DIV);
72 73
   }
74
+
75
+  function toggleDisplay(checkbox_id, item_id) 
76
+  {
77
+    if (document.getElementById(checkbox_id).checked == true) {
78
+      document.getElementById(item_id).style.display = 'block';
79
+    } else {
80
+      document.getElementById(item_id).style.display = 'none';
81
+    }
82
+  }
83
+
73 84
 </script>
74 85
 ");
75 86
 
... ...
@@ -85,27 +96,108 @@ if ($is_mailbox and ($account['password'] != ''))
85 96
 } 
86 97
 
87 98
 $form .= "
88
-    <p><input type=\"checkbox\" id=\"mailbox\" name=\"mailbox\" value=\"yes\" ".($is_mailbox ? 'checked="checked" ' : '')." /><label for=\"mailbox\">&#160;<strong>In Mailbox speichern</strong></label></p>
89
-    <p style=\"margin-left: 2em;\" id=\"mailbox_options\">Passwort für Abruf:&#160;<input type=\"password\" id=\"password\" name=\"password\" value=\"{$password_value}\" />{$password_message}</p>";
99
+    <p><input onchange=\"toggleDisplay('mailbox', 'mailbox_options')\" type=\"checkbox\" id=\"mailbox\" name=\"mailbox\" value=\"yes\" ".($is_mailbox ? 'checked="checked" ' : '')." /><label for=\"mailbox\">&#160;<strong>In Mailbox speichern</strong></label></p>
100
+    <div style=\"margin-left: 2em;".($is_mailbox ? '' : ' display: none;')."\" id=\"mailbox_options\">
101
+    <p>Passwort für Abruf:&#160;<input type=\"password\" id=\"password\" name=\"password\" value=\"{$password_value}\" />{$password_message}</p>";
90 102
 
91
-$form.= "<p style=\"margin-left: 2em;\" class=\"spamfilter_options\">Unerwünschte E-Mails (Spam, Viren) in diesem Postfach ".html_select('spamfilter_action', array("none" => 'nicht filtern', "folder" => 'in Unterordner »Spam« ablegen', "tag" => 'markieren und zustellen', "delete" => 'nicht zustellen (löschen)'), $account['spamfilter'])."</p>";
103
+$form.= "<p class=\"spamfilter_options\">Unerwünschte E-Mails (Spam, Viren) in diesem Postfach ".html_select('spamfilter_action', array("none" => 'nicht filtern', "folder" => 'in Unterordner »Spam« ablegen', "tag" => 'markieren und zustellen', "delete" => 'nicht zustellen (löschen)'), $account['spamfilter'])."</p>";
92 104
 
93 105
 $quota = config('vmail_basequota');
94 106
 if ($is_mailbox and $account['quota']) {
95 107
   $quota = $account['quota'];
96 108
 }
97 109
 
98
-$form .= "<p style=\"margin-left: 2em;\" class=\"quota_options\">Größe des Postfachs: <input type=\"text\" id=\"quota\" name=\"quota\" value=\"{$quota}\" /> MB<br /><span style=\"font-size: 80%\"><em>Hinweis: Die Differenz zwischen dem hier gesetzten Wert und dem Sockelbetrag von ".config('vmail_basequota')." MB wird vom Speicherplatz Ihres Benutzer-Kontos abgezogen.</em></span></p>";
110
+$form .= "<p class=\"quota_options\">Größe des Postfachs: <input type=\"text\" id=\"quota\" name=\"quota\" value=\"{$quota}\" /> MB<br /><span style=\"font-size: 80%\"><em>Hinweis: Die Differenz zwischen dem hier gesetzten Wert und dem Sockelbetrag von ".config('vmail_basequota')." MB wird vom Speicherplatz Ihres Benutzer-Kontos abgezogen.</em></span></p>";
99 111
 
100 112
 $quota_notify = ($account['quota_threshold'] >= 0) ? ' checked="checked" ' : '';
101 113
 $quota_threshold = ($account['quota_threshold'] >= 0) ? $account['quota_threshold'] : '';
102
-$form .= "<p style=\"margin-left: 2em;\" class=\"quota_options\"><input type=\"checkbox\" id=\"quota_notify\" name=\"quota_notify\" value=\"1\" {$quota_notify} /><label for=\"quota_notify\">Benachrichtigung wenn weniger als</label> <input type=\"text\" name=\"quota_threshold\" id=\"quota_threshold\" value=\"{$quota_threshold}\" /> MB Speicherplatz zur Verfügung stehen.</p>";
114
+$form .= "<p class=\"quota_options\"><input type=\"checkbox\" id=\"quota_notify\" name=\"quota_notify\" value=\"1\" {$quota_notify} /><label for=\"quota_notify\">Benachrichtigung wenn weniger als</label> <input type=\"text\" name=\"quota_threshold\" id=\"quota_threshold\" value=\"{$quota_threshold}\" /> MB Speicherplatz zur Verfügung stehen.</p>";
115
+
116
+$form .= "</div>";
117
+
118
+
103 119
 
104 120
 
105
-$form .= "<p><input type=\"checkbox\" id=\"forward\" name=\"forward\" value=\"yes\" ".($is_forward ? 'checked="checked" ' : '')." /><label for=\"forward\">&#160;<strong>Weiterleitung an andere E-Mail-Adressen</strong></label></p>";
121
+$form .= "<p><input onchange=\"toggleDisplay('autoresponder', 'autoresponder_config')\" type=\"checkbox\" id=\"autoresponder\" name=\"autoresponder\" value=\"yes\" ".($is_autoresponder ? 'checked="checked" ' : '')." /><label for=\"autoresponder\">&#160;<strong>Automatische Antwort versenden</strong></label></p>";
106 122
 
123
+$form .= "<div style=\"margin-left: 2em;".($is_autoresponder ? '' : ' display: none;')."\" id=\"autoresponder_config\">";
124
+
125
+$ar = $account['autoresponder'];
126
+if (! $ar) {
127
+  $ar = empty_autoresponder_config();
128
+}
129
+
130
+if ($ar['valid_until'] != NULL && $ar['valid_until'] < date('Y-m-d')) {
131
+  // Daten sind Restbestand von einem früheren Einsatz des Autoresponders
132
+  $ar['valid_from'] = NULL;
133
+  $ar['valid_until'] = NULL;
134
+}
135
+$valid_from_now_checked = ($ar['valid_from'] <= date('Y-m-d H:i:s') || $ar['valid_from'] == NULL) ? ' checked="checked"' : '';
136
+$valid_from_future_checked = ($ar['valid_from'] > date('Y-m-d H:i:s')) ? ' checked="checked"' : '';
137
+$startdate = $ar['valid_from'];
138
+if (! $startdate) {
139
+  $startdate = date('Y-m-d', time() + 1*24*60*60);
140
+}
141
+$form .= "<p><input type=\"radio\" name=\"ar_valid_from\" value=\"now\" id=\"ar_valid_from_now\"{$valid_from_now_checked} /> <label for=\"ar_valid_from_now\">Ab sofort</label><br />".
142
+  "<input type=\"radio\" name=\"ar_valid_from\" value=\"future\" id=\"ar_valid_from_future\"{$valid_from_future_checked} /> <label for=\"ar_valid_from_future\">Erst ab dem </label>".
143
+  html_datepicker("ar_valid_from", strtotime($startdate))."</p>";
144
+
145
+$valid_until_infinity_checked = ($ar['valid_until'] == NULL) ? ' checked="checked"' : '';
146
+$valid_until_date_checked = ($ar['valid_until'] != NULL) ? ' checked="checked"' : '';
147
+$enddate = $ar['valid_until'];
148
+if (! $enddate) {
149
+  $enddate = date('Y-m-d', time() + 7*24*60*60);
150
+}
151
+$form .= "<h4>Deaktivierung</h4>";
152
+$form .= "<p><input type=\"radio\" name=\"ar_valid_until\" value=\"infinity\" id=\"ar_valid_until_infinity\"{$valid_until_infinity_checked} /> <label for=\"ar_valid_until_infinity\">Unbefristet</label><br />".
153
+  "<input type=\"radio\" name=\"ar_valid_until\" value=\"date\" id=\"ar_valid_until_date\"{$valid_until_date_checked} /> <label for=\"ar_valid_until_date\">Keine Antworten mehr versenden ab dem </label>".
154
+  html_datepicker("ar_valid_until", strtotime($enddate))."</p>";
155
+
156
+
157
+$subject = $ar['subject'];
158
+if ($subject == NULL)
159
+  $subject = '';
160
+$ar_subject_default_checked = ($subject == NULL) ? ' checked="checked"' : '';
161
+$ar_subject_custom_checked = ($subject) ? ' checked="checked"' : '';
162
+$form .= "<h4>Betreffzeile der automatischen Antwort</h4>".
163
+  "<p><input type=\"radio\" name=\"ar_subject\" value=\"default\" id=\"ar_subject_default\"{$ar_subject_default_checked} /> ".
164
+  "<label for=\"ar_subject_default\">Automatisch (Re: <em>&lt;Betreff der Originalnachricht&gt;</em>)</label><br />".
165
+  "<input type=\"radio\" name=\"ar_subject\" value=\"custom\" id=\"ar_subject_custom\"{$ar_subject_custom_checked} /> ".
166
+  "<label for=\"ar_subject_custom\">Anderer Betreff:</label> <input type=\"text\" name=\"ar_subject_value\" id=\"ar_subject_value\" value=\"{$subject}\"/></p>";
167
+
168
+$message = $ar['message'];
169
+$form .= "<h4>Inhalt der automatischen Antwort</h4>".
170
+  "<p><textarea cols=\"80\" rows=\"10\" name=\"ar_message\" id=\"ar_message\">".$ar['message']."</textarea></p>";
171
+$quote = $ar['quote'];
172
+if (! $quote) 
173
+  $quote = 'none';
174
+$form .= "<p><label for=\"ar_quote\">Originalnachricht des Absenders </label>".
175
+  html_select('ar_quote', array("none" => 'nicht in Antwort einschließen', 
176
+                                "inline" => 'zitieren (max. 50 Zeilen)', 
177
+                                "attach" => 'vollständig als Anhang beifügen'), $quote)."</p>";