array( "Back to Mailboxes" => "postfix-mailboxes-main.php" ), )); # Display change screen if ($_POST['frmaction'] == "change") { # Check a mailbox was selected if (isset($_POST['postfix_mailbox_id'])) { # Prepare statement $stmt = $db->prepare(" SELECT ID, Mailbox, Quota, Name, BCC, Comment, Disabled FROM ${DB_TABLE_PREFIX}mailboxes WHERE ID = ? "); ?>
execute(array($_POST['postfix_mailbox_id'])); $row = $stmt->fetchObject(); $stmt->closeCursor(); ?>
Old Value New Value
Mailbox mailbox ?>
Name name ?>
Password *encrypted*
Quota (in Mbyte) quota ?> (0 = unlimited)
BCC bcc ?>
Comment comment ?>
Disabled disabled ? 'yes' : 'no' ?>

No mailbox selected
quote($_POST['postfix_mailbox_name'])); } if (!empty($_POST['postfix_mailbox_password'])) { # Encrypt password $password = "{MD5}".base64_encode(pack("H*", md5($_POST['postfix_mailbox_password']))); array_push($updates,"Password = ".$db->quote($password)); } if (isset($_POST['postfix_mailbox_quota'])) { if (!empty($_POST['postfix_mailbox_quota'])) { $quota = $db->quote($_POST['postfix_mailbox_quota']); array_push($updates,"Quota = ".$quota); } } if (!empty($_POST['postfix_mailbox_bcc'])) { array_push($updates,"BCC = ".$db->quote($_POST['postfix_mailbox_bcc'])); } if (!empty($_POST['postfix_mailbox_comment'])) { array_push($updates,"Comment = ".$db->quote($_POST['postfix_mailbox_comment'])); } if (isset($_POST['postfix_mailbox_disabled']) && $_POST['postfix_mailbox_disabled'] != "") { array_push($updates,"Disabled = ".$db->quote($_POST['postfix_mailbox_disabled'])); } # Check if we have updates if (sizeof($updates) > 0) { $updateStr = implode(', ',$updates); $res = $db->exec("UPDATE ${DB_TABLE_PREFIX}mailboxes SET $updateStr WHERE ID = ".$db->quote($_POST['postfix_mailbox_id'])); if ($res) { ?>
Mailbox updated
Error updating mailbox!
errorInfo()) ?>
No changes made to Postfix mailbox
Invalid invocation