# STTA Rev. 1.3 Copyright (c) 2001-2004 Jesús Pérez Lorenzo  --- license GNU GPL 
# stta: (@#) 1.31051043346- [2004_01_29_102036]

# admin.pl for STTA 
 
if ($access{'global'}) {
        if ($access{'admin'} == 1) {
            if ($out_titles eq 1 ) {  
	             print "<td align=center>\n";
	             print "<h3>$text{'index_admin'}</h3>\n";
            }
            if ( ! $access{'noconfig'} ) {
		$config_icon = { "icon" => "images/icon.gif",
			     "name" => $text{'sttaconfig_title'},
			     "link" => "sttaconfig.cgi" };
		$maincfg_icon = { "icon" => "images/sttaconfig.gif",
			     "name" => $text{'maincfg_title'},
			     "link" => "config.cgi?main" };
		$debugcfg_icon = { "icon" => "images/sttaconfig.gif",
			     "name" => $text{'debugcfg_title'},
			     "link" => "config.cgi?debug" };
		$sesscfg_icon = { "icon" => "images/sttaconfig.gif",
			     "name" => $text{'sessioncfg_title'},
			     "link" => "config.cgi?session" };
             }
	     $schemaldap_icon = { "icon" => "images/ldapschema.gif",
			     "name" => $text{'ldapschema_title'},
			     "link" => "ldap_schema.cgi" };
	     $schemaldapcache_icon = { "icon" => "images/ldapcacheschema.gif",
			     "name" => $text{'ldapcacheschema_title'},
			     "link" => "ldapcache_schema.cgi" };
	     $sttainstallupd_icon = { "icon" => "images/sttaupd.jpg",
			     "name" => $text{'installupd_title'},
			     "link" => "stta_installupd.cgi" };
             $debuglist_icon = { "icon" => "images/list_debuglogs.gif",
			        "name" => $text{'listdebuglogs_title'},
                   "link"=>"file_mod.cgi?kf=list_debuglogs&postform=listdebuglogs"};
             $sttalogslist_icon = { "icon" => "images/list_sttalogs.gif",
			        "name" => $text{'liststtalogs_title'},
                   "link"=>"file_mod.cgi?kf=list_sttalogs&postform=liststtalogs"};
             $backuplist_icon = { "icon" => "images/list_backups.gif",
			        "name" => $text{'listbackups_title'},
                   "link"=>"file_mod.cgi?kf=list_backups&postform=listbackups"};
             $webhelp_icon = { "icon" => "images/webhelp.gif",
			          "name" => $text{'webhelp_title'},
                                  "link"=>"stta_webhelp.cgi"};
             $sttareport_icon = { "icon" => "images/sttareport.gif",
			          "name" => $text{'sttareport_title'},
                                  "link"=>"stta_report.cgi"};
             $brandmgr_icon = { "icon" => "images/brandmgr.gif",
			          "name" => $text{'brandmgr_title'},
                                  "link"=>"stta_brandlst.cgi"} ;
             $checksync_icon = { "icon" => "images/checksync.gif",
			          "name" => $text{'checksync_title'},
                                  "link"=>"stta_checksync.cgi"};
             if ($interface eq "tabs" ) {
                 if ( ! $access{'noconfig'} )  {
	             &outconfig_icons("admin", "index.cgi",
                       $config_icon,$maincfg_icon,  $debugcfg_icon, $sesscfg_icon );
                 }
	         &outconfig_icons("admin", "index.cgi",
	                 $debuglist_icon,$sttalogslist_icon,  $backuplist_icon );
	         &outconfig_icons("admin", "index.cgi",
	                 $schemaldap_icon,$schemaldapcache_icon );
	         &outconfig_icons("admin", "index.cgi",
	                 $sttainstallupd_icon, $brandmgr_icon, $checksync_icon );
	         &outconfig_icons("admin", "index.cgi",
	                 $webhelp_icon, $sttareport_icon );
             } else {
                 if ( ! $access{'noconfig'} ) {
	             &config_icons("admin", "index.cgi",
	               $config_icon,$maincfg_icon,  $debugcfg_icon, $sesscfg_icon );
                 }
	         &config_icons("admin", "index.cgi",
	                 $debuglist_icon,$sttalogslist_icon, $backuplist_icon,
	                 $schemaldap_icon,$schemaldapcache_icon );
	         &config_icons("admin", "index.cgi",
	                 $sttainstallupd_icon, $brandmgr_icon, $cheksync_icon);
	         &config_icons("admin", "index.cgi",
	                 $webhelp_icon, $sttareport_icon );
             }
	}
}
