0c1d96becb6f7f6eae272bece21ff807b6930bdb
bernd Erste Version des vmail-Modul

bernd authored 17 years ago

modules/vmail/accounts.php   1) <?php
Bernd Wurst Added license tags for CC0,...

Bernd Wurst authored 12 years ago

modules/email/vmail.php      2) /*
modules/email/vmail.php      3) This file belongs to the Webinterface of schokokeks.org Hosting
modules/email/vmail.php      4) 
Hanno Böck Change license from CC0 to...

Hanno Böck authored 2 years ago

modules/email/vmail.php      5) Written by schokokeks.org Hosting, namely
Bernd Wurst Added license tags for CC0,...

Bernd Wurst authored 12 years ago

modules/email/vmail.php      6)   Bernd Wurst <bernd@schokokeks.org>
modules/email/vmail.php      7)   Hanno Böck <hanno@schokokeks.org>
modules/email/vmail.php      8) 
Hanno Böck Change license from CC0 to...

Hanno Böck authored 2 years ago

modules/email/vmail.php      9) This code is published under a 0BSD license.
Bernd Wurst Added license tags for CC0,...

Bernd Wurst authored 12 years ago

modules/email/vmail.php     10) 
modules/email/vmail.php     11) 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.
modules/email/vmail.php     12) */
bernd Erste Version des vmail-Modul

bernd authored 17 years ago

modules/vmail/accounts.php  13) 
modules/vmail/accounts.php  14) require_once('inc/base.php');
bernd Info-Seite über Mail-Login-...

bernd authored 13 years ago

modules/email/vmail.php     15) require_once('inc/icons.php');
bernd Erste Version des vmail-Modul

bernd authored 17 years ago

modules/vmail/accounts.php  16) require_once('inc/security.php');
modules/vmail/accounts.php  17) require_role(ROLE_SYSTEMUSER);
Bernd Wurst Filter-Funktion für vmail-A...

Bernd Wurst authored 6 years ago

modules/email/vmail.php     18) require_once('inc/jquery.php');
modules/email/vmail.php     19) javascript();
bernd Erste Version des vmail-Modul

bernd authored 17 years ago

modules/vmail/accounts.php  20) 
bernd Großer VMail-move

bernd authored 16 years ago

modules/email/vmail.php     21) require_once('hasdomain.php');
modules/email/vmail.php     22) 
modules/email/vmail.php     23) if (! user_has_vmail_domain()) {
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/vmail.php     24)     title("E-Mail-Verwaltung");
Hanno remove whitespace in empty...

Hanno authored 6 years ago

modules/email/vmail.php     25) 
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/vmail.php     26)     output('
bernd Mehr config-optionen und co...

bernd authored 15 years ago

modules/email/vmail.php     27) <p>Sie können bei '.config('company_name').' die E-Mails Ihrer Domains auf zwei unterschiedliche Arten empfangen.</p>
bernd Großer VMail-move

bernd authored 16 years ago

modules/email/vmail.php     28) <ol><li>Sie können einfache E-Mail-Konten erstellen, die ankommende E-Mails speichern oder weiterleiten.</li>
modules/email/vmail.php     29) <li>Sie können die manuelle Verwaltung wählen, bei der Sie passende .courier-Dateien für den Empfang und
modules/email/vmail.php     30) manuelle POP3/IMAP-Konten für den Abruf erstellen können.</li></ol>
bernd exklusivität der mail-verwa...

bernd authored 16 years ago

modules/email/vmail.php     31) <p>Diese Wahlmöglichkeit haben Sie pro Domain bzw. Subdomain. eine Mischung beider Verfahren ist nicht möglich. 
modules/email/vmail.php     32) Subdomains können grundsätzlich nur durch Administratoren eingerichtet und verändert werden.</p>
bernd Großer VMail-move

bernd authored 16 years ago

modules/email/vmail.php     33) <p>Sie haben bisher keine Domains, die auf Web-basierte Verwaltung von E-Mail-Adressen eingerichtet sind.</p>
modules/email/vmail.php     34) 
modules/email/vmail.php     35) <p> </p>
modules/email/vmail.php     36) 
bernd eliminate .php extensions f...

bernd authored 16 years ago

modules/email/vmail.php     37) <p>Besuchen Sie die '.internal_link('domains', 'Domain-Einstellungen').' um diese Auswahl für Ihre Domains zu ändern.</p>
bernd Großer VMail-move

bernd authored 16 years ago

modules/email/vmail.php     38) 
bernd eliminate .php extensions f...

bernd authored 16 years ago

modules/email/vmail.php     39) <p>Wenn Sie die manuelle Einrichtung möchten oder keine eigene Domain nutzen, können Sie unter '.internal_link('imap', 'POP3/IMAP').' manuelle POP3-/IMAP-Konten erstellen.</p>
bernd Großer VMail-move

bernd authored 16 years ago

modules/email/vmail.php     40) 
modules/email/vmail.php     41) ');
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/vmail.php     42) } else {
modules/email/vmail.php     43)     $filter = null;
modules/email/vmail.php     44)     if (isset($_REQUEST['filter']) && $_REQUEST['filter'] != '') {
modules/email/vmail.php     45)         $filter = $_REQUEST['filter'];
modules/email/vmail.php     46)     }
bernd Großer VMail-move

bernd authored 16 years ago

modules/email/vmail.php     47) 
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/vmail.php     48)     require_once('vmail.php');
bernd Erste Version des vmail-Modul

bernd authored 17 years ago

modules/vmail/accounts.php  49) 
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/vmail.php     50)     $domains = get_vmail_domains();
modules/email/vmail.php     51)     $all_accounts = get_vmail_accounts();
bernd Neue Oberfläche für VMail-A...

bernd authored 16 years ago

modules/vmail/accounts.php  52) 
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 3 years ago

modules/email/vmail.php     53)     $sorted_by_domains = [];
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/vmail.php     54)     foreach ($all_accounts as $account) {
modules/email/vmail.php     55)         if (array_key_exists($account['domain'], $sorted_by_domains)) {
modules/email/vmail.php     56)             array_push($sorted_by_domains[$account['domain']], $account);
modules/email/vmail.php     57)         } else {
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 3 years ago

modules/email/vmail.php     58)             $sorted_by_domains[$account['domain']] = [$account];
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/vmail.php     59)         }
modules/email/vmail.php     60)     }
bernd Neue Oberfläche für VMail-A...

bernd authored 16 years ago

modules/vmail/accounts.php  61) 
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/vmail.php     62)     DEBUG($sorted_by_domains);
bernd Erste Version des vmail-Modul

bernd authored 17 years ago

modules/vmail/accounts.php  63) 
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/vmail.php     64)     title('E-Mail-Accounts');
Bernd Wurst Alle VMail-Domain in der Üb...

Bernd Wurst authored 11 years ago

modules/email/vmail.php     65) 
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/vmail.php     66)     addnew("edit", "Neue E-Mail-Adresse anlegen");
Bernd Wurst Alle VMail-Domain in der Üb...

Bernd Wurst authored 11 years ago

modules/email/vmail.php     67) 
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/vmail.php     68)     if (count($domains) > 0) {
modules/email/vmail.php     69)         // Filter-Funktion
modules/email/vmail.php     70)         if (count($all_accounts) > 10 || $filter) {
modules/email/vmail.php     71)             $form = '<p><label for="filter">Filter für die Anzeige:</label> <input type="text" name="filter" id="filter" value="'.$filter.'"><button type="button" id="clear" title="Filter leeren">&times;</button><input type="submit" value="Filtern!"></p>';
modules/email/vmail.php     72)             output(html_form('vmail_filter', 'vmail', '', $form));
modules/email/vmail.php     73)         }
Bernd Wurst Filter-Funktion für vmail-A...

Bernd Wurst authored 6 years ago

modules/email/vmail.php     74) 
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/vmail.php     75)         output('
Bernd Wurst Filter-Funktion für vmail-A...

Bernd Wurst authored 6 years ago

modules/email/vmail.php     76)             <p>Folgende E-Mail-Konten sind aktuell eingerichtet:</p>
modules/email/vmail.php     77)             ');
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/vmail.php     78)         foreach ($domains as $dom) {
modules/email/vmail.php     79)             if ($filter && strpos($dom['domainname'], $filter) === false) {
modules/email/vmail.php     80)                 // Die Domain entspricht nicht dem Filter, schau die Postfächer an
modules/email/vmail.php     81)                 $account_found = false;
modules/email/vmail.php     82)                 if (array_key_exists($dom['id'], $sorted_by_domains)) {
modules/email/vmail.php     83)                     $accounts_on_domain = $sorted_by_domains[$dom['id']];
modules/email/vmail.php     84)                     foreach ($accounts_on_domain as $this_account) {
modules/email/vmail.php     85)                         if (strpos($this_account['local'], $filter) !== false) {
modules/email/vmail.php     86)                             $account_found = true;
modules/email/vmail.php     87)                         }
Bernd Wurst Filter-Funktion für vmail-A...

Bernd Wurst authored 6 years ago

modules/email/vmail.php     88)                     }
modules/email/vmail.php     89)                 }
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/vmail.php     90)                 if (! $account_found) {
modules/email/vmail.php     91)                     continue;
modules/email/vmail.php     92)                 }
Bernd Wurst Filter-Funktion für vmail-A...

Bernd Wurst authored 6 years ago

modules/email/vmail.php     93)             }
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/vmail.php     94)             output('
Bernd Wurst Filter-Funktion für vmail-A...

Bernd Wurst authored 6 years ago

modules/email/vmail.php     95)                 <h4>'.$dom['domainname'].' <small>('.other_icon('information.png', 'Zugangsdaten anzeigen').' '.internal_link('logindata', 'Zugangsdaten für E-Mail-Abruf anzeigen', 'server='.get_server_by_id($dom['server']).'&type=vmail').')</small></h4>
modules/email/vmail.php     96)                 <div style="margin-left: 2em; margin-top: 0.5em; padding: 0.1em 0.5em;">');
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/vmail.php     97)             if (array_key_exists($dom['id'], $sorted_by_domains)) {
modules/email/vmail.php     98)                 $accounts_on_domain = $sorted_by_domains[$dom['id']];
Bernd Wurst Filter-Funktion für vmail-A...

Bernd Wurst authored 6 years ago

modules/email/vmail.php     99) 
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/vmail.php    100)                 foreach ($accounts_on_domain as $this_account) {
modules/email/vmail.php    101)                     if ($filter &&
modules/email/vmail.php    102)                     (strpos($dom['domainname'], $filter) === false &&
Bernd Wurst Filter-Funktion für vmail-A...

Bernd Wurst authored 6 years ago

modules/email/vmail.php    103)                      strpos($this_account['local'], $filter) === false)) {
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/vmail.php    104)                         continue;
modules/email/vmail.php    105)                     }
modules/email/vmail.php    106)                     $acc = get_account_details($this_account['id']);
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 3 years ago

modules/email/vmail.php    107)                     $actions = [];
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/vmail.php    108)                     DEBUG($acc);
modules/email/vmail.php    109)                     if ($acc['password'] != '') {
modules/email/vmail.php    110)                         $percent = round(($acc["quota_used"] / $acc["quota"]) * 100);
modules/email/vmail.php    111)                         $color = ($percent > 95 ? 'red' : ($percent > 75 ? "yellow" : "green"));
modules/email/vmail.php    112)                         $width = 2 * min($percent, 100);
modules/email/vmail.php    113)                         $quotachart = "<div style=\"margin: 2px 0; padding: 0; width: 200px; border: 1px solid black;\"><div style=\"font-size: 1px; background-color: {$color}; height: 10px; width: {$width}px; margin: 0; padding: 0;\">&#160;</div></div> {$acc['quota_used']} MB von {$acc['quota']} MB belegt";
modules/email/vmail.php    114)                         array_push($actions, "Ablegen in Mailbox<br />".$quotachart);
modules/email/vmail.php    115)                     }
modules/email/vmail.php    116)                     if ($acc['autoresponder']) {
modules/email/vmail.php    117)                         $now = date('Y-m-d');
modules/email/vmail.php    118)                         $valid_from = $acc['autoresponder']['valid_from'];
modules/email/vmail.php    119)                         $valid_until = $acc['autoresponder']['valid_until'];
modules/email/vmail.php    120)                         if ($valid_from == null) {
modules/email/vmail.php    121)                             // Autoresponder abgeschaltet
Hanno Böck more strict codingstyle wit...

Hanno Böck authored 2 years ago

modules/email/vmail.php    122)                             //array_push($actions, "<strike>Automatische Antwort versenden</strike> (Abgeschaltet)");
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/vmail.php    123)                         } elseif ($valid_from > $now) {
Bernd Wurst fix deprecation / nnull arg...

Bernd Wurst authored 1 year ago

modules/email/vmail.php    124)                             $valid_from_string = date('d.m.Y', strtotime($acc['autoresponder']['valid_from']));
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/vmail.php    125)                             array_push($actions, "<strike>Automatische Antwort versenden</strike> (Wird aktiviert am {$valid_from_string})");
modules/email/vmail.php    126)                         } elseif ($valid_until == null) {
modules/email/vmail.php    127)                             array_push($actions, "Automatische Antwort versenden (Unbefristet)");
modules/email/vmail.php    128)                         } elseif ($valid_until > $now) {
Bernd Wurst fix deprecation / nnull arg...

Bernd Wurst authored 1 year ago

modules/email/vmail.php    129)                             $valid_until_string = date('d.m.Y', strtotime($acc['autoresponder']['valid_until']));
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/vmail.php    130)                             array_push($actions, "Automatische Antwort versenden (Wird deaktiviert am {$valid_until_string})");
modules/email/vmail.php    131)                         } elseif ($valid_until < $now) {
Bernd Wurst fix deprecation / nnull arg...

Bernd Wurst authored 1 year ago

modules/email/vmail.php    132)                             $valid_until_string = date('d.m.Y', strtotime($acc['autoresponder']['valid_until']));
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/vmail.php    133)                             array_push($actions, "<strike>Automatische Antwort versenden</strike> (Automatisch abgeschaltet seit {$valid_until_string})");
modules/email/vmail.php    134)                         }
modules/email/vmail.php    135)                     }
modules/email/vmail.php    136)                     foreach ($acc['forwards'] as $fwd) {
Bernd Wurst Umstellung von filter_input...

Bernd Wurst authored 5 years ago

modules/email/vmail.php    137)                         array_push($actions, "Weiterleitung an <strong>".filter_output_html($fwd['destination'])."</strong>");
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/vmail.php    138)                     }
modules/email/vmail.php    139)                     $dest = '';
modules/email/vmail.php    140)                     if (count($actions) > 0) {
modules/email/vmail.php    141)                         $dest = "<ul>";
modules/email/vmail.php    142)                         foreach ($actions as $a) {
modules/email/vmail.php    143)                             $dest .= "<li>{$a}</li>";
modules/email/vmail.php    144)                         }
modules/email/vmail.php    145)                         $dest .= '</ul>';
modules/email/vmail.php    146)                     }
modules/email/vmail.php    147)                     if ($acc['smtpreply']) {
Bernd Wurst fixed typo

Bernd Wurst authored 5 years ago

modules/email/vmail.php    148)                         output('<p><strike>'.filter_output_html($acc['local'].'@'.$this_account['domainname']).'</strike> '.internal_link("save", '<img src="'.$prefix.'images/delete.png" alt="löschen" title="Dieses Konto löschen"/>', "action=delete&id=".$acc['id']).'</p>');
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/vmail.php    149)                         output("<ul><li>".icon_disabled()." Diese Adresse ist stillgelegt. <strong>".internal_link('suspend', 'Stilllegung ändern/aufheben', 'account='.$acc['id']).'</strong></li></ul>');
modules/email/vmail.php    150)                     } else {
Bernd Wurst Umstellung von filter_input...

Bernd Wurst authored 5 years ago

modules/email/vmail.php    151)                         output('<p>'.internal_link('edit', filter_output_html($acc['local'].'@'.$this_account['domainname']), 'id='.$acc['id']).' '.internal_link("save", '<img src="'.$prefix.'images/delete.png" alt="löschen" title="Dieses Konto löschen"/>', "action=delete&id=".$acc['id']).'</p>');
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/vmail.php    152)                         output('<p>'.$dest.'</p>');
Bernd Wurst Filter-Funktion für vmail-A...

Bernd Wurst authored 6 years ago

modules/email/vmail.php    153)                     }
modules/email/vmail.php    154)                 }
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/vmail.php    155)             } else {
modules/email/vmail.php    156)                 output('<p><em>Bisher keine E-Mail-Adressen unter dieser Domain.</em></p>');
Bernd Wurst Filter-Funktion für vmail-A...

Bernd Wurst authored 6 years ago

modules/email/vmail.php    157)             }
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/vmail.php    158)             addnew("edit", "Neue E-Mail-Adresse anlegen", "domain={$dom['id']}");
modules/email/vmail.php    159)             output('</div>');
Bernd Wurst SMTP-seitige Autoresponder...

Bernd Wurst authored 10 years ago

modules/email/vmail.php    160)         }
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/vmail.php    161)     } else {
modules/email/vmail.php    162)         output('<p><em>Es sind bisher keine Ihrer Domains für Mail-Empfang eingerichtet.</em></p>');
modules/email/vmail.php    163)     }
bernd Erste Version des vmail-Modul

bernd authored 17 years ago

modules/vmail/accounts.php 164) 
modules/vmail/accounts.php 165) 
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/vmail.php    166)     /* FIXME: Das sollte nur kommen, wenn der IMAP/POP3-Menü-Eintrag nicht da ist */
Bernd Wurst Umstellung von filter_input...

Bernd Wurst authored 5 years ago

modules/email/vmail.php    167)     output('<p style="font-size: 90%;padding-top: 0.5em; border-top: 1px solid black;">Hinweis: '.filter_output_html(config('company_name')).' bietet für fortgeschrittene Nutzer die manuelle Einrichtung von POP3/IMAP-Accounts.<br/>'.internal_link("imap", "Neuen POP3/IMAP-Account anlegen", "action=create").'</p>');