63a0529b21bfd97a4ef395e8d3d3f513526357c6
bernd Erste Version des vmail-Modul

bernd authored 16 years ago

modules/vmail/edit.php   1) <?php
modules/vmail/edit.php   2) 
modules/vmail/edit.php   3) require_once('inc/debug.php');
modules/vmail/edit.php   4) require_once('inc/security.php');
modules/vmail/edit.php   5) 
modules/vmail/edit.php   6) require_once('vmail.php');
modules/vmail/edit.php   7) 
modules/vmail/edit.php   8) $title = "E-Mail-Adresse bearbeiten";
bernd Alles in das email-modul ve...

bernd authored 16 years ago

modules/email/edit.php   9) $section = 'email_vmail';
bernd Erste Version des vmail-Modul

bernd authored 16 years ago

modules/vmail/edit.php  10) require_role(ROLE_SYSTEMUSER);
modules/vmail/edit.php  11) 
modules/vmail/edit.php  12) $id = (int) $_GET['id'];
bernd huch, was macht das denn da...

bernd authored 16 years ago

modules/vmail/edit.php  13) $account = empty_account();
bernd Erste Version des vmail-Modul

bernd authored 16 years ago

modules/vmail/edit.php  14) 
modules/vmail/edit.php  15) if ($id != 0)
modules/vmail/edit.php  16)   $account = get_account_details($id);
modules/vmail/edit.php  17) 
modules/vmail/edit.php  18) DEBUG($account);
modules/vmail/edit.php  19) if ($id == 0) {
modules/vmail/edit.php  20)   output("<h3>Neue E-Mail-Adresse anlegen</h3>");
modules/vmail/edit.php  21)   $title = "E-Mail-Adresse anlegen";
modules/vmail/edit.php  22) }
modules/vmail/edit.php  23) else {
modules/vmail/edit.php  24)   output("<h3>E-Mail-Adresse bearbeiten</h3>");
modules/vmail/edit.php  25) }
modules/vmail/edit.php  26) 
modules/vmail/edit.php  27) 
bernd Anpassung auf neues Interface

bernd authored 16 years ago

modules/vmail/edit.php  28) $is_forward = (count($account['forwards']) > 0);
modules/vmail/edit.php  29) $is_mailbox = ($account['password'] != NULL  ||  $id == 0);
modules/vmail/edit.php  30) $numforwards = max(count($account['forwards']), 1);
bernd Erste Version des vmail-Modul

bernd authored 16 years ago

modules/vmail/edit.php  31) 
bernd Neues VMail-Interface (funk...

bernd authored 16 years ago

modules/vmail/edit.php  32) output("<script type=\"text/javascript\">
modules/vmail/edit.php  33)   
bernd Anpassung auf neues Interface

bernd authored 16 years ago

modules/vmail/edit.php  34)   var numForwards = {$numforwards};
bernd Neues VMail-Interface (funk...

bernd authored 16 years ago

modules/vmail/edit.php  35) 
modules/vmail/edit.php  36)   function moreForward()
modules/vmail/edit.php  37)   {
modules/vmail/edit.php  38)     numForwards += 1;
modules/vmail/edit.php  39) 
bernd Neues Design für VMail-Edit...

bernd authored 16 years ago

modules/vmail/edit.php  40)     P1 = document.createElement('p');
modules/vmail/edit.php  41) 
modules/vmail/edit.php  42)     TXT1 = document.createTextNode('Weiterleiten an ');
bernd Neues VMail-Interface (funk...

bernd authored 16 years ago

modules/vmail/edit.php  43) 
modules/vmail/edit.php  44)     INPUT = document.createElement('input');
modules/vmail/edit.php  45)     INPUT.type = 'text';
modules/vmail/edit.php  46)     INPUT.name = 'forward_to_' + numForwards;
modules/vmail/edit.php  47)     INPUT.value = '';
modules/vmail/edit.php  48) 
bernd Neues Design für VMail-Edit...

bernd authored 16 years ago

modules/vmail/edit.php  49)     P1.appendChild(TXT1);
modules/vmail/edit.php  50)     P1.appendChild(INPUT);
modules/vmail/edit.php  51) 
modules/vmail/edit.php  52)     P2 = document.createElement('p');
modules/vmail/edit.php  53) 
modules/vmail/edit.php  54)     TXT2 = document.createTextNode('Spam-Mails an diese Adresse ');
modules/vmail/edit.php  55) 
bernd Neues VMail-Interface (funk...

bernd authored 16 years ago

modules/vmail/edit.php  56)     SELECT = document.createElement('select');
modules/vmail/edit.php  57)     SELECT.name = 'spamfilter_action_' + numForwards;
modules/vmail/edit.php  58) 
bernd Formulierung

bernd authored 16 years ago

modules/vmail/edit.php  59)     SELECT.options[0] = new Option('nicht filtern', 'none', 1);
bernd kein Filter ist default für...

bernd authored 16 years ago

modules/vmail/edit.php  60)     SELECT.options[1] = new Option('markieren und zustellen', 'tag', 0);
bernd Neues VMail-Interface (funk...

bernd authored 16 years ago

modules/vmail/edit.php  61)     SELECT.options[2] = new Option('nicht zustellen', 'delete', 0);
modules/vmail/edit.php  62) 
bernd Neues Design für VMail-Edit...

bernd authored 16 years ago

modules/vmail/edit.php  63)     P2.appendChild(TXT2);
modules/vmail/edit.php  64)     P2.appendChild(SELECT);
modules/vmail/edit.php  65) 
modules/vmail/edit.php  66)     DIV = document.createElement('div');
modules/vmail/edit.php  67)     DIV.className = 'vmail-forward';
bernd Neues VMail-Interface (funk...

bernd authored 16 years ago

modules/vmail/edit.php  68) 
bernd Neues Design für VMail-Edit...

bernd authored 16 years ago

modules/vmail/edit.php  69)     DIV.appendChild(P1);
modules/vmail/edit.php  70)     DIV.appendChild(P2);
bernd Neues VMail-Interface (funk...

bernd authored 16 years ago

modules/vmail/edit.php  71) 
bernd Neues Design für VMail-Edit...

bernd authored 16 years ago

modules/vmail/edit.php  72)     parent = document.getElementById('forward_config');
modules/vmail/edit.php  73)     parent.appendChild(DIV);
bernd Neues VMail-Interface (funk...

bernd authored 16 years ago

modules/vmail/edit.php  74)   }
modules/vmail/edit.php  75) </script>
modules/vmail/edit.php  76) ");
bernd Erste Version des vmail-Modul

bernd authored 16 years ago

modules/vmail/edit.php  77) 
modules/vmail/edit.php  78) $form = "
bernd domain-auswahlfeld korrekt...

bernd authored 16 years ago

modules/vmail/edit.php  79)     <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>";
bernd Erste Version des vmail-Modul

bernd authored 16 years ago

modules/vmail/edit.php  80) 
modules/vmail/edit.php  81) $password_message = '';
bernd Sterne in das Passwort-feld...

bernd authored 16 years ago

modules/vmail/edit.php  82) $password_value = '';
bernd Anpassung auf neues Interface

bernd authored 16 years ago

modules/vmail/edit.php  83) if ($is_mailbox and ($account['password'] != ''))
bernd Sterne in das Passwort-feld...

bernd authored 16 years ago

modules/vmail/edit.php  84) {
bernd Eingabefeld breiter

bernd authored 16 years ago

modules/vmail/edit.php  85)   $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>';
bernd Sterne in das Passwort-feld...

bernd authored 16 years ago

modules/vmail/edit.php  86)   $password_value = '**********';
modules/vmail/edit.php  87) } 
bernd Erste Version des vmail-Modul

bernd authored 16 years ago

modules/vmail/edit.php  88) 
bernd Neues VMail-Interface (funk...

bernd authored 16 years ago

modules/vmail/edit.php  89) $form .= "
bernd Eingabefeld breiter

bernd authored 16 years ago

modules/vmail/edit.php  90)     <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>
bernd Sterne in das Passwort-feld...

bernd authored 16 years ago

modules/vmail/edit.php  91)     <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>";
bernd Neues VMail-Interface (funk...

bernd authored 16 years ago

modules/vmail/edit.php  92) 
bernd Eingabefeld breiter

bernd authored 16 years ago

modules/vmail/edit.php  93) $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>";
bernd Neues VMail-Interface (funk...

bernd authored 16 years ago

modules/vmail/edit.php  94) 
bernd Eingabefeld breiter

bernd authored 16 years ago

modules/vmail/edit.php  95) $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>";
bernd Neues VMail-Interface (funk...

bernd authored 16 years ago

modules/vmail/edit.php  96) 
bernd Neues Design für VMail-Edit...

bernd authored 16 years ago

modules/vmail/edit.php  97) 
modules/vmail/edit.php  98) $form .= "<div style=\"margin-left: 2em;\" id=\"forward_config\">";
bernd Neues VMail-Interface (funk...

bernd authored 16 years ago

modules/vmail/edit.php  99) 
bernd Anpassung auf neues Interface

bernd authored 16 years ago

modules/vmail/edit.php 100) if ($is_forward)
modules/vmail/edit.php 101) {
modules/vmail/edit.php 102)   for ($i = 0 ; $i < $numforwards ; $i++)
modules/vmail/edit.php 103)   {
bernd Neues Design für VMail-Edit...

bernd authored 16 years ago

modules/vmail/edit.php 104)     $num = $i+1;
modules/vmail/edit.php 105)     $form .= "<div class=\"vmail-forward\">
modules/vmail/edit.php 106)     <p>Weiterleiten an <input type=\"text\" id=\"forward_to_{$num}\" name=\"forward_to_{$num}\" value=\"{$account['forwards'][$i]['destination']}\" /></p>
modules/vmail/edit.php 107)     <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>
modules/vmail/edit.php 108)     </div>\n";
bernd Anpassung auf neues Interface

bernd authored 16 years ago

modules/vmail/edit.php 109)   }
modules/vmail/edit.php 110) }
modules/vmail/edit.php 111) else
modules/vmail/edit.php 112) {
bernd Neues Design für VMail-Edit...

bernd authored 16 years ago

modules/vmail/edit.php 113)     $form .= "<div class=\"vmail-forward\">
modules/vmail/edit.php 114)     <p>Weiterleiten an <input type=\"text\" id=\"forward_to_1\" name=\"forward_to_1\" value=\"\" /></p>
modules/vmail/edit.php 115)     <p>Spam-Mails an diese Adresse ".html_select('spamfilter_action_1', array("none" => 'nicht filtern', "tag" => 'markieren und zustellen', "delete" => 'nicht zustellen'), "none")."</p>
modules/vmail/edit.php 116)     </div>\n";
bernd Anpassung auf neues Interface

bernd authored 16 years ago

modules/vmail/edit.php 117) }
modules/vmail/edit.php 118) 
bernd Neues Design für VMail-Edit...

bernd authored 16 years ago

modules/vmail/edit.php 119) $form .= '</div>';
modules/vmail/edit.php 120) 
modules/vmail/edit.php 121) $form .= '<p style="margin-left: 2em;">[ <a href="#" onclick="moreForward();">mehr Empfänger</a> ]</p>
bernd eliminate .php extensions f...

bernd authored 15 years ago

modules/email/edit.php 122)   <p><input type="submit" value="Speichern" />&#160;&#160;&#160;&#160;'.internal_link('accounts', 'Abbrechen').'</p>';
bernd Erste Version des vmail-Modul

bernd authored 16 years ago

modules/vmail/edit.php 123) 
bernd eliminate .php extensions f...

bernd authored 15 years ago

modules/email/edit.php 124) output(html_form('vmail_edit_mailbox', 'save', 'action=edit'.($id != 0 ? '&id='.$id : ''), $form));