From d7f757b6ab06c274d35c0989754155699d7567db Mon Sep 17 00:00:00 2001 From: Humorhenker <36549980+Humorhenker@users.noreply.github.com> Date: Thu, 5 Dec 2019 15:57:29 +0100 Subject: [PATCH] =?UTF-8?q?islist=20Option=20eingef=C3=BChrt=20um=20Mailli?= =?UTF-8?q?sten=20und=20reine=20Umleitungen=20zu=20untescheiden?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/bin/addmaillist.php | 6 ++++-- public/bin/editlist.php | 8 +++++--- public/bin/editlistpre.php | 5 ++++- public/bin/maillistsettings.php | 11 ++++++----- 4 files changed, 19 insertions(+), 11 deletions(-) diff --git a/public/bin/addmaillist.php b/public/bin/addmaillist.php index 05c332e..b919d7c 100644 --- a/public/bin/addmaillist.php +++ b/public/bin/addmaillist.php @@ -23,9 +23,11 @@ try { } session_start(); if ($_SESSION['log'] == 1 && $_SESSION['admin']) { - $eintrag = "INSERT INTO `alias_details` (`name`, `owners`, `destinations`, `security`) VALUES (:newlistname, :owners, :destinations, :security)"; // Aliasdaten in MailServer DB eintragen + if (!isset($_POST['newlistislist'])) $islist = 0; // wenn die checkbox nicht ausgewählt wurde ist die Post Variable nicht gesetzt, dass stört die Datenbank, deshalb wird Null eingertragen + else $islist = $_POST['newlistislist']; + $eintrag = "INSERT INTO `alias_details` (`name`, `owners`, `destinations`, `security`, `islist`) VALUES (:newlistname, :owners, :destinations, :security, :islist)"; // Aliasdaten in MailServer DB eintragen $sth = $dbh->prepare($eintrag); - $sth->execute(array(':newlistname' => $_POST['newlistname'], ':owners' => $_POST['newlistowners'], ':destinations' => $_POST['newlistdestinations'], ':security' => $_POST['newlistsecurity'])); + $sth->execute(array(':newlistname' => $_POST['newlistname'], ':owners' => $_POST['newlistowners'], ':destinations' => $_POST['newlistdestinations'], ':security' => $_POST['newlistsecurity'], ':islist' => $islist)); $newlistid = $dbh->lastInsertID(); foreach (explode(' ', $_POST['newlistowners']) as $maillistowner) { $maillistownerex = explode('@', $maillistowner); diff --git a/public/bin/editlist.php b/public/bin/editlist.php index 53e6eb1..6d3efc4 100644 --- a/public/bin/editlist.php +++ b/public/bin/editlist.php @@ -32,10 +32,12 @@ if ($_SESSION['log'] == 1) { exit; } } - $newlistowner = explode('@', $_POST['newlistowner']); - $eintrag = "UPDATE `alias_details` SET `name` = :newlistname, `owners` = :owners, `destinations` = :destinations, `security` = :security WHERE `id` LIKE :editlistid"; // Aliasdaten in MailServer DB eintragen + $newlistowner = explode('@', $_POST['newlistowners']); + if (!isset($_POST['newlistislist'])) $islist = 0; // wenn die checkbox nicht ausgewählt wurde ist die Post Variable nicht gesetzt, dass stört die Datenbank, deshalb wird Null eingertragen + else $islist = $_POST['newlistislist']; + $eintrag = "UPDATE `alias_details` SET `name` = :newlistname, `owners` = :owners, `destinations` = :destinations, `security` = :security, `islist` = :islist WHERE `id` LIKE :editlistid"; // Aliasdaten in MailServer DB eintragen $sth = $dbh->prepare($eintrag); - $sth->execute(array(':newlistname' => $_POST['newlistname'], ':owners' => $_POST['newlistowners'], ':destinations' => $_POST['newlistdestinations'], ':security' => $_POST['newlistsecurity'], ':editlistid' => $_POST['editlistid'])); + $sth->execute(array(':newlistname' => $_POST['newlistname'], ':owners' => $_POST['newlistowners'], ':destinations' => $_POST['newlistdestinations'], ':security' => $_POST['newlistsecurity'], ':islist' => $islist, ':editlistid' => $_POST['editlistid'])); $newlistsource = explode('@', $_POST['newlistsource']); $eintrag = "DELETE FROM `alias_owner` WHERE `alias_id` LIKE :aliasid"; $sth = $dbh->prepare($eintrag); diff --git a/public/bin/editlistpre.php b/public/bin/editlistpre.php index decb411..c938ecf 100644 --- a/public/bin/editlistpre.php +++ b/public/bin/editlistpre.php @@ -38,7 +38,7 @@ if ($_SESSION['log']) {
Listenname | Listenadresse | Listenempfänger | Listenbesitzer | Listensicherheit | Optionen |
---|
Listenname | Listenadresse | Listenempfänger | Listenbesitzer | Listensicherheit | Ist Maillingliste | Optionen | ' . $lists['security'] . ' | Löschen Editieren | ';
+ echo '' . $lists['security'] . ' | ' . $lists['islist'] . ' | Löschen Editieren | ';
}
echo '
---|