array ("post","integer",""), "new_account" =>array ("post","integer",""), "pass" => array ("post","string",""), "passconf" => array("post","string",""), "quotamb" => array("post","integer",0), "enabled" => array("post","boolean",true), "islocal" => array("post","boolean",true), "recipients" => array("post","string",""), ); getFields($fields); $isedit=true; // if we go back to edit, it will know ;) // We check that email first ... so that we can compare its status with our ... if (!$res=$mail->get_details($mail_id)) { include("mail_list.php"); exit(); } else { /* * checking the password */ if($pass != $passconf){ $msg->raise("Error", "mail", _("Passwords do not match")); include ("mail_edit.php"); exit(); } else { if (!$mail->set_passwd($mail_id,$pass,($islocal == 1?false:true))) { /* SET THE PASSWORD */ include ("mail_edit.php"); exit(); } } /* * now the enable/disable status */ if ($res["enabled"] && !$enabled) { if (!$mail->disable($mail_id)) { /* DISABLE */ include ("mail_edit.php"); exit(); } } if (!$res["enabled"] && $enabled) { if (!$mail->enable($mail_id)) { /* ENABLE */ include ("mail_edit.php"); exit(); } } /* * now the islocal + quota + recipients */ if (!$mail->set_details($mail_id,$islocal,$quotamb,$recipients)) { /* SET OTHERS */ include ("mail_edit.php"); exit(); } /* * Other elements by hooks */ $rh=$hooks->invoke("mail_edit_post",array($mail_id)); if (in_array(false,$rh,true)) { include ("mail_edit.php"); exit(); } else { foreach($rh as $h) if ($h) $msg->raise("Error", "mail", $h); } } if ($new_account) $msg->raise("Ok", "mail", _("Your email has been created successfully")); // à traduire else $msg->raise("Ok", "mail", _("Your email has been edited successfully")); $_REQUEST["domain_id"]=$dom->get_domain_byname($res["domain"]); include("mail_list.php");