diff --git a/bureau/admin/ftp_del.php b/bureau/admin/ftp_del.php
index 7843791a..65253a86 100755
--- a/bureau/admin/ftp_del.php
+++ b/bureau/admin/ftp_del.php
@@ -29,7 +29,6 @@
*/
require_once("../class/config.php");
-$error="";
// On parcours les POST_VARS et on repere les del_.
reset($_POST);
$lst_todel=array();
@@ -54,10 +53,9 @@ getFields($fields);
if(!empty($confirm_del)) {
foreach($lst_todel as $v) {
$r=$ftp->delete_ftp($v);
- if (!$r) {
- $error.=$err->errstr()."
";
- } else {
- $error.=sprintf(_("The ftp account %s has been successfully deleted"),$r)."
";
+ if ($r) {
+ $success=true;
+ $msg->raise("Ok", "ftp", _("The ftp account %s has been successfully deleted"),$r);
}
}
include("ftp_list.php");
@@ -71,7 +69,7 @@ if(!empty($confirm_del)) {
$error
"; - include("foot.php"); - exit(); -} - if (! $id && !$create) { //not a creation and not an edit - $error=_("Error: neither a creation nor an edition"); + $msg->raise("Error", "ftp", _("Error: neither a creation nor an edition")); include("ftp_list.php"); exit(); } @@ -60,7 +52,6 @@ if (! $id ) { //create } if (!$r) { - $error=$err->errstr(); $is_include=true; $rr[0]["prefixe"]=$prefixe; $rr[0]["login"]=$login; @@ -68,11 +59,11 @@ if (!$r) { include_once("ftp_edit.php"); exit(); } else { -if ($create) { - $error=_("The ftp account has been successfully created"); -} else { - $error=_("The ftp account has been successfully saved"); -} + if ($create) + $msg->raise("Ok", "ftp", _("The ftp account has been successfully created")); + else + $msg->raise("Ok", "ftp", _("The ftp account has been successfully saved")); + include("ftp_list.php"); exit(); } diff --git a/bureau/admin/ftp_edit.php b/bureau/admin/ftp_edit.php index 8925f45a..d5999827 100755 --- a/bureau/admin/ftp_edit.php +++ b/bureau/admin/ftp_edit.php @@ -40,29 +40,27 @@ if ( !isset($is_include) ) { } if (!$id && !$create) { - $error=_("Neither a creation nor a edition"); + $msg->raise("Error", "ftp", _("Neither a creation nor a edition")); echo "$error
"; + echo $msg->msg_html_all(); include_once("foot.php"); exit(); } if (!$id && $create) { //creation echo "