c2fdf5e33d33da11d7f9ce02b6a187a11727fa91
bernd Erste Version des vmail-Modul

bernd authored 16 years ago

1) <?php
2) 
3) require_once('inc/debug.php');
4) require_once('inc/security.php');
5) 
6) require_once('vmail.php');
7) 
8) $title = "E-Mail-Adresse bearbeiten";
9) $section = 'vmail_accounts';
10) require_role(ROLE_SYSTEMUSER);
11) 
12) $id = (int) $_GET['id'];
bernd huch, was macht das denn da...

bernd authored 16 years ago

13) $account = empty_account();
bernd Erste Version des vmail-Modul

bernd authored 16 years ago

14) 
15) if ($id != 0)
16)   $account = get_account_details($id);
17) 
18) DEBUG($account);
19) if ($id == 0) {
20)   output("<h3>Neue E-Mail-Adresse anlegen</h3>");
21)   $title = "E-Mail-Adresse anlegen";
22) }
23) else {
24)   output("<h3>E-Mail-Adresse bearbeiten</h3>");
25) }
26) 
27) 
bernd mehrere Adressen erlauben

bernd authored 16 years ago

28) $is_forward = ($account['type'] == 'forward');
bernd Erste Version des vmail-Modul

bernd authored 16 years ago

29) $is_mailbox = ( ! $is_forward);
30) 
bernd Neues VMail-Interface (funk...

bernd authored 16 years ago

31) output("<script type=\"text/javascript\">
32)   
33)   var numForwards = 1;
34) 
35)   function moreForward()
36)   {
37)     numForwards += 1;
38) 
39)     TR = document.createElement('tr');
40)     TD1 = document.createElement('td');
41)     TD2 = document.createElement('td');
42) 
43)     INPUT = document.createElement('input');
44)     INPUT.type = 'text';
45)     INPUT.name = 'forward_to_' + numForwards;
46)     INPUT.value = '';
47) 
48)     SELECT = document.createElement('select');
49)     SELECT.name = 'spamfilter_action_' + numForwards;
50) 
51)     SELECT.options[0] = new Option('kein Filter', 'none', 1);
52)     SELECT.options[1] = new Option('markieren und zustellen', 'tag', 0);
53)     SELECT.options[2] = new Option('nicht zustellen', 'delete', 0);
54) 
55)     TD1.appendChild(INPUT);
56)     TD2.appendChild(SELECT);
57) 
58)     TR.appendChild(TD1);
59)     TR.appendChild(TD2);
60) 
61)     table = document.getElementById('forward_table');
62)     table.appendChild(TR);
63)   }
64) </script>
65) ");
bernd Javascript aus vmail-Modul...

bernd authored 16 years ago

66) /*
bernd Erste Version des vmail-Modul

bernd authored 16 years ago

67) output("<script type=\"text/javascript\">
68)   
69)   function selectForwarding() {
70)     // document.getElementById('forward_options').style.visibility = 'visible';
71)     // document.getElementById('mailbox_options').style.visibility = 'hidden';
72)     document.getElementById('forward_options').style.display = 'block';
73)     document.getElementById('mailbox_options').style.display = 'none';
74)     document.getElementById('spamfilter_folder').disabled = true;
75)     document.getElementById('virusfilter_folder').disabled = true;
76)     }
77)   
78)   function selectMailbox() {
79)     // document.getElementById('mailbox_options').style.visibility = 'visible';
80)     // document.getElementById('forward_options').style.visibility = 'hidden';
81)     document.getElementById('mailbox_options').style.display = 'block';
82)     document.getElementById('forward_options').style.display = 'none';
83)     document.getElementById('spamfilter_folder').disabled = false;
84)     document.getElementById('virusfilter_folder').disabled = false;
85)     }
86)   
87)   function toggleSpamfilterOptions() {
88)     if (document.getElementById('spamfilter').checked)
89)       document.getElementById('spamfilter_options').style.display = 'block';
90)     else
91)       document.getElementById('spamfilter_options').style.display = 'none';
92)     }
93)   
94)   function toggleVirusfilterOptions() {
95)     if (document.getElementById('virusfilter').checked)
96)       document.getElementById('virusfilter_options').style.display = 'block';
97)     else
98)       document.getElementById('virusfilter_options').style.display = 'none';
99)     }
100) 
101)   </script>");
bernd Javascript aus vmail-Modul...

bernd authored 16 years ago

102) */
bernd Erste Version des vmail-Modul

bernd authored 16 years ago

103) 
104) $form = "
105)     <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['domainid'])."</p>";
106) 
bernd Spam- und viren nur noch ei...

bernd authored 16 years ago

107) /*  
bernd Javascript aus vmail-Modul...

bernd authored 16 years ago

108) $form .= "<p><input type=\"checkbox\" id=\"virusfilter\" name=\"virusfilter\" value=\"1\" ".($account['virusfilter'] != NULL ? 'checked="checked" ' : '')." /><label for=\"virusfilter\">&#160;Viren-Scanner</label></p>";
bernd Erste Version des vmail-Modul

bernd authored 16 years ago

109) 
bernd Javascript aus vmail-Modul...

bernd authored 16 years ago

110) $form .= "<p style=\"margin-left: 2em;\" id=\"virusfilter_options\">
bernd Erste Version des vmail-Modul

bernd authored 16 years ago

111)   <em>Was soll mit E-Mails geschehen, in denen ein Virus erkannt wurde?</em><br />
bernd Spam- und viren nur noch ei...

bernd authored 16 years ago

112)   <input type=\"radio\" id=\"virusfilter_folder\" name=\"virusfilter_action\" value=\"folder\" ".($account['virusfilter'] == 'folder' ? 'checked="checked" ' : '')."/><label for=\"virusfilter_folder\">&#160;In IMAP-Unterordner »Spam« ablegen</label><br />
bernd Erste Version des vmail-Modul

bernd authored 16 years ago

113)   <input type=\"radio\" id=\"virusfilter_tag\" name=\"virusfilter_action\" value=\"tag\" ".($account['virusfilter'] == 'tag' ? 'checked="checked" ' : '')."/><label for=\"virusfilter_tag\">&#160;Markieren und ganz normal zustellen</label><br />
114) <input type=\"radio\" id=\"virusfilter_delete\" name=\"virusfilter_action\" value=\"delete\" ".($account['virusfilter'] == 'delete' ? 'checked="checked" ' : '')."/><label for=\"virusfilter_delete\">&#160;Löschen</label>
115)   </p>
116)   ";
bernd Spam- und viren nur noch ei...

bernd authored 16 years ago

117) */
bernd Erste Version des vmail-Modul

bernd authored 16 years ago

118) 
119) $password_message = '';
120) if ($is_mailbox and ($account['data'] != ''))
bernd Bugfix: Funktion-Dopplung v...

bernd authored 16 years ago

121)   $password_message = '<span style="font-size: 80%"><br /><em>Sie haben bereits ein Passwort gesetzt. Wenn Sie dieses Feld leer lassen, wird das bisherige Passwort beibehalten.</em></span>';
bernd Erste Version des vmail-Modul

bernd authored 16 years ago

122)   
123) 
bernd Neues VMail-Interface (funk...

bernd authored 16 years ago

124) $form .= "
125)     <p><input type=\"checkbox\" id=\"mailbox\" name=\"type\" value=\"mailbox\" ".($is_mailbox ? 'checked="checked" ' : '')." /><label for=\"mailbox\">&#160;In Mailbox speichern</label></p>
bernd Javascript aus vmail-Modul...

bernd authored 16 years ago

126)     <p style=\"margin-left: 2em;\" id=\"mailbox_options\">Passwort für Abruf:&#160;<input type=\"password\" id=\"password\" name=\"password\" value=\"\" />{$password_message}</p>";
bernd Neues VMail-Interface (funk...

bernd authored 16 years ago

127) 
128) 
129) $form .= "
130) <p style=\"margin-left: 2em;\" class=\"spamfilter_options\">
131)   <em>Wählen Sie, was mit unerwünschten E-Mails (Spam, Viren) passieren soll</em><br />
132)   <input type=\"radio\" id=\"spamfilter_none\" name=\"spamfilter_action\" value=\"none\" ".($account['spamfilter'] == NULL ? 'checked="checked" ' : '')."/><label for=\"spamfilter_none\">&#160;Keine Überprüfung durchführen (alle E-Mails zustellen)</label><br />
133)   <input type=\"radio\" id=\"spamfilter_folder\" name=\"spamfilter_action\" value=\"folder\" ".($account['spamfilter'] == 'folder' ? 'checked="checked" ' : '')."/><label for=\"spamfilter_folder\">&#160;In IMAP-Unterordner »Spam« ablegen</label><br />
134)   <input type=\"radio\" id=\"spamfilter_tag\" name=\"spamfilter_action\" value=\"tag\" ".($account['spamfilter'] == 'tag' ? 'checked="checked" ' : '')."/><label for=\"spamfilter_tag\">&#160;Markieren und ganz normal zustellen</label><br />
135)   <input type=\"radio\" id=\"spamfilter_delete\" name=\"spamfilter_action\" value=\"delete\" ".($account['spamfilter'] == 'delete' ? 'checked="checked" ' : '')."/><label for=\"spamfilter_delete\">&#160;Nicht zustellen (Löschen)</label>
136) </p>
137)   ";
138) 
139) $form .= "<p><input type=\"checkbox\" id=\"forward\" name=\"type\" value=\"forward\" ".($is_forward ? 'checked="checked" ' : '')." /><label for=\"forward\">&#160;Weiterleitung an andere E-Mail-Adressen</label></p>";
140) 
141) $form .= "<table style=\"margin-left: 2em;\" id=\"forward_table\">
142) <tr><th>Ziel-Adresse</th><th>Unerwünschte E-Mails</th></tr>
143) ";
144) 
145) $form .= "
146) <tr>
147)   <td><input type=\"text\" id=\"forward_to_1\" name=\"forward_to_1\" value=\"\" /></td>
148)   <td>
149)   <select id=\"spamfilter_action_1\" name=\"spamfilter_action_1\">
150)     <option value=\"none\">kein Filter</option>
151)     <option value=\"tag\">markieren und zustellen</option>
152)     <option value=\"delete\">löschen</option>
153)   </select>
154)   </td>
155) </tr>
156)   ";
bernd Erste Version des vmail-Modul

bernd authored 16 years ago

157)     
bernd Neues VMail-Interface (funk...

bernd authored 16 years ago

158) $form .= '</table>
159)   <p style="margin-left: 2em;">[ <a href="#" onclick="moreForward();">mehr Empfänger</a> ]</p>