Bernd Wurst commited on 2018-02-20 11:35:39
              Zeige 5 geänderte Dateien mit 51 Einfügungen und 4 Löschungen.
            
| ... | ... | 
                      @@ -75,7 +75,7 @@ if ($is_current_user) {
                     | 
                  
| 75 | 75 | 
                        $used = true;  | 
                    
| 76 | 76 | 
                        }  | 
                    
| 77 | 77 | 
                             if (have_module('email') && mail_in_use($dom->id)) {
                       | 
                    
| 78 | 
                        -        output("<p>Es gibt E-Mail-Postfächer unter dieser Domain ".internal_link('../email/vmail', '→ Bearbeiten', 'domain='.$dom->fqdn)."</p>");
                       | 
                    |
| 78 | 
                        +        output("<p>Es gibt E-Mail-Postfächer unter dieser Domain ".internal_link('../email/vmail', '→ Bearbeiten', 'filter='.$dom->fqdn)."</p>");
                       | 
                    |
| 79 | 79 | 
                        $used = true;  | 
                    
| 80 | 80 | 
                        }  | 
                    
| 81 | 81 | 
                             if (have_module('mailman') && mailman_subdomains($dom->id)) {
                       | 
                    
| ... | ... | 
                      @@ -18,6 +18,8 @@ require_once('inc/base.php');
                     | 
                  
| 18 | 18 | 
                         require_once('inc/icons.php');
                       | 
                    
| 19 | 19 | 
                         require_once('inc/security.php');
                       | 
                    
| 20 | 20 | 
                        require_role(ROLE_SYSTEMUSER);  | 
                    
| 21 | 
                        +require_once('inc/jquery.php');
                       | 
                    |
| 22 | 
                        +javascript();  | 
                    |
| 21 | 23 | 
                         | 
                    
| 22 | 24 | 
                         require_once('hasdomain.php');
                       | 
                    
| 23 | 25 | 
                         | 
                    
| ... | ... | 
                      @@ -44,6 +46,10 @@ Subdomains können grundsätzlich nur durch Administratoren eingerichtet und ver  | 
                  
| 44 | 46 | 
                        else  | 
                    
| 45 | 47 | 
                         {
                       | 
                    
| 46 | 48 | 
                         | 
                    
| 49 | 
                        +$filter = NULL;  | 
                    |
| 50 | 
                        +if (isset($_REQUEST['filter']) && $_REQUEST['filter'] != '') {
                       | 
                    |
| 51 | 
                        + $filter = $_REQUEST['filter'];  | 
                    |
| 52 | 
                        +}  | 
                    |
| 47 | 53 | 
                         | 
                    
| 48 | 54 | 
                         require_once('vmail.php');
                       | 
                    
| 49 | 55 | 
                         | 
                    
| ... | ... | 
                      @@ -67,11 +73,32 @@ addnew("edit", "Neue E-Mail-Adresse anlegen");
                     | 
                  
| 67 | 73 | 
                         | 
                    
| 68 | 74 | 
                        if (count($domains) > 0)  | 
                    
| 69 | 75 | 
                         {
                       | 
                    
| 76 | 
                        + // Filter-Funktion  | 
                    |
| 77 | 
                        +    if (count($all_accounts) > 10 || $filter) {
                       | 
                    |
| 78 | 
                        + $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">×</button><input type="submit" value="Filtern!"></p>';  | 
                    |
| 79 | 
                        +        output(html_form('vmail_filter', 'vmail', '', $form));
                       | 
                    |
| 80 | 
                        + }  | 
                    |
| 81 | 
                        +  | 
                    |
| 70 | 82 | 
                             output('
                       | 
                    
| 71 | 83 | 
                        <p>Folgende E-Mail-Konten sind aktuell eingerichtet:</p>  | 
                    
| 72 | 84 | 
                        ');  | 
                    
| 73 | 85 | 
                        foreach ($domains as $dom)  | 
                    
| 74 | 86 | 
                             {
                       | 
                    
| 87 | 
                        +        if ($filter && strpos($dom['domainname'], $filter) === false) {
                       | 
                    |
| 88 | 
                        + // Die Domain entspricht nicht dem Filter, schau die Postfächer an  | 
                    |
| 89 | 
                        + $account_found = false;  | 
                    |
| 90 | 
                        +            if (array_key_exists($dom['id'], $sorted_by_domains)) {
                       | 
                    |
| 91 | 
                        + $accounts_on_domain = $sorted_by_domains[$dom['id']];  | 
                    |
| 92 | 
                        +                foreach ($accounts_on_domain AS $this_account) {
                       | 
                    |
| 93 | 
                        +                    if (strpos($this_account['local'], $filter) !== false) {
                       | 
                    |
| 94 | 
                        + $account_found = true;  | 
                    |
| 95 | 
                        + }  | 
                    |
| 96 | 
                        + }  | 
                    |
| 97 | 
                        + }  | 
                    |
| 98 | 
                        +            if (! $account_found) {
                       | 
                    |
| 99 | 
                        + continue;  | 
                    |
| 100 | 
                        + }  | 
                    |
| 101 | 
                        + }  | 
                    |
| 75 | 102 | 
                                 output('
                       | 
                    
| 76 | 103 | 
                                         <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>
                       | 
                    
| 77 | 104 | 
                        <div style="margin-left: 2em; margin-top: 0.5em; padding: 0.1em 0.5em;">');  | 
                    
| ... | ... | 
                      @@ -80,6 +107,11 @@ if (count($domains) > 0)  | 
                  
| 80 | 107 | 
                         | 
                    
| 81 | 108 | 
                        foreach ($accounts_on_domain AS $this_account)  | 
                    
| 82 | 109 | 
                                     {
                       | 
                    
| 110 | 
                        + if ($filter &&  | 
                    |
| 111 | 
                        + (strpos($dom['domainname'], $filter) === false &&  | 
                    |
| 112 | 
                        +                     strpos($this_account['local'], $filter) === false)) {
                       | 
                    |
| 113 | 
                        + continue;  | 
                    |
| 114 | 
                        + }  | 
                    |
| 83 | 115 | 
                        $acc = get_account_details($this_account['id']);  | 
                    
| 84 | 116 | 
                        $actions = array();  | 
                    
| 85 | 117 | 
                        DEBUG($acc);  | 
                    
| ... | ... | 
                      @@ -39,9 +39,6 @@ $filter = "";  | 
                  
| 39 | 39 | 
                         if (isset($_REQUEST['filter']) && $_REQUEST['filter'] != '') {
                       | 
                    
| 40 | 40 | 
                        $filter = $_REQUEST['filter'];  | 
                    
| 41 | 41 | 
                        }  | 
                    
| 42 | 
                        -if (isset($_REQUEST['clear']) && $_REQUEST['clear'] == 'X') {
                       | 
                    |
| 43 | 
                        - $filter = "";  | 
                    |
| 44 | 
                        -}  | 
                    |
| 45 | 42 | 
                        $vhosts = list_vhosts($filter);  | 
                    
| 46 | 43 | 
                         | 
                    
| 47 | 44 | 
                         | 
                    
| 48 | 45 |