From: Peter Popovec Date: Tue, 26 Jun 2007 07:00:00 +0000 (+0200) Subject: for forward "leave mail in mailbox" signaling X-Git-Tag: 0.5^0 X-Git-Url: http://zub.fei.tuke.sk/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cc86fc6861844237299610c0b2dbcc7d1f8e1cca;p=ldapvmail for forward "leave mail in mailbox" signaling --- diff --git a/debian/changelog b/debian/changelog index 2e793e6..da6c7c9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +ldapvmail (0.5) unstable; urgency=low + + * for forward "leave mial in mailbox" signaling + + -- Peter Popovec Tue, 26 Jun 2007 08:54:46 +0200 + ldapvmail (0.4.1) unstable; urgency=low * fixed foreach on unassigned arrays @@ -21,7 +27,7 @@ ldapvmail (0.3.1) unstable; urgency=low ldapvmail (0.3) unstable; urgency=low - * web interface first wersion + * web interface first version -- Peter Popovec Fri, 23 Sep 2005 08:01:26 +0200 diff --git a/debian/control b/debian/control index 92dedff..29e46d2 100644 --- a/debian/control +++ b/debian/control @@ -9,5 +9,6 @@ Package: ldapvmail Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Description: TUI for virtual mail system based on postfix, courier and ldap - NEWT based TUI for virtual mail system based on postfix, courier and ldap - Warning, this is alpha release ! + NEWT based TUI and web interface for virtual mail system based on postfix, + courier and ldap + diff --git a/web/usr/share/ldapVmail/index.php b/web/usr/share/ldapVmail/index.php index 38ec26b..2cd8898 100644 --- a/web/usr/share/ldapVmail/index.php +++ b/web/usr/share/ldapVmail/index.php @@ -113,7 +113,7 @@ $info = ldap_get_entries($ds, $sr); #print_r($info); printf(""); -printf(""); +printf(""); $dcolor[0]="cyan"; $dcolor[1]="lightgreen"; @@ -121,17 +121,18 @@ $dcolor[2]="yellow"; $dcolor[3]="red"; for($spolu=$index=0;$index<$info["count"];$index++) - { - printf("", - $dcolor[$index % 2 ], -// $_SERVER["PHP_SELF"], - $info[$index]["uid"][0], - $info[$index]["uid"][0]); - if (0==$info[$index]["mailalternateaddress"]["count"]) + { + printf("", + $dcolor[$index % 2 ], +// $_SERVER["PHP_SELF"], + $info[$index]["uid"][0], + $info[$index]["uid"][0]); + if (0==$info[$index]["mailalternateaddress"]["count"]) { printf("", $dcolor[$index % 2 ], $info[$index]["mail"][0]); - else { + } + else { printf(" "); - } - if ($info[$index]["mailforwardingaddress"]["count"]<2) - printf("\n", - $dcolor[$index % 2 ], - $info[$index]["mailforwardingaddress"][0]); - else { - printf(" - "); - } - } + } + $selfForward="No"; + $xcount=$info[$index]["mailforwardingaddress"]["count"]; + $selfF=-1; + for($i=0;$i<$info[$index]["mailforwardingaddress"]["count"];$i++){ + if($info[$index]["mailforwardingaddress"][$i]==$info[$index]["mail"][0]){ + $selfForward="Yes"; + $selfF=$i; + $xcount--; + } + } + switch ($xcount) { + case 0: + $selfForward="-"; + printf("\n", + $dcolor[$index % 2 ]); + break; + case 1: + for($i=0;$i<$info[$index]["mailforwardingaddress"]["count"];$i++){ + if($selfF!=$i){ + printf("\n", + $dcolor[$index % 2 ], + $info[$index]["mailforwardingaddress"][$i]); + } + } + break; + default: + printf(" + "); + } + printf("\n",$dcolor[$index % 2 ],$selfForward); + } printf ("
POP3/IMAP loginmailforward
POP3/IMAP loginmailforwardleave in mailbox
%s
%s%s
@@ -145,22 +146,45 @@ for($spolu=$index=0;$index<$info["count"];$index++) for($i=0;$i<$info[$index]["mailalternateaddress"]["count"];$i++) printf("\n",$info[$index]["mailalternateaddress"][$i]); printf("
 %s
-
-
  %s +
+
 %s
"); ldap_free_result($sr); }