"; } if ($fPassword != $fPassword2) { $error = 1; $tName = $fName; $tQuota = $fQuota; $pEdit_mailbox_password_text = $PALANG['pEdit_mailbox_password_text_error']; } if (!check_quota ($fQuota, $fDomain)) { $error = 1; $tName = $fName; $tQuota = $fQuota; $pEdit_mailbox_quota_text = $PALANG['pEdit_mailbox_quota_text_error']; } if ($error != 1) { if (!empty ($fQuota)) $quota = $fQuota . "000000"; if ($fActive == "on") $fActive = 1; if (empty ($fPassword) and empty ($fPassword2)) { $result = db_query ("UPDATE mailbox SET name='$fName',quota='$quota',modified=NOW(),active='$fActive' WHERE username='$fUsername' AND domain='$fDomain'"); } else { $password = pacrypt ($fPassword); $result = db_query ("UPDATE mailbox SET password='$password',name='$fName',quota='$quota',modified=NOW(),active='$fActive' WHERE username='$fUsername' AND domain='$fDomain'"); } if ($result['rows'] != 1) { $tMessage = $PALANG['pEdit_mailbox_result_error']; } else { db_log ($SESSID_USERNAME, $fDomain, "edit mailbox", $fUsername); header ("Location: overview.php?domain=$fDomain"); exit; } } include ("./templates/header.tpl"); include ("./templates/menu.tpl"); include ("./templates/edit-mailbox.tpl"); include ("./templates/footer.tpl"); } ?>