diff --git a/bureau/admin/sql_bck.php b/bureau/admin/sql_bck.php index e6111532..502eb92b 100755 --- a/bureau/admin/sql_bck.php +++ b/bureau/admin/sql_bck.php @@ -52,13 +52,9 @@ $fields = array ( ); getFields($fields); -if (!$r=$mysql->get_mysql_details($id)) { - $error=$err->errstr(); -} +$r=$mysql->get_mysql_details($id); -if (isset($error) && $error) { - echo "

$error

 

"; -} +echo $msg->msg_html_all(); if (is_array($r)) { ?> diff --git a/bureau/admin/sql_del.php b/bureau/admin/sql_del.php index 550e1050..5dce21d7 100755 --- a/bureau/admin/sql_del.php +++ b/bureau/admin/sql_del.php @@ -35,20 +35,14 @@ $fields = array ( ); getFields($fields); -if(!isset($error)){ - $error=""; -} - if ($confirm=="y" ) { reset($_POST); while (list($key,$val)=each($_POST)) { if (substr($key,0,4)=="del_") { // Effacement de la base $val $r=$mysql->del_db(substr($key,4)); - if (!$r) { - $error.=$err->errstr()."
"; - } else { - $error.=sprintf(_("The database %s has been successfully deleted"),$val)."
"; + if ($r) { + $msg->raise("ok", "mysql", _("The database '%s' has been successfully deleted"), $val); } } } @@ -63,7 +57,7 @@ foreach($_POST as $key=>$val) { } } if (!$found) { - $error=_("Please check which databases you want to delete"); + $msg->raise("alert", "mysql", _("Please check which databases you want to delete")); include("sql_list.php"); exit(); } @@ -82,7 +76,7 @@ if (!$found) { reset($_POST); while (list($key,$val)=each($_POST)) { if (substr($key,0,4)=="del_") { - echo "".ehe($val,false)."
\n"; + echo "\n"; } } diff --git a/bureau/admin/sql_doadd.php b/bureau/admin/sql_doadd.php index 8add2197..3d644bc1 100644 --- a/bureau/admin/sql_doadd.php +++ b/bureau/admin/sql_doadd.php @@ -34,7 +34,7 @@ $fields = array ( ); getFields($fields); if (!$quota->cancreate("mysql")) { - $error=_("Can't create a database: your quota is over"); + $msg->raise("alert", "mysql", _("Can't create a database: your quota is over")); include("sql_list.php"); exit; } @@ -46,13 +46,11 @@ if($q['u'] > 0){ $dbname=$mem->user["login"]; } -if(!$mysql->add_db($dbname)) { - $error=$err->errstr(); - include("sql_list.php"); - exit; +if($mysql->add_db($dbname)) { + $msg->raise("ok", "mysql", _("La base de données '%s' a bien été créé."),$dbname); } -header('Location: sql_getparam.php?dbname='.htmlentities($dbname)); -#include("sql_list.php"); +#header('Location: sql_getparam.php?dbname='.htmlentities($dbname)); +include("sql_list.php"); ?> diff --git a/bureau/admin/sql_dobck.php b/bureau/admin/sql_dobck.php index 3472aba6..fa22391c 100644 --- a/bureau/admin/sql_dobck.php +++ b/bureau/admin/sql_dobck.php @@ -48,12 +48,13 @@ $fields = array ( getFields($fields); -if (!$mysql->put_mysql_backup($id,$bck_mode,$bck_history,$bck_gzip,$bck_dir)) { - $error=$err->errstr(); +$mysql->put_mysql_backup($id,$bck_mode,$bck_history,$bck_gzip,$bck_dir); + +if ($msg->has_msgs("Error")) { include("sql_bck.php"); exit(); } else { - $error=_("Your backup parameters has been successfully changed."); + $msg->raise("ok", "mysql", _("Your backup parameters has been successfully changed.")); } include("sql_list.php"); ?> diff --git a/bureau/admin/sql_dorestore.php b/bureau/admin/sql_dorestore.php index 400b19cd..a2e2691b 100644 --- a/bureau/admin/sql_dorestore.php +++ b/bureau/admin/sql_dorestore.php @@ -43,9 +43,8 @@ getFields($fields); get_mysql_details($id)) { - $error=$err->errstr(); -} +$r=$mysql->get_mysql_details($id); + if (! $r["enabled"]) { echo "

"._("You currently have no database defined")."

"; include_once("foot.php"); @@ -57,14 +56,11 @@ if (! $r["enabled"]) {

restore($restfile,true,$id)) { - $error=$err->errstr(); -} else { - $error=_("Your database has been restored, check out the previous text for error messages."); +if ($mysql->restore($restfile,true,$id)) { + $msg->raise("ok", "mysql", _("Your database has been restored, check out the previous text for error messages.")); } // if mysql->restore -echo "

$error

 

"; - +echo $msg->msg_html_all(); ?>

diff --git a/bureau/admin/sql_getparam.php b/bureau/admin/sql_getparam.php index 7d9fda0b..9c19c262 100644 --- a/bureau/admin/sql_getparam.php +++ b/bureau/admin/sql_getparam.php @@ -34,30 +34,35 @@ $fields = array ( "dbname" => array ("request", "string", ""), ); getFields($fields); -if (!$r=$mysql->get_dblist()) { +if (!$res=$mysql->get_dblist()) { $error=$err->errstr(); } -$r=$mysql->get_defaultsparam($dbname); -if (!$r) { - $error=$err->errstr(); -} +$res=$mysql->get_defaultsparam($dbname); ?>



$error

 

"; - include_once("foot.php"); - exit(); - } +echo $msg->msg_html_all(); + +if ($msg->has_msgs("error")) { + include_once("foot.php"); + exit(); +} ?>

:

+ + 1)?"Paramètres ".$i:"Paramètres"; +?> - + @@ -65,7 +70,7 @@ if (!$r) { - + + + +Sélectifs"; +} +?> + +
'.$mysql->dbus->HumanHostname.''; ?>'.$title.''; ?>
Droits de l'utilisateur  ">
@@ -95,6 +112,8 @@ if(!isset($r['user'])){ echo "

";__("You changed the MySQL User base configuration. Please refer to your configuration");echo"

 

"; } ?> +
+

diff --git a/bureau/admin/sql_list.php b/bureau/admin/sql_list.php index 05f6913e..7e028572 100755 --- a/bureau/admin/sql_list.php +++ b/bureau/admin/sql_list.php @@ -38,12 +38,14 @@ $r=$mysql->get_userslist();

$error

"; - } - if(!$r || empty($r)){ - echo "

"._("You have no sql user at the moment.")."

"; + // On regarde d'abord si on a une db existante. Sioui, on regarde si on a des utilisateurs existants + if(!$rdb || empty($rdb)){ + $msg->raise("info", "mysql", _("You have no database at the moment.")); + } else if(!$r || empty($r)){ + $msg->raise("info", "mysql", _("You have no sql user at the moment.")); } + +echo $msg->msg_html_all(); ?> -
+
" class="inb delete" />
diff --git a/bureau/admin/sql_pma_sso.php b/bureau/admin/sql_pma_sso.php index 5daf9e00..657302a1 100644 --- a/bureau/admin/sql_pma_sso.php +++ b/bureau/admin/sql_pma_sso.php @@ -29,9 +29,7 @@ */ require_once("../class/config.php"); -if (!$r=$mysql->php_myadmin_connect()) { - $error=$err->errstr(); -} else { +if ($r=$mysql->php_myadmin_connect()) { // SSO of PhpMyAdmin $_SESSION['PMA_single_signon_user'] = $r["login"]; $_SESSION['PMA_single_signon_password'] = $r["pass"]; @@ -45,9 +43,8 @@ if (!$r=$mysql->php_myadmin_connect()) { include_once("head.php"); echo '

'._("SQL Admin").'

'; -if (!empty($error)) { - echo "

$error

"; -} +echo $msg->msg_html_all(); + include_once("foot.php"); ?> diff --git a/bureau/admin/sql_restore.php b/bureau/admin/sql_restore.php index 7b7d4ba3..1840467c 100755 --- a/bureau/admin/sql_restore.php +++ b/bureau/admin/sql_restore.php @@ -36,18 +36,14 @@ $fields = array ( ); getFields($fields); -if (!$r=$mysql->get_mysql_details($id)) { - $error=$err->errstr(); -} +$r=$mysql->get_mysql_details($id); ?>



$error

 

"; -} +echo $msg->msg_html_all(); if (!is_array($r)) { echo "

"._("You currently have no database defined")."

"; diff --git a/bureau/admin/sql_users_add.php b/bureau/admin/sql_users_add.php index 9a1726a6..4873da2a 100755 --- a/bureau/admin/sql_users_add.php +++ b/bureau/admin/sql_users_add.php @@ -37,21 +37,20 @@ $fields = array ( ); getFields($fields); +$c=$admin->listPasswordPolicies(); +$passwd_classcount = $c['mysql']['classcount']; + ?>



$error

"; - if (isset($fatal) && $fatal) { -?> - +echo $msg->msg_html_all(); -
@@ -62,12 +61,17 @@ getFields($fields); +user["login"]."_"); +?> - + - + @@ -81,7 +85,7 @@ getFields($fields);
user["login"]; ?>_user["login"]; ?>_