diff --git a/bureau/admin/adm_variables.php b/bureau/admin/adm_variables.php index 7559e5cb..9e40812a 100644 --- a/bureau/admin/adm_variables.php +++ b/bureau/admin/adm_variables.php @@ -33,11 +33,13 @@ if (!$admin->enabled) { __("This page is restricted to authorized staff"); exit(); } -$fields = array ( - "member_id" => array ("post", "integer", null), - "fqdn_id" => array ("post", "integer", null), -); -getFields($fields); + +$conf = variable_init(); +foreach ($conf as $name => $val) { + if (isset($GLOBALS['_POST'][$name])) { + variable_set($name, $GLOBALS['_POST'][$name]); + } +} include_once ("head.php"); @@ -50,110 +52,20 @@ include_once ("head.php");

- - - - - - - - - - + +
+variables_list(); -$global_conf=$variables->get_impersonated(); -foreach( $variables->variables_list_name() as $varname => $varcomment) { ?> +foreach( variables_list() as $vars) { ?> - - - - - + + +
display_value_html($allvars, 'DEFAULT', NULL, $varname);?>display_value_html($allvars, 'GLOBAL', NULL, $varname);?>display_valueraw_html($global_conf[$varname]['value'], $varname); } ?>
- -


- -
-

- -get_creator_by_uid($member_id); - -$ml=array(); -foreach($admin->get_list() as $mid=>$mlogin) { - $ml[$mid] = $mlogin['login']; -} -echo _("See the vars for the account")." "; -echo ""; -echo " "._("logged via")." "; -echo " "; -echo ""; - -?> +

" />

-
- -get_sub_domain_all($fqdn_id); -$domList = $dom->get_panel_url_list(); -$fqdn=$domList[$fqdn_id]; -$impersonated_conf=$variables->get_impersonated($fqdn, $member_id); - -echo sprintf(_("Here are values for members %s logged via %s"), ''.$ml[$member_id].'', "$fqdn") ;?> - -"; -echo ""; -foreach( $variables->strata_order as $st) { - echo ""; -} // foeach -echo ""; -echo ""; -foreach( $variables->variables_list_name() as $varname => $varcomment) { ?> - - - - - - - - - - - - -
"._("Var")."$st"._("Used value")."
display_value_html($allvars, 'DEFAULT', NULL, $varname); ?>display_value_html($allvars, 'GLOBAL', NULL, $varname); ?>display_value_html($allvars, 'FQDN_CREATOR', $sub_infos['member_id'], $varname); ?>display_value_html($allvars, 'FQDN', $sub_infos['id'], $varname); ?>display_value_html($allvars, 'CREATOR', $creator, $varname); ?>display_value_html($allvars, 'MEMBER', $member_id, $varname); ?>display_value_html($allvars, 'DOMAIN', 'FIXME', $varname); ?>display_valueraw_html($impersonated_conf[$varname]['value'], $varname); ?>
- -
- - -
-

- - - - - diff --git a/bureau/class/m_dom.php b/bureau/class/m_dom.php index 4699310b..26e93c92 100644 --- a/bureau/class/m_dom.php +++ b/bureau/class/m_dom.php @@ -85,8 +85,9 @@ class m_dom { * Constructeur */ function m_dom() { + global $L_FQDN; $this->tld_no_check_at_all = variable_get('tld_no_check_at_all', 0, 'Disable ALL check on the TLD (users will be able to add any domain)', array('desc' => 'Disabled', 'type' => 'boolean')); - variable_get('mailname_bounce', '%%FQDN%%', 'FQDN of the mail server, used to create vhost virtual mail_adress.', array('desc' => 'FQDN', 'type' => 'string')); + variable_get('mailname_bounce', $L_FQDN, 'FQDN of the mail server, used to create vhost virtual mail_adress.', array('desc' => 'FQDN', 'type' => 'string')); } function get_panel_url_list() { diff --git a/bureau/class/m_ftp.php b/bureau/class/m_ftp.php index c7922fcd..2d66b28e 100644 --- a/bureau/class/m_ftp.php +++ b/bureau/class/m_ftp.php @@ -36,7 +36,7 @@ class m_ftp { */ function m_ftp() { global $L_FQDN; - $this->srv_name = variable_get('ftp_human_name', '%%FQDN%%','Human name for FTP server', array('desc'=>'Name','type'=>'string')); + $this->srv_name = variable_get('ftp_human_name', $L_FQDN,'Human name for FTP server', array('desc'=>'Name','type'=>'string')); } diff --git a/bureau/class/m_mail.php b/bureau/class/m_mail.php index fe3d9197..08b80a8b 100644 --- a/bureau/class/m_mail.php +++ b/bureau/class/m_mail.php @@ -82,13 +82,14 @@ class m_mail { * Constructeur */ function m_mail() { - $this->srv_submission = variable_get('mail_human_submission', '%%FQDN%%','Human name for mail server (submission protocol), leave empty to disable help', array('desc'=>'Name','type'=>'string')); - $this->srv_smtp = variable_get('mail_human_smtp', '%%FQDN%%','Human name for mail server (SMTP protocol), leave empty to disable help', array('desc'=>'Name','type'=>'string')); - $this->srv_smtps = variable_get('mail_human_smtps', '%%FQDN%%','Human name for mail server (SMTPS protocol), leave empty to disable help', array('desc'=>'Name','type'=>'string')); - $this->srv_imap = variable_get('mail_human_imap', '%%FQDN%%','Human name for IMAP mail server', array('desc'=>'Name','type'=>'string')); - $this->srv_imaps = variable_get('mail_human_imaps', '%%FQDN%%','Human name for IMAPS mail server', array('desc'=>'Name','type'=>'string')); - $this->srv_pop3 = variable_get('mail_human_pop3', '%%FQDN%%','Human name for POP3 mail server', array('desc'=>'Name','type'=>'string')); - $this->srv_pop3s = variable_get('mail_human_pop3s', '%%FQDN%%','Human name for POP3s mail server', array('desc'=>'Name','type'=>'string')); + global $L_FQDN; + $this->srv_submission = variable_get('mail_human_submission', $L_FQDN,'Human name for mail server (submission protocol), leave empty to disable help', array('desc'=>'Name','type'=>'string')); + $this->srv_smtp = variable_get('mail_human_smtp', $L_FQDN,'Human name for mail server (SMTP protocol), leave empty to disable help', array('desc'=>'Name','type'=>'string')); + $this->srv_smtps = variable_get('mail_human_smtps', $L_FQDN,'Human name for mail server (SMTPS protocol), leave empty to disable help', array('desc'=>'Name','type'=>'string')); + $this->srv_imap = variable_get('mail_human_imap', $L_FQDN,'Human name for IMAP mail server', array('desc'=>'Name','type'=>'string')); + $this->srv_imaps = variable_get('mail_human_imaps', $L_FQDN,'Human name for IMAPS mail server', array('desc'=>'Name','type'=>'string')); + $this->srv_pop3 = variable_get('mail_human_pop3', $L_FQDN,'Human name for POP3 mail server', array('desc'=>'Name','type'=>'string')); + $this->srv_pop3s = variable_get('mail_human_pop3s', $L_FQDN,'Human name for POP3s mail server', array('desc'=>'Name','type'=>'string')); } function hook_menu() {