#!/usr/bin/perl
# index.cgi
# Display a list of links for various types of global configuration
# STTA Rev. 1.3 Copyright (c) 2001-2002 Jesús Pérez Lorenzo  --- license GNU GPL 

require './stta-lib.pl';
&ReadParse(); 

if ( $access{stop} eq 1 ) {
      &headerstta($text{'index_title'}, "images/$current_lang/stta_stta.gif", "sttaintro",undef, 1, 0,  &restart_button()."<br>");
} else {
      &headerstta($text{'index_title'}, "images/$current_lang/stta_stta.gif", "sttaintro",undef, 1, 0,$text{headpage_rigth} );
}
# check for the base directory
if (!(-d $config{'tta_dir'})) {
	print "<hr><p>\n";
	print &text('index_eroot', "<tt>$config{'tta_dir'}</tt>",
		    "/config.cgi?$module_name"),"<p>\n";
	print "<hr>\n";
	&footer("/", $text{'index'});
	exit;
	}

# check for the executable
if (!-x $config{'tta_daemon'} || -d $config{'tta_daemon'}) {
	print "<hr><p>\n";
	print &text('index_eserver', "<tt>$config{'tta_daemon'}</tt>",
		    "/config.cgi?$module_name"),"<p>\n";
	print "<hr>\n";
	&footer("/", $text{'index'});
	exit;
	}
do "index/master.pl";
$interface=$config{'interface'}; 
        if ($interface eq "tabs" ) {
            do "index/index_tabs.pl";
        } else {
            $out_titles=1;    
            do "index/index_table.pl";
        }
&footer($config{'back_return'},$text{'index'});
do "footer.pl";
exit;
