stta/stta/tmp/t/tarantella/ldap_ldif.cgi
2021-10-01 20:35:43 +01:00

38 lines
1.0 KiB
Perl
Executable File

#!/usr/bin/perl
# ldap_ldif.cgi
# Ldif LDAP Services
require './tarantella-lib.pl';
&foreign_require("proc", "proc-lib.pl");
&header($text{'index_ldapldif'}, "", "ldapldif");
print "<hr><p>\n";
print "<table width=100% border>\n";
print "<tr $tb> <td><b>$text{'titidx_ldapldif'}</b></td> </tr>\n";
print "<tr $cb> <td><table width=100%>\n";
print "<hr>\n";
print "<tr><td>\n";
if ($config{'ldap_ldif_dir'}) {
$ahora=`date +%Y_%m_%d_%H%M%S`;
$namefile=$config{'ldap_ldif_dir'}."/".$ahora;
$str=$config{'ldap_ldif'}." ".$namefile;
} else {
$str=$config{'ldap_ldif'};
}
$exec_str="ldap";
$cmd_str="ldif";
if (&run_cmd($str)) {
print "</pre><tr><center><b>-- oOo --</b></center></tr>\n";
} else {
print "<b>$text{'index_cmderr'}</b>\n";
}
print "<tr>\n";
print "<tr>\n";
print "<tr>\n";
print "</table></table><p>\n";
&footer($text{'back_return'},$text{'index'});
do "footer.pl";
exit;