|
|
|
@ -49,10 +49,6 @@ if (isset ($_GET['domain'])) $fDomain = escape_string ($_GET['domain']);
|
|
|
|
|
$pEdit_mailbox_name_text = $PALANG['pEdit_mailbox_name_text'];
|
|
|
|
|
$pEdit_mailbox_quota_text = $PALANG['pEdit_mailbox_quota_text'];
|
|
|
|
|
|
|
|
|
|
$result = db_query("SELECT * FROM $table_mailbox WHERE username = '$fUsername' AND domain = '$fDomain'");
|
|
|
|
|
if($result['rows'] != 1) {
|
|
|
|
|
die("Invalid username chosen; user does not exist in mailbox table");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!(check_owner ($SESSID_USERNAME, $fDomain) || authentication_has_role('global-admin')) )
|
|
|
|
|
{
|
|
|
|
@ -63,6 +59,10 @@ if (!(check_owner ($SESSID_USERNAME, $fDomain) || authentication_has_role('globa
|
|
|
|
|
$tMessage = $PALANG['pEdit_mailbox_domain_error'] . "$fDomain</span>";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$result = db_query("SELECT * FROM $table_mailbox WHERE username = '$fUsername' AND domain = '$fDomain'");
|
|
|
|
|
if($result['rows'] != 1) {
|
|
|
|
|
die("Invalid username chosen; user does not exist in mailbox table");
|
|
|
|
|
}
|
|
|
|
|
$user_details = db_array($result['result']);
|
|
|
|
|
|
|
|
|
|
if ($_SERVER['REQUEST_METHOD'] == "GET")
|
|
|
|
@ -93,7 +93,6 @@ if ($_SERVER['REQUEST_METHOD'] == "POST")
|
|
|
|
|
if (isset ($_POST['fQuota'])) $fQuota = intval ($_POST['fQuota']);
|
|
|
|
|
if (isset ($_POST['fActive'])) $fActive = escape_string ($_POST['fActive']);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if($fPassword != $user_details['password']){
|
|
|
|
|
if($fPassword == $fPassword2) {
|
|
|
|
|
if ($fPassword != "") {
|
|
|
|
@ -144,14 +143,13 @@ if ($_SERVER['REQUEST_METHOD'] == "POST")
|
|
|
|
|
$formvars['active']=$sqlActive;
|
|
|
|
|
|
|
|
|
|
$result = db_update ('mailbox', "username='$fUsername' AND domain='$fDomain'", $formvars, array('modified'));
|
|
|
|
|
|
|
|
|
|
if ($result != 1) {
|
|
|
|
|
$tMessage = $PALANG['pEdit_mailbox_result_error'];
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
db_log ($SESSID_USERNAME, $fDomain, 'edit_mailbox', $fUsername);
|
|
|
|
|
|
|
|
|
|
header ("Location: list-virtual.php?domain=$fDomain");
|
|
|
|
|
// header ("Location: list-virtual.php?domain=$fDomain");
|
|
|
|
|
exit;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|