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

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

&headerstta($text{'index_ttastatus'}, "", "ttastatus",undef,1,0,"$text{'headpage_right'}"."$text{'head_logout'}",undef,undef,"$text{head_below}" );
 print "<hr><p>\n"; 
 print "<table width=100% border>\n";
 print "<tr $tb> <td><font color='$revtext'><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'};


   print "<pre>\n";
   $ens_obj=".../_ens/o=gestion.rima.telefonica.es/ou=usuarios/ou=administradores/cn=jesuspe"; 
   $op="attributes";
   $type_cmd="attributes";
   &run_tta_cmd($type_cmd,$ens_obj);
   %h_ttaobj=&load_ttaobj();
   foreach $keyobj (keys (%h_ttaobj)) {
            print $h_ttaobj{$keyobj}->{'property'}."  ".$h_ttaobj{$keyobj}->{'value'}."\n";
   }

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

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



