#!/usr/bin/perl
# test-list.cgi
# Display list for Tarantella Services.
# STTA Rev. 1.2 Copyright (c) Jesús Pérez Lorenzo  --- license GNU GPL 

 require './tarantella-lib.pl';
&foreign_require("proc", "proc-lib.pl");

&headerstta($text{'index_ttastatus'}, "", "ttastatus",undef,1,1,$text{headpage_rigth} );
 print "<hr><p>\n"; 
 print "<table width=100% border>\n";
 print "<tr $tb> <td><b>$text{'titidx_ttastatus'}</b></td> </tr>\n";
 print "<tr $cb> <td><table width=100%>\n";
 print "<hr>\n";
 print "<tr><td><pre>\n";

#        $str="tta status";
#        $str=$config{'tta_status'};


 %ou=&list_hosts(5);
   foreach $keyou (keys (%ou)) {
     print  " $keyou--".$ou{$keyou}->{ipname}."\n";
   }
 $host="alhambra.itaca.alandalus.es";
 print "$host = ".$ou{$host}->{portalive}."\n";
 do "footer.pl";
exit;

# &showrec_list(\%ou);
 &show_hash(\%ou,"","=","","");    
 $host='alhambra.itaca.alandalus.es';
 print "$host = ".$ou{$hosts}{portalive}."\n";
# print $ou{'alhambra'}{ipname}."\n";
 do "footer.pl";
exit;
foreach $lk (@ou_list) {
                      print $lk->{'alias'}."  ";
                      print $lk->{'name'}." ";
                      print $lk->{'obj'}." ";
                      print $lk->{'ens'}." ";
                      print $lk->{'maxsess'}."\n";
                      print $lk->{'ipname'}."\n";
                      print $lk->{'portalive'}."\n";
                }
 do "footer.pl";
exit;
#%ou=&list_ous();

#$keyou="usuarios";
#print  " $keyou--".$ou{$keyou}->{ens}."\n";
#foreach $keyou (keys (%ou)) {
#@foreach $keyou (@ou) {
#                      if ( $ou->{'alias'} eq "usuarios" ) 
#                      {
#                          $rec1=${$ou{$keyou}};
#                          print  " $keyou--".$ou{$keyou}->{name}."\n";
#                          print  " $keyou--".$ou{$keyou}->{ens}."\n";
#                          print $ou{$keyou.'_name'}."\n";
#                          print $ou{$keyou.'_obj'}."\n";
#                          print $ou{$keyou.'_ens'}."\n";
#		      }
#                }

 print "<tr>\n";
 print "<tr>\n";
 print "<tr>\n";
 print "</table></table><p>\n";
 &footer($config{'back_return'},$text{'index'});
 do "footer.pl";
exit;
  # start by reading Webtops File List
foreach $u (&list_webtops()) {
                      print $u->{'alias'}."  ";
                      print $u->{'name'}."\n";
                      print $u->{'obj'}."\n";
                }
foreach $lk (&list_links()) {
                      print $lk->{'alias'}."  ";
                      print $lk->{'name'}."\n";
                      print $lk->{'obj'}."\n";
                }

%ou=&list_ous();
foreach $keyou (keys (%ou)) {
#                      if ( $ou->{'alias'} eq "usuarios" ) 
#                      {
                          print $ou{$keyou.'_alias'}."- ";
                          print $ou{$keyou.'_name'}."\n";
                          print $ou{$keyou.'_obj'}."\n";
                          print $ou{$keyou.'_ens'}."\n";
		      }
#                }
 print "$lnum\n";

 print "<tr>\n";
 print "<tr>\n";
 print "<tr>\n";
 print "</table></table><p>\n";
 &footer($config{'back_return'},$text{'index'});
 do "footer.pl";
 exit;



