<% include("/elements/header.html", $title, menubar( 'Main Menu' => $p, 'View all agents' => $p.'browse/agent.cgi', ) ) %> % if ($FS::UID::use_confcompat) { CONFIGURATION NOT STORED IN DATABASE -- USING COMPATIBILITY MODE

%} % % foreach my $section ( qw(required billing username password UI session % shell BIND % ), % '', 'deprecated') { % foreach my $nav_section ( qw(required billing username password UI session % shell BIND % ), % '', 'deprecated') { % if ( $section eq $nav_section ) { [<% ucfirst($nav_section || 'unclassified') %>] % } else { [<% ucfirst($nav_section || 'unclassified') %>] % } % }
<% table("#cccccc", 2) %> <% ucfirst($section || 'unclassified') %> configuration options % foreach my $i (grep $_->section eq $section, @config_items) { <% $i->key %> - <% $i->description %> % foreach my $type ( ref($i->type) ? @{$i->type} : $i->type ) { % my $n = 0; % if ( $type eq '' ) { % } elsif ( $type eq 'binary' ) { <% $conf->exists($i->key, $agentnum) ? qq!download! : 'empty' %> % } elsif ( $type eq 'textarea' % || $type eq 'editlist' % || $type eq 'selectmultiple' ) { % } elsif ( $type eq 'checkbox' ) { % } elsif ( $type eq 'text' || $type eq 'select' ) { % } elsif ( $type eq 'select-sub' ) { % } else { % } % $n++; }
no type
<% encode_entities(join("\n", $conf->config($i->key, $agentnum) ) ) %>
YES' : 'ff0000">NO' %>
<% $conf->exists($i->key, $agentnum) ? $conf->config($i->key, $agentnum) : '' %>
<% $conf->config($i->key, $agentnum) %>: <% &{ $i->option_sub }( $conf->config($i->key, $agentnum) ) %>
unknown type <% $type %>
% }

% } <%init> die "access denied" unless $FS::CurrentUser::CurrentUser->access_right('Configuration'); my ($conf, $title, @config_items, $agentnum); if ($cgi->param('agentnum') =~ /^(\d+)$/) { $agentnum = $1; } if ($agentnum) { my $agent = qsearchs('agent', { 'agentnum' => $agentnum } ); die "Agent $agentnum not found!" unless $agent; $title = "Configuration for ". $agent->agent; } else { $title = 'Global Configuration'; } $conf = new FS::Conf; @config_items = grep { $agentnum ? $_->per_agent : 1 } $conf->config_items;