From b16c3ac69a1777913104c62de1dd5c1d8358cbf8 Mon Sep 17 00:00:00 2001 From: quenenni Date: Tue, 15 Aug 2017 17:03:56 +0200 Subject: [PATCH] =?UTF-8?q?classe=20admin=20/=20fichiers=20section=20admin?= =?UTF-8?q?=20associ=C3=A9s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bureau/admin/adm_add.php | 12 +- bureau/admin/adm_authip_whitelist.php | 9 +- bureau/admin/adm_db_servers.php | 3 +- bureau/admin/adm_deactivate.php | 21 ++- bureau/admin/adm_defquotas.php | 7 +- bureau/admin/adm_dnsweberror.php | 8 +- bureau/admin/adm_doadd.php | 10 +- bureau/admin/adm_dodefquotas.php | 15 +- bureau/admin/adm_dodel.php | 13 +- bureau/admin/adm_doedit.php | 11 +- bureau/admin/adm_domlock.php | 9 +- bureau/admin/adm_doms.php | 7 +- bureau/admin/adm_doms_def_type.php | 13 +- bureau/admin/adm_domstype.php | 8 +- bureau/admin/adm_domstypedoedit.php | 9 +- bureau/admin/adm_domstypeedit.php | 15 +- bureau/admin/adm_domstyperegenerate.php | 13 +- bureau/admin/adm_donosu.php | 13 +- bureau/admin/adm_dorenew.php | 9 +- bureau/admin/adm_dosu.php | 11 +- bureau/admin/adm_edit.php | 19 +- bureau/admin/adm_email.php | 12 +- bureau/admin/adm_list.php | 13 +- bureau/admin/adm_lockpanel.php | 5 +- bureau/admin/adm_login.php | 20 +- bureau/admin/adm_mxaccount.php | 19 +- bureau/admin/adm_panel.php | 9 +- bureau/admin/adm_passpolicy.php | 23 +-- bureau/admin/adm_quotadoedit.php | 8 +- bureau/admin/adm_quotaedit.php | 17 +- bureau/admin/adm_slavedns.php | 20 +- bureau/admin/adm_tld.php | 13 +- bureau/admin/adm_tldadd.php | 9 +- bureau/admin/adm_tlddoadd.php | 6 +- bureau/admin/adm_tlddoedit.php | 6 +- bureau/admin/adm_tldedit.php | 8 +- bureau/admin/adm_update_domains.php | 6 +- bureau/admin/adm_variables.php | 5 +- bureau/class/m_admin.php | 241 ++++++++++++------------ 39 files changed, 333 insertions(+), 342 deletions(-) diff --git a/bureau/admin/adm_add.php b/bureau/admin/adm_add.php index f12b8e9f..64db13b9 100755 --- a/bureau/admin/adm_add.php +++ b/bureau/admin/adm_add.php @@ -28,7 +28,8 @@ require_once("../class/config.php"); include_once("head.php"); if (!$admin->enabled) { - __("This page is restricted to authorized staff"); + $msg->raise('Error', "admin", _("This page is restricted to authorized staff")); + echo $msg->msg_html_all(); exit(); } @@ -45,14 +46,15 @@ $fields = array ( ); getFields($fields); +$c=$admin->listPasswordPolicies(); +$passwd_classcount = $c['adm']['classcount']; + ?>



$error

"; -} +echo $msg->msg_html_all(); ?>
@@ -63,7 +65,7 @@ if (isset($error) && $error) { * - + * diff --git a/bureau/admin/adm_authip_whitelist.php b/bureau/admin/adm_authip_whitelist.php index 8e36b8fe..700085bc 100755 --- a/bureau/admin/adm_authip_whitelist.php +++ b/bureau/admin/adm_authip_whitelist.php @@ -15,13 +15,13 @@ getFields($fields); if (!empty($delete_id)) { if (! $authip->ip_delete($delete_id)) { - $error="Error during deletion"; + $msg->raise('Error', "admin", _("Error during deletion")); // à traduire } } if (!empty($ipsub)) { if (! $authip->ip_save_whitelist($id, $ipsub, $infos)) { - $error="Error during recording"; + $msg->raise('Error', "admin", _("Error during recording")); } } @@ -32,9 +32,8 @@ $list_ip = $authip->list_ip_whitelist();

- -

- +msg_html_all(); ?> +

"; __("The IP and subnet you have here are allowed for ALL users and ALL usages"); ?>

diff --git a/bureau/admin/adm_db_servers.php b/bureau/admin/adm_db_servers.php index b9285767..1f25c70b 100644 --- a/bureau/admin/adm_db_servers.php +++ b/bureau/admin/adm_db_servers.php @@ -27,7 +27,8 @@ require_once("../class/config.php"); include("head.php"); if (!$admin->enabled) { - __("This page is restricted to authorized staff"); + $msg->raise('Error', "admin", _("This page is restricted to authorized staff")); + echo $msg->msg_html_all(); exit(); } diff --git a/bureau/admin/adm_deactivate.php b/bureau/admin/adm_deactivate.php index e678d522..0b8d0cfc 100755 --- a/bureau/admin/adm_deactivate.php +++ b/bureau/admin/adm_deactivate.php @@ -32,7 +32,8 @@ require_once("../class/config.php"); include_once("head.php"); if (!$admin->enabled) { - __("This page is restricted to authorized staff"); + $msg->raise('Error', "admin", _("This page is restricted to authorized staff")); + echo $msg->msg_html_all(); exit; } $fields = array ( @@ -43,19 +44,22 @@ $fields = array ( getFields($fields); if (!$uid) { - __("Account not found"); + $msg->raise('Error', "admin", _("Account not found")); + echo $msg->msg_html_all(); include_once("foot.php"); exit(); } if (!$admin->checkcreator($uid)) { - __("This page is restricted to authorized staff"); + $msg->raise('Error', "admin", _("This page is restricted to authorized staff")); + echo $msg->msg_html_all(); include_once("foot.php"); exit(); } if (!$r=$admin->get($uid)) { - __("User does not exist"); + $msg->raise('Error', "admin", _("User does not exist")); + echo $msg->msg_html_all(); include_once("foot.php"); exit(); } @@ -79,7 +83,8 @@ if (! ($confirmed ) ) { print "

" . _("Domains of user: ") . $r["login"] . "

"; } else { if (empty($redirect)) { - __("Missing redirect url."); + $msg->raise('Error', "admin", _("Missing redirect url.")); + echo $msg->msg_html_all(); include_once("foot.php"); exit(); } @@ -105,9 +110,7 @@ reset($domains); foreach ($domains as $key => $domain) { if (!$confirmed) print '

' . $domain . '