30 require_once(
"../class/config.php");
32 if (!$admin->enabled) {
33 __(
"This page is restricted to authorized staff");
37 "member_id" => array (
"post",
"integer", null),
38 "fqdn_id" => array (
"post",
"integer", null),
42 include_once (
"head.php");
45 <h3><?php
__(
"Configure AlternC variables"); ?></h3>
50 <?php
__(
"Here are the internal AlternC variables that are currently being used."); ?>
53 <table border=
"0" cellpadding=
"4" cellspacing=
"0" class=
'tlist' id=
"tab_listvar_glob">
56 <th><?php
__(
"Names"); ?></th>
57 <th><?php
__(
"Comment"); ?></th>
58 <th><?php
__(
"Default value"); ?></th>
59 <th><?php
__(
"Global value"); ?></th>
60 <th><?php
__(
"Actual value used"); ?></th>
67 foreach(
$variables->variables_list_name() as $varname => $varcomment) { ?>
70 <td><a href=
'adm_var_edit.php?var=<?php echo urlencode($varname)?>'><?php echo $varname; ?></a></td>
71 <td><?php echo $varcomment; ?></td>
82 <h3
id=
"overwrited_vars"><?php
__(
"Overwrited vars"); ?></h3>
83 <form method=
"post" action=
"adm_variables.php#overwrited_vars">
88 foreach($admin->get_list() as $mid=>$mlogin) {
89 $ml[$mid] = $mlogin[
'login'];
91 echo _(
"See the vars for the account").
" ";
92 echo
"<select name='member_id'>";
eoption(
$ml, $member_id);echo
"</select>";
93 echo
" "._(
"logged via").
" ";
94 echo
"<select name='fqdn_id'>";
eoption(
$dom->get_panel_url_list(), $fqdn_id );echo
"</select> ";
95 echo
"<input type='submit' class='ina' value=\""; echo
ehe(_(
"View")); echo
"\" />";
102 if ( $member_id && $fqdn_id ) {
103 $sub_infos=
$dom->get_sub_domain_all($fqdn_id);
104 $fqdn=
$dom->get_panel_url_list()[$fqdn_id];
105 $impersonated_conf=
$variables->get_impersonated($fqdn, $member_id);
107 echo sprintf(_(
"Here are values for members %s logged via %s"),
'<b>'.
$ml[$member_id].
'</b>',
"<b>$fqdn</b>") ;?>
108 <table
class=
'tlist' id=
"tab_listvar_impers">
111 echo
"<th>"._(
"Var").
"</th>";
115 echo
"<th>"._(
"Used value").
"</th>";
116 echo
"</tr></thead>";
117 foreach(
$variables->variables_list_name() as $varname => $varcomment) { ?>
119 <td><a href=
'adm_var_edit.php?var=<?php echo urlencode($varname); ?>'><?php echo $varname; ?></a></td>
120 <td><?php
$variables->display_value_html(
$allvars,
'DEFAULT', NULL, $varname); ?></td>
122 <td><?php
$variables->display_value_html(
$allvars,
'FQDN_CREATOR', $sub_infos[
'member_id'], $varname); ?></td>
123 <td><?php
$variables->display_value_html(
$allvars,
'FQDN', $sub_infos[
'id'], $varname); ?></td>
125 <td><?php
$variables->display_value_html(
$allvars,
'MEMBER', $member_id, $varname); ?></td>
126 <td><?php
$variables->display_value_html(
$allvars,
'DOMAIN',
'FIXME', $varname); ?></td>
127 <td><?php
$variables->display_valueraw_html($impersonated_conf[$varname][
'value'], $varname); ?></td>
138 <h3><?php
__(
"Magical values");?></h3>
139 <?php
__(
"Those var are automatically replaced by the value indicated"); ?>
142 foreach (
$variables->replace_array as $vrepk => $vrepvalue) {
143 echo
"<li><code>$vrepk</code> => $vrepvalue</li>";
148 <script type=
"text/javascript">
150 $(document).ready(
function()
152 $(
"#tab_listvar_impers").tablesorter();
153 $(
"#tab_listvar_glob").tablesorter();
158 <?php include_once(
"foot.php"); ?>