#!/usr/bin/perl
# test-list.cgi
# Display list for Tarantella Services.

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

&header($text{'index_ttastatus'}, "", "ttastatus");
 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'};


sub show_hash
{
 local ($k,$v);
  return if (!%{$_[0]} || $r ne 'HASH');
  while (($k,$v) = each(%{$_[0]})) { print "$k=$v\n"; }
}
showrec_list
{
  return if (!%{$_[0]} || $r ne 'HASH');
  local %h_lst=%{$_[0]}
  local $lnum=1;
  local ($item,$k,$v);

      print "<pre>\n";
      foreach $item (keys (%h_lst)) {
            push (@h_lst_list, $h_lst{$item});
            print "_________________________________________________$lnum\n";
            foreach $k ( keys (%{$h_lst{$item}})) {
                 local $v=${$h_lst{$item}}{$k};
                 print "$k\t=\t$v \n";
            }
            $lnum++;
      }
      print "__________________________________________________\n";
      print "TOTAL: $lnum \n";
      print "__________________________________________________\n";
      print "</pre>\n";
}

 %ou=&list_ous();
 &showrec_list(\%ou);
 do "footer.pl";
exit;
foreach $lk (@ou_list) {
                      print $lk->{'alias'}."  ";
                      print $lk->{'name'}." ";
                      print $lk->{'obj'}." ";
                      print $lk->{'ens'}." ";
                      print $lk->{'maxsess'}."\n";
                }
#%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;



