cf54502a10b16c985ea28db17885d377226b6145
bernd Erste Version des vmail-Modul

bernd authored 16 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) 
Bernd Wurst Copyright year update

Bernd Wurst authored 6 years ago

modules/email/vmail.php      5) Written 2008-2018 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) 
modules/email/vmail.php      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.
modules/email/vmail.php     10) 
modules/email/vmail.php     11) You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see 
modules/email/vmail.php     12) http://creativecommons.org/publicdomain/zero/1.0/
modules/email/vmail.php     13) 
modules/email/vmail.php     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.
modules/email/vmail.php     15) */
bernd Erste Version des vmail-Modul

bernd authored 16 years ago

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

bernd authored 13 years ago

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

bernd authored 16 years ago

modules/vmail/accounts.php  19) require_once('inc/security.php');
modules/vmail/accounts.php  20) require_role(ROLE_SYSTEMUSER);
modules/vmail/accounts.php  21) 
bernd Großer VMail-move

bernd authored 16 years ago

modules/email/vmail.php     22) require_once('hasdomain.php');
modules/email/vmail.php     23) 
modules/email/vmail.php     24) if (! user_has_vmail_domain()) {
bernd Benutze überall title() sta...

bernd authored 13 years ago

modules/email/vmail.php     25)   title("E-Mail-Verwaltung");
bernd Großer VMail-move

bernd authored 16 years ago

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

bernd authored 14 years ago

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

bernd authored 15 years ago

modules/email/vmail.php     32) <p>Diese Wahlmöglichkeit haben Sie pro Domain bzw. Subdomain. eine Mischung beider Verfahren ist nicht möglich. 
modules/email/vmail.php     33) 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     34) <p>Sie haben bisher keine Domains, die auf Web-basierte Verwaltung von E-Mail-Adressen eingerichtet sind.</p>
modules/email/vmail.php     35) 
modules/email/vmail.php     36) <p> </p>
modules/email/vmail.php     37) 
bernd eliminate .php extensions f...

bernd authored 15 years ago

modules/email/vmail.php     38) <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     39) 
bernd eliminate .php extensions f...

bernd authored 15 years ago

modules/email/vmail.php     40) <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     41) 
modules/email/vmail.php     42) ');
modules/email/vmail.php     43) }
modules/email/vmail.php     44) else
modules/email/vmail.php     45) {
modules/email/vmail.php     46) 
modules/email/vmail.php     47) 
bernd Erste Version des vmail-Modul

bernd authored 16 years ago

modules/vmail/accounts.php  48) require_once('vmail.php');
modules/vmail/accounts.php  49) 
bernd Neue Oberfläche für VMail-A...

bernd authored 16 years ago

modules/vmail/accounts.php  50) $domains = get_vmail_domains();
modules/vmail/accounts.php  51) $all_accounts = get_vmail_accounts();
modules/vmail/accounts.php  52) 
modules/vmail/accounts.php  53) $sorted_by_domains = array();
modules/vmail/accounts.php  54) foreach ($all_accounts AS $account)
modules/vmail/accounts.php  55) {
modules/vmail/accounts.php  56)   if (array_key_exists($account['domain'], $sorted_by_domains))
modules/vmail/accounts.php  57)     array_push($sorted_by_domains[$account['domain']], $account);
modules/vmail/accounts.php  58)   else
modules/vmail/accounts.php  59)     $sorted_by_domains[$account['domain']] = array($account);
modules/vmail/accounts.php  60) }
modules/vmail/accounts.php  61) 
modules/vmail/accounts.php  62) DEBUG($sorted_by_domains);
bernd Erste Version des vmail-Modul

bernd authored 16 years ago

modules/vmail/accounts.php  63) 
bernd Benutze überall title() sta...

bernd authored 13 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) 
modules/email/vmail.php     66) addnew("edit", "Neue E-Mail-Adresse anlegen");
modules/email/vmail.php     67) 
modules/email/vmail.php     68) if (count($domains) > 0)
bernd Nette Meldung wenn keine E-...

bernd authored 14 years ago

modules/email/vmail.php     69) {
modules/email/vmail.php     70)   output('
Bernd Wurst Alle VMail-Domain in der Üb...

Bernd Wurst authored 11 years ago

modules/email/vmail.php     71) <p>Folgende E-Mail-Konten sind aktuell eingerichtet:</p>
bernd Erste Version des vmail-Modul

bernd authored 16 years ago

modules/vmail/accounts.php  72) ');
Bernd Wurst Alle VMail-Domain in der Üb...

Bernd Wurst authored 11 years ago

modules/email/vmail.php     73)   foreach ($domains as $dom) 
bernd Nette Meldung wenn keine E-...

bernd authored 14 years ago

modules/email/vmail.php     74)   {
Bernd Wurst Alle VMail-Domain in der Üb...

Bernd Wurst authored 11 years ago

modules/email/vmail.php     75)     output('
modules/email/vmail.php     76)       <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     77)       <div style="margin-left: 2em; margin-top: 0.5em; padding: 0.1em 0.5em;">');
modules/email/vmail.php     78)     if (array_key_exists($dom['id'], $sorted_by_domains)) {
modules/email/vmail.php     79)       $accounts_on_domain = $sorted_by_domains[$dom['id']];
bernd Info-Seite über Mail-Login-...

bernd authored 13 years ago

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

bernd authored 16 years ago

modules/vmail/accounts.php  81) 	    foreach ($accounts_on_domain AS $this_account)
modules/vmail/accounts.php  82) 	    {
modules/vmail/accounts.php  83) 	      $acc = get_account_details($this_account['id']);
modules/vmail/accounts.php  84) 	      $actions = array();
modules/vmail/accounts.php  85) 	      DEBUG($acc);
Bernd Wurst Unnötige Abfrage entfernt

Bernd Wurst authored 9 years ago

modules/email/vmail.php     86) 	      if ($acc['password'] != '')
bernd Neue Oberfläche für VMail-A...

bernd authored 16 years ago

modules/vmail/accounts.php  87) 	      {
bernd Zeige vmail-Quota im Webint...

bernd authored 13 years ago

modules/email/vmail.php     88)                 $percent = round(( $acc["quota_used"] / $acc["quota"] ) * 100 );
modules/email/vmail.php     89)                 $color = ( $percent > 95 ? 'red' : ($percent > 75 ? "yellow" : "green" ));
modules/email/vmail.php     90)                 $width = 2 * min($percent, 100);
modules/email/vmail.php     91)                 $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";
Bernd Wurst Alle Optionen bzgl. Spamfil...

Bernd Wurst authored 7 years ago

modules/email/vmail.php     92) 	        array_push($actions, "Ablegen in Mailbox<br />".$quotachart);
bernd Neue Oberfläche für VMail-A...

bernd authored 16 years ago

modules/vmail/accounts.php  93) 	      }
bernd Konfiguration des Autorespo...

bernd authored 12 years ago

modules/email/vmail.php     94)         if ($acc['autoresponder']) {
bernd Datums-Check und Daten in u...

bernd authored 12 years ago

modules/email/vmail.php     95)             $now = date( 'Y-m-d' );
bernd Konfiguration des Autorespo...

bernd authored 12 years ago

modules/email/vmail.php     96)             $valid_from = $acc['autoresponder']['valid_from'];
bernd Datums-Check und Daten in u...

bernd authored 12 years ago

modules/email/vmail.php     97)             $valid_from_string = date('d.m.Y', strtotime($acc['autoresponder']['valid_from']));
bernd Konfiguration des Autorespo...

bernd authored 12 years ago

modules/email/vmail.php     98)             $valid_until = $acc['autoresponder']['valid_until'];
bernd Datums-Check und Daten in u...

bernd authored 12 years ago

modules/email/vmail.php     99)             $valid_until_string = date('d.m.Y', strtotime($acc['autoresponder']['valid_until']));
bernd Konfiguration des Autorespo...

bernd authored 12 years ago

modules/email/vmail.php    100)             if ($valid_from == NULL) {
modules/email/vmail.php    101)               // Autoresponder abgeschaltet
bernd Bugfix: Fehler bei neu erst...

bernd authored 12 years ago

modules/email/vmail.php    102)               //array_push($actions, "<strike>Automatische Antwort versenden</strike> (Abgeschaltet)");
bernd Konfiguration des Autorespo...

bernd authored 12 years ago

modules/email/vmail.php    103)             } elseif ($valid_from > $now) {
bernd Datums-Check und Daten in u...

bernd authored 12 years ago

modules/email/vmail.php    104)               array_push($actions, "<strike>Automatische Antwort versenden</strike> (Wird aktiviert am {$valid_from_string})");
bernd Konfiguration des Autorespo...

bernd authored 12 years ago

modules/email/vmail.php    105)             } elseif ($valid_until == NULL) {
modules/email/vmail.php    106)               array_push($actions, "Automatische Antwort versenden (Unbefristet)");
modules/email/vmail.php    107)             } elseif ($valid_until > $now) {
bernd Datums-Check und Daten in u...

bernd authored 12 years ago

modules/email/vmail.php    108)               array_push($actions, "Automatische Antwort versenden (Wird deaktiviert am {$valid_until_string})");
bernd Konfiguration des Autorespo...

bernd authored 12 years ago

modules/email/vmail.php    109)             } elseif ($valid_until < $now) {
bernd Datums-Check und Daten in u...

bernd authored 12 years ago

modules/email/vmail.php    110)               array_push($actions, "<strike>Automatische Antwort versenden</strike> (Automatisch abgeschaltet seit {$valid_until_string})");
bernd Konfiguration des Autorespo...

bernd authored 12 years ago

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

bernd authored 16 years ago

modules/vmail/accounts.php 113) 	      foreach ($acc['forwards'] AS $fwd)
modules/vmail/accounts.php 114) 	      {
modules/vmail/accounts.php 115) 		$fwd['destination'] = filter_input_general($fwd['destination']);
Bernd Wurst Alle Optionen bzgl. Spamfil...

Bernd Wurst authored 7 years ago

modules/email/vmail.php    116) 	        array_push($actions, "Weiterleitung an <strong>{$fwd['destination']}</strong>");
bernd Neue Oberfläche für VMail-A...

bernd authored 16 years ago

modules/vmail/accounts.php 117) 	      }
modules/vmail/accounts.php 118) 	      $dest = '';
modules/vmail/accounts.php 119) 	      if (count($actions) > 0)
modules/vmail/accounts.php 120) 	      {
modules/vmail/accounts.php 121) 	        $dest = "<ul>";
modules/vmail/accounts.php 122) 		foreach ($actions as $a)
modules/vmail/accounts.php 123) 		  $dest .= "<li>{$a}</li>";
modules/vmail/accounts.php 124) 		$dest .= '</ul>';
modules/vmail/accounts.php 125) 	      }
Bernd Wurst SMTP-seitige Autoresponder...

Bernd Wurst authored 9 years ago

modules/email/vmail.php    126)         if ($acc['smtpreply']) {
modules/email/vmail.php    127)           output('<p><strike>'.$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>');
Bernd Wurst Update auf nicht mehr so ne...

Bernd Wurst authored 9 years ago

modules/email/vmail.php    128)           output("<ul><li>".icon_disabled()." Diese Adresse ist stillgelegt. <strong>".internal_link('suspend', 'Stilllegung ändern/aufheben', 'account='.$acc['id']).'</strong></li></ul>');
Bernd Wurst SMTP-seitige Autoresponder...

Bernd Wurst authored 9 years ago

modules/email/vmail.php    129)         } else {
modules/email/vmail.php    130)           output('<p>'.internal_link('edit', $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>');
modules/email/vmail.php    131)           output('<p>'.$dest.'</p>');
modules/email/vmail.php    132)         }
bernd Neue Oberfläche für VMail-A...

bernd authored 16 years ago

modules/vmail/accounts.php 133) 	    }
Bernd Wurst Alle VMail-Domain in der Üb...

Bernd Wurst authored 11 years ago

modules/email/vmail.php    134)     } else {
modules/email/vmail.php    135)       output('<p><em>Bisher keine E-Mail-Adressen unter dieser Domain.</em></p>');
modules/email/vmail.php    136)     }
modules/email/vmail.php    137)     addnew("edit", "Neue E-Mail-Adresse anlegen", "domain={$dom['id']}");
modules/email/vmail.php    138)     output('</div>');
modules/email/vmail.php    139)   } 
bernd Nette Meldung wenn keine E-...

bernd authored 14 years ago

modules/email/vmail.php    140) }
modules/email/vmail.php    141) else
modules/email/vmail.php    142) {
Bernd Wurst Alle VMail-Domain in der Üb...

Bernd Wurst authored 11 years ago

modules/email/vmail.php    143)   output('<p><em>Es sind bisher keine Ihrer Domains für Mail-Empfang eingerichtet.</em></p>');
bernd Nette Meldung wenn keine E-...

bernd authored 14 years ago

modules/email/vmail.php    144) }
modules/email/vmail.php    145)         
bernd Erste Version des vmail-Modul

bernd authored 16 years ago

modules/vmail/accounts.php 146) 
bernd Hinweis für vmail-user

bernd authored 16 years ago

modules/vmail/accounts.php 147) /* FIXME: Das sollte nur kommen, wenn der IMAP/POP3-Menü-Eintrag nicht da ist */
bernd Mehr config-optionen und co...

bernd authored 14 years ago

modules/email/vmail.php    148) output('<p style="font-size: 90%;padding-top: 0.5em; border-top: 1px solid black;">Hinweis: '.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>');
bernd Erste Version des vmail-Modul

bernd authored 16 years ago

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

bernd authored 16 years ago

modules/email/vmail.php    150) }