Fix: Maillisteditierung durch Nutzer löschte maillistsource. Einfügen eines 'supportinfotext' auf der settingspage
This commit is contained in:
parent
d9368c2f57
commit
3f44bcc6a6
|
@ -38,7 +38,6 @@ if ($_SESSION['log'] == 1) {
|
||||||
$eintrag = "UPDATE `alias_details` SET `name` = :newlistname, `owners` = :owners, `destinations` = :destinations, `security` = :security, `islist` = :islist WHERE `id` LIKE :editlistid"; // Aliasdaten in MailServer DB eintragen
|
$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 = $dbh->prepare($eintrag);
|
||||||
$sth->execute(array(':newlistname' => $_POST['newlistname'], ':owners' => $_POST['newlistowners'], ':destinations' => $_POST['newlistdestinations'], ':security' => $_POST['newlistsecurity'], ':islist' => $islist, ':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";
|
$eintrag = "DELETE FROM `alias_owner` WHERE `alias_id` LIKE :aliasid";
|
||||||
$sth = $dbh->prepare($eintrag);
|
$sth = $dbh->prepare($eintrag);
|
||||||
$sth->execute(array(':aliasid' => $_POST['editlistid']));
|
$sth->execute(array(':aliasid' => $_POST['editlistid']));
|
||||||
|
@ -48,6 +47,14 @@ if ($_SESSION['log'] == 1) {
|
||||||
$sth = $dbh->prepare($eintrag);
|
$sth = $dbh->prepare($eintrag);
|
||||||
$sth->execute(array(':aliasid' => $_POST['editlistid'], ':owner_username' => $maillistownerex[0], ':owner_domain' => $maillistownerex[1]));
|
$sth->execute(array(':aliasid' => $_POST['editlistid'], ':owner_username' => $maillistownerex[0], ':owner_domain' => $maillistownerex[1]));
|
||||||
}
|
}
|
||||||
|
if ($_SESSION['admin']) {
|
||||||
|
$newlistsource = explode('@', $_POST['newlistsource']);
|
||||||
|
} else {
|
||||||
|
$abfrage = "SELECT `source_username`, `source_domain` FROM `aliases` WHERE `alias_id` LIKE :alias_id";
|
||||||
|
$result = $dbh->prepare($abfrage);
|
||||||
|
$result->execute(array(':alias_id' => $_POST['editlistid']));
|
||||||
|
$newlistsource = $result->fetch(); //bei fetch() werden im Array ['spaltenname'] und [#Nummer der Spalte] angelegt also ['source_usernam'] und [0] praktische Sache
|
||||||
|
}
|
||||||
$eintrag = "DELETE FROM `aliases` WHERE `alias_id` LIKE :aliasid";
|
$eintrag = "DELETE FROM `aliases` WHERE `alias_id` LIKE :aliasid";
|
||||||
$sth = $dbh->prepare($eintrag);
|
$sth = $dbh->prepare($eintrag);
|
||||||
$sth->execute(array(':aliasid' => $_POST['editlistid']));
|
$sth->execute(array(':aliasid' => $_POST['editlistid']));
|
||||||
|
|
|
@ -48,9 +48,11 @@ if ($_SESSION['log']) {
|
||||||
$listdetails = $result2->fetch();
|
$listdetails = $result2->fetch();
|
||||||
echo'
|
echo'
|
||||||
<form name="editlist" method=POST action="editlist.php">
|
<form name="editlist" method=POST action="editlist.php">
|
||||||
<label>Listenname:<input name="newlistname" type="text" placeholder="Listenname" value="' . $lists['name'] . '"/></label>
|
<label>Listenname: <input name="newlistname" type="text" placeholder="Listenname" value="' . $lists['name'] . '"/></label>
|
||||||
<label>Listenadresse:<input name="newlistsource" type="text" placeholder="Listenadresse" value="' . $listdetails['source_username'] . '@' . $listdetails['source_domain'] . '"/></label>
|
<label>Listenadresse: ';
|
||||||
<label>Listenbesitzer:<textarea rows="1" cols="50" name="newlistowners">' . $lists['owners'] . '</textarea></label><br>
|
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> ';
|
||||||
|
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">';
|
<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";
|
$abfrage3 = "SELECT `destination_username`, `destination_domain` FROM `aliases` WHERE `alias_id` LIKE :aliasid";
|
||||||
$result3 = $dbh->prepare($abfrage3);
|
$result3 = $dbh->prepare($abfrage3);
|
||||||
|
|
|
@ -65,8 +65,9 @@ if ($_SESSION['log'] == 1) {
|
||||||
<form name="deletemail" method=POST action="bin/deletemail.php">
|
<form name="deletemail" method=POST action="bin/deletemail.php">
|
||||||
<input type="submit" value="LÖSCHEN"/>
|
<input type="submit" value="LÖSCHEN"/>
|
||||||
</form><p>';
|
</form><p>';
|
||||||
echo $config['connectionsettingsadvicetext'];
|
echo nl2br($config['connectionsettingsadvicetext']);
|
||||||
echo $config['supportinfotext'];
|
echo '<br><br>';
|
||||||
|
echo nl2br($config['supportinfotext']);
|
||||||
echo '</p></body>
|
echo '</p></body>
|
||||||
</html>';
|
</html>';
|
||||||
exit;
|
exit;
|
||||||
|
|
Loading…
Reference in New Issue