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 '
---|