mirror of
https://github.com/postfixadmin/postfixadmin.git
synced 2024-09-19 19:22:14 +02:00
Adds colored indicators for password expired, account disabled and vacation enabled accounts
This commit is contained in:
parent
ab10c9b49a
commit
d809e0fbf7
@ -516,6 +516,16 @@ $CONF['show_undeliverable']='YES';
|
||||
$CONF['show_undeliverable_color']='tomato';
|
||||
// mails to these domains will never be flagged as undeliverable
|
||||
$CONF['show_undeliverable_exceptions']=array("unixmail.domain.ext","exchangeserver.domain.ext");
|
||||
// show mailboxes with expired password
|
||||
$CONF['show_expired']='YES';
|
||||
$CONF['show_expired_color']='orange';
|
||||
// show vacation enabled mailboxes
|
||||
$CONF['show_vacation']='YES';
|
||||
$CONF['show_vacation_color']='turquoise';
|
||||
// show disabled accounts
|
||||
$CONF['show_disabled']='YES';
|
||||
$CONF['show_disabled_color']='grey';
|
||||
// show POP/IMAP mailboxes
|
||||
$CONF['show_popimap']='YES';
|
||||
$CONF['show_popimap_color']='darkgrey';
|
||||
// you can assign special colors to some domains. To do this,
|
||||
|
@ -2201,6 +2201,39 @@ function gen_show_status($show_alias) {
|
||||
}
|
||||
}
|
||||
|
||||
// Vacation CHECK
|
||||
if ( $CONF['show_vacation'] == 'YES' ) {
|
||||
$stat_result = db_query ("SELECT * FROM ". $CONF['database_tables']['vacation'] ." WHERE email = '" . $show_alias . "' AND active = 1");
|
||||
if ($stat_result['rows'] == 1) {
|
||||
$stat_string .= "<span style='background-color:" . $CONF['show_vacation_color'] .
|
||||
"'>" . $CONF['show_status_text'] . "</span> ";
|
||||
} else {
|
||||
$stat_string .= $CONF['show_status_text'] . " ";
|
||||
}
|
||||
}
|
||||
|
||||
// Disabled CHECK
|
||||
if ( $CONF['show_disabled'] == 'YES' ) {
|
||||
$stat_result = db_query ("SELECT * FROM ". $CONF['database_tables']['mailbox'] ." WHERE username = '" . $show_alias . "' AND active = 0");
|
||||
if ($stat_result['rows'] == 1) {
|
||||
$stat_string .= "<span style='background-color:" . $CONF['show_disabled_color'] .
|
||||
"'>" . $CONF['show_status_text'] . "</span> ";
|
||||
} else {
|
||||
$stat_string .= $CONF['show_status_text'] . " ";
|
||||
}
|
||||
}
|
||||
|
||||
// Expired CHECK
|
||||
if ( $CONF['show_expired'] == 'YES' ) {
|
||||
$stat_result = db_query ("SELECT * FROM ". $CONF['database_tables']['mailbox'] ." WHERE username = '" . $show_alias . "' AND pw_expires_on <= now()");
|
||||
if ($stat_result['rows'] == 1) {
|
||||
$stat_string .= "<span style='background-color:" . $CONF['show_expired_color'] .
|
||||
"'>" . $CONF['show_status_text'] . "</span> ";
|
||||
} else {
|
||||
$stat_string .= $CONF['show_status_text'] . " ";
|
||||
}
|
||||
}
|
||||
|
||||
// POP/IMAP CHECK
|
||||
if ($CONF['show_popimap'] == 'YES') {
|
||||
$stat_delimiter = "";
|
||||
|
@ -348,6 +348,10 @@ $PALANG['broadcast_mailboxes_only'] = 'Only send to mailboxes';
|
||||
$PALANG['broadcast_to_domains'] = 'Send to domains:';
|
||||
|
||||
$PALANG['pStatus_undeliverable'] = 'maybe UNDELIVERABLE ';
|
||||
$PALANG['pStatus_disabled'] = 'Account disabled ';
|
||||
$PALANG['pStatus_expired'] = 'Password expired ';
|
||||
$PALANG['pStatus_vacation'] = 'Vacation enabled ';
|
||||
|
||||
$PALANG['pStatus_custom'] = 'Delivers to ';
|
||||
$PALANG['pStatus_popimap'] = 'POP/IMAP ';
|
||||
|
||||
|
@ -342,6 +342,9 @@ $PALANG['pBroadcast_error_empty'] = 'Les champs "Nom", "Sujet" et "Message" ne p
|
||||
$PALANG['broadcast_mailboxes_only'] = 'Only send to mailboxes'; # XXX
|
||||
$PALANG['broadcast_to_domains'] = 'Send to domains:'; # XXX
|
||||
$PALANG['pStatus_undeliverable'] = 'Non délivrable ';
|
||||
$PALANG['pStatus_vacation'] = 'Répondeur activé ';
|
||||
$PALANG['pStatus_disabled'] = 'Compte désactivé ';
|
||||
$PALANG['pStatus_expired'] = 'Mot de passe expiré ';
|
||||
$PALANG['pStatus_custom'] = 'Délivré à ';
|
||||
$PALANG['pStatus_popimap'] = 'POP/IMAP ';
|
||||
$PALANG['password_too_short'] = 'Mot de passe trop court. - %s caractères minimum';
|
||||
|
@ -71,6 +71,16 @@
|
||||
{if $CONF.show_undeliverable===YES}
|
||||
<span style='background-color:{$CONF.show_undeliverable_color};'>{$CONF.show_status_text}</span>={$PALANG.pStatus_undeliverable}
|
||||
{/if}
|
||||
{if $CONF.show_vacation===YES}
|
||||
<span style='background-color:{$CONF.show_vacation_color};'>{$CONF.show_status_text}</span>={$PALANG.pStatus_vacation}
|
||||
{/if}
|
||||
{if $CONF.show_disabled===YES}
|
||||
<span style='background-color:{$CONF.show_disabled_color};'>{$CONF.show_status_text}</span>={$PALANG.pStatus_disabled}
|
||||
{/if}
|
||||
{if $CONF.show_expired===YES}
|
||||
<span style='background-color:{$CONF.show_expired_color};'>{$CONF.show_status_text}</span>={$PALANG.pStatus_expired}
|
||||
{/if}
|
||||
|
||||
{if $CONF.show_popimap===YES}
|
||||
<span style='background-color:{$CONF.show_popimap_color};'>{$CONF.show_status_text}</span>={$PALANG.pStatus_popimap}
|
||||
{/if}
|
||||
|
Loading…
Reference in New Issue
Block a user