#!/usr/bin/perl
# config.cgi
# From Webmin config.cgi  ... does not allow to pass arguments so ...
# STTA Rev. 1.3 Copyright (c) 2001-2004 Jesús Pérez Lorenzo  --- license GNU GPL
# stta: (@#) 1.31051043346- [2004_01_29_102036]

require '../web-lib.pl';
do 'global-lib.pl';
do 'lists-lib.pl';
do 'html-lib.pl';
do 'print-lib.pl';
do "config_info.pl";

&init_config();
&load_dataconf();
$tta_ok=true;
$ldap_ok=true;
$ldapcache_ok=true;
$fileCFG = $ARGV[0];
if ( $fileCFG ne '' ) {
  $helpFile="config_".$fileCFG;
} else {
  $helpFile="sttaconfig";
}
$m = "stta";
%access = &get_module_acl(undef, $m);
$access{'noconfig'} &&
	&error($text{'config_ecannot'});
%module_info = &get_module_info($m);
if ( $config{check_brand} eq "true" ) { &check_brand_cgi() }
&headerstta( $text{'config_title'}, undef, $helpFile,undef,1,0,"$text{'headpage_right'}"."$text{'head_logout'}",undef,undef,"$text{head_below}" );

print "<center><font size=+2>",&text('config_dir', $module_info{'desc'}),
      "</font></center>\n";
print "<hr>\n";

print "<form action=\"/config_save.cgi\">\n";
print "<input type=hidden name=module value=\"$m\">\n";
print "<input type=hidden name=fcfg value=\"$fileCFG\">\n";
print "<table border>\n";
print "<tr $tb> <td><font color='$revtext'><b>",&text('config_header', $module_info{'desc'}),
      "</b> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n";
print "<img SRC='/stta/images/info.gif' width=20 heigth=20 align=top border=0> - $text{'help'}\n";
if ( $fileCFG eq "" ) {
    print "<img SRC='/stta/images/icon_pencil.gif' width=20 heigth=18 align=top border=0> - $text{'modify'}\n";
}
print "</td></font></tr>\n";

print "<tr $cb> <td><table width=100%>\n";

&config_form;

print "</table></td></tr></table>\n";
print "<input type=submit value=\"$text{'save'}\"></form>\n";
print "<hr>\n";

&footer($config{'back_return'},$text{'index'});
 do "footer.pl";

