Erste Version des vmail-Modul
bernd authored 17 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'];
|
huch, was macht das denn da...
bernd authored 17 years ago
|
13) $account = empty_account();
|
Erste Version des vmail-Modul
bernd authored 17 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)
|
Anpassung auf neues Interface
bernd authored 17 years ago
|
28) $is_forward = (count($account['forwards']) > 0);
29) $is_mailbox = ($account['password'] != NULL || $id == 0);
30) $numforwards = max(count($account['forwards']), 1);
|
Erste Version des vmail-Modul
bernd authored 17 years ago
|
31)
|
Neues VMail-Interface (funk...
bernd authored 17 years ago
|
32) output("<script type=\"text/javascript\">
33)
|
Anpassung auf neues Interface
bernd authored 17 years ago
|
34) var numForwards = {$numforwards};
|
Neues VMail-Interface (funk...
bernd authored 17 years ago
|
35)
36) function moreForward()
37) {
38) numForwards += 1;
39)
40) TR = document.createElement('tr');
41) TD1 = document.createElement('td');
42) TD2 = document.createElement('td');
43)
44) INPUT = document.createElement('input');
45) INPUT.type = 'text';
46) INPUT.name = 'forward_to_' + numForwards;
47) INPUT.value = '';
48)
49) SELECT = document.createElement('select');
50) SELECT.name = 'spamfilter_action_' + numForwards;
51)
|
Sterne in das Passwort-Feld...
bernd authored 17 years ago
|
52) SELECT.options[0] = new Option('kein Filter', 'none', 0);
53) SELECT.options[1] = new Option('markieren und zustellen', 'tag', 1);
|
Neues VMail-Interface (funk...
bernd authored 17 years ago
|
54) SELECT.options[2] = new Option('nicht zustellen', 'delete', 0);
55)
56) TD1.appendChild(INPUT);
57) TD2.appendChild(SELECT);
58)
59) TR.appendChild(TD1);
60) TR.appendChild(TD2);
61)
62) table = document.getElementById('forward_table');
63) table.appendChild(TR);
64) }
65) </script>
66) ");
|
Erste Version des vmail-Modul
bernd authored 17 years ago
|
67)
68) $form = "
69) <p><strong>E-Mail-Adresse:</strong> <input type=\"text\" name=\"local\" id=\"local\" size=\"10\" value=\"{$account['local']}\" /><strong style=\"font-size: 1.5em;\"> @ </strong>".domainselect($account['domainid'])."</p>";
70)
71) $password_message = '';
|
Anpassung auf neues Interface
bernd authored 17 years ago
|
72) if ($is_mailbox and ($account['password'] != ''))
|
Bugfix: Funktion-Dopplung v...
bernd authored 17 years ago
|
73) $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>';
|
Erste Version des vmail-Modul
bernd authored 17 years ago
|
74)
75)
|
Neues VMail-Interface (funk...
bernd authored 17 years ago
|
76) $form .= "
|
Anpassung auf neues Interface
bernd authored 17 years ago
|
77) <p><input type=\"checkbox\" id=\"mailbox\" name=\"mailbox\" value=\"yes\" ".($is_mailbox ? 'checked="checked" ' : '')." /><label for=\"mailbox\"> In Mailbox speichern</label></p>
|
Sterne in das Passwort-Feld...
bernd authored 17 years ago
|
78) <p style=\"margin-left: 2em;\" id=\"mailbox_options\">Passwort für Abruf: <input type=\"password\" id=\"password\" name=\"password\" value=\"**********\" />{$password_message}</p>";
|
Neues VMail-Interface (funk...
bernd authored 17 years ago
|
79)
80)
81) $form .= "
82) <p style=\"margin-left: 2em;\" class=\"spamfilter_options\">
83) <em>Wählen Sie, was mit unerwünschten E-Mails (Spam, Viren) passieren soll</em><br />
84) <input type=\"radio\" id=\"spamfilter_none\" name=\"spamfilter_action\" value=\"none\" ".($account['spamfilter'] == NULL ? 'checked="checked" ' : '')."/><label for=\"spamfilter_none\"> Keine Überprüfung durchführen (alle E-Mails zustellen)</label><br />
85) <input type=\"radio\" id=\"spamfilter_folder\" name=\"spamfilter_action\" value=\"folder\" ".($account['spamfilter'] == 'folder' ? 'checked="checked" ' : '')."/><label for=\"spamfilter_folder\"> In IMAP-Unterordner »Spam« ablegen</label><br />
86) <input type=\"radio\" id=\"spamfilter_tag\" name=\"spamfilter_action\" value=\"tag\" ".($account['spamfilter'] == 'tag' ? 'checked="checked" ' : '')."/><label for=\"spamfilter_tag\"> Markieren und ganz normal zustellen</label><br />
87) <input type=\"radio\" id=\"spamfilter_delete\" name=\"spamfilter_action\" value=\"delete\" ".($account['spamfilter'] == 'delete' ? 'checked="checked" ' : '')."/><label for=\"spamfilter_delete\"> Nicht zustellen (Löschen)</label>
88) </p>
89) ";
90)
|
Anpassung auf neues Interface
bernd authored 17 years ago
|
91) $form .= "<p><input type=\"checkbox\" id=\"forward\" name=\"forward\" value=\"yes\" ".($is_forward ? 'checked="checked" ' : '')." /><label for=\"forward\"> Weiterleitung an andere E-Mail-Adressen</label></p>";
|
Neues VMail-Interface (funk...
bernd authored 17 years ago
|
92)
93) $form .= "<table style=\"margin-left: 2em;\" id=\"forward_table\">
94) <tr><th>Ziel-Adresse</th><th>Unerwünschte E-Mails</th></tr>
95) ";
96)
|
Anpassung auf neues Interface
bernd authored 17 years ago
|
97) if ($is_forward)
98) {
99) for ($i = 0 ; $i < $numforwards ; $i++)
100) {
101) $num = $i+1;
102) $form .= "
103) <tr>
104) <td><input type=\"text\" id=\"forward_to_{$num}\" name=\"forward_to_{$num}\" value=\"{$account['forwards'][$i]['destination']}\" /></td>
105) <td>
106) ".html_select('spamfilter_action_'.$num, array("none" => 'kein Filter', "tag" => 'markieren und zustellen', "delete" => 'löschen'), $account['forwards'][$i]['spamfilter'])."
107) </td>
108) </tr>
109) ";
110) }
111) }
112) else
113) {
114) $form .= "
|
Neues VMail-Interface (funk...
bernd authored 17 years ago
|
115) <tr>
116) <td><input type=\"text\" id=\"forward_to_1\" name=\"forward_to_1\" value=\"\" /></td>
117) <td>
|
Sterne in das Passwort-Feld...
bernd authored 17 years ago
|
118) ".html_select('spamfilter_action_1', array("none" => 'kein Filter', "tag" => 'markieren und zustellen', "delete" => 'löschen'), "tag")."
|
Neues VMail-Interface (funk...
bernd authored 17 years ago
|
119) </td>
120) </tr>
121) ";
|
Anpassung auf neues Interface
bernd authored 17 years ago
|
122) }
123)
|
Neues VMail-Interface (funk...
bernd authored 17 years ago
|
124) $form .= '</table>
125) <p style="margin-left: 2em;">[ <a href="#" onclick="moreForward();">mehr Empfänger</a> ]</p>
|