# STTA Rev. 1.3 Copyright (c) 2001-2004 Jesús Pérez Lorenzo  --- license GNU GPL 
# stta: (@#) 1.31051043346- [2004_01_29_102036]
# supervision.pl for STTA 
 
if ($access{'global'}) {
        if ($access{'supervision'} == 1) {
                if ($out_titles eq 1 ) {  
	             print "<td align=center>\n";
	             print "<h3>$text{'index_supervision'}</h3>\n";
               }
		$logstta_icon = { "icon" => "images/log_stta.gif",
			     "name" => $text{'logstta_title'},
			     "link" => "log_stta.cgi" };
		$logldap_icon = { "icon" => "images/log_ldap.gif",
			     "name" => $text{'logldap_title'},
			     "link" => "logusers_ldap.cgi" };
		$psSV_icon = { "icon" => "/webminlog/images/icon.gif",
			     "name" => $text{'sv_histAct_title'},
			     "link" => "search.cgi?uall=1&mall=0&module=stta&tall=1"};
		$defstta_icon = { "icon" => "images/dirdefs_stta.gif",
			     "name" => $text{'dirdefstta_title'},
			     "link" => "dirdef_stta.cgi" };
		$deflists_icon = { "icon" => "images/deflists_stta.gif",
			     "name" => $text{'showlist_title'},
			     "link" => "file_deflists.cgi" };
		$loghttp_icon = { "icon" => "images/log_http.gif",
			     "name" => $text{'loghttp_title'},
			     "link" => "log_http.cgi" };
		$loghttpacc_icon = { "icon" => "images/log_httpacc.gif",
			     "name" => $text{'loghttpacc_title'},
			     "link" => "log_httpacc.cgi" };
		$loghttps_icon = { "icon" => "images/log_https.gif",
			     "name" => $text{'loghttps_title'},
			     "link" => "log_https.cgi" };
		$loghttpsacc_icon = { "icon" => "images/log_httpsacc.gif",
			     "name" => $text{'loghttpsacc_title'},
			     "link" => "log_httpsacc.cgi" };
		$logtta_icon = { "icon" => "images/dirlogs_tta.gif",
			     "name" => $text{'dirlogstta_title'},
			     "link" => "dirlogs_tta.cgi" };
		$logssttacache_icon = { "icon" => "images/dirlogs_cache.gif",
			     "name" => $text{'dirlogscache_title'},
			     "link" => "dirlogs_cache.cgi" };
		$logsldap_icon = { "icon" => "images/dirlogs_ldap.gif",
			     "name" => $text{'logldapsrv_title'},
			     "link" => "log_ldap.cgi" };
		$acclogldap_icon = { "icon" => "images/log_ldapacc.gif",
			     "name" => $text{'logaccldap_title'},
			     "link" => "logldap_acc.cgi" };
		$logsldapcache_icon = { "icon" => "images/dirlogs_cache.gif",
			     "name" => $text{'logldapcachesrv_title'},
			     "link" => "logldap_cache.cgi" };
		$acclogldapcache_icon = { "icon" => "images/log_ldapacc.gif",
			     "name" => $text{'logaccldapcache_title'},
			     "link" => "logldapcache_acc.cgi" };
		$syslog_icon = { "icon" => "images/log_system.gif",
			     "name" => $text{'logsystem_title'},
			     "link" => "log_system.cgi" };
		$savedir_icon = { "icon" => "images/save_dir.gif",
			     "name" => $text{'dirsave_title'},
			     "link" => "dir_save.cgi" };
                if ($interface eq "tabs" ) {
	             &outconfig_icons("supervision", "index.cgi",
	                 $psSV_icon , $savedir_icon, $logtta_icon);
                } else {
	             &config_icons("supervision", "index.cgi",
	                 $psSV_icon , $savedir_icon, $logtta_icon);
                }
                if ($interface eq "tabs" ) {
	             &outconfig_icons("supervision", "index.cgi",
	                 $logstta_icon, $deflists_icon, $defstta_icon );
                } else {
	             &config_icons("supervision", "index.cgi",
	                 $logstta_icon, $deflists_icon, $defstta_icon );
                }
                if ($out_titles eq 1 ) {  
	             print "</td><td align=center>\n";
	             print "<h3>$text{'index_supervision'}</h3>\n";
                }
                if ($interface eq "tabs" ) {
	             &outconfig_icons("supervision", "index.cgi",
	                 $logsldap_icon,$acclogldap_icon,$logldap_icon );
                } else {
	             &config_icons("supervision", "index.cgi",
	                 $logsldap_icon,$acclogldap_icon,$logldap_icon );
                }
                if ( $config{'is_ldapcache'} eq "true" ) {
                   if ($interface eq "tabs" ) {
	             &outconfig_icons("supervision", "index.cgi",
	                 $logsldapcache_icon,$acclogldapcache_icon,
		         $logssttacache_icon )
                   } else {
	             &config_icons("supervision", "index.cgi",
	                 $logsldapcache_icon,$acclogldapcache_icon,
		         $logssttacache_icon )
                   }
                }
                if ($interface eq "tabs" ) {
	             &outconfig_icons("global", "global.cgi?",
	                 $syslog_icon, $loghttp_icon, $loghttpacc_icon );
                } else {
	             &config_icons("global", "global.cgi?",
	                 $syslog_icon, $loghttp_icon, $loghttpacc_icon);
                }
                if ($interface eq "tabs" ) {
	             &outconfig_icons("global", "global.cgi?",
	                 $loghttps_icon, $loghttpsacc_icon );
                } else {
	             &config_icons("global", "global.cgi?",
	                 $loghttps_icon, $loghttpsacc_icon );
                     if ($out_titles eq 1 ) {  print "</td>\n"; }
                }
	}
}
