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 // domain
// goto // goto
// //
// Form POST \ GET Variables: // Form POST / GET Variables:
// //
// address // address
// domain // domain

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -14,7 +14,7 @@
// list_alias // list_alias
// list_mailbox // list_mailbox
// //
// Form POST \ GET Variables: // Form POST / GET Variables:
// //
// search // search
// //
@ -23,34 +23,35 @@ include '../languages/' . check_language() . '.lang';
$list_domains = list_domains(); $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)) { if (isset($search)) {
$dbh = pdo_connect(); $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 = $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->bindValue(1, '%'.$search.'%', PDO::PARAM_STR);
$sth->execute(); $sth->execute();
$list_alias = $sth->fetchAll(); $list_alias = $sth->fetchAll();
foreach ($list_alias as $key => $value) { foreach ($list_alias as $key => $value) {
if (!in_array($value['domain'], array_column($list_domains, 'domain'))) { if (!in_array($value['domain'], array_column($list_domains, 'domain'))) {
unset($list_alias[$key]); unset($list_alias[$key]);
}
} }
}
$sth = $dbh->prepare("SELECT * FROM mailbox WHERE username LIKE ? ORDER BY username"); $sth = $dbh->prepare("SELECT * FROM mailbox WHERE username LIKE ? ORDER BY username");
$sth->bindValue(1, '%'.$search.'%', PDO::PARAM_STR); $sth->bindValue(1, '%'.$search.'%', PDO::PARAM_STR);
$sth->execute(); $sth->execute();
$list_mailbox = $sth->fetchAll(); $list_mailbox = $sth->fetchAll();
foreach ($list_mailbox as $key => $value) { foreach ($list_mailbox as $key => $value) {
if (!in_array($value['domain'], array_column($list_domains, 'domain'))) { if (!in_array($value['domain'], array_column($list_domains, 'domain'))) {
unset($list_mailbox[$key]); unset($list_mailbox[$key]);
}
} }
} else {
$list_alias = array();
$list_mailbox = array();
} }
} else {
$list_alias = array();
$list_mailbox = array();
} }
include '../templates/header.tpl'; include '../templates/header.tpl';
include '../templates/admin_menu.tpl'; include '../templates/admin_menu.tpl';
include '../templates/search.tpl'; include '../templates/search.tpl';

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -14,7 +14,7 @@
// list_alias // list_alias
// list_mailbox // list_mailbox
// //
// Form POST \ GET Variables: // Form POST / GET Variables:
// //
// search // search
// //
@ -24,34 +24,35 @@ include './languages/' . check_language() . '.lang';
$SESSID_USERNAME = check_session(); $SESSID_USERNAME = check_session();
$list_domains = list_domains($SESSID_USERNAME); $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)) { if (isset($search)) {
$dbh = pdo_connect(); $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 = $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->bindValue(1, '%'.$search.'%', PDO::PARAM_STR);
$sth->execute(); $sth->execute();
$list_alias = $sth->fetchAll(); $list_alias = $sth->fetchAll();
foreach ($list_alias as $key => $value) { foreach ($list_alias as $key => $value) {
if (!in_array($value['domain'], array_column($list_domains, 'domain'))) { if (!in_array($value['domain'], array_column($list_domains, 'domain'))) {
unset($list_alias[$key]); unset($list_alias[$key]);
}
} }
}
$sth = $dbh->prepare("SELECT * FROM mailbox WHERE username LIKE ? ORDER BY username"); $sth = $dbh->prepare("SELECT * FROM mailbox WHERE username LIKE ? ORDER BY username");
$sth->bindValue(1, '%'.$search.'%', PDO::PARAM_STR); $sth->bindValue(1, '%'.$search.'%', PDO::PARAM_STR);
$sth->execute(); $sth->execute();
$list_mailbox = $sth->fetchAll(); $list_mailbox = $sth->fetchAll();
foreach ($list_mailbox as $key => $value) { foreach ($list_mailbox as $key => $value) {
if (!in_array($value['domain'], array_column($list_domains, 'domain'))) { if (!in_array($value['domain'], array_column($list_domains, 'domain'))) {
unset($list_mailbox[$key]); unset($list_mailbox[$key]);
}
} }
} else {
$list_alias = array();
$list_mailbox = array();
} }
} else {
$list_alias = array();
$list_mailbox = array();
} }
include './templates/header.tpl'; include './templates/header.tpl';
include './templates/menu.tpl'; include './templates/menu.tpl';
include './templates/search.tpl'; include './templates/search.tpl';

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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