s/depreciated/deprecated/
[freeside.git] / httemplate / config / config-view.cgi
1 <!-- mason kludge -->
2 <%= header('View Configuration', menubar( 'Main Menu' => $p,
3                                      'Edit Configuration' => 'config.cgi' ) ) %>
4
5 <% my $conf = new FS::Conf; my @config_items = $conf->config_items; %>
6
7 <% foreach my $section ( qw(required billing username password UI session
8                             shell mail radius apache BIND
9                            ),
10                          '', 'deprecated') { %>
11   <%= table("#cccccc", 2) %>
12   <tr>
13     <th colspan="2" bgcolor="#dcdcdc">
14       <%= ucfirst($section || 'unclassified') %> configuration options
15     </th>
16   </tr>
17   <% foreach my $i (grep $_->section eq $section, @config_items) { %>
18     <tr>
19       <td><a name="<%= $i->key %>">
20         <b><%= $i->key %></b>&nbsp;-&nbsp;<%= $i->description %>
21       </a></td>
22       <td><table border=0>
23         <% foreach my $type ( ref($i->type) ? @{$i->type} : $i->type ) {
24              my $n = 0; %>
25           <% if ( $type eq '' ) { %>
26             <tr><td><font color="#ff0000">no type</font></td></tr>
27           <% } elsif ( $type eq 'textarea' ) { %>
28             <tr><td bgcolor="#ffffff">
29 <pre>
30 <%= encode_entities(join("\n", $conf->config($i->key) ) ) %>
31 </pre>
32             </td></tr>
33           <% } elsif ( $type eq 'checkbox' ) { %>
34             <tr><td bgcolor="#<%= $conf->exists($i->key) ? '00ff00">YES' : 'ff0000">NO' %></td></tr>
35           <% } elsif ( $type eq 'text' || $type eq 'select' )  { %>
36             <tr><td bgcolor="#ffffff"><%=  $conf->exists($i->key) ? $conf->config($i->key) : '' %></td></tr>
37           <% } else { %>
38             <tr><td>
39               <font color="#ff0000">unknown type <%= $type %></font>
40             </td></tr>
41           <% } %>
42         <% $n++; } %>
43       </table></td>
44     </tr>
45   <% } %>
46   </table><br><br>
47 <% } %>
48
49 </body></html>