diff --git a/functions.inc.php b/functions.inc.php index cb2f27cd..2a2c819a 100644 --- a/functions.inc.php +++ b/functions.inc.php @@ -1661,8 +1661,6 @@ function gen_show_status ($show_alias) $stat_ok = 1; while ( ($g=array_pop($gotos)) && $stat_ok ) { - - //$stat_result = db_query ("SELECT address FROM $table_alias WHERE goto='$g' AND address != '$g'"); $stat_result = db_query ("SELECT address FROM $table_alias WHERE address = '$g'"); if ($stat_result['rows'] == 0) { @@ -1671,6 +1669,12 @@ function gen_show_status ($show_alias) if ( $stat_ok == 0 ) { $stat_domain = substr($g,strpos($g,"@")+1); + $stat_vacdomain = substr($stat_domain,strpos($stat_domain,"@")+1); + if ( $stat_vacdomain == $CONF['vacation_domain'] ) + { + $stat_ok = 1; + break; + } for ($i=0; $i < sizeof($CONF['show_undeliverable_exceptions']);$i++) { if ( $stat_domain == $CONF['show_undeliverable_exceptions'][$i] ) @@ -1700,9 +1704,10 @@ function gen_show_status ($show_alias) // POP/IMAP CHECK if ( $CONF['show_popimap'] == 'YES' ) { - //if the address passed in appears in its own goto filed, its POP/IMAP - if (preg_match ('/^' . $show_alias . '.*$/', $stat_goto) || - preg_match ('/,' . $show_alias . '.*$/', $stat_goto) ) + //if the address passed in appears in its own goto field, its POP/IMAP + if (preg_match ('/^' . $show_alias . '$/', $stat_goto) || + preg_match ('/.*,' . $show_alias . ',.*$/', $stat_goto) || + preg_match ('/,' . $show_alias . '$/', $stat_goto) ) { $stat_string .= "" . $CONF['show_status_text'] . " "; diff --git a/languages/en.lang b/languages/en.lang index 0527d751..f37e1250 100644 --- a/languages/en.lang +++ b/languages/en.lang @@ -324,6 +324,8 @@ $PALANG['pEdit_dbLog_editmailbox'] = 'edit mailbox'; $PALANG['pSearch'] = 'search'; $PALANG['pSearch_welcome'] = 'Searching for: '; +$PALANG['pReturn_to'] = 'Return to'; + $PALANG['pBroadcast_title'] = 'Send broadcast message'; $PALANG['pBroadcast_from'] = 'From'; $PALANG['pBroadcast_from_help'] = 'From address should be like e.g. "Systems Team" <support@my.domain.tld>'; diff --git a/search.php b/search.php index 614cfad8..db846987 100644 --- a/search.php +++ b/search.php @@ -17,6 +17,8 @@ // Form POST \ GET Variables: // // fSearch +// fGo +// fDomain // require ("./variables.inc.php"); require ("./config.inc.php"); @@ -102,12 +104,19 @@ if ($_SERVER['REQUEST_METHOD'] == "GET") if ($_SERVER['REQUEST_METHOD'] == "POST") { if (isset ($_POST['search'])) $fSearch = escape_string ($_POST['search']); - if (isset ($_POST['fgo'])) $fgo = escape_string ($_POST['fgo']); - if (isset ($_POST['domain'])) $fdomain = escape_string ($_POST['domain']); + if (isset ($_POST['fGo'])) $fGo = escape_string ($_POST['fGo']); + if (isset ($_POST['fDomain'])) $fDomain = escape_string ($_POST['fDomain']); - if (empty ($fSearch) && !empty ($fgo)) + if (empty ($fSearch) && !empty ($fGo)) { - header("Location: overview.php?domain=" . $_POST['domain'] ) && exit; + if (check_admin($SESSID_USERNAME)) + { + header("Location: list-virtual.php?domain=" . $fDomain ) && exit; + } + else + { + header("Location: overview.php?domain=" . $fDomain ) && exit; + } } diff --git a/templates/search.tpl b/templates/search.tpl index 83b55100..8b0ee0a5 100644 --- a/templates/search.tpl +++ b/templates/search.tpl @@ -11,7 +11,8 @@ '; - print '