1dd25774000c45b48570436d2f49ecf76b21929d
bernd Erste Version des vmail-Modul

bernd authored 16 years ago

1) <?php
2) 
3) require_once('inc/base.php');
4) require_once('inc/security.php');
5) require_role(ROLE_SYSTEMUSER);
6) 
7) require_once('vmail.php');
8) 
bernd Neue Oberfläche für VMail-A...

bernd authored 16 years ago

9) $domains = get_vmail_domains();
10) $all_accounts = get_vmail_accounts();
11) 
12) $sorted_by_domains = array();
13) foreach ($all_accounts AS $account)
14) {
15)   if (array_key_exists($account['domain'], $sorted_by_domains))
16)     array_push($sorted_by_domains[$account['domain']], $account);
17)   else
18)     $sorted_by_domains[$account['domain']] = array($account);
19) }
20) 
21) DEBUG($sorted_by_domains);
bernd Erste Version des vmail-Modul

bernd authored 16 years ago

22) 
23) output('<h3>E-Mail-Accounts</h3>
24) <p>Folgende E-Mail-Konten sind eingerichtet:</p>
25) ');
bernd Neue Oberfläche für VMail-A...

bernd authored 16 years ago

26)         foreach ($sorted_by_domains as $accounts_on_domain)
bernd Erste Version des vmail-Modul

bernd authored 16 years ago

27)         {
bernd Neue Oberfläche für VMail-A...

bernd authored 16 years ago

28) 	    output('<h4>'.$accounts_on_domain[0]['domainname'].'</h4>');
29) 	    foreach ($accounts_on_domain AS $this_account)
30) 	    {
31) 	      $acc = get_account_details($this_account['id']);
32) 	      $actions = array();
33) 	      DEBUG($acc);
34) 	      if ($acc['password'] != '')
35) 	      {
36) 	      	$spam = 'ohne Spamfilter';
37) 	        switch ($acc['spamfilter'])
38) 	  	{
39) 		        case 'folder':  $spam = 'Spam in Unterordner';
40) 					break;
41) 			case 'tag':	$spam = 'Spam markieren';
42) 					break;
43) 			case 'delete':	$spam = 'Spam nicht zustellen';
44) 					break;
45) 	        }
46) 	        array_push($actions, "Ablegen in Mailbox ({$spam})");
47) 	      }
48) 	      foreach ($acc['forwards'] AS $fwd)
49) 	      {
50) 	      	$spam = 'ohne Spamfilter';
51) 	        switch ($acc['spamfilter'])
52) 	  	{
53) 			case 'tag':	$spam = 'Spam markieren';
54) 					break;
55) 			case 'delete':	$spam = 'Spam nicht zustellen';
56) 					break;
57) 	        }
58) 		$fwd['destination'] = filter_input_general($fwd['destination']);
59) 	        array_push($actions, "Weiterleitung an <strong>{$fwd['destination']}</strong> ({$spam})");
60) 	      }
61) 	      $dest = '';
62) 	      if (count($actions) > 0)
63) 	      {
64) 	        $dest = "<ul>";
65) 		foreach ($actions as $a)
66) 		  $dest .= "<li>{$a}</li>";
67) 		$dest .= '</ul>';
68) 	      }
69)               output('
70)               <div style="margin-left: 2em;"><p>'.internal_link('edit.php', $acc['local'].'@'.$this_account['domainname'], 'id='.$acc['id']).' <a href="save.php?action=delete&amp;id='.$acc['id'].'"><img src="'.$prefix.'images/delete.png" alt="löschen" title="Dieses Konto löschen"/></a></p>
71) 	      <p>'.$dest.'</p></div>');
72) 	    }
73) 
bernd Erste Version des vmail-Modul

bernd authored 16 years ago

74)         }
bernd Neue Oberfläche für VMail-A...

bernd authored 16 years ago

75) output('<p><a href="edit.php">Neuen Account anlegen</a></p>');
bernd Erste Version des vmail-Modul

bernd authored 16 years ago

76) 
bernd Hinweis für vmail-user

bernd authored 16 years ago

77) /* FIXME: Das sollte nur kommen, wenn der IMAP/POP3-Menü-Eintrag nicht da ist */
78) output('<p>Hinweis: schokokeks.org bietet für fortgeschrittene Nutzer die manuelle Einrichtung von POP3/IMAP-Accounts.<br/><a href="'.$prefix.'go/imap/accounts.php?action=create">Neuen POP3/IMAP-Account anlegen</a></p>');