array ("get", "string", null), "var_id" => array ("post", "integer", null), "var_value" => array ("post", "string", null), "var_name" => array ("post", "string", null), "strata" => array ("post", "string", null), "strata_id" => array ("post", "integer", null), "delete" => array ("post", "boolean", false), ); getFields($fields); if (empty($var)) { echo "
";__("Missing var name");echo "
"; include_once("foot.php"); } if ( $var_id && $delete ) { $variables->del($var_id); } else if ( $strata && $var_name && $var_value ) { $variables->variable_update_or_create($var_name, $var_value, $strata, $strata_id); } else if ( $var_id && $var_value ) { $variables->variable_update_or_create($var_name, $var_value, null, null, $var_id); } echo ""; __($strata); echo " | "; switch($strata) { case 'DEFAULT': echo "".$allvars['DEFAULT'][null][$var]['value']." | "; break; case 'GLOBAL': echo ""; if ( isset($allvars['GLOBAL'][null][$var]) && is_array($allvars['GLOBAL'][null][$var])){ echo "".$allvars['GLOBAL'][null][$var]['value'].""; edit_var($allvars['GLOBAL'][null][$var]); } else { echo ""._("Add").""; add_var($strata); } echo " | "; break; case 'FQDN_CREATOR': echo "";
foreach ($allvars['FQDN_CREATOR'] as $ttk => $ttv ) {
if ( isset($ttv[$var]) && is_array( $ttv[$var])) {
echo sprintf(_("Overwritted by %s"), $members[$ttk]['login'])." → ";
echo "".$ttv[$var]['value']."";
edit_var($ttv[$var]);
}
echo " "; } echo ""._("Add").""; add_var($strata, $members_list); echo " | ";
break;
case 'FQDN':
echo "";
foreach ($allvars['FQDN'] as $ttk => $ttv ) {
if ( isset($ttv[$var]) && is_array( $ttv[$var])) {
echo sprintf(_("Overwritted by %s"), $panel_url[$ttk])." → ";
echo "".$ttv[$var]['value']."";
edit_var($ttv[$var]);
}
echo " "; } echo ""._("Add").""; add_var($strata, $panel_url); echo " | ";
break;
case 'CREATOR':
echo "";
foreach ($allvars['CREATOR'] as $ttk => $ttv ) {
if ( isset($ttv[$var]) && is_array( $ttv[$var])) {
echo sprintf(_("Overwritted by %s"), $members[$ttk]['login'])." → ";
echo "".$ttv[$var]['value']."";
edit_var($ttv[$var]);
}
echo " "; } echo ""._("Add").""; add_var($strata, $creators_list ); echo " | ";
break;
case 'MEMBER':
echo "";
foreach ($allvars['MEMBER'] as $ttk => $ttv ) {
if ( isset($ttv[$var]) && is_array( $ttv[$var])) {
echo sprintf(_("Overwritted by %s"), $members[$ttk]['login'])." → ";
echo "".$ttv[$var]['value']."";
edit_var($ttv[$var]);
}
echo " "; } echo ""._("Add").""; add_var($strata, $members_list); echo " | ";
break;
case 'DOMAIN':
//FIXME TODO
echo "Todo. | "; break; } //switch echo "