This commit is contained in:
mischa 2022-09-04 20:43:21 +00:00
parent f4071a612a
commit 36ef6f7c64
32 changed files with 79 additions and 76 deletions

View File

@ -16,7 +16,7 @@
// domain
// goto
//
// Form POST \ GET Variables:
// Form POST / GET Variables:
//
// address
// domain

View File

@ -16,7 +16,7 @@
// name
// domain
//
// Form POST \ GET Variables:
// Form POST / GET Variables:
//
// username
// password1

View File

@ -16,7 +16,7 @@
// domain
// goto
//
// Form POST \ GET Variables:
// Form POST / GET Variables:
//
// address
// domain

View File

@ -16,7 +16,7 @@
// name
// domain
//
// Form POST \ GET Variables:
// Form POST / GET Variables:
//
// username
// password1

View File

@ -17,7 +17,7 @@
// username
// domains
//
// Form POST \ GET Variables:
// Form POST / GET Variables:
//
// username
// password1

View File

@ -13,7 +13,7 @@
//
// -none-
//
// Form POST \ GET Variables:
// Form POST / GET Variables:
//
// -none-
//

View File

@ -13,7 +13,7 @@
//
// message
//
// Form POST \ GET Variables:
// Form POST / GET Variables:
//
// table
// where

View File

@ -18,7 +18,7 @@
// aliases
// mailboxes
//
// Form POST \ GET Variables:
// Form POST / GET Variables:
//
// domain
// description

View File

@ -14,7 +14,7 @@
// message
// goto
//
// Form POST \ GET Variables:
// Form POST / GET Variables:
//
// address
// domain

View File

@ -14,7 +14,7 @@
// message
// name
//
// Form POST \ GET Variables:
// Form POST / GET Variables:
//
// username
// domain

View File

@ -13,7 +13,7 @@
//
// -none-
//
// Form POST \ GET Variables:
// Form POST / GET Variables:
//
// -none-
//

View File

@ -13,7 +13,7 @@
//
// list_admins
//
// Form POST \ GET Variables:
// Form POST / GET Variables:
//
// -none-
//

View File

@ -13,7 +13,7 @@
//
// list_domains
//
// Form POST \ GET Variables:
// Form POST / GET Variables:
//
// username
//

View File

@ -14,7 +14,7 @@
// list_alias
// list_mailbox
//
// Form POST \ GET Variables:
// Form POST / GET Variables:
//
// domain
// offset

View File

@ -14,7 +14,7 @@
// list_alias
// list_mailbox
//
// Form POST \ GET Variables:
// Form POST / GET Variables:
//
// search
//
@ -23,34 +23,35 @@ include '../languages/' . check_language() . '.lang';
$list_domains = list_domains();
$search = filter_input(INPUT_POST, 'search', FILTER_DEFAULT);
if ($_SERVER['REQUEST_METHOD'] == "POST") {
$search = filter_input(INPUT_POST, 'search', FILTER_DEFAULT);
if (isset($search)) {
$dbh = pdo_connect();
$sth = $dbh->prepare("SELECT alias.address,alias.goto,alias.modified,alias.domain FROM alias LEFT JOIN mailbox ON alias.address=mailbox.username WHERE alias.address LIKE ? AND mailbox.maildir IS NULL ORDER BY alias.address");
$sth->bindValue(1, '%'.$search.'%', PDO::PARAM_STR);
$sth->execute();
$list_alias = $sth->fetchAll();
foreach ($list_alias as $key => $value) {
if (!in_array($value['domain'], array_column($list_domains, 'domain'))) {
unset($list_alias[$key]);
if (isset($search)) {
$dbh = pdo_connect();
$sth = $dbh->prepare("SELECT alias.address,alias.goto,alias.modified,alias.domain FROM alias LEFT JOIN mailbox ON alias.address=mailbox.username WHERE alias.address LIKE ? AND mailbox.maildir IS NULL ORDER BY alias.address");
$sth->bindValue(1, '%'.$search.'%', PDO::PARAM_STR);
$sth->execute();
$list_alias = $sth->fetchAll();
foreach ($list_alias as $key => $value) {
if (!in_array($value['domain'], array_column($list_domains, 'domain'))) {
unset($list_alias[$key]);
}
}
}
$sth = $dbh->prepare("SELECT * FROM mailbox WHERE username LIKE ? ORDER BY username");
$sth->bindValue(1, '%'.$search.'%', PDO::PARAM_STR);
$sth->execute();
$list_mailbox = $sth->fetchAll();
foreach ($list_mailbox as $key => $value) {
if (!in_array($value['domain'], array_column($list_domains, 'domain'))) {
unset($list_mailbox[$key]);
$sth = $dbh->prepare("SELECT * FROM mailbox WHERE username LIKE ? ORDER BY username");
$sth->bindValue(1, '%'.$search.'%', PDO::PARAM_STR);
$sth->execute();
$list_mailbox = $sth->fetchAll();
foreach ($list_mailbox as $key => $value) {
if (!in_array($value['domain'], array_column($list_domains, 'domain'))) {
unset($list_mailbox[$key]);
}
}
} else {
$list_alias = array();
$list_mailbox = array();
}
} else {
$list_alias = array();
$list_mailbox = array();
}
include '../templates/header.tpl';
include '../templates/admin_menu.tpl';
include '../templates/search.tpl';

View File

@ -13,7 +13,7 @@
//
// log
//
// Form POST \ GET Variables:
// Form POST / GET Variables:
//
// domain
//

View File

@ -13,7 +13,7 @@
//
// message
//
// Form POST \ GET Variables:
// Form POST / GET Variables:
//
// table
// where

View File

@ -14,7 +14,7 @@
// message
// goto
//
// Form POST \ GET Variables:
// Form POST / GET Variables:
//
// address
// domain

View File

@ -14,7 +14,7 @@
// message
// name
//
// Form POST \ GET Variables:
// Form POST / GET Variables:
//
// username
// domain

View File

@ -13,7 +13,7 @@
//
// -none-
//
// Form POST \ GET Variables:
// Form POST / GET Variables:
//
// -none-
//

View File

@ -14,7 +14,7 @@
// list_alias
// list_mailbox
//
// Form POST \ GET Variables:
// Form POST / GET Variables:
//
// domain
// offset

View File

@ -13,7 +13,7 @@
//
// -none-
//
// Form POST \ GET Variables:
// Form POST / GET Variables:
//
// -none-
//

View File

@ -13,7 +13,7 @@
//
// -none-
//
// Form POST \ GET Variables:
// Form POST / GET Variables:
//
// -none-
//

View File

@ -13,7 +13,7 @@
//
// message
//
// Form POST \ GET Variables:
// Form POST / GET Variables:
//
// password_current
// password1

View File

@ -14,7 +14,7 @@
// list_alias
// list_mailbox
//
// Form POST \ GET Variables:
// Form POST / GET Variables:
//
// search
//
@ -24,34 +24,35 @@ include './languages/' . check_language() . '.lang';
$SESSID_USERNAME = check_session();
$list_domains = list_domains($SESSID_USERNAME);
$search = filter_input(INPUT_POST, 'search', FILTER_DEFAULT);
if ($_SERVER['REQUEST_METHOD'] == "POST") {
$search = filter_input(INPUT_POST, 'search', FILTER_DEFAULT);
if (isset($search)) {
$dbh = pdo_connect();
$sth = $dbh->prepare("SELECT alias.address,alias.goto,alias.modified,alias.domain FROM alias LEFT JOIN mailbox ON alias.address=mailbox.username WHERE alias.address LIKE ? AND mailbox.maildir IS NULL ORDER BY alias.address");
$sth->bindValue(1, '%'.$search.'%', PDO::PARAM_STR);
$sth->execute();
$list_alias = $sth->fetchAll();
foreach ($list_alias as $key => $value) {
if (!in_array($value['domain'], array_column($list_domains, 'domain'))) {
unset($list_alias[$key]);
if (isset($search)) {
$dbh = pdo_connect();
$sth = $dbh->prepare("SELECT alias.address,alias.goto,alias.modified,alias.domain FROM alias LEFT JOIN mailbox ON alias.address=mailbox.username WHERE alias.address LIKE ? AND mailbox.maildir IS NULL ORDER BY alias.address");
$sth->bindValue(1, '%'.$search.'%', PDO::PARAM_STR);
$sth->execute();
$list_alias = $sth->fetchAll();
foreach ($list_alias as $key => $value) {
if (!in_array($value['domain'], array_column($list_domains, 'domain'))) {
unset($list_alias[$key]);
}
}
}
$sth = $dbh->prepare("SELECT * FROM mailbox WHERE username LIKE ? ORDER BY username");
$sth->bindValue(1, '%'.$search.'%', PDO::PARAM_STR);
$sth->execute();
$list_mailbox = $sth->fetchAll();
foreach ($list_mailbox as $key => $value) {
if (!in_array($value['domain'], array_column($list_domains, 'domain'))) {
unset($list_mailbox[$key]);
$sth = $dbh->prepare("SELECT * FROM mailbox WHERE username LIKE ? ORDER BY username");
$sth->bindValue(1, '%'.$search.'%', PDO::PARAM_STR);
$sth->execute();
$list_mailbox = $sth->fetchAll();
foreach ($list_mailbox as $key => $value) {
if (!in_array($value['domain'], array_column($list_domains, 'domain'))) {
unset($list_mailbox[$key]);
}
}
} else {
$list_alias = array();
$list_mailbox = array();
}
} else {
$list_alias = array();
$list_mailbox = array();
}
include './templates/header.tpl';
include './templates/menu.tpl';
include './templates/search.tpl';

View File

@ -16,7 +16,7 @@
// subject
// body
//
// Form POST \ GET Variables:
// Form POST / GET Variables:
//
// to
// subject

View File

@ -13,7 +13,7 @@
//
// -none-
//
// Form POST \ GET Variables:
// Form POST / GET Variables:
//
// -none-
//

View File

@ -13,7 +13,7 @@
//
// -none-
//
// Form POST \ GET Variables:
// Form POST / GET Variables:
//
// -none-
//

View File

@ -13,7 +13,7 @@
//
// -none-
//
// Form POST \ GET Variables:
// Form POST / GET Variables:
//
// -none-
//
@ -27,3 +27,4 @@ include '../templates/header.tpl';
include '../templates/users_menu.tpl';
include '../templates/users_main.tpl';
include '../templates/footer.tpl';
?>

View File

@ -13,7 +13,7 @@
//
// message
//
// Form POST \ GET Variables:
// Form POST / GET Variables:
//
// password_current
// password1

View File

@ -15,7 +15,7 @@
// tSubject
// tBody
//
// Form POST \ GET Variables:
// Form POST / GET Variables:
//
// fSubject
// fBody

View File

@ -13,7 +13,7 @@
//
// log
//
// Form POST \ GET Variables:
// Form POST / GET Variables:
//
// domain
//