fix bug where list source was not updated on change

This commit is contained in:
hmrhkr committed 2021-11-10 15:13:53 +01:00
1 parent a04893aed9
commit 649990eeef
3 files changed
+27 -21

No files matched your search

+3 -7
View File
@@ -38,20 +38,16 @@ if ($_SESSION['log']) {
</head>
<body>
<a href="maillistsettings.php"><h3>Zurück zur Maillistoberfläche (Editieren abbrechen)</h3></a><br>';
$abfrage = "SELECT `name`, `owners`, `security`, `islist` FROM `alias_details` WHERE `id` LIKE :editlistid";
$abfrage = "SELECT `name`, `owners`, `source`, `security`, `islist` FROM `alias_details` WHERE `id` LIKE :editlistid";
$result = $dbh->prepare($abfrage);
$result->execute(array(':editlistid' => $_GET['editlistid']));
while ($lists = $result->fetch()) {
$abfrage2 = "SELECT `source_username`, `source_domain` FROM `aliases` WHERE `alias_id` LIKE :aliasid";
$result2 = $dbh->prepare($abfrage2);
$result2->execute(array(':aliasid' => $_GET['editlistid']));
$listdetails = $result2->fetch();
echo'
<form name="editlist" method=POST action="editlist.php">
<label>Listenname: <input name="newlistname" type="text" placeholder="Listenname" value="' . $lists['name'] . '"/></label>
<label>Listenadresse: ';
if ($_SESSION['admin']) echo '<input name="newlistsource" type="text" placeholder="Listenadresse" value="' . $listdetails['source_username'] . '@' . $listdetails['source_domain'] . '"/></label>';
else echo $listdetails['source_username'] . '@' . $listdetails['source_domain'] . '</label> ';
if ($_SESSION['admin']) echo '<input name="newlistsource" type="text" placeholder="Listenadresse" value="' . $lists['name'] . '"/></label>';
else echo $lists['source'] . '</label> ';
echo '<label>Listenbesitzer: <textarea rows="1" cols="50" name="newlistowners">' . $lists['owners'] . '</textarea></label><br>
<label>Listenempfänger (durch Leerzeichen getrennt):<br><textarea rows="4" cols="50" name="newlistdestinations">';
$abfrage3 = "SELECT `destination_username`, `destination_domain` FROM `aliases` WHERE `alias_id` LIKE :aliasid";