clean up
This commit is contained in:
parent
f4071a612a
commit
36ef6f7c64
|
@ -16,7 +16,7 @@
|
|||
// domain
|
||||
// goto
|
||||
//
|
||||
// Form POST \ GET Variables:
|
||||
// Form POST / GET Variables:
|
||||
//
|
||||
// address
|
||||
// domain
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
// name
|
||||
// domain
|
||||
//
|
||||
// Form POST \ GET Variables:
|
||||
// Form POST / GET Variables:
|
||||
//
|
||||
// username
|
||||
// password1
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
// domain
|
||||
// goto
|
||||
//
|
||||
// Form POST \ GET Variables:
|
||||
// Form POST / GET Variables:
|
||||
//
|
||||
// address
|
||||
// domain
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
// name
|
||||
// domain
|
||||
//
|
||||
// Form POST \ GET Variables:
|
||||
// Form POST / GET Variables:
|
||||
//
|
||||
// username
|
||||
// password1
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
// username
|
||||
// domains
|
||||
//
|
||||
// Form POST \ GET Variables:
|
||||
// Form POST / GET Variables:
|
||||
//
|
||||
// username
|
||||
// password1
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
//
|
||||
// -none-
|
||||
//
|
||||
// Form POST \ GET Variables:
|
||||
// Form POST / GET Variables:
|
||||
//
|
||||
// -none-
|
||||
//
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
//
|
||||
// message
|
||||
//
|
||||
// Form POST \ GET Variables:
|
||||
// Form POST / GET Variables:
|
||||
//
|
||||
// table
|
||||
// where
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
// aliases
|
||||
// mailboxes
|
||||
//
|
||||
// Form POST \ GET Variables:
|
||||
// Form POST / GET Variables:
|
||||
//
|
||||
// domain
|
||||
// description
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
// message
|
||||
// goto
|
||||
//
|
||||
// Form POST \ GET Variables:
|
||||
// Form POST / GET Variables:
|
||||
//
|
||||
// address
|
||||
// domain
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
// message
|
||||
// name
|
||||
//
|
||||
// Form POST \ GET Variables:
|
||||
// Form POST / GET Variables:
|
||||
//
|
||||
// username
|
||||
// domain
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
//
|
||||
// -none-
|
||||
//
|
||||
// Form POST \ GET Variables:
|
||||
// Form POST / GET Variables:
|
||||
//
|
||||
// -none-
|
||||
//
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
//
|
||||
// list_admins
|
||||
//
|
||||
// Form POST \ GET Variables:
|
||||
// Form POST / GET Variables:
|
||||
//
|
||||
// -none-
|
||||
//
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
//
|
||||
// list_domains
|
||||
//
|
||||
// Form POST \ GET Variables:
|
||||
// Form POST / GET Variables:
|
||||
//
|
||||
// username
|
||||
//
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
// list_alias
|
||||
// list_mailbox
|
||||
//
|
||||
// Form POST \ GET Variables:
|
||||
// Form POST / GET Variables:
|
||||
//
|
||||
// domain
|
||||
// offset
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
//
|
||||
// log
|
||||
//
|
||||
// Form POST \ GET Variables:
|
||||
// Form POST / GET Variables:
|
||||
//
|
||||
// domain
|
||||
//
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
//
|
||||
// message
|
||||
//
|
||||
// Form POST \ GET Variables:
|
||||
// Form POST / GET Variables:
|
||||
//
|
||||
// table
|
||||
// where
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
// message
|
||||
// goto
|
||||
//
|
||||
// Form POST \ GET Variables:
|
||||
// Form POST / GET Variables:
|
||||
//
|
||||
// address
|
||||
// domain
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
// message
|
||||
// name
|
||||
//
|
||||
// Form POST \ GET Variables:
|
||||
// Form POST / GET Variables:
|
||||
//
|
||||
// username
|
||||
// domain
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
//
|
||||
// -none-
|
||||
//
|
||||
// Form POST \ GET Variables:
|
||||
// Form POST / GET Variables:
|
||||
//
|
||||
// -none-
|
||||
//
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
// list_alias
|
||||
// list_mailbox
|
||||
//
|
||||
// Form POST \ GET Variables:
|
||||
// Form POST / GET Variables:
|
||||
//
|
||||
// domain
|
||||
// offset
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
//
|
||||
// -none-
|
||||
//
|
||||
// Form POST \ GET Variables:
|
||||
// Form POST / GET Variables:
|
||||
//
|
||||
// -none-
|
||||
//
|
||||
|
|
2
main.php
2
main.php
|
@ -13,7 +13,7 @@
|
|||
//
|
||||
// -none-
|
||||
//
|
||||
// Form POST \ GET Variables:
|
||||
// Form POST / GET Variables:
|
||||
//
|
||||
// -none-
|
||||
//
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
//
|
||||
// message
|
||||
//
|
||||
// Form POST \ GET Variables:
|
||||
// Form POST / GET Variables:
|
||||
//
|
||||
// password_current
|
||||
// password1
|
||||
|
|
47
search.php
47
search.php
|
@ -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';
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
// subject
|
||||
// body
|
||||
//
|
||||
// Form POST \ GET Variables:
|
||||
// Form POST / GET Variables:
|
||||
//
|
||||
// to
|
||||
// subject
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
//
|
||||
// -none-
|
||||
//
|
||||
// Form POST \ GET Variables:
|
||||
// Form POST / GET Variables:
|
||||
//
|
||||
// -none-
|
||||
//
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
//
|
||||
// -none-
|
||||
//
|
||||
// Form POST \ GET Variables:
|
||||
// Form POST / GET Variables:
|
||||
//
|
||||
// -none-
|
||||
//
|
||||
|
|
|
@ -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';
|
||||
?>
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
//
|
||||
// message
|
||||
//
|
||||
// Form POST \ GET Variables:
|
||||
// Form POST / GET Variables:
|
||||
//
|
||||
// password_current
|
||||
// password1
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
// tSubject
|
||||
// tBody
|
||||
//
|
||||
// Form POST \ GET Variables:
|
||||
// Form POST / GET Variables:
|
||||
//
|
||||
// fSubject
|
||||
// fBody
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
//
|
||||
// log
|
||||
//
|
||||
// Form POST \ GET Variables:
|
||||
// Form POST / GET Variables:
|
||||
//
|
||||
// domain
|
||||
//
|
||||
|
|
Loading…
Reference in New Issue