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