Initial import from SF and other sources
|
@ -0,0 +1,41 @@
|
|||
#!/usr/bin/perl -w
|
||||
#use strict;
|
||||
|
||||
###################################################################
|
||||
#
|
||||
|
||||
sub getStyle {
|
||||
my $style = $_[0];
|
||||
|
||||
if ($style =~ /map/i) {
|
||||
$_[1] = 0;
|
||||
return "conf_style";
|
||||
}
|
||||
if ($style =~ /lectro/i) {
|
||||
$_[1] = 1;
|
||||
return "simpage";
|
||||
}
|
||||
if ($style =~ /golf/i) {
|
||||
$_[1] = 2;
|
||||
return "golf_style";
|
||||
}
|
||||
}
|
||||
|
||||
###################################################################
|
||||
#
|
||||
|
||||
sub main {
|
||||
my $icheck = -1;
|
||||
$ch = getStyle("electro", $icheck);
|
||||
print( "Resultat:\n" );
|
||||
print( "-- style = $ch\n" );
|
||||
print( "-- check = $icheck\n" );
|
||||
}
|
||||
|
||||
###################################################################
|
||||
#
|
||||
|
||||
main;
|
||||
|
||||
#
|
||||
###################################################################
|
|
@ -0,0 +1,35 @@
|
|||
#!/usr/bin/perl -w
|
||||
#use strict;
|
||||
|
||||
###################################################################
|
||||
#
|
||||
|
||||
sub getStyle {
|
||||
if ($_[0] =~ /map/i) {
|
||||
return ("conf_style", 0);
|
||||
}
|
||||
if ($_[0] =~ /lectro/i) {
|
||||
return ("simpage", 1);
|
||||
}
|
||||
if ($_[0] =~ /golf/i) {
|
||||
return ("golf_style", 2);
|
||||
}
|
||||
}
|
||||
|
||||
###################################################################
|
||||
#
|
||||
|
||||
sub main {
|
||||
($ch, $icheck) = getStyle("electro");
|
||||
print( "Resultat:\n" );
|
||||
print( "-- style = $ch\n" );
|
||||
print( "-- check = $icheck\n" );
|
||||
}
|
||||
|
||||
###################################################################
|
||||
#
|
||||
|
||||
main;
|
||||
|
||||
#
|
||||
###################################################################
|
|
@ -0,0 +1,202 @@
|
|||
#!/usr/bin/perl -w
|
||||
#use strict;
|
||||
use Template;
|
||||
use CGI;
|
||||
use Data::Dumper;
|
||||
require './lemonldap-lib.pl';
|
||||
|
||||
|
||||
my $tt = Template->new( {# ABSOLUTE => 1,
|
||||
PREC_CHOMP =>1,
|
||||
POST_CHOMP =>1, } );
|
||||
|
||||
##########################################
|
||||
# chargement des infos de la page #
|
||||
##########################################
|
||||
my $message = 0;
|
||||
|
||||
my $dump1;
|
||||
|
||||
if (defined (CGI::param ('submitAddCluster')) ) { ## traitement d un nouveau node
|
||||
|
||||
my $new_clexml = CGI::param('idn');
|
||||
if( !length($new_clexml)){
|
||||
$message = $text{ 'lab_error_8' };
|
||||
} else {
|
||||
|
||||
my $location = CGI::param('Locationn') ;
|
||||
my $address = CGI::param('Addressn') ;
|
||||
my $hash = {} ;
|
||||
$hash->{'location'} = $location if $location;
|
||||
$hash->{'address'} = $address if $address;
|
||||
|
||||
my $xmlemon = getXML( $config{'XML_file'} );
|
||||
my $chapter = getChapterXML( $xmlemon, 'cluster' );
|
||||
my $id = CGI::param('id');
|
||||
my $clust = $chapter->{ $id } ;
|
||||
|
||||
if( defined( $clust->{ 'node' }->{ $new_clexml } ) ){
|
||||
$message = $text{ 'lab_error_9' };
|
||||
}else {
|
||||
$clust->{ 'node' }->{ $new_clexml } = $hash;
|
||||
###### ecriture par XMLOUT #############
|
||||
&writeXML( $xmlemon, $config{'XML_file'});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
## vars pour affichage de caract. du node selectionné / supprimé
|
||||
my $nodeID = 0;
|
||||
my $nodeSimple = 0;
|
||||
my $nodeLoc = 0;
|
||||
|
||||
|
||||
if (defined (CGI::param ('RemoveNode')) ) { ## SUPPRESSION d un node
|
||||
my $clenode = CGI::param('idn');
|
||||
|
||||
$nodeID = $clenode;
|
||||
$nodeSimple = CGI::param('Addressn') ;
|
||||
$nodeLoc = CGI::param('Locationn') ;
|
||||
|
||||
my $xmlemon = getXML( $config{'XML_file'} );
|
||||
my $chapter = getChapterXML( $xmlemon, 'cluster' );
|
||||
my $id = CGI::param('id');
|
||||
my $clust = $chapter->{ $id } ;
|
||||
|
||||
my @knodes = keys( %{$clust->{'node'}} );
|
||||
|
||||
$dump1 = Dumper( @knodes );
|
||||
|
||||
delete( $clust->{ 'node' }->{ $clenode } );
|
||||
|
||||
if( @knodes == 1 ){
|
||||
delete( $clust->{ 'node' } );
|
||||
}
|
||||
|
||||
###### ecriture par XMLOUT #############
|
||||
|
||||
&writeXML( $xmlemon, $config{'XML_file'});
|
||||
}
|
||||
|
||||
|
||||
if (! defined (CGI::param ("submitCluster")) ) {
|
||||
|
||||
my $conf = &getXmlPage( "cluster" );
|
||||
my $filethtml = $conf->{template};
|
||||
my $title = $text{ &dePourCent( $conf->{title} ) };
|
||||
my $_style = CGI::param('style')||$config{Style};
|
||||
my $tabular = [];
|
||||
|
||||
$mode = 'Expert' ;
|
||||
$tabular = &getTab( $conf->{tabs}->{expert} );
|
||||
$tabular = &polyGlotTab( $tabular, \%text );
|
||||
$tabular = &ajustLink ($tabular,$mode,$_style);
|
||||
$flipflop = 'Normal';
|
||||
|
||||
$styl = $config{'Style'};
|
||||
|
||||
my $composs = &getAllComposants( $conf->{composants}->{expert} );
|
||||
$composs = &polyGlotTab( $composs, \%text );
|
||||
|
||||
my $xmlemon = getXML( $config{'XML_file'} );
|
||||
my $chapter = getChapterXML( $xmlemon, "cluster" );
|
||||
|
||||
my @f = keys %{$chapter};
|
||||
|
||||
my $first = $f[0];
|
||||
|
||||
&TransformVars( $composs, $chapter );
|
||||
############### I collect node info #####
|
||||
my @combonodes;
|
||||
if($chapter->{$first}->{node} ) {
|
||||
my $node = $chapter->{$first}->{ "node" };
|
||||
my @nodes = keys( %{$node} );
|
||||
@nodes = sort( @nodes );
|
||||
|
||||
for( @nodes ) {
|
||||
my $item = { "labOption" => $_, "idValue" => $_ };
|
||||
push( @combonodes, $_ );
|
||||
}
|
||||
# list of node
|
||||
# just label and add bouton
|
||||
} else {
|
||||
# just label and add bouton
|
||||
}
|
||||
|
||||
my $flagShowRemo = 0;
|
||||
|
||||
if( defined (CGI::param('listNodes') )){
|
||||
$nodeID = CGI::param('listNodes');
|
||||
$nodeSimple = $chapter->{ $first }->{ 'node' }->{$nodeID}->{ 'address' };
|
||||
$nodeLoc = $chapter->{ $first }->{ 'node' }->{$nodeID}->{ 'location' };
|
||||
$flagShowRemo= 1;
|
||||
}
|
||||
|
||||
$vars= { style => $styl,
|
||||
title => $title,
|
||||
mode => $mode,
|
||||
css => $_style,
|
||||
label => $flipflop,
|
||||
parent => $0,
|
||||
tab_about => $tabular,
|
||||
langa => \%text,
|
||||
composall => $composs,
|
||||
combonodes => \@combonodes,
|
||||
message => $message,
|
||||
nodeID => $nodeID,
|
||||
nodeSimple => $nodeSimple,
|
||||
nodeLoc => $nodeLoc,
|
||||
flagShowRemo => $flagShowRemo
|
||||
};
|
||||
|
||||
$vars->{style} = &getStyle($styl, $vars->{checked});
|
||||
|
||||
|
||||
print "Content-type: text/html\n";
|
||||
$tt->process($filethtml,$vars) || die $tt->error();
|
||||
|
||||
print( "<HR> $dump1 <HR>" );
|
||||
|
||||
} else { ## Traitement du "SUBMIT"
|
||||
##########################################################
|
||||
|
||||
# print "Content-type: text/html\n";
|
||||
# print( "\n" );
|
||||
# my @lo =CGI::param();
|
||||
# my $l =Dumper(@lo);
|
||||
# print "$l";
|
||||
# print( "<BR>" );
|
||||
my $_style = CGI::param('style');
|
||||
my $mode = CGI::param('mode');
|
||||
my $old_clexml = CGI::param('_id');
|
||||
my $new_clexml = CGI::param('id');
|
||||
my $location = CGI::param('Location') ;
|
||||
my $address = CGI::param('Address') ;
|
||||
my $hash = {} ;
|
||||
$hash->{'location'} = $location if $location;
|
||||
$hash->{'address'} = $address if $address;
|
||||
$hash->{'node'} = $node if $node;
|
||||
|
||||
my $xmlemon = getXML( $config{'XML_file'} );
|
||||
my $chapter = getChapterXML( $xmlemon, "cluster" );
|
||||
my $l= Dumper ($chapter);
|
||||
delete $chapter->{$old_clexml};
|
||||
|
||||
if($new_clexml ) {
|
||||
$xmlemon->{cluster}->{$new_clexml}= $hash;
|
||||
}
|
||||
else {
|
||||
delete $xmlemon->{cluster} ;
|
||||
}
|
||||
|
||||
###### ecriture par XMLOUT #############
|
||||
|
||||
&writeXML( $xmlemon, $config{'XML_file'});
|
||||
|
||||
#### affichage de la page ttconfig sur param
|
||||
# $l= Dumper ($xmlemon);
|
||||
# print "final $l";
|
||||
&redirect( "index.cgi?mode=$mode&style=$_style" );
|
||||
}
|
||||
#
|
||||
############ C FINI
|
|
@ -0,0 +1,271 @@
|
|||
#!/usr/bin/perl
|
||||
use Data::Dumper;
|
||||
use XML::Simple;
|
||||
|
||||
|
||||
sub getXML {
|
||||
my $confile = $_[0];
|
||||
|
||||
my $pxml = XMLin( $confile, "ForceArray" => "1" );
|
||||
return( $pxml );
|
||||
}
|
||||
|
||||
|
||||
sub writeXML {
|
||||
my $pxml = $_[0];
|
||||
my $namef = $_[1];
|
||||
|
||||
my $rootN = $_[2] || "lemonldapconfig";
|
||||
|
||||
open( $fout, ">$namef" ) || die("Oops !! couldn't open $namef !!??");
|
||||
|
||||
XMLout( $pxml, OutputFile => $fout,
|
||||
AttrIndent => 1,
|
||||
RootName => $rootN,
|
||||
KeyAttr => { session =>'id',
|
||||
cache =>'id',
|
||||
handler =>'id',
|
||||
application =>'id',
|
||||
domain =>'id',
|
||||
cluster =>'id',
|
||||
node => 'id',
|
||||
} );
|
||||
close( $fout );
|
||||
}
|
||||
|
||||
##----------------------------------------------------------------------------------------
|
||||
## MAJ DU XML
|
||||
|
||||
sub videhash {
|
||||
my $h = $_[ 0 ];
|
||||
my $pxml = $_[ 1 ];
|
||||
|
||||
if (exists ($h->{lemonldapdomain})) {
|
||||
my $id_handler = $h->{ 'lemonldaphandlerid' };
|
||||
my $id_domain = $h->{ 'lemonldapdomain' };
|
||||
|
||||
###################################
|
||||
## maj
|
||||
|
||||
print( "DOMAINE : $id_domain \t --> $id_handler\n" );
|
||||
|
||||
if( length($h->{ 'ipadress' } )) {
|
||||
$pxml->{ 'domain' }->{$id_domain}->{ 'handler' }->{ $id_handler }->{ 'VirtualHost' } = 'byIPAdress';
|
||||
$pxml->{ 'domain' }->{$id_domain}->{ 'handler' }->{ $id_handler }->{ 'IPAdress' } = $h->{ 'ipadress' };
|
||||
}
|
||||
else {
|
||||
$pxml->{ 'domain' }->{$id_domain}->{ 'handler' }->{ $id_handler }->{ 'VirtualHost' } = 'byName';
|
||||
}
|
||||
|
||||
my %kk = ( 'lemonldapportal' => ['Portal' , ''] ,
|
||||
'lemonldapbasepub' => ['BasePub' , ''] ,
|
||||
'lemonldapbasepriv' => ['BasePriv' , ''] ,
|
||||
'lemonldapenabledproxy' => ['EnableLWPProxy', '0'] ,
|
||||
'lemonldapattrldap' => ['Organization', ''] ,
|
||||
'lemonldapcodeappli' => ['AppliCode' , ''] ,
|
||||
'lemonldapdisabled' => ['DisableAccessControl', '0'] ,
|
||||
'lemonldapstopcookie' => ['StopCookie' , '0'] ,
|
||||
'lemonldaprecursive' => ['ChaseRedirect', '0'] ,
|
||||
'lemonldapproxyext' => ['ProxyExt' , ''] ,
|
||||
'lemonldapics' => ['ProxyPatterns', ''] ,
|
||||
'lemonldapmultihoming' => ['MultiHoming' , -1] ,
|
||||
'lemonldaplwptimeout' => ['LWPTimeout' , ''] ,
|
||||
'lemonldapsoftcontrol' => ['SoftControl' , '0'] ,
|
||||
'lemonldapheader' => ['Header' , ''] ,
|
||||
'lemonldapallow' => ['Allow' , ''] ,
|
||||
'lemonldappluginpolicy' => ['PolicyPlugIn', ''] ,
|
||||
'lemonldappluginhtml' => ['RewritePlugIn', ''] ,
|
||||
'lemonldappluginheader' => ['HeaderPlugIn', ''] ,
|
||||
'lemonldappluginbackend' => ['BackendPlugIn','']
|
||||
);
|
||||
|
||||
my @kapa = keys( %kk );
|
||||
|
||||
for( @kapa ){
|
||||
my $k = $_;
|
||||
my $igp = $kk{ $k }[0];
|
||||
my $def = $kk{ $k }[1];
|
||||
|
||||
if( length( $h->{ $k } )){
|
||||
$pxml->{ 'domain' }->{$id_domain}->{ 'handler' }->{ $id_handler }->{ $igp } = $h->{ $k };
|
||||
} else {
|
||||
if( $def == -1 ){
|
||||
delete( $pxml->{ 'domain' }->{$id_domain}->{ 'handler' }->{ $id_handler }->{ $igp } );
|
||||
} else {
|
||||
$pxml->{ 'domain' }->{$id_domain}->{ 'handler' }->{ $id_handler }->{ $igp } = $def;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
##-------------------------------------------------------------------------------------------
|
||||
## MISE A JOUR DES NOMS DE VARIABLES
|
||||
|
||||
sub MajVarNames {
|
||||
my $pxml = $_[0];
|
||||
|
||||
|
||||
## CACHE.configIpcKey --> CACHE.ConfigFile
|
||||
##------------------------------------------
|
||||
my @confs = keys( %{$pxml->{'cache'} } );
|
||||
for( @confs ){
|
||||
my $conf = $_;
|
||||
my $ipc = $pxml->{'cache'}->{ $conf }->{'configIpcKey'};
|
||||
if( $ipc ){
|
||||
delete( $pxml->{'cache'}->{ $conf }->{'configIpcKey'} );
|
||||
$pxml->{'cache'}->{ $conf }->{'ConfigFile'} = $ipc;
|
||||
print(" Cache -> $conf \t\t configIpcKey -> $conf TO ConfigFile\n");
|
||||
}
|
||||
}
|
||||
|
||||
## Domain.Session --> Domain.SessionStore
|
||||
##------------------------------------------
|
||||
my @doms = keys( %{ $pxml->{'domain'} } );
|
||||
for( @doms ){
|
||||
# domaine
|
||||
my $dom = $_;
|
||||
|
||||
my $sess = $pxml->{'domain'}->{ $dom }->{ 'Session' };
|
||||
if( $sess ){
|
||||
delete( $pxml->{'domain'}->{ $dom }->{ 'Session' } );
|
||||
$pxml->{'domain'}->{ $dom }->{ 'SessionStore' } = $sess;
|
||||
print(" Domaine -> $dom \t\t Session -> $sess TO SessionStore\n");
|
||||
}
|
||||
|
||||
## HANDLERS
|
||||
##---------------------------------
|
||||
# recup ts les handlers d un domaine
|
||||
my @hands = keys( %{ $pxml->{'domain'}->{ $dom }->{ 'handler' } } );
|
||||
for( @hands ){
|
||||
my $hand = $_;
|
||||
|
||||
my $enabledProxy = $pxml->{'domain'}->{ $dom }->{ 'handler' }->{ $hand }->{ 'Enabledproxy' } ;
|
||||
my $attrLdap = $pxml->{'domain'}->{ $dom }->{ 'handler' }->{ $hand }->{ 'AttrLdap' } ;
|
||||
my $codeAppli = $pxml->{'domain'}->{ $dom }->{ 'handler' }->{ $hand }->{ 'CodeAppli' } ;
|
||||
my $disabled = $pxml->{'domain'}->{ $dom }->{ 'handler' }->{ $hand }->{ 'Disabled' } ;
|
||||
my $plugHtml = $pxml->{'domain'}->{ $dom }->{ 'handler' }->{ $hand }->{ 'PlugInHtml' } ;
|
||||
my $plugBackend = $pxml->{'domain'}->{ $dom }->{ 'handler' }->{ $hand }->{ 'PlugInBackend' } ;
|
||||
my $plugHeader = $pxml->{'domain'}->{ $dom }->{ 'handler' }->{ $hand }->{ 'PlugInHeader' } ;
|
||||
my $plugPolicy = $pxml->{'domain'}->{ $dom }->{ 'handler' }->{ $hand }->{ 'PlugInPolicy' } ;
|
||||
my $ics = $pxml->{'domain'}->{ $dom }->{ 'handler' }->{ $hand }->{ 'Ics' } ;
|
||||
my $recursive = $pxml->{'domain'}->{ $dom }->{ 'handler' }->{ $hand }->{ 'Recursive' } ;
|
||||
|
||||
delete( $pxml->{'domain'}->{ $dom }->{ 'handler' }->{ $hand }->{ 'Enabledproxy' } );
|
||||
delete( $pxml->{'domain'}->{ $dom }->{ 'handler' }->{ $hand }->{ 'AttrLdap' } );
|
||||
delete( $pxml->{'domain'}->{ $dom }->{ 'handler' }->{ $hand }->{ 'CodeAppli' } );
|
||||
delete( $pxml->{'domain'}->{ $dom }->{ 'handler' }->{ $hand }->{ 'Disabled' } );
|
||||
delete( $pxml->{'domain'}->{ $dom }->{ 'handler' }->{ $hand }->{ 'PlugInHtml' } );
|
||||
delete( $pxml->{'domain'}->{ $dom }->{ 'handler' }->{ $hand }->{ 'PlugInBackend' });
|
||||
delete( $pxml->{'domain'}->{ $dom }->{ 'handler' }->{ $hand }->{ 'PlugInHeader' } );
|
||||
delete( $pxml->{'domain'}->{ $dom }->{ 'handler' }->{ $hand }->{ 'PlugInPolicy' } );
|
||||
delete( $pxml->{'domain'}->{ $dom }->{ 'handler' }->{ $hand }->{ 'Ics' } );
|
||||
delete( $pxml->{'domain'}->{ $dom }->{ 'handler' }->{ $hand }->{ 'Recursive' } );
|
||||
|
||||
if($enabledProxy ) {
|
||||
$pxml->{'domain'}->{ $dom }->{ 'handler' }->{ $hand }->{ 'EnableLWPProxy' } = $enabledProxy;
|
||||
print(" Domaine -> $dom \t Handler -> $hand\t Enabledproxy TO EnableLWPProxy\n");
|
||||
}
|
||||
if($attrLdap ) {
|
||||
$pxml->{'domain'}->{ $dom }->{ 'handler' }->{ $hand }->{ 'Organization' } = $attrLdap ;
|
||||
print(" Domaine -> $dom \t Handler -> $hand\t AttrLdap TO Organization\n");
|
||||
}
|
||||
if($codeAppli ) {
|
||||
$pxml->{'domain'}->{ $dom }->{ 'handler' }->{ $hand }->{ 'AppliCode' } = $codeAppli ;
|
||||
print(" Domaine -> $dom \t Handler -> $hand\t CodeAppli TO AppliCode\n");
|
||||
}
|
||||
if($disabled ) {
|
||||
$pxml->{'domain'}->{ $dom }->{ 'handler' }->{ $hand }->{ 'DisableAccessControl' } = $disabled ;
|
||||
print(" Domaine -> $dom \t Handler -> $hand\t Disabled TO DisableAccessControl\n");
|
||||
}
|
||||
if($plugHtml ) {
|
||||
$pxml->{'domain'}->{ $dom }->{ 'handler' }->{ $hand }->{ 'RewritePlugIn' } = $plugHtml ;
|
||||
print(" Domaine -> $dom \t Handler -> $hand\t PlugInHtml TO RewritePlugIn\n");
|
||||
}
|
||||
if($plugBackend ) {
|
||||
$pxml->{'domain'}->{ $dom }->{ 'handler' }->{ $hand }->{ 'BackendPlugIn' } = $plugBackend ;
|
||||
print(" Domaine -> $dom \t Handler -> $hand\t PlugInBackend TO BackendPlugIn\n");
|
||||
}
|
||||
if($plugHeader ) {
|
||||
$pxml->{'domain'}->{ $dom }->{ 'handler' }->{ $hand }->{ 'HeaderPlugIn' } = $plugHeader ;
|
||||
print(" Domaine -> $dom \t Handler -> $hand\t PlugInHeader TO HeaderPlugIn\n");
|
||||
}
|
||||
if($plugPolicy ) {
|
||||
$pxml->{'domain'}->{ $dom }->{ 'handler' }->{ $hand }->{ 'PolicyPlugIn' } = $plugPolicy ;
|
||||
print(" Domaine -> $dom \t Handler -> $hand\t PlugInPolicy TO PolicyPlugIn\n");
|
||||
}
|
||||
if($ics ) {
|
||||
$pxml->{'domain'}->{ $dom }->{ 'handler' }->{ $hand }->{ 'ProxyPatterns' } = $ics ;
|
||||
print(" Domaine -> $dom \t Handler -> $hand\t Ics TO ProxyPatterns\n");
|
||||
}
|
||||
if($recursive ) {
|
||||
$pxml->{'domain'}->{ $dom }->{ 'handler' }->{ $hand }->{ 'ChaseRedirect' } = $recursive ;
|
||||
print(" Domaine -> $dom \t Handler -> $hand\t Recursive TO ChaseRedirect\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
sub main {
|
||||
my $confile = $_[0];
|
||||
my $xmlfile = $_[1];
|
||||
my %hash;
|
||||
|
||||
my $pxml = getXML( $xmlfile );
|
||||
|
||||
print( "\nVAR NAMES UPDATED :\n\n" );
|
||||
|
||||
MajVarNames( $pxml );
|
||||
|
||||
print( "\nHANDLERS UPDATED :\n\n" );
|
||||
|
||||
my $HF;
|
||||
open( $HF, $confile ) || die("Couldn' open $confile !!\n");
|
||||
|
||||
while ( <$HF> ) {
|
||||
chomp $_;
|
||||
if (/\<virtual/i) {
|
||||
# debut vh
|
||||
if(%hash) {
|
||||
videhash(\%hash, $pxml);
|
||||
%hash =();
|
||||
}
|
||||
($hash{ipadress}) = /\s(\d.+).$/;
|
||||
}
|
||||
if(/<\/virtual/i && %hash ) {
|
||||
videhash(\%hash, $pxml) ;
|
||||
%hash =();
|
||||
}
|
||||
if( /perlsetvar/i ) {
|
||||
my ($filler, $nom, $valeur) = /(perlsetvar)\s+(.+)\s+(.+)$/i ;
|
||||
$nom=~ s/^\s+//g;
|
||||
$nom=~ s/\s+$//g;
|
||||
$valeur=~ s/^\s+//g;
|
||||
$valeur=~ s/\s+$//g;
|
||||
|
||||
$valeur=~ s/^'+//g;
|
||||
$valeur=~ s/'+$//g;
|
||||
|
||||
$nom=lc($nom);
|
||||
$hash{$nom} = $valeur ;
|
||||
}
|
||||
}
|
||||
|
||||
## REWRITE XML FILE
|
||||
##------------------
|
||||
writeXML( $pxml, $xmlfile );
|
||||
}
|
||||
|
||||
############################################
|
||||
|
||||
if( @ARGV != 2 ){
|
||||
print("-------------------------------------------------\n\n");
|
||||
print("USAGE: conf2xml config_file_name xml_file_name (names with complete path)\n\n\n");
|
||||
} else {
|
||||
main($ARGV[0], $ARGV[1] );
|
||||
print( "\n" );
|
||||
}
|
||||
|
||||
############################################
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
XML_file=/opt/apache/conf/application_new.xml
|
||||
httpd_conf=/opt/apache/conf/lemon.conf
|
||||
XML_DTD=/opt/apache/conf/lemonldap.dtd
|
|
@ -0,0 +1,3 @@
|
|||
XML_file=/opt/apache/conf/application_new.xml
|
||||
httpd_conf=/opt/apache/conf/lemon.conf
|
||||
XML_DTD=/opt/apache/conf/lemonldap.dtd
|
|
@ -0,0 +1,3 @@
|
|||
XML_file=/opt/apache/conf/application_new.xml
|
||||
httpd_conf=/opt/apache/conf/lemon.conf
|
||||
XML_DTD=/opt/apache/conf/lemonldap.dtd
|
|
@ -0,0 +1,9 @@
|
|||
line1=Configurable options,11
|
||||
XML_file=Full path to XML config file,0
|
||||
httpd_conf=Full path to conf.d,0
|
||||
Style= Style of GUI,1,maps-Old Maps,Electro-Electro,Golf-Golf
|
||||
pid_file=Path to Apache PID file,0
|
||||
start_cmd=Command to start apache,0
|
||||
stop_cmd=Command to stop apache,0
|
||||
restart_cmd=Command to restart apache,0
|
||||
|
|
@ -0,0 +1,59 @@
|
|||
#!/usr/bin/perl
|
||||
# configcache.cgi
|
||||
# Display the icons for various types of lemonldapconfig options
|
||||
use Data::Dumper;
|
||||
require './lemonldap-lib.pl';
|
||||
|
||||
# Check if lemonlap is installed
|
||||
|
||||
&header($text{'index_title'}, "", undef, 1, 1, 0,
|
||||
&help_search_link("lemonldap", "man", "doc", "google"));
|
||||
print "<hr>\n";
|
||||
|
||||
|
||||
|
||||
|
||||
$exp1 = &get_configcache();
|
||||
my %exp =%$exp1;
|
||||
# Display global category icons
|
||||
print "<h3>$text{'index_config'}</h3>\n";
|
||||
@attr = @{&get_config_attr()} ;
|
||||
|
||||
print "<table border=1 bgcolor='grey'>";
|
||||
my $ligne=&formcolonne(\@attr,'name') ;
|
||||
print "$ligne";
|
||||
|
||||
|
||||
foreach (keys %exp) {
|
||||
my @a;
|
||||
push @a,"<a href=/lemonldap/modif_exp.cgi?exp=$_>$_</a>" ;
|
||||
my $ctr=$_;
|
||||
|
||||
foreach (@attr) {
|
||||
next if $_->{name}=~/^id/i;
|
||||
push @a,$exp{$ctr}->{$_->{name}}||" ";
|
||||
}
|
||||
|
||||
|
||||
|
||||
my $ligne=&formline(\@a,) ;
|
||||
print "$ligne";
|
||||
|
||||
}
|
||||
|
||||
|
||||
print "</table>";
|
||||
|
||||
|
||||
|
||||
print "<hr>";
|
||||
my $table = tablemaj(@attr) ;
|
||||
print "<h3>$text{'create_line'}</h3>\n";
|
||||
|
||||
print "<form method=get target= config_create.cgi>";
|
||||
|
||||
print $table ;
|
||||
print "<p><input type=submit>";
|
||||
|
||||
print "</form>";
|
||||
&footer("/lemonldap", $text{'index'});
|
|
@ -0,0 +1,33 @@
|
|||
#!/usr/bin/perl
|
||||
# create_domain.cgi
|
||||
# Display the icons for various types of lemonldapconfig options
|
||||
use Data::Dumper;
|
||||
require './lemonldap-lib.pl';
|
||||
&ReadParse();
|
||||
my $domain = $in{'domain'};
|
||||
my $c = &get_config;
|
||||
my $all_domain = $c->{domain};
|
||||
# Display global category icons
|
||||
my @tab= @{&get_domain_attr()} ;
|
||||
my %tmp;
|
||||
foreach (@tab) {
|
||||
undef ($in{$_->{name}}) if $in{$_->{name}} eq '';
|
||||
$tmp{$_->{name}}= $in{$_->{name}} if defined ($in{$_->{name}});
|
||||
|
||||
|
||||
|
||||
}
|
||||
my $cle =$tmp{id};
|
||||
delete $tmp{id};
|
||||
$all_domain->{$cle} = \%tmp;
|
||||
my $l =Dumper($all_domain);
|
||||
$c->{domain} = $all_domain ;
|
||||
### write xml ###
|
||||
my $res =&writexml($config{XML_file},$c);
|
||||
unless ($res) {
|
||||
system ("mv $config{XML_file} $config{XML_file}.bak");
|
||||
system ("mv $config{XML_file}.tmp $config{XML_file} ");
|
||||
}
|
||||
&redirect("domain.cgi");
|
||||
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
#!/usr/bin/perl
|
||||
# create_handler.cgi
|
||||
use Data::Dumper;
|
||||
require './lemonldap-lib.pl';
|
||||
&ReadParse();
|
||||
|
||||
my $domain = $in{'domain'};
|
||||
my $c = &get_config;
|
||||
my $all_domain = $c->{domain};
|
||||
# Display global category icons
|
||||
my @tab= @{&get_handler_attr()} ;
|
||||
|
||||
my %tmp;
|
||||
foreach (@tab) {
|
||||
undef ($in{$_->{name}}) if $in{$_->{name}} eq '';
|
||||
$tmp{$_->{name}}= $in{$_->{name}} if defined ($in{$_->{name}});
|
||||
|
||||
|
||||
|
||||
}
|
||||
my $cle =$tmp{id};
|
||||
delete $tmp{id};
|
||||
$all_domain->{$domain}->{handler}->{$cle} = \%tmp;
|
||||
my $l =Dumper($all_domain);
|
||||
$c->{domain} = $all_domain ;
|
||||
### write xml ###
|
||||
my $res =&writexml($config{XML_file},$c);
|
||||
unless ($res) {
|
||||
system ("mv $config{XML_file} $config{XML_file}.bak");
|
||||
system ("mv $config{XML_file}.tmp $config{XML_file} ");
|
||||
}
|
||||
### process at httpd.conf
|
||||
if ($in{'virtualhost_line'}) {
|
||||
my $ligne="<virtualhost $in{'virtualhost_line'} >\n";
|
||||
$ligne.= "ServerName $in{'servername'}\n" if $in{'servername'};
|
||||
$ligne.= "perltranshandler $in{'perltranshandler'}\n" if $in{'perltranshandler'};
|
||||
$ligne.="PerlSetVar lemonldapHandlerID $cle\n" if $in{lemonldaphandlerid} eq 'yes' ;
|
||||
$ligne.="</virtualhost>\n" ;
|
||||
open ENTRE ,">>$config{httpd_conf}" ;
|
||||
print ENTRE $ligne;
|
||||
close ENTRE ;
|
||||
}
|
||||
|
||||
&redirect("un_domain.cgi?domain=$domain");
|
|
@ -0,0 +1,368 @@
|
|||
<!--
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
|
||||
|
||||
/* ************************************ */
|
||||
/* mise en forme de différentes balises */
|
||||
/* ************************************ */
|
||||
|
||||
TITLE {
|
||||
font: 36px Arial;
|
||||
font-weight: bold;
|
||||
color=green;
|
||||
}
|
||||
|
||||
|
||||
BODY {
|
||||
background-color: #EDF0BA ;
|
||||
background-image: url("/lemongui4webmin/images/map_conf.jpg") ;
|
||||
background-attachment: fixed ;
|
||||
font-size: 0.80em;
|
||||
margin: 0.7cm 0.7cm 0.7cm 0.7cm;
|
||||
}
|
||||
|
||||
H1 {
|
||||
font-family: arial, verdana, sans-serif ;
|
||||
background-image: url("/lemongui4webmin/images/back2_h1.jpg") ;
|
||||
backgroud-repeat: repeat-x;
|
||||
font: Arial;
|
||||
font-size: 4em;
|
||||
font-weight: bold;
|
||||
color: #6f4a2e;
|
||||
border: 2px double #007;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
H2 {
|
||||
font-family: arial, verdana, sans-serif ;
|
||||
font: Arial;
|
||||
font-size: 3em;
|
||||
font-weight: bold;
|
||||
color: #236;
|
||||
background-image: url("/lemongui4webmin/images/back2_h2.jpg") ;
|
||||
backgroud-repeat: repeat-x;
|
||||
text-align: center;
|
||||
border: 2px double #336;
|
||||
}
|
||||
H3 {
|
||||
font-family: arial, verdana, sans-serif ;
|
||||
font: Arial;
|
||||
font-size: 2.5em;
|
||||
font-weight: bold;
|
||||
color: #236;
|
||||
}
|
||||
H4 {
|
||||
font-family: arial, verdana, sans-serif ;
|
||||
font: Arial;
|
||||
font-size: 2em;
|
||||
font-weight: bold;
|
||||
color: #236;
|
||||
}
|
||||
H5 {
|
||||
font-family: arial, verdana, sans-serif ;
|
||||
font: Arial;
|
||||
font-size: 1em;
|
||||
font-weight: bold;
|
||||
color: #236;
|
||||
}
|
||||
|
||||
I {
|
||||
font-family: arial, verdana, sans-serif ;
|
||||
font: Arial;
|
||||
font-size: 0.9em;
|
||||
font-weight: bold;
|
||||
color: #236;
|
||||
}
|
||||
|
||||
B {
|
||||
font-family: arial, verdana, sans-serif ;
|
||||
font: Arial;
|
||||
font-size: 1.2em;
|
||||
font-weight: bold;
|
||||
color: #236;
|
||||
}
|
||||
|
||||
.alive {
|
||||
color: #0F0 ;
|
||||
background-color: #000000 ;
|
||||
font-style : bold;
|
||||
letter-spacing : 6px;
|
||||
word-spacing : 12px;
|
||||
text-decoration: blink ;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.dead {
|
||||
color: #f00 ;
|
||||
background-color: #000000 ;
|
||||
font-style : bold;
|
||||
letter-spacing : 6px;
|
||||
word-spacing : 12px;
|
||||
text-decoration: blink ;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
|
||||
.ConfStyle {
|
||||
background-image: url("/lemongui4webmin/images/boat2_conf.jpg") ;
|
||||
background-attachment: fixed ;
|
||||
background-color: #E4EBF5 ;
|
||||
margin: 0cm 5.0cm 0.7cm 0.7cm;
|
||||
border: 2px solid #070;
|
||||
font-family: courier, prestige, monospace;
|
||||
font-size: 0.9em;
|
||||
line-height: 1.0em;
|
||||
color: #450;
|
||||
}
|
||||
.ExpertStyle {
|
||||
background-image: url("/lemongui4webmin/images/expert22.jpg") ;
|
||||
background-attachment: fixed ;
|
||||
background-color: #E4EBF5 ;
|
||||
margin: 0cm 0.1cm 0.3cm 0.1cm;
|
||||
border: 2px double #007;
|
||||
font-family: courier, prestige, monospace;
|
||||
font-size: 1.1em;
|
||||
color: #040B15;
|
||||
line-height: 1.0em;
|
||||
}
|
||||
|
||||
.PetiFont {
|
||||
font-family: courier, prestige, monospace;
|
||||
font-size: 0.7em;
|
||||
}
|
||||
|
||||
pre {
|
||||
margin: 0.7cm 0.7cm 0.7cm 0.7cm;
|
||||
}
|
||||
|
||||
LABEL {
|
||||
background: transparent;
|
||||
DISPLAY: inline ;
|
||||
FLOAT: left ;
|
||||
WIDTH: 150px ;
|
||||
font-weight: bold ;
|
||||
font-family: Arial, Helvetica, sans-serif ;
|
||||
text-align: right ;
|
||||
margin-left: 2px ;
|
||||
margin-right: 35px ;
|
||||
color: #236;
|
||||
}
|
||||
|
||||
.LABG {
|
||||
background: transparent;
|
||||
DISPLAY: inline ;
|
||||
FLOAT: left ;
|
||||
font-weight: bold ;
|
||||
font-family: Arial, Helvetica, sans-serif ;
|
||||
text-align: right ;
|
||||
color: #236;
|
||||
}
|
||||
|
||||
|
||||
.OPTION {
|
||||
background: transparent;
|
||||
/*background-color: #E7F0CE ; */
|
||||
font-family: Arial, Helvetica, sans-serif ;
|
||||
font-weight: bold;
|
||||
color: #236;
|
||||
}
|
||||
|
||||
/* ******************************************************************** */
|
||||
/* MISE EN FORME DES TABULATIONS */
|
||||
/* ******************************************************************** */
|
||||
|
||||
div.tabs {
|
||||
background: transparent;
|
||||
border-collapse: collapse;
|
||||
border-bottom-color: #8CACBB;
|
||||
border-bottom-style: solid;
|
||||
border-bottom-width: 1px;
|
||||
padding: 0.5em 0em 0em 2em;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
div.tabs a {
|
||||
/* The normal, unselected tabs. They are all links */
|
||||
background: transparent;
|
||||
border-color: #8CACBB;
|
||||
border-width: 1px;
|
||||
border-style: solid solid none solid;
|
||||
color: #436976;
|
||||
font-weight: normal;
|
||||
height: 1.2em;
|
||||
margin-right: 0.5em;
|
||||
padding: 0em 2em;
|
||||
/* text-transform: lowercase; */
|
||||
}
|
||||
|
||||
div.tabs a.selected {
|
||||
/* The selected tab. There's only one of this */
|
||||
background: #83903E;
|
||||
border: 1px solid #8CACBB;
|
||||
border-bottom: #DEE7EC 1px solid;
|
||||
color: #F6FCD5;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
div.tabs a:hover {
|
||||
background: #83903E;
|
||||
border-color: #8CACBB;
|
||||
border-bottom-color: #DEE7EC;
|
||||
color: #F6FCD5;
|
||||
}
|
||||
|
||||
A:link {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
A:visited {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.posit_TL {
|
||||
position:absolute ;
|
||||
left: 10px ;
|
||||
top: 5px ;
|
||||
}
|
||||
|
||||
.posit_TR {
|
||||
position:absolute ;
|
||||
right: 10px ;
|
||||
top: 5px ;
|
||||
}
|
||||
|
||||
.posit_C {
|
||||
position:absolute ;
|
||||
left: 50% ;
|
||||
}
|
||||
|
||||
.bouton_0 {
|
||||
color: #83903E;
|
||||
background-color: #F6FCD5;
|
||||
font-size: 0.9em;
|
||||
border: 1px solid #660;
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
.bouton_0:hover {
|
||||
color: #F6FCD5;
|
||||
background-color: #83903E;
|
||||
font-size: 0.9em;
|
||||
border: 1px solid #660;
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
.bouton_0dd {
|
||||
color: #000;
|
||||
background-color: #777;
|
||||
font-size: 0.9em;
|
||||
border: 1px solid #660;
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
.bouton_0dd:hover {
|
||||
color: #000;
|
||||
background-color: #777;
|
||||
font-size: 0.9em;
|
||||
border: 1px solid #660;
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
|
||||
.tdg {
|
||||
width: 120px;
|
||||
text-align: right;
|
||||
vertical-align: middle;
|
||||
background-color: #F6FCD5;
|
||||
border-top: 1px solid #660;
|
||||
font-family: arial, verdana, sans-serif ;
|
||||
font: Arial;
|
||||
font-size: 0.8em;
|
||||
font-weight: bold;
|
||||
color: #83903e;
|
||||
padding-right: 12px;
|
||||
}
|
||||
|
||||
.tdd {
|
||||
width: 160px;
|
||||
text-align: left;
|
||||
vertical-align: middle;
|
||||
border-top: 1px solid #236;
|
||||
font-family: arial, verdana, sans-serif ;
|
||||
font: Arial;
|
||||
font-size: 0.8em;
|
||||
font-weight: bold;
|
||||
color: #236;
|
||||
padding-left: 12px;
|
||||
}
|
||||
|
||||
/* ******************************************************************** */
|
||||
/* INPUTS */
|
||||
/* ******************************************************************** */
|
||||
|
||||
.INPUTR {
|
||||
background: transparent;
|
||||
font-family: Arial, Helvetica, sans-serif ;
|
||||
font-weight: bold;
|
||||
font: Arial;
|
||||
font-size: 0.9em;
|
||||
color: #236;
|
||||
padding-left: 5px;
|
||||
}
|
||||
|
||||
/* ******************************************************************** */
|
||||
/* DIFF classes de mise en forme de zones ayant le "focus" */
|
||||
/* ******************************************************************** */
|
||||
|
||||
INPUT:focus {
|
||||
background-color: #555555 ;
|
||||
color: #FFFFFF ;
|
||||
}
|
||||
|
||||
/* ***** */
|
||||
|
||||
|
||||
.SELECT {
|
||||
background: transparent ;
|
||||
font-family: Arial, Helvetica, sans-serif ;
|
||||
font: Arial;
|
||||
font-size: 1.1em ;
|
||||
color: #236 ;
|
||||
font-weight: bold;
|
||||
}
|
||||
.SELECTO {
|
||||
background: #444 ;
|
||||
font-family: Arial, Helvetica, sans-serif ;
|
||||
font: Arial;
|
||||
font-size: 1.1em ;
|
||||
color: #AB5;
|
||||
font-weight: bold;
|
||||
}
|
||||
.ListSELECT {
|
||||
background: transparent ;
|
||||
font-family: Arial, Helvetica, sans-serif ;
|
||||
font: Arial;
|
||||
font-size: 0.9em ;
|
||||
color: #236 ;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.ListSELECTO {
|
||||
background: transparent ;
|
||||
font-family: Arial, Helvetica, sans-serif ;
|
||||
font: Arial;
|
||||
font-size: 0.9em ;
|
||||
color: #236 ;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.ListSELECTA {
|
||||
background: #222 ;
|
||||
font-family: Arial, Helvetica, sans-serif ;
|
||||
font: Arial;
|
||||
font-size: 1.1em ;
|
||||
color: #59F ;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,369 @@
|
|||
<!--
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
|
||||
|
||||
/* ************************************ */
|
||||
/* mise en forme de différentes balises */
|
||||
/* ************************************ */
|
||||
|
||||
TITLE {
|
||||
font: 36px Arial;
|
||||
font-weight: bold;
|
||||
color=green;
|
||||
}
|
||||
|
||||
|
||||
BODY {
|
||||
background-color: #EDF0BA ;
|
||||
background-image: url("/lemongui4webmin/images/golf_back2.jpg") ;
|
||||
background-attachment: fixed ;
|
||||
font-size: 0.80em;
|
||||
margin: 0.7cm 0.7cm 0.7cm 0.7cm;
|
||||
}
|
||||
H1 {
|
||||
font-family: arial, verdana, sans-serif ;
|
||||
background-image: url("/lemongui4webmin/images/golf5_back.jpg") ;
|
||||
backgroud-repeat: repeat-x;
|
||||
font: Arial;
|
||||
font-size: 4em;
|
||||
font-weight: bold;
|
||||
color: #375F30;
|
||||
border: 2px double #375F30;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
H2 {
|
||||
font-family: arial, verdana, sans-serif ;
|
||||
font: Arial;
|
||||
font-size: 3em;
|
||||
font-weight: bold;
|
||||
color: #375F30;
|
||||
background-image: url("/lemongui4webmin/images/golf5_back.jpg") ;
|
||||
backgroud-repeat: repeat-x;
|
||||
text-align: center;
|
||||
border: 2px double #375F30;
|
||||
}
|
||||
H3 {
|
||||
font-family: arial, verdana, sans-serif ;
|
||||
font: Arial;
|
||||
font-size: 2.5em;
|
||||
font-weight: bold;
|
||||
color: #375F30;
|
||||
}
|
||||
H4 {
|
||||
font-family: arial, verdana, sans-serif ;
|
||||
font: Arial;
|
||||
font-size: 2em;
|
||||
font-weight: bold;
|
||||
color: #375F30;
|
||||
}
|
||||
H5 {
|
||||
font-family: arial, verdana, sans-serif ;
|
||||
font: Arial;
|
||||
font-size: 1em;
|
||||
font-weight: bold;
|
||||
color: #375F30;
|
||||
}
|
||||
|
||||
I {
|
||||
font-family: arial, verdana, sans-serif ;
|
||||
font: Arial;
|
||||
font-size: 0.9em;
|
||||
font-weight: bold;
|
||||
color: #375F30;
|
||||
}
|
||||
|
||||
B {
|
||||
font-family: arial, verdana, sans-serif ;
|
||||
font: Arial;
|
||||
font-size: 1.2em;
|
||||
font-weight: bold;
|
||||
color: #375F30;
|
||||
}
|
||||
|
||||
.alive {
|
||||
color: #0F0 ;
|
||||
background-color: #000000 ;
|
||||
font-style : bold;
|
||||
letter-spacing : 6px;
|
||||
word-spacing : 12px;
|
||||
text-decoration: blink ;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.dead {
|
||||
color: #f00 ;
|
||||
background-color: #000000 ;
|
||||
font-style : bold;
|
||||
letter-spacing : 6px;
|
||||
word-spacing : 12px;
|
||||
text-decoration: blink ;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
|
||||
.ConfStyle {
|
||||
background-image: url("/lemongui4webmin/images/golf4_back.jpg") ;
|
||||
background-attachment: fixed ;
|
||||
background-color: #E4EBF5 ;
|
||||
margin: 0cm 5.0cm 0.7cm 0.7cm;
|
||||
border: 2px solid #070;
|
||||
font-family: courier, prestige, monospace;
|
||||
font-size: 0.9em;
|
||||
line-height: 1.0em;
|
||||
color: #375F30;
|
||||
}
|
||||
|
||||
.ExpertStyle {
|
||||
background-image: url("/lemongui4webmin/images/expert3.jpg") ;
|
||||
background-attachment: fixed ;
|
||||
background-color: #E4EBF5 ;
|
||||
margin: 0cm 0.1cm 0.3cm 0.1cm;
|
||||
border: 2px double #007;
|
||||
font-family: courier, prestige, monospace;
|
||||
font-size: 1.1em;
|
||||
color: #040B15;
|
||||
line-height: 1.0em;
|
||||
}
|
||||
|
||||
.PetiFont {
|
||||
font-family: courier, prestige, monospace;
|
||||
font-size: 0.7em;
|
||||
}
|
||||
|
||||
pre {
|
||||
margin: 0.7cm 0.7cm 0.7cm 0.7cm;
|
||||
}
|
||||
|
||||
LABEL {
|
||||
background: transparent;
|
||||
DISPLAY: inline ;
|
||||
FLOAT: left ;
|
||||
WIDTH: 150px ;
|
||||
font-weight: bold ;
|
||||
font-family: Arial, Helvetica, sans-serif ;
|
||||
text-align: right ;
|
||||
margin-left: 2px ;
|
||||
margin-right: 35px ;
|
||||
color: #375F30;
|
||||
}
|
||||
|
||||
.LABG {
|
||||
background: transparent;
|
||||
DISPLAY: inline ;
|
||||
FLOAT: left ;
|
||||
font-weight: bold ;
|
||||
font-family: Arial, Helvetica, sans-serif ;
|
||||
text-align: right ;
|
||||
color: #375F30;
|
||||
}
|
||||
|
||||
.OPTION {
|
||||
background: transparent;
|
||||
/* background-color: #DEE7EF ; */
|
||||
font-family: Arial, Helvetica, sans-serif ;
|
||||
font-weight: bold;
|
||||
color: #375F30;
|
||||
}
|
||||
|
||||
/* ******************************************************************** */
|
||||
/* MISE EN FORME DES TABULATIONS */
|
||||
/* ******************************************************************** */
|
||||
|
||||
div.tabs {
|
||||
background: transparent;
|
||||
border-collapse: collapse;
|
||||
border-bottom-color: #8CACBB;
|
||||
border-bottom-style: solid;
|
||||
border-bottom-width: 1px;
|
||||
padding: 0.5em 0em 0em 2em;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
div.tabs a {
|
||||
/* The normal, unselected tabs. They are all links */
|
||||
background: transparent;
|
||||
border-color: #8CACBB;
|
||||
border-width: 1px;
|
||||
border-style: solid solid none solid;
|
||||
color: #375F30;
|
||||
font-weight: normal;
|
||||
height: 1.2em;
|
||||
margin-right: 0.5em;
|
||||
padding: 0em 2em;
|
||||
/* text-transform: lowercase; */
|
||||
}
|
||||
|
||||
div.tabs a.selected {
|
||||
/* The selected tab. There's only one of this */
|
||||
background: #375F30;
|
||||
border: 1px solid #8CACBB;
|
||||
border-bottom: #DEE7EC 1px solid;
|
||||
color: #EDF4FB;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
div.tabs a:hover {
|
||||
background: #375F30;
|
||||
border-color: #8CACBB;
|
||||
border-bottom-color: #DEE7EC;
|
||||
color: #EDF4FB;
|
||||
}
|
||||
|
||||
A:link {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
A:visited {
|
||||
text-decoration: none;
|
||||
}
|
||||
.posit_TL {
|
||||
position:absolute ;
|
||||
left: 10px ;
|
||||
top: 5px ;
|
||||
}
|
||||
|
||||
.posit_TR {
|
||||
position:absolute ;
|
||||
right: 10px ;
|
||||
top: 5px ;
|
||||
}
|
||||
|
||||
.posit_C {
|
||||
position:absolute ;
|
||||
left: 50% ;
|
||||
}
|
||||
|
||||
|
||||
.bouton_0 {
|
||||
color: #375f30;
|
||||
background-color: #edf4fb;
|
||||
font-size: 0.9em;
|
||||
border: 1px solid #660;
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
.bouton_0:hover {
|
||||
color: #edf4fb;
|
||||
background-color: #375f30;
|
||||
font-size: 0.9em;
|
||||
border: 1px solid #660;
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
.bouton_0dd {
|
||||
color: #000;
|
||||
background-color: #777;
|
||||
font-size: 0.9em;
|
||||
border: 1px solid #660;
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
.bouton_0dd:hover {
|
||||
color: #000;
|
||||
background-color: #777;
|
||||
font-size: 0.9em;
|
||||
border: 1px solid #660;
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
|
||||
.tdg {
|
||||
width: 120px;
|
||||
text-align: right;
|
||||
vertical-align: middle;
|
||||
background-color: #edf4fb;
|
||||
border-top: 1px solid #660;
|
||||
/* border-bottom: 1px solid #660;*/
|
||||
font-family: arial, verdana, sans-serif ;
|
||||
font: Arial;
|
||||
font-size: 0.8em;
|
||||
font-weight: bold;
|
||||
color: #375f30;
|
||||
padding-right: 12px;
|
||||
}
|
||||
|
||||
.tdd {
|
||||
width: 160px;
|
||||
text-align: left;
|
||||
vertical-align: middle;
|
||||
border-top: 1px solid #cdd4db;
|
||||
/* border-bottom: 1px solid #660; */
|
||||
font-family: arial, verdana, sans-serif ;
|
||||
font: Arial;
|
||||
font-size: 0.8em;
|
||||
font-weight: bold;
|
||||
color: #375f30;
|
||||
padding-left: 12px;
|
||||
}
|
||||
|
||||
/* ******************************************************************** */
|
||||
/* INPUTS */
|
||||
/* ******************************************************************** */
|
||||
|
||||
.INPUTR {
|
||||
background: transparent;
|
||||
font-family: Arial, Helvetica, sans-serif ;
|
||||
font-weight: bold;
|
||||
font: Arial;
|
||||
font-size: 0.9em;
|
||||
color: #375f30;
|
||||
padding-left: 5px;
|
||||
}
|
||||
|
||||
/* ******************************************************************** */
|
||||
/* DIFF classes de mise en forme de zones ayant le "focus" */
|
||||
/* ******************************************************************** */
|
||||
|
||||
INPUT:focus {
|
||||
background-color: #555555 ;
|
||||
color: #FFFFFF ;
|
||||
}
|
||||
|
||||
/* ***** */
|
||||
|
||||
.SELECT {
|
||||
background: transparent ;
|
||||
font-family: Arial, Helvetica, sans-serif ;
|
||||
font: Arial;
|
||||
font-size: 1.1em ;
|
||||
color: #375f30 ;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.SELECTO {
|
||||
background: #444 ;
|
||||
font-family: Arial, Helvetica, sans-serif ;
|
||||
font: Arial;
|
||||
font-size: 1.1em ;
|
||||
color: #37Ef30 ;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.ListSELECT {
|
||||
background: transparent ;
|
||||
font-family: Arial, Helvetica, sans-serif ;
|
||||
font: Arial;
|
||||
font-size: 0.9em ;
|
||||
color: #375f30;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.ListSELECTO {
|
||||
background: transparent ;
|
||||
font-family: Arial, Helvetica, sans-serif ;
|
||||
font: Arial;
|
||||
font-size: 0.9em ;
|
||||
color: #375ef30 ;
|
||||
font-weight: bold;
|
||||
}
|
||||
.ListSELECTA {
|
||||
background: #222 ;
|
||||
font-family: Arial, Helvetica, sans-serif ;
|
||||
font: Arial;
|
||||
font-size: 1.1em ;
|
||||
color: #59F ;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
|
||||
-->
|
|
@ -0,0 +1,452 @@
|
|||
<!--
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
|
||||
|
||||
/* ************************************ */
|
||||
/* mise en forme de différentes balises */
|
||||
/* ************************************ */
|
||||
|
||||
TITLE {
|
||||
font: 36px Arial;
|
||||
font-weight: bold;
|
||||
color=green;
|
||||
}
|
||||
|
||||
|
||||
BODY {
|
||||
background-color: #EDF0BA ;
|
||||
background-image: url("/lemongui4webmin/images/mapmond256.jpg") ;
|
||||
background-attachment: fixed ;
|
||||
font-size: 0.80em;
|
||||
line-height: 1.1;
|
||||
margin: 0.7cm 0.7cm 0.7cm 0.7cm;
|
||||
}
|
||||
|
||||
.h4expert {
|
||||
font-family: arial, verdana, sans-serif ;
|
||||
font-variant: small-caps ;
|
||||
background-image: url("/lemongui4webmin/images/theExpert.jpg") ;
|
||||
/* backgroud-repeat: repeat-x; */
|
||||
text-align: center;
|
||||
font: Arial;
|
||||
font-size: 4em;
|
||||
font-weight: bold;
|
||||
color: #aaF;
|
||||
border: 2px double #007;
|
||||
}
|
||||
.h4normal {
|
||||
font-family: arial, verdana, sans-serif ;
|
||||
font-variant: small-caps ;
|
||||
background-image: url("/lemongui4webmin/images/theNormal.jpg") ;
|
||||
/* backgroud-repeat: repeat-x; */
|
||||
text-align: center;
|
||||
font: Arial;
|
||||
font-size: 4em;
|
||||
font-weight: bold;
|
||||
color: #FFF;
|
||||
border: 2px double #007;
|
||||
}
|
||||
|
||||
H1 {
|
||||
font-family: arial, verdana, sans-serif ;
|
||||
background-image: url("/lemongui4webmin/images/back_h1.jpg") ;
|
||||
backgroud-repeat: repeat-x;
|
||||
font: Arial;
|
||||
font-size: 4em;
|
||||
font-weight: bold;
|
||||
color: #236;
|
||||
border: 2px double #375F30;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
|
||||
H2 {
|
||||
font-family: arial, verdana, sans-serif ;
|
||||
font: Arial;
|
||||
font-size: 3em;
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
color: #236;
|
||||
background-image: url("/lemongui4webmin/images/back2_h2.jpg") ;
|
||||
backgroud-repeat: repeat-x;
|
||||
border: 2px double #007;
|
||||
}
|
||||
H3 {
|
||||
font-family: arial, verdana, sans-serif ;
|
||||
font: Arial;
|
||||
font-size: 2.5em;
|
||||
font-weight: bold;
|
||||
color: #236;
|
||||
}
|
||||
H4 {
|
||||
font-family: arial, verdana, sans-serif ;
|
||||
font: Arial;
|
||||
font-size: 2em;
|
||||
font-weight: bold;
|
||||
color: #236;
|
||||
}
|
||||
H5 {
|
||||
font-family: arial, verdana, sans-serif ;
|
||||
font: Arial;
|
||||
font-size: 1em;
|
||||
font-weight: bold;
|
||||
color: #236;
|
||||
}
|
||||
|
||||
I {
|
||||
font-family: arial, verdana, sans-serif ;
|
||||
font: Arial;
|
||||
font-size: 0.9em;
|
||||
font-weight: bold;
|
||||
color: #236;
|
||||
}
|
||||
|
||||
B {
|
||||
font-family: arial, verdana, sans-serif ;
|
||||
font: Arial;
|
||||
font-size: 1.2em;
|
||||
font-weight: bold;
|
||||
color: #236;
|
||||
}
|
||||
|
||||
.alive {
|
||||
color: #0F0 ;
|
||||
background-color: #000000 ;
|
||||
font-style : bold;
|
||||
letter-spacing : 6px;
|
||||
word-spacing : 12px;
|
||||
text-decoration: blink ;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.dead {
|
||||
color: #f00 ;
|
||||
background-color: #000000 ;
|
||||
font-style : bold;
|
||||
letter-spacing : 6px;
|
||||
word-spacing : 12px;
|
||||
text-decoration: blink ;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.ConfStyle {
|
||||
background-image: url("/lemongui4webmin/images/connex.jpg") ;
|
||||
background-repeat: repeat-y ;
|
||||
background-attachment: fixed ;
|
||||
background-color: #E4EBF5 ;
|
||||
margin: 0cm 4.0cm 0.7cm 0.7cm;
|
||||
border: 2px double #007;
|
||||
font-family: courier, prestige, monospace;
|
||||
font-size: 0.9em;
|
||||
color: #040B15;
|
||||
line-height: 1.0em;
|
||||
}
|
||||
.ExpertStyle {
|
||||
background-image: url("/lemongui4webmin/images/expert.jpg") ;
|
||||
background-attachment: fixed ;
|
||||
background-color: #E4EBF5 ;
|
||||
margin: 0cm 0.1cm 0.3cm 0.1cm;
|
||||
border: 2px double #007;
|
||||
font-family: courier, prestige, monospace;
|
||||
font-size: 1.1em;
|
||||
color: #040B15;
|
||||
line-height: 1.0em;
|
||||
}
|
||||
|
||||
.LExpertMode {
|
||||
background-image: url("/lemongui4webmin/images/theExpert.jpg") ;
|
||||
background-repeat: no-repeat ;
|
||||
border: 2px double #007;
|
||||
font-family: courier, prestige, monospace;
|
||||
font-size: 1.1em;
|
||||
position:absolute ;
|
||||
left: 10px ;
|
||||
bottom: 2px ;
|
||||
width: 170px;
|
||||
height: 231;
|
||||
}
|
||||
|
||||
.PetiFont {
|
||||
font-family: courier, prestige, monospace;
|
||||
font-size: 0.7em;
|
||||
}
|
||||
|
||||
pre {
|
||||
margin: 0.7cm 0.7cm 0.7cm 0.7cm;
|
||||
}
|
||||
|
||||
LABEL {
|
||||
background: transparent;
|
||||
DISPLAY: inline ;
|
||||
FLOAT: left ;
|
||||
WIDTH: 150px ;
|
||||
font-weight: bold ;
|
||||
font-family: Arial, Helvetica, sans-serif ;
|
||||
text-align: right ;
|
||||
margin-left: 2px ;
|
||||
margin-right: 35px ;
|
||||
color: #040B15;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.LABG {
|
||||
background: transparent;
|
||||
DISPLAY: inline ;
|
||||
FLOAT: left ;
|
||||
font-weight: bold ;
|
||||
font-family: Arial, Helvetica, sans-serif ;
|
||||
text-align: right ;
|
||||
color: #040B15;
|
||||
}
|
||||
|
||||
|
||||
.OPTION {
|
||||
background: transparent;
|
||||
font-family: Arial, Helvetica, sans-serif ;
|
||||
font-weight: bold;
|
||||
color: #040B15;
|
||||
}
|
||||
|
||||
/* ******************************************************************** */
|
||||
/* MISE EN FORME DES TABULATIONS */
|
||||
/* ******************************************************************** */
|
||||
|
||||
div.tabs {
|
||||
background: transparent;
|
||||
border-collapse: collapse;
|
||||
border-bottom-color: #8CACBB;
|
||||
border-bottom-style: solid;
|
||||
border-bottom-width: 1px;
|
||||
padding: 0.5em 0em 0em 2em;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
div.tabs a {
|
||||
/* The normal, unselected tabs. They are all links */
|
||||
background: transparent;
|
||||
border-color: #8CACBB;
|
||||
border-width: 1px;
|
||||
border-style: solid solid none solid;
|
||||
color: #436976;
|
||||
font-weight: normal;
|
||||
height: 1.2em;
|
||||
margin-right: 0.5em;
|
||||
padding: 0em 2em;
|
||||
/* text-transform: lowercase; */
|
||||
}
|
||||
|
||||
div.tabs a.selected {
|
||||
/* The selected tab. There's only one of this */
|
||||
background: #7087B0;
|
||||
border: 1px solid #8CACBB;
|
||||
border-bottom: #DEE7EC 1px solid;
|
||||
color: #EDF4FB;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
div.tabs a:hover {
|
||||
background: #7087B0;
|
||||
border-color: #8CACBB;
|
||||
border-bottom-color: #DEE7EC;
|
||||
color: #EDF4FB;
|
||||
}
|
||||
|
||||
A:link {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
A:visited {
|
||||
text-decoration: none;
|
||||
}
|
||||
.posit_TL {
|
||||
position:absolute ;
|
||||
left: 10px ;
|
||||
top: 5px ;
|
||||
}
|
||||
|
||||
.posit_TR {
|
||||
position:absolute ;
|
||||
right: 10px ;
|
||||
top: 5px ;
|
||||
}
|
||||
|
||||
.posit_C {
|
||||
position:absolute ;
|
||||
left: 50% ;
|
||||
}
|
||||
|
||||
|
||||
.bouton_0 {
|
||||
color: #7087b0;
|
||||
background-color: #edf4fb;
|
||||
font-size: 0.9em;
|
||||
border: 1px solid #660;
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
.bouton_0:hover {
|
||||
color: #edf4fb;
|
||||
background-color: #7087b0;
|
||||
font-size: 0.9em;
|
||||
border: 1px solid #660;
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
.bouton_0dd {
|
||||
color: #000;
|
||||
background-color: #777;
|
||||
font-size: 0.9em;
|
||||
border: 1px solid #660;
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
.bouton_0dd:hover {
|
||||
color: #000;
|
||||
background-color: #777;
|
||||
font-size: 0.9em;
|
||||
border: 1px solid #660;
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
.tdg {
|
||||
width: 120px;
|
||||
text-align: right;
|
||||
vertical-align: middle;
|
||||
background-color: #edf4fb;
|
||||
border-top: 1px solid #236;
|
||||
font-family: arial, verdana, sans-serif ;
|
||||
font: Arial;
|
||||
font-size: 0.8em;
|
||||
font-weight: bold;
|
||||
color: #7087b0;
|
||||
padding-right: 12px;
|
||||
}
|
||||
|
||||
.tdd {
|
||||
width: 160px;
|
||||
text-align: left;
|
||||
vertical-align: middle;
|
||||
border-top: 1px solid #edf4fb;
|
||||
font-family: arial, verdana, sans-serif ;
|
||||
font: Arial;
|
||||
font-size: 0.8em;
|
||||
font-weight: bold;
|
||||
color: #236;
|
||||
padding-left: 12px;
|
||||
}
|
||||
|
||||
/* ******************************************************************** */
|
||||
/* INPUTS */
|
||||
/* ******************************************************************** */
|
||||
|
||||
.INPUTR {
|
||||
background: transparent;
|
||||
font-family: Arial, Helvetica, sans-serif ;
|
||||
font-weight: bold;
|
||||
font: Arial;
|
||||
font-size: 0.9em;
|
||||
color: #236;
|
||||
padding-left: 5px;
|
||||
}
|
||||
|
||||
/* ******************************************************************** */
|
||||
/* DIFF classes de mise en forme de zones ayant le "focus" */
|
||||
/* ******************************************************************** */
|
||||
|
||||
INPUT:focus {
|
||||
background-color: #555555 ;
|
||||
color: #FFFFFF ;
|
||||
}
|
||||
|
||||
/* ***** */
|
||||
|
||||
.SELECT {
|
||||
background: transparent ;
|
||||
font-family: Arial, Helvetica, sans-serif ;
|
||||
font: Arial;
|
||||
font-size: 1.1em ;
|
||||
color: #236 ;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.SELECTO {
|
||||
background: #444 ;
|
||||
font-family: Arial, Helvetica, sans-serif ;
|
||||
font: Arial;
|
||||
font-size: 1.1em ;
|
||||
color: #59F ;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
|
||||
.ListSELECT {
|
||||
background: transparent ;
|
||||
font-family: Arial, Helvetica, sans-serif ;
|
||||
font: Arial;
|
||||
font-size: 0.9em ;
|
||||
color: #236 ;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.ListSELECTO {
|
||||
background: transparent ;
|
||||
font-family: Arial, Helvetica, sans-serif ;
|
||||
font: Arial;
|
||||
font-size: 1.1em ;
|
||||
color: #59F ;
|
||||
font-weight: bold;
|
||||
}
|
||||
.ListSELECTA {
|
||||
background: #222 ;
|
||||
font-family: Arial, Helvetica, sans-serif ;
|
||||
font: Arial;
|
||||
font-size: 1.1em ;
|
||||
color: #59F ;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
|
||||
/* ******************************************************************** */
|
||||
/* DEUX COLONNES */
|
||||
/* ******************************************************************** */
|
||||
|
||||
#colonneDroite {
|
||||
width: 50%;
|
||||
float: left;
|
||||
background: transparent;
|
||||
padding-bottom: 1em;
|
||||
}
|
||||
|
||||
#colonneGauche {
|
||||
width: 50%;
|
||||
float: left;
|
||||
background: transparent;
|
||||
padding-bottom: 1em;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.PresA {
|
||||
background-color: #E4EBF5 ;
|
||||
margin: 0.7cm 0.7cm 0.7cm 0.7cm;
|
||||
padding: 0.4cm 0.4cm 0.4cm 0.4cm;
|
||||
border: 2px double #007;
|
||||
font-family: arial, verdana, sans-serif ;
|
||||
font: Arial;
|
||||
font-size: 1.0em;
|
||||
color: #040B15;
|
||||
line-height: 1.0em;
|
||||
}
|
||||
|
||||
.PresB {
|
||||
background-color: #EEE ;
|
||||
margin: 0.5cm 0.5cm 0.5cm 0.5cm;
|
||||
padding: 0.5cm 0.5cm 0.5cm 0.5cm;
|
||||
border: 2px double #007;
|
||||
font-family: courier, prestige, monospace;
|
||||
font-size: 1.1em;
|
||||
color: #040B15;
|
||||
line-height: 1.0em;
|
||||
}
|
||||
|
||||
-->
|
|
@ -0,0 +1,31 @@
|
|||
#!/usr/bin/perl
|
||||
# un_domain.cgi
|
||||
# Display the icons for various types of lemonldapconfig options
|
||||
use Data::Dumper;
|
||||
require './lemonldap-lib.pl';
|
||||
# Check if lemonlap is installed
|
||||
&ReadParse();
|
||||
my $domain = $in{'domain'};
|
||||
if ($in{'delete'} and $in{'confirm'} eq 'yes') {
|
||||
my $c = &get_config;
|
||||
my $all_domain = $c->{domain};
|
||||
my $all_handler= $all_domain->{$domain}{handler} ;
|
||||
&sauvefile($config{httpd_conf},'tmp1');
|
||||
foreach (keys %{$all_handler} ) {
|
||||
&delete_handler_httpd($_);
|
||||
}
|
||||
delete $all_domain->{$domain};
|
||||
|
||||
$c->{domain} = $all_domain ;
|
||||
&restaurefile("$config{httpd_conf}",'tmp1');
|
||||
my $res =&writexml($config{XML_file},$c);
|
||||
unless ($res) {
|
||||
system ("mv $config{XML_file} $config{XML_file}.bak");
|
||||
system ("mv $config{XML_file}.tmp $config{XML_file} ");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
&redirect("domain.cgi");
|
||||
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
#!/usr/bin/perl
|
||||
# un_domain.cgi
|
||||
# Display the icons for various types of lemonldapconfig options
|
||||
use Data::Dumper;
|
||||
require './lemonldap-lib.pl';
|
||||
# Check if lemonlap is installed
|
||||
&ReadParse();
|
||||
my $domain = $in{'domain'};
|
||||
my $handler = $in{'handler'};
|
||||
if ($in{'delete'} and $in{'confirm'} eq 'yes') {
|
||||
my $c = &get_config;
|
||||
my $all_domain = $c->{domain};
|
||||
delete $all_domain->{$domain}->{handler}->{$handler};
|
||||
$c->{domain} = $all_domain ;
|
||||
my $res =&writexml($config{XML_file},$c);
|
||||
unless ($res) {
|
||||
system ("mv $config{XML_file} $config{XML_file}.bak");
|
||||
system ("mv $config{XML_file}.tmp $config{XML_file} ");
|
||||
}
|
||||
}
|
||||
### delete info about httpd
|
||||
&delete_handler_httpd($handler);
|
||||
|
||||
|
||||
&redirect("domain.cgi?domain=$domain");
|
||||
|
||||
|
|
@ -0,0 +1,293 @@
|
|||
#!/usr/bin/perl -w
|
||||
#use strict;
|
||||
use Template;
|
||||
use CGI;
|
||||
use Data::Dumper;
|
||||
require './lemonldap-lib.pl';
|
||||
|
||||
|
||||
my $tt = Template->new( {# ABSOLUTE => 1,
|
||||
PREC_CHOMP =>1,
|
||||
POST_CHOMP =>1, } );
|
||||
|
||||
|
||||
##
|
||||
## PAS DE NOUVEAU DOMAINE NOMMES "ADD DOMAIN" OU NON NOMMES
|
||||
##------------------------------------------------------------------------------------
|
||||
my $message = 0;
|
||||
|
||||
my $flagSUBMIT = CGI::param('submitDomain') ;
|
||||
if( defined( $flagSUBMIT ) ) {
|
||||
if( CGI::param( 'idDomain' ) eq $text{ lab_26 } ){
|
||||
$message = 'ERROR: \"\" ' . $text{ lab_26 } . ' \"\" ' . $text{lab_error_4};
|
||||
$flagSUBMIT = undef;
|
||||
}
|
||||
if( !length( CGI::param( 'idDomain' ) ) ){
|
||||
$message = 'ERROR: ' . ' ' . $text{lab_error_5};
|
||||
$flagSUBMIT = undef;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
##########################################
|
||||
# chargement des infos de la page #
|
||||
##########################################
|
||||
|
||||
if (! defined ($flagSUBMIT) ) {
|
||||
|
||||
my $conf = &getXmlPage( "domain" );
|
||||
my $filethtml = $conf->{template};
|
||||
my $title = $text{ &dePourCent( $conf->{title} ) };
|
||||
my $_style = CGI::param('style')||$config{Style};
|
||||
my $tabular = [];
|
||||
my $composs;
|
||||
my $mode;
|
||||
|
||||
my $refTimeOut;
|
||||
|
||||
if (CGI::param('mode') =~ /pert/) { # mode expert beaucoups plus d option
|
||||
$mode='Expert' ;
|
||||
$tabular = &getTab( $conf->{tabs}->{expert} );
|
||||
$flipflop= 'Normal';
|
||||
$composs = &getAllComposants( $conf->{composants}->{expert} );
|
||||
$refTimeOut = &getRefValueInCompo( $composs, 'idTimeOut' );
|
||||
} else {
|
||||
$mode ='Normal';
|
||||
$tabular = &getTab( $conf->{tabs}->{normal} );
|
||||
$flipflop= 'Expert';
|
||||
$composs = &getAllComposants( $conf->{composants}->{normal} );
|
||||
}
|
||||
|
||||
$styl = $config{'Style'};
|
||||
|
||||
if( defined (CGI::param ("editHandlers")) ) {
|
||||
my $dom = CGI::param('cbDomain');
|
||||
my $handle = CGI::param('listHandlers');
|
||||
&redirect( "handlers_0.cgi?mode=$mode&style=$_style&Domain=$dom&SelHandler=$handle" );
|
||||
exit(0);
|
||||
}
|
||||
|
||||
$tabular = &polyGlotTab( $tabular, \%text );
|
||||
$tabular = &ajustLink ($tabular,$mode,$_style);
|
||||
|
||||
$composs = &polyGlotTab( $composs, \%text );
|
||||
|
||||
my $xmlemon = getXML( $config{'XML_file'} );
|
||||
|
||||
my $sesserv = getChapterXML( $xmlemon, "session" );
|
||||
if( !$sesserv ){
|
||||
&redirect( "/lemongui4webmin/session.cgi?mode=$mode&style=$styl" );
|
||||
exit();
|
||||
}
|
||||
|
||||
my $chapter = getChapterXML( $xmlemon, "domain" );
|
||||
|
||||
#my $flagShowEditHandler = ( keys( %{chapter} ) ) ? 1 : 0;
|
||||
|
||||
my @sessIDs = keys( %{$sesserv} );
|
||||
|
||||
my @comboSessions;
|
||||
|
||||
for( @sessIDs ){
|
||||
my $item = { "labOption" => $_, "idValue" => $_ };
|
||||
push( @comboSessions, $item );
|
||||
}
|
||||
|
||||
## combo box domaines
|
||||
my $combo_domains;
|
||||
|
||||
##
|
||||
## sélection de la bonne ligne dans la comboBox des domains et ajout de l'item "ADD NEW"
|
||||
##
|
||||
my $firstL = &keyToVal( $chapter, $combo_domains );
|
||||
my $addnew = { "labOption" => $text{ lab_26 }, "idValue" => $text{ lab_26 } };
|
||||
push( @{$combo_domains}, $addnew );
|
||||
|
||||
#
|
||||
########################################## TEST POUR CHANGEMENT de domaine
|
||||
#
|
||||
|
||||
my $cbd = CGI::param( cbDomain );
|
||||
if( !$cbd ){
|
||||
$cbd = $firstL;
|
||||
}
|
||||
if( defined( CGI::param( 'ledomaine' ) ) ){
|
||||
$cbd = CGI::param( 'ledomaine' );
|
||||
}
|
||||
|
||||
|
||||
my $sessSelected = $chapter->{ $cbd }->{ 'SessionStore' };
|
||||
|
||||
my %chapterX = ( 'xxxx', $chapter->{ $cbd } );
|
||||
&TransformVars( $composs, \%chapterX );
|
||||
|
||||
## IPCheck ???
|
||||
##----------------------
|
||||
my $valab = getRefValueInCompo( $composs, 'IPCheck' );
|
||||
# my $dump1;
|
||||
$valab->{ isChecked } = $chapterX{'xxxx'}->{ 'IPCheck' } ? "CHECKED" : "";
|
||||
|
||||
#
|
||||
######## DELETE HANDLER
|
||||
#
|
||||
if( defined( CGI::param('DeleteHandler'))){
|
||||
my $allHandlersChapters = $chapter->{ $cbd }->{ 'handler' };
|
||||
my $selectedHand = CGI::param('listHandlers');
|
||||
|
||||
if( &OkToChange( $allHandlersChapters, $selectedHand, $message )){
|
||||
## DELETE SELECTED HANDLER
|
||||
##-------------------------
|
||||
delete( $chapter->{ $cbd }->{ 'handler' }->{ $selectedHand } );
|
||||
&writeXML( $xmlemon, $config{'XML_file'});
|
||||
}
|
||||
}
|
||||
|
||||
#
|
||||
######## DELETE DOMAIN
|
||||
#
|
||||
|
||||
my $flagShowEditHandler = 1;
|
||||
|
||||
if( defined( CGI::param('DeleteDomain'))){
|
||||
my $allHandlersChapters = $chapter->{ $cbd }->{ 'handler' };
|
||||
if( $allHandlersChapters ){
|
||||
$message = 'ERROR: '. $cbd . ' ' . $text{ 'lab_error_6' };
|
||||
} else {
|
||||
delete( $chapter->{ $cbd } );
|
||||
|
||||
## reste t il des domaines ???
|
||||
##-----------------------------
|
||||
my @kdoms = keys( %{$chapter} );
|
||||
if( !@kdoms ){
|
||||
delete( $xmlemon->{'domain'} );
|
||||
$flagShowEditHandler = 0;
|
||||
}
|
||||
|
||||
&writeXML( $xmlemon, $config{'XML_file'});
|
||||
$combo_domains = undef;
|
||||
$firstL = &keyToVal( $chapter, $combo_domains );
|
||||
my $addnew = { "labOption" => $text{ lab_26 }, "idValue" => $text{ lab_26 } };
|
||||
push( @{$combo_domains}, $addnew );
|
||||
}
|
||||
}
|
||||
|
||||
## RECUP HANDLERS ASSOC WITH DOMAIN
|
||||
my $handlers = $chapter->{ $cbd }->{ 'handler' };
|
||||
my @handkeys = keys( %{$handlers} );
|
||||
@handkeys = sort( @handkeys );
|
||||
|
||||
my @listHandlers;
|
||||
|
||||
for( @handkeys ){
|
||||
my $item = { "labOption" => $_, "idValue" => $_ };
|
||||
push( @listHandlers, $item );
|
||||
}
|
||||
|
||||
if( $cbd eq $text{ lab_26 } || !$cbd){
|
||||
$flagShowEditHandler = 0;
|
||||
}
|
||||
|
||||
#$dump1 = $cbd;
|
||||
|
||||
#
|
||||
####### VARIABLES PASSES EN PARAMETRE AU TEMPLATE
|
||||
|
||||
$vars= { style => $styl,
|
||||
checked => $check,
|
||||
title => $title,
|
||||
mode => $mode,
|
||||
cgi => 'domain.cgi',
|
||||
css => $_style,
|
||||
label => $flipflop,
|
||||
parent => $0,
|
||||
tab_session => $tabular,
|
||||
langa => \%text,
|
||||
composall => $composs,
|
||||
combo_domain => $combo_domains,
|
||||
option_selected => $cbd,
|
||||
label_combo => $text{ 'lab_17' },
|
||||
label_comboSess => $text{ 'session_server' },
|
||||
selected_session => $sessSelected,
|
||||
combo_sessions => \@comboSessions,
|
||||
list_handlers => \@listHandlers,
|
||||
flag_ShowEditHandler => $flagShowEditHandler,
|
||||
message => $message,
|
||||
lab_56 => $text{ 'lab_56' },
|
||||
lab_57 => $text{ 'lab_57' }
|
||||
};
|
||||
|
||||
$vars->{style} = &getStyle($styl, $vars->{checked});
|
||||
|
||||
print "Content-type: text/html\n";
|
||||
$tt->process($filethtml,$vars) || die $tt->error();
|
||||
|
||||
## print("<BR><HR>Dump1 ---> $dump1 <HR><BR>");
|
||||
## print("<BR><HR>Dump = $dump2 <HR><BR>");
|
||||
|
||||
} else { ## Traitement du "SUBMIT"
|
||||
##########################################################
|
||||
=pod
|
||||
print "Content-type: text/html\n";
|
||||
print( "\n" );
|
||||
|
||||
|
||||
my @lo =CGI::param();
|
||||
my $l =Dumper(@lo);
|
||||
print "$l";
|
||||
print( "<BR><hr><BR>" );
|
||||
for( @lo ){
|
||||
my $loc = CGI::param( $_ );
|
||||
print("$_ --> $loc //");
|
||||
}
|
||||
=cut
|
||||
|
||||
my $_style = CGI::param('style');
|
||||
my $mode = CGI::param('mode');
|
||||
my $dom = CGI::param( 'idDomain' );
|
||||
|
||||
my $xmlemon = getXML( $config{'XML_file'} );
|
||||
my $chapter = getChapterXML( $xmlemon, "domain" );
|
||||
if( !$chapter ){
|
||||
$xmlemon->{ 'domain' }->{ $dom }->{ 'Cookie' } = CGI::param( 'Cookie' );
|
||||
$chapter = $xmlemon->{ 'domain' }->{ $dom };
|
||||
} else {
|
||||
$chapter = $chapter->{ $dom };
|
||||
if( !$chapter ){
|
||||
$xmlemon->{ 'domain' }->{ $dom }->{ 'Cookie' } = CGI::param( 'Cookie' );
|
||||
$chapter = $xmlemon->{ 'domain' }->{ $dom };
|
||||
}
|
||||
}
|
||||
|
||||
$chapter->{ 'Cookie' } = CGI::param( 'Cookie' );
|
||||
if( !length( $chapter->{ 'Cookie' } ) ){
|
||||
$chapter->{ 'Cookie' } = "lemonldap";
|
||||
}
|
||||
$chapter->{ 'ldap_branch_people' } = CGI::param( 'ldap_branch_people' );
|
||||
$chapter->{ 'Portal' } = CGI::param( 'Portal' );
|
||||
$chapter->{ 'SessionStore' } = CGI::param( 'cbSessions' );
|
||||
$chapter->{ 'ldap_server' } = CGI::param( 'ldap_server' );
|
||||
$chapter->{ 'ldap_port' } = CGI::param( 'ldap_port' );
|
||||
if( !length( $chapter->{ 'ldap_port' } ) ){
|
||||
$chapter->{ 'ldap_port' } = "389";
|
||||
}
|
||||
$chapter->{ 'DnManager' } = CGI::param( 'DnManager' );
|
||||
$chapter->{ 'passwordManager' } = CGI::param( 'passwordManager' );
|
||||
|
||||
if( defined( CGI::param('slavecda') )) {
|
||||
$chapter->{ 'slavecda' } = CGI::param( 'slavecda' );
|
||||
}
|
||||
|
||||
$chapter->{ 'IPCheck' } = defined( CGI::param('IPCheck') ) ? '1' : '0';
|
||||
|
||||
&writeXML( $xmlemon, $config{'XML_file'});
|
||||
|
||||
# my $dump1 = Dumper( $chapter );
|
||||
# my $dump2 = Dumper( @comboSessions );
|
||||
|
||||
# print("<BR><HR>Dump1 = $dump1 <HR><BR>");
|
||||
# print("<BR><HR>Dump = $dump2 <HR><BR>");
|
||||
|
||||
&redirect( "domain.cgi?mode=$mode&style=$_style&cbDomain=$dom" );
|
||||
}
|
||||
#
|
||||
############ C FINI
|
|
@ -0,0 +1,53 @@
|
|||
my $__param = [
|
||||
{name => 'lemonldapportal',
|
||||
type =>'IMPLIED',} ,
|
||||
{name => 'lemonldapbasepub',
|
||||
type => 'IMPLIED',},
|
||||
{name => 'lemonldapbasepriv',
|
||||
type => 'IMPLIED',},
|
||||
{name => 'lemonldapdomain',
|
||||
type => 'REQUIRED' },
|
||||
{name => 'lemonldaphandlerid',
|
||||
type => 'REQUIRED' },
|
||||
|
||||
{name => 'lemonldapconfig',
|
||||
type => 'REQUIRED' },
|
||||
{name => 'lemonldapconfigipckey',
|
||||
type => 'REQUIRED',default =>'CONF' },
|
||||
{name => 'lemonldapconfigttl',
|
||||
type => 'REQUIRED'},
|
||||
{name =>'lemonldapenabledproxy',
|
||||
type => 'IMPLIED',},
|
||||
{name =>'lemonldapipckey',
|
||||
type => 'IMPLIED',},
|
||||
{name => 'lemonldapipcnb' ,
|
||||
type => 'IMPLIED',},
|
||||
{name => 'lemonldapattrldap',
|
||||
type => 'IMPLIED',},
|
||||
{name => 'lemonldapcodeappli',
|
||||
type => 'IMPLIED',},
|
||||
{name => 'lemonldapdisabled',
|
||||
liste =>[0|1], default =>'0',
|
||||
|
||||
type => 'IMPLIED',},
|
||||
|
||||
{name => 'lemonldapsession',
|
||||
type => 'IMPLIED',},
|
||||
{name => 'lemonldapstopcookie',
|
||||
liste =>[0|1], default =>'0',
|
||||
type => 'IMPLIED',},
|
||||
{name => 'lemonldaprecursive',
|
||||
liste =>[0|1], default =>'0',
|
||||
|
||||
type => 'IMPLIED',},
|
||||
{name => 'lemonldapproxyext',
|
||||
type => 'IMPLIED',},
|
||||
{name => 'lemonldapics',
|
||||
type => 'IMPLIED',},
|
||||
{name =>'lemonldapmultihoming',
|
||||
type => 'IMPLIED',},
|
||||
|
||||
|
||||
];
|
||||
|
||||
|
|
@ -0,0 +1,643 @@
|
|||
#!/usr/bin/perl -w
|
||||
#use strict;
|
||||
use Template;
|
||||
use CGI;
|
||||
use Data::Dumper;
|
||||
require './lemonldap-lib.pl';
|
||||
|
||||
|
||||
my $dump1;
|
||||
my $dump2;
|
||||
|
||||
|
||||
#---------------------------------------------------------------------
|
||||
# SUUPRIME DES COMPOSANTS ISSUS DU guiconfig.xml POUR ASSISTANT
|
||||
#---------------------------------------------------------------------
|
||||
|
||||
sub CleanComposants {
|
||||
my $compos = $_[0];
|
||||
my @keep = @{$_[1]};
|
||||
my $newcomp;
|
||||
|
||||
$dump2 = join(',', @keep);
|
||||
|
||||
for( @keep ){
|
||||
my $item = $_;
|
||||
|
||||
for( @{$compos} ){
|
||||
my $comp = $_;
|
||||
if( $comp->{ 'id_input' } eq $item ){
|
||||
push( @{$newcomp}, $comp );
|
||||
}
|
||||
}
|
||||
}
|
||||
$_[0] = $newcomp;
|
||||
}
|
||||
|
||||
|
||||
my $message = 0;
|
||||
|
||||
my $tt = Template->new( {# ABSOLUTE => 1,
|
||||
PREC_CHOMP =>1,
|
||||
POST_CHOMP =>1, } );
|
||||
|
||||
|
||||
|
||||
## ATTENTION A CONTROLER SI TYPE HANDLER == COMBINED ---> MotifOut PAS VIDE !!!!!
|
||||
## PAS DE NOUVEAU HANDLER NOMMES "ADD HANDLER" OU NON NOMMES
|
||||
##------------------------------------------------------------------------------------
|
||||
my $flagSUBMIT = CGI::param('submitHandlers_0') ;
|
||||
if( defined( $flagSUBMIT ) ) {
|
||||
if( CGI::param( 'selTypeHandler' ) eq 'CombinedType' ){
|
||||
if( !length( CGI::param( 'MotifOut' ) ) ){
|
||||
$message = 'ERROR: ' . $text{lab_error_0};
|
||||
$flagSUBMIT = undef;
|
||||
}
|
||||
}
|
||||
if( CGI::param( 'idHandler' ) eq $text{ lab_55 } ){
|
||||
$message = 'ERROR: \"\" ' . $text{ lab_55 } . ' \"\" ' . $text{lab_error_1};
|
||||
$flagSUBMIT = undef;
|
||||
}
|
||||
if( !length( CGI::param( 'idHandler' ) ) ){
|
||||
$message = 'ERROR: ' . ' ' . $text{lab_error_3};
|
||||
$flagSUBMIT = undef;
|
||||
}
|
||||
if( defined( CGI::param( 'IPAdress' )) ){
|
||||
if( !length( CGI::param( 'IPAdress' )) ){
|
||||
$message = 'ERROR: ' . ' ' . $text{lab_error_11};
|
||||
$flagSUBMIT = undef;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
##########################################
|
||||
# chargement des infos de la page #
|
||||
##########################################
|
||||
|
||||
if ( !defined( $flagSUBMIT)) {
|
||||
|
||||
my $conf = &getXmlPage( "handlers_0" );
|
||||
my $filethtml = $conf->{template};
|
||||
|
||||
my $selectedHand;
|
||||
my $domActif;
|
||||
my $flagSameHandler = 0;
|
||||
my $tabular = [];
|
||||
|
||||
if ( defined (CGI::param ("Domain")) ) {
|
||||
$domActif = CGI::param('Domain');
|
||||
$selectedHand = CGI::param('SelHandler');
|
||||
} else {
|
||||
$domActif = CGI::param('idDomain');
|
||||
$selectedHand = CGI::param('cbHandlers');
|
||||
|
||||
if( $selectedHand eq CGI::param('ExHandler')) {
|
||||
$flagSameHandler = 1; ## même handler en ré entrant
|
||||
}
|
||||
}
|
||||
|
||||
my $title = $text{ &dePourCent( $conf->{title} ) } . " / " . $domActif;
|
||||
|
||||
my $_style = CGI::param('style')||$config{Style};
|
||||
|
||||
my $composs;
|
||||
my $mode;
|
||||
|
||||
if (CGI::param('mode') =~ /pert/) { # mode expert beaucoups plus d option
|
||||
$mode ='Expert' ;
|
||||
$composs = &getAllComposants( $conf->{'composants'}->{'expert'} );
|
||||
$tabular = &getTab( $conf->{'tabs'}->{'expert'} );
|
||||
} else {
|
||||
$mode ='Normal';
|
||||
$composs = &getAllComposants( $conf->{'composants'}->{'normal'} );
|
||||
$tabular = &getTab( $conf->{'tabs'}->{'normal'} );
|
||||
}
|
||||
|
||||
$styl = $config{'Style'};
|
||||
$tabular = &polyGlotTab( $tabular, \%text );
|
||||
$tabular = &ajustLink ($tabular,$mode,$_style,$domActif);
|
||||
$composs = &polyGlotTab( $composs, \%text );
|
||||
|
||||
my $xmlemon = getXML( $config{"XML_file"} );
|
||||
my $chapter = getChapterXML( $xmlemon, "domain" );
|
||||
|
||||
my $handlers = $chapter->{ $domActif }->{ "handler" };
|
||||
my @handkeys = keys( %{$handlers} );
|
||||
@handkeys = sort( @handkeys );
|
||||
|
||||
my @comboHandlers;
|
||||
|
||||
for( @handkeys ){
|
||||
my $item = { "labOption" => $_, "idValue" => $_ };
|
||||
push( @comboHandlers, $item );
|
||||
}
|
||||
|
||||
my $item = { "labOption" => $text{ lab_55 }, "idValue" => $text{ lab_55 } };
|
||||
push( @comboHandlers, $item );
|
||||
|
||||
if( !$selectedHand ){
|
||||
$selectedHand = $handkeys[ 0 ];
|
||||
}
|
||||
|
||||
## Recup ALL handlers DATAS
|
||||
##---------------------------------------
|
||||
my @allHandlers;
|
||||
my @auxall = keys( %{ $chapter->{ $domActif }->{ 'handler' } } );
|
||||
for( @auxall ){
|
||||
my $homer = $chapter->{ $domActif }->{ 'handler' }->{ $_ }->{ 'MultiHomer' };
|
||||
if( $homer eq 'CombinedType' ){
|
||||
push( @allHandlers, $_ );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
## SELECTED HANDLER ONLY
|
||||
##------------------------
|
||||
my $allHandlersChapters = $chapter->{ $domActif }->{ 'handler' };
|
||||
$chapter = $chapter->{ $domActif }->{ 'handler' }->{ $selectedHand };
|
||||
|
||||
my %chapterX = ( 'xxxx', $chapter );
|
||||
&TransformVars( $composs, \%chapterX );
|
||||
|
||||
##---------------------------------------------------------------------------------------------------------
|
||||
##---------------------------------------------------------------------------------------------------------
|
||||
## ASSISTANT ??????
|
||||
my $valab;
|
||||
my $helpText = 0;
|
||||
my $IDX_ASSIST = 0;
|
||||
|
||||
|
||||
if( defined(CGI::param( 'AssistCreator' ) ) ){
|
||||
$helpText = $text{ 'assist_handler_0' };
|
||||
$filethtml = $conf->{templateAssist};
|
||||
# clean composants PHASE 0
|
||||
#--------------------------
|
||||
my @keep = ('idHandler');
|
||||
CleanComposants( $composs, \@keep );
|
||||
}
|
||||
|
||||
|
||||
if( defined(CGI::param( 'AssistCreate_Next' ) ) ){ # NEXT PHASE d'assistance
|
||||
$IDX_ASSIST = CGI::param( 'IDX_WIZARD' );
|
||||
|
||||
if( $IDX_ASSIST == 0 ){
|
||||
my $idhandler = CGI::param( 'idHandler' );
|
||||
$filethtml = $conf->{templateAssist};
|
||||
if( !length( $idhandler ) ){ ## nom de handler non saisie
|
||||
$helpText = $text{ 'assist_handler_0' };
|
||||
# clean composants PHASE 0
|
||||
#--------------------------
|
||||
my @keep = ('idHandler');
|
||||
CleanComposants( $composs, \@keep );
|
||||
$message = $text{'lab_error_7'};
|
||||
}
|
||||
else { ## name OK --> PHASE suivante
|
||||
$helpText = $text{ 'assist_handler_1' };
|
||||
my @keep = ('idHandler', 'Enabledproxy', 'Recursive');
|
||||
CleanComposants( $composs, \@keep );
|
||||
$valab = &getRefValueInCompo( $composs, 'idHandler' );
|
||||
$valab->{ 'defValue' } = $idhandler;
|
||||
$valab = &getRefValueInCompo( $composs, 'Enabledproxy' );
|
||||
$valab->{ isChecked } = "";
|
||||
$valab = getRefValueInCompo( $composs, 'Recursive' );
|
||||
$valab->{ isChecked } = "";
|
||||
|
||||
$IDX_ASSIST = 1;
|
||||
}
|
||||
} elsif( $IDX_ASSIST == 1 ){
|
||||
my $idhandler = CGI::param( 'idHandler' );
|
||||
my $checkEnabled = defined( CGI::param( 'Enabledproxy' ) ) ? 'CHECKED' : '';
|
||||
my $checkRecurs = defined( CGI::param( 'Recursive' ) ) ? 'CHECKED' : '';
|
||||
$filethtml = $conf->{templateAssist};
|
||||
if( !length( $idhandler ) ){ ## nom de handler non saisie
|
||||
$helpText = $text{ 'assist_handler_1' };
|
||||
# clean composants PHASE 0
|
||||
#--------------------------
|
||||
my @keep = ('idHandler', 'Enabledproxy', 'Recursive');
|
||||
CleanComposants( $composs, \@keep );
|
||||
$message = $text{'lab_error_7'};
|
||||
}
|
||||
else { ## name OK --> PHASE suivante
|
||||
$helpText = $text{ 'assist_handler_2' };
|
||||
my @keep = ('idHandler', 'Enabledproxy', 'Recursive', 'AttrLdap', 'idCodeAppli');
|
||||
CleanComposants( $composs, \@keep );
|
||||
$valab = &getRefValueInCompo( $composs, 'idHandler' );
|
||||
$valab->{ 'defValue' } = $idhandler;
|
||||
$valab = &getRefValueInCompo( $composs, 'Enabledproxy' );
|
||||
$valab->{ 'isChecked' } = $checkEnabled;
|
||||
$valab = getRefValueInCompo( $composs, 'Recursive' );
|
||||
$valab->{ 'isChecked' } = $checkRecurs;
|
||||
$valab = getRefValueInCompo( $composs, 'AttrLdap' );
|
||||
$valab->{ 'defValue' } = '';
|
||||
$valab = getRefValueInCompo( $composs, 'idCodeAppli' );
|
||||
$valab->{ 'defValue' } = '';
|
||||
$IDX_ASSIST = 2;
|
||||
}
|
||||
} elsif( $IDX_ASSIST == 2 ){
|
||||
my $idhandler = CGI::param( 'idHandler' );
|
||||
my $checkEnabled = defined( CGI::param( 'Enabledproxy' ) ) ? 'CHECKED' : '';
|
||||
my $checkRecurs = defined( CGI::param( 'Recursive' ) ) ? 'CHECKED' : '';
|
||||
my $attrldap = CGI::param( 'AttrLdap' );
|
||||
my $codeappli = CGI::param( 'idCodeAppli' );
|
||||
$filethtml = $conf->{templateAssist};
|
||||
if( !length( $idhandler ) ){ ## nom de handler non saisie
|
||||
$helpText = $text{ 'assist_handler_1' };
|
||||
# clean composants PHASE 0
|
||||
#--------------------------
|
||||
my @keep = ('idHandler', 'Enabledproxy', 'Recursive');
|
||||
CleanComposants( $composs, \@keep );
|
||||
$message = $text{'lab_error_7'};
|
||||
|
||||
##### ATTRLDAP ET CODE APPLI A TESTER ??????
|
||||
|
||||
}
|
||||
else { ## --> PHASE suivante
|
||||
$helpText = $text{ 'assist_handler_3' };
|
||||
my @keep = ('idHandler', 'Enabledproxy', 'Recursive', 'AttrLdap', 'idCodeAppli', 'BasePub', 'BasePriv');
|
||||
CleanComposants( $composs, \@keep );
|
||||
$valab = &getRefValueInCompo( $composs, 'idHandler' );
|
||||
$valab->{ 'defValue' } = $idhandler;
|
||||
$valab = &getRefValueInCompo( $composs, 'Enabledproxy' );
|
||||
$valab->{ 'isChecked' } = $checkEnabled;
|
||||
$valab = getRefValueInCompo( $composs, 'Recursive' );
|
||||
$valab->{ 'isChecked' } = $checkRecurs;
|
||||
$valab = getRefValueInCompo( $composs, 'AttrLdap' );
|
||||
$valab->{ 'defValue' } = $attrldap;
|
||||
$valab = getRefValueInCompo( $composs, 'idCodeAppli' );
|
||||
$valab->{ 'defValue' } = $codeappli;
|
||||
$valab = getRefValueInCompo( $composs, 'BasePub' );
|
||||
$valab->{ 'defValue' } = '';
|
||||
$valab = getRefValueInCompo( $composs, 'BasePriv' );
|
||||
$valab->{ 'defValue' } = '';
|
||||
$IDX_ASSIST = 3;
|
||||
}
|
||||
} elsif( $IDX_ASSIST == 3 ){ ## VALID !!!!
|
||||
my $idhandler = CGI::param( 'idHandler' );
|
||||
|
||||
$xmlemon->{ 'domain' }->{ $domActif }->{ 'handler' }->{ $idhandler }->{ 'MultiHomer' } = CGI::param('selTypeHandler');
|
||||
my $locchap = $xmlemon->{ 'domain' }->{ $domActif }->{ 'handler' }->{ $idhandler };
|
||||
|
||||
$locchap->{ 'VirtualHost' } = CGI::param('selVirtualHost');
|
||||
$locchap->{ 'Organization' } = CGI::param('AttrLdap');
|
||||
$locchap->{ 'BasePriv' } = CGI::param('BasePriv');
|
||||
$locchap->{ 'BasePub' } = CGI::param('BasePub');
|
||||
$locchap->{ 'AppliCode' } = CGI::param('idCodeAppli');
|
||||
$locchap->{ 'EnableLWPProxy' }= defined( CGI::param('Enabledproxy') ) ? '1' : '0';
|
||||
$locchap->{ 'ChaseRedirect'} = defined( CGI::param('Recursive' ) ) ? '1' : '0';
|
||||
|
||||
&writeXML( $xmlemon, $config{'XML_file'});
|
||||
|
||||
## MISE A JOUR DES AFFICHAGES AVEC LE NOUVEAU HANDLER !!!!!
|
||||
##------------------------------------------------------------
|
||||
$chapter = getChapterXML( $xmlemon, "domain" );
|
||||
$handlers = $chapter->{ $domActif }->{ "handler" };
|
||||
@handkeys = keys( %{$handlers} );
|
||||
@handkeys = sort( @handkeys );
|
||||
|
||||
@comboHandlers = undef;
|
||||
|
||||
for( @handkeys ){
|
||||
my $item = { "labOption" => $_, "idValue" => $_ };
|
||||
push( @comboHandlers, $item );
|
||||
}
|
||||
|
||||
my $item = { "labOption" => $text{ lab_55 }, "idValue" => $text{ lab_55 } };
|
||||
push( @comboHandlers, $item );
|
||||
|
||||
@auxall = keys( %{ $chapter->{ $domActif }->{ 'handler' } } );
|
||||
for( @auxall ){
|
||||
$homer = $chapter->{ $domActif }->{ 'handler' }->{ $_ }->{ 'MultiHomer' };
|
||||
if( $homer eq 'CombinedType' ){
|
||||
push( @allHandlers, $_ );
|
||||
}
|
||||
}
|
||||
## SELECTED HANDLER ONLY
|
||||
##------------------------
|
||||
$allHandlersChapters = $chapter->{ $domActif }->{ 'handler' };
|
||||
$selectedHand = $idhandler;
|
||||
$chapter = $chapter->{ $domActif }->{ 'handler' }->{ $selectedHand };
|
||||
|
||||
%chapterX = ( 'xxxx', $chapter );
|
||||
$conf = &getXmlPage( "handlers_0" );
|
||||
if( $mode eq 'Expert' ){
|
||||
$composs = &getAllComposants( $conf->{'composants'}->{ 'expert' } );
|
||||
} else {
|
||||
$composs = &getAllComposants( $conf->{'composants'}->{ 'normal' } );
|
||||
}
|
||||
|
||||
$composs = &polyGlotTab( $composs, \%text );
|
||||
&TransformVars( $composs, \%chapterX );
|
||||
|
||||
}
|
||||
}
|
||||
# END OF WIZARD THING
|
||||
#//////////////////////////////////////////////////////////////////////////
|
||||
#//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
##//////////////////////////////////////////////////////////////////////////
|
||||
##//////////////////////////////////////////////////////////////////////////
|
||||
####### VARIABLES PASSES EN PARAMETRE AU TEMPLATE
|
||||
|
||||
$valab = getRefValueInCompo( $composs, 'Enabledproxy' );
|
||||
$valab->{ isChecked } = $chapter->{ 'EnableLWPProxy' } ? "CHECKED" : "";
|
||||
$valab = getRefValueInCompo( $composs, 'Disabled' );
|
||||
$valab->{ isChecked } = $chapter->{ 'DisableAccessControl' } ? "CHECKED" : "";
|
||||
$valab = getRefValueInCompo( $composs, 'StopCookie' );
|
||||
$valab->{ isChecked } = $chapter->{ 'StopCookie' } ? "CHECKED" : "";
|
||||
$valab = getRefValueInCompo( $composs, 'Recursive' );
|
||||
$valab->{ isChecked } = $chapter->{ 'ChaseRedirect' } ? "CHECKED" : "";
|
||||
$valab = getRefValueInCompo( $composs, 'SoftControl' );
|
||||
$valab->{ isChecked } = $chapter->{ 'SoftControl' } ? "CHECKED" : "";
|
||||
|
||||
|
||||
##--------------------------------------------------------
|
||||
##--------------------------------------------------------
|
||||
## MULTI-HOMING HANDLER ????? !!!!!!!!!! VITUALHOST TYPE
|
||||
##--------------------------------------------------------
|
||||
my $exHomer = $chapter->{ 'MultiHomer' };
|
||||
my $typeHomer = $exHomer;
|
||||
|
||||
## TYPE HANDLER CHANGE ?????
|
||||
##----------------------------------------------
|
||||
|
||||
if( defined(CGI::param('selTypeHandler')) ){
|
||||
if( $flagSameHandler ){
|
||||
$typeHomer = CGI::param('selTypeHandler');
|
||||
}
|
||||
if( $flagSameHandler && ($typeHomer ne $exHomer) ){
|
||||
my $flag = 1;
|
||||
if( $exHomer eq 'CombinedType' ){
|
||||
if( !&OkToChange( $allHandlersChapters, $selectedHand, $message )){
|
||||
$flag = 0;
|
||||
$typeHomer = $exHomer;
|
||||
}
|
||||
}
|
||||
if( $flag ){
|
||||
$chapter->{ 'MultiHomer' } = $typeHomer;
|
||||
if( $typeHomer ne 'MultiHomingType' ){
|
||||
delete( $chapter->{ 'MultiHoming' } );
|
||||
}
|
||||
## maj du XML
|
||||
##------------
|
||||
# &writeXML( $xmlemon, $config{'XML_file'});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
my $flagHomer = $typeHomer eq 'MultiHomingType' ? 1 : 0;
|
||||
my $virtualHost = $chapter->{ 'VirtualHost' };
|
||||
if( !$virtualHost ) {
|
||||
$virtualHost = 'byName';
|
||||
}
|
||||
my $newVH = $virtualHost;
|
||||
|
||||
## VIRTUAL HOST CHANGE ????
|
||||
##--------------------------
|
||||
if ( defined (CGI::param ('selVirtualHost')) ) {
|
||||
if( $flagSameHandler ){
|
||||
$newVH = CGI::param ('selVirtualHost');
|
||||
}
|
||||
if( $flagSameHandler && ($newVH ne $virtualHost ) ){
|
||||
$virtualHost = $newVH;
|
||||
|
||||
#$chapter->{ 'VirtualHost' } = $virtualHost;
|
||||
## maj du XML
|
||||
##------------
|
||||
#&writeXML( $xmlemon, $config{'XML_file'});
|
||||
}
|
||||
}
|
||||
|
||||
## PROXY ENABLED CHANGE ??
|
||||
##------------------------
|
||||
if( $flagSameHandler ){
|
||||
$valab = getRefValueInCompo( $composs, 'Enabledproxy' );
|
||||
if( defined (CGI::param ('Enabledproxy')) ) {
|
||||
$valab->{ isChecked } = 'CHECKED';
|
||||
} else {
|
||||
$valab->{ isChecked } = '';
|
||||
}
|
||||
}
|
||||
##
|
||||
## si c est un handler MULTI-HOMING --> chargement des liste de handlers "homed"
|
||||
## et dispo (non homed) pour le MULTI-HOMING
|
||||
##----------------------------------------------
|
||||
my @tabHomed;
|
||||
my @tabDispo;
|
||||
|
||||
if( $typeHomer eq 'MultiHomingType' ){
|
||||
|
||||
my $line = $chapter->{ 'MultiHoming' };
|
||||
@tabHomed = split( /,/, $line );
|
||||
|
||||
for( my $i=0; $i< @allHandlers; $i++ ){
|
||||
my $h1 = $allHandlers[ $i ];
|
||||
if( $h1 ne $selectedHand ){
|
||||
my $flag = 0;
|
||||
for( @tabHomed ){
|
||||
if( $h1 eq $_ ){
|
||||
$flag = 1;
|
||||
}
|
||||
}
|
||||
if( !$flag ){
|
||||
push( @tabDispo, $h1 );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
##//////////////////////////////////////////////////////////////////////////
|
||||
##//////////////////////////////////////////////////////////////////////////
|
||||
## Traitement des ADD / REMOVE HANDLERS dans les multi homing
|
||||
|
||||
if( defined (CGI::param ('RemoveHomed')) ) {
|
||||
my $hand = CGI::param ('listHomed');
|
||||
my @nList;
|
||||
push(@tabDispo, $hand);
|
||||
for( @tabHomed ){
|
||||
if( $_ ne $hand){
|
||||
push(@nList, $_);
|
||||
}
|
||||
}
|
||||
@tabHomed = @nList;
|
||||
my $string = join(',', @tabHomed);
|
||||
|
||||
## maj du XML
|
||||
##-------------
|
||||
$chapter->{ 'MultiHoming' } = $string;
|
||||
&writeXML( $xmlemon, $config{'XML_file'});
|
||||
}
|
||||
if( defined (CGI::param ('AddDispo')) ) {
|
||||
my $hand = CGI::param ('listDispo');
|
||||
push( @tabHomed, $hand );
|
||||
my @nlist;
|
||||
for( @tabDispo ){
|
||||
if( $_ ne $hand ){
|
||||
push( @nlist, $_ );
|
||||
}
|
||||
}
|
||||
@tabDispo = @nlist;
|
||||
my $string = join( ',', @tabHomed );
|
||||
|
||||
## maj du XML
|
||||
##-------------
|
||||
$chapter->{ 'MultiHoming' } = $string;
|
||||
&writeXML( $xmlemon, $config{'XML_file'});
|
||||
}
|
||||
|
||||
if( !$selectedHand ){
|
||||
$selectedHand = $text{ lab_55 };
|
||||
}
|
||||
my $flagAddHandler = ($selectedHand eq $text{ lab_55 });
|
||||
|
||||
my @logLevels = ( 'debug', 'info', 'notice', 'warn', 'error', 'crit', 'alert', 'emerg', $text{'lab_68'} );
|
||||
|
||||
$vars= { style => $styl,
|
||||
title => $title,
|
||||
mode => $mode,
|
||||
cgi => 'handlers_0.cgi',
|
||||
css => $_style,
|
||||
parent => $0,
|
||||
label => '0',
|
||||
langa => \%text,
|
||||
tab_session => $tabular,
|
||||
composall => $composs,
|
||||
combo_handlers => \@comboHandlers,
|
||||
labCombo => $title,
|
||||
option_selected => $selectedHand,
|
||||
domaine => $domActif,
|
||||
flag_homer => $flagHomer,
|
||||
type_homer => $typeHomer,
|
||||
exHandler => $selectedHand,
|
||||
homed_handlers => \@tabHomed,
|
||||
dispo_handlers => \@tabDispo,
|
||||
lab_6 => $text{ 'lab_6' },
|
||||
lab_7 => $text{ 'lab_7' },
|
||||
lab_42 => $text{ 'lab_42' },
|
||||
lab_43 => $text{ 'lab_43' },
|
||||
virtual_host => $virtualHost,
|
||||
message => $message,
|
||||
flagAddHandler => $flagAddHandler,
|
||||
lab_58 => $text{ 'lab_58' },
|
||||
helpText => $helpText,
|
||||
lab_prev => $text{ 'lab_prev' },
|
||||
lab_next => $text{ 'lab_next' },
|
||||
IDX_ASSIST => $IDX_ASSIST,
|
||||
lab_27 => $text{ 'lab_27' },
|
||||
logLevels => \@logLevels
|
||||
};
|
||||
|
||||
$vars->{style} = &getStyle($styl, $vars->{checked});
|
||||
|
||||
print "Content-type: text/html\n";
|
||||
$tt->process($filethtml,$vars) || die $tt->error();
|
||||
|
||||
=pod
|
||||
$dump1 = Dumper( $composs );
|
||||
print("<BR><HR>Dump(1) ---> $dump1 <HR><BR>");
|
||||
|
||||
print("<BR><HR>Dump(2) ---> $dump2 <HR><BR>");
|
||||
|
||||
my @lo =CGI::param();
|
||||
my $l =Dumper(@lo);
|
||||
print "$l";
|
||||
print( "<BR><hr><BR>" );
|
||||
for( @lo ){
|
||||
my $loc = CGI::param( $_ );
|
||||
print("$_ --> $loc <br>");
|
||||
}
|
||||
=cut
|
||||
|
||||
} else { ## Traitement du "SUBMIT"
|
||||
##########################################################
|
||||
my $dom = CGI::param('idDomain');
|
||||
my $_style = CGI::param('style');
|
||||
my $mode = CGI::param('mode');
|
||||
|
||||
my $selectedHand = CGI::param('idHandler'); ## PAS cbHAndler a cause de ADD HADLER !!!!!
|
||||
|
||||
my $xmlemon = getXML( $config{'XML_file'} );
|
||||
my $chapter = getChapterXML( $xmlemon, 'domain' );
|
||||
$chapter = $chapter->{ $dom }->{ 'handler' }->{ $selectedHand };
|
||||
|
||||
##----------------------------------------------------------------------------------------
|
||||
# SI LE HANDLER n existe pas --> CREATION DE L ANCRAGE XML and ROCK'N ROLL
|
||||
##----------------------------------------------------------------------------------------
|
||||
$dump1 = "JE SUIS ICI";
|
||||
$dump2 = Dumper( $chapter );
|
||||
if( !$chapter ){
|
||||
$dump1 = "JE SUIS LA et pas ICI";
|
||||
$xmlemon->{ 'domain' }->{ $dom }->{ 'handler' }->{ $selectedHand }->{ 'MultiHomer' } = CGI::param('selTypeHandler');
|
||||
$chapter = $xmlemon->{ 'domain' }->{ $dom }->{ 'handler' }->{ $selectedHand };
|
||||
$dump2 = Dumper( $chapter );
|
||||
}
|
||||
$chapter->{ 'MultiHomer' } = CGI::param('selTypeHandler');
|
||||
$chapter->{ 'VirtualHost' } = CGI::param('selVirtualHost');
|
||||
if( defined( CGI::param( 'IPAdress' )) ){
|
||||
$chapter->{ 'IPAdress' } = CGI::param('IPAdress');
|
||||
} else {
|
||||
delete( $chapter->{ 'IPAdress' } );
|
||||
}
|
||||
|
||||
|
||||
$chapter->{ 'Allow' } = CGI::param('selAllow');
|
||||
$chapter->{ 'Organization' } = CGI::param('AttrLdap');
|
||||
$chapter->{ 'BasePriv' } = CGI::param('BasePriv');
|
||||
$chapter->{ 'BasePub' } = CGI::param('BasePub');
|
||||
$chapter->{ 'AppliCode' } = CGI::param('idCodeAppli');
|
||||
$chapter->{ 'DisableAccessControl' } = defined( CGI::param('Disabled') ) ? '1' : '0';
|
||||
if( defined( CGI::param('Enabledproxy') ) ){
|
||||
$chapter->{ 'EnableLWPProxy' } = '1';
|
||||
$chapter->{ 'LWPTimeout' } = CGI::param('LWPTimeout');
|
||||
$chapter->{ 'ChaseRedirect' } = defined( CGI::param('Recursive' ) ) ? '1' : '0';
|
||||
} else {
|
||||
$chapter->{ 'EnableLWPProxy' } = '0';
|
||||
delete( $chapter->{ 'LWPTimeout' } );
|
||||
delete( $chapter->{ 'ChaseRedirect' } );
|
||||
}
|
||||
|
||||
$chapter->{ 'Header' } = CGI::param('Header');
|
||||
$chapter->{ 'ProxyPatterns' } = CGI::param('Ics');
|
||||
$chapter->{ 'MotifIn' } = CGI::param('MotifIn');
|
||||
$chapter->{ 'MotifOut' } = CGI::param('MotifOut');
|
||||
|
||||
if( defined( CGI::param( 'PlugInBackend' )) ) {
|
||||
$chapter->{ 'BackendPlugIn' } = CGI::param('PlugInBackend');
|
||||
}
|
||||
if( defined( CGI::param( 'PlugInHeader' )) ) {
|
||||
$chapter->{ 'HeaderPlugIn' } = CGI::param('PlugInHeader' );
|
||||
}
|
||||
if( defined( CGI::param( 'PlugInHtml' )) ) {
|
||||
$chapter->{ 'RewritePlugIn' } = CGI::param('PlugInHtml' );
|
||||
}
|
||||
if( defined( CGI::param( 'PlugInPolicy' )) ) {
|
||||
$chapter->{ 'PolicyPlugIn' } = CGI::param('PlugInPolicy' );
|
||||
}
|
||||
|
||||
$chapter->{ 'Portal' } = CGI::param('Portal' );
|
||||
$chapter->{ 'ProxyExt' } = CGI::param('ProxyExt' );
|
||||
$chapter->{ 'SoftControl' } = defined( CGI::param('SoftControl') ) ? '1' : '0';
|
||||
$chapter->{ 'StopCookie' } = defined( CGI::param('StopCookie' ) ) ? '1' : '0';
|
||||
$chapter->{ 'LogLevel' } = CGI::param('LogLevel' );
|
||||
|
||||
&writeXML( $xmlemon, $config{'XML_file'});
|
||||
|
||||
=pod
|
||||
print( "Content-type: text/html\n" );
|
||||
print( "\n" );
|
||||
|
||||
print("<HR><BR> $dump1 <BR>$dump2<HR>");
|
||||
|
||||
my @lo =CGI::param();
|
||||
for( @lo ){
|
||||
my $loc = CGI::param( $_ );
|
||||
print("$_ --> $loc <BR>");
|
||||
}
|
||||
|
||||
# print( Dumper( $chapter ) );
|
||||
=cut
|
||||
&redirect( "handlers_0.cgi?mode=$mode&style=$_style&Domain=$dom" );
|
||||
}
|
||||
#
|
||||
############ C FINI
|
|
@ -0,0 +1,175 @@
|
|||
#!/usr/bin/perl
|
||||
# httpd-lib.pl
|
||||
# Display the icons for various types of lemonldapconfig options
|
||||
use Data::Dumper;
|
||||
#require './lemonldap-lib.pl';
|
||||
sub parse_config_file
|
||||
{
|
||||
local($fh, @rv, $line, %dummy);
|
||||
$fh = $_[0];
|
||||
$dummy{'line'} = $dummy{'eline'} = $_[1]-1;
|
||||
$dummy{'file'} = $_[2];
|
||||
$dummy{'type'} = 0;
|
||||
$dummy{'name'} = "dummy";
|
||||
@rv = (\%dummy);
|
||||
while($line = <$fh>) {
|
||||
chop;
|
||||
$line =~ s/^\s*#.*$//g;
|
||||
if ($line =~ /^\s*<\/(\S+)\s*(.*)>/) {
|
||||
# end of a container directive. This can only happen in a
|
||||
# recursive call to this function
|
||||
$_[1]++;
|
||||
last if ($_[3]);
|
||||
}
|
||||
elsif ($line =~ /^\s*<IfModule\s+(\!?)(\S+)\.c>/i) {
|
||||
# start of an IfModule block. Read it, and if the module
|
||||
# exists put the directives in this section.
|
||||
local ($not, $mod) = ($1, $2);
|
||||
local $oldline = $_[1];
|
||||
$_[1]++;
|
||||
local @dirs = &parse_config_file($fh, $_[1], $_[2], 1);
|
||||
if (!$not && $httpd_modules{$mod} ||
|
||||
$not && !$httpd_modules{$mod}) {
|
||||
# use the directives..
|
||||
push(@rv, { 'line', $oldline,
|
||||
'eline', $oldline,
|
||||
'file', $_[2],
|
||||
'name', "<IfModule $not$mod>" });
|
||||
push(@rv, @dirs);
|
||||
push(@rv, { 'line', $_[1]-1,
|
||||
'eline', $_[1]-1,
|
||||
'file', $_[2],
|
||||
'name', "</IfModule>" });
|
||||
}
|
||||
}
|
||||
elsif ($line =~ /^\s*<IfDefine\s+(\!?)(\S+)>/i) {
|
||||
# start of an IfDefine block. Read it, and if the define
|
||||
# exists put the directives in this section
|
||||
local ($not, $def) = ($1, $2);
|
||||
local $oldline = $_[1];
|
||||
$_[1]++;
|
||||
local @dirs = &parse_config_file($fh, $_[1], $_[2], 1);
|
||||
if (!$not && $httpd_defines{$def} ||
|
||||
$not && !$httpd_defines{$def}) {
|
||||
# use the directives..
|
||||
push(@rv, { 'line', $oldline,
|
||||
'eline', $oldline,
|
||||
'file', $_[2],
|
||||
'name', "<IfDefine $not$def>" });
|
||||
push(@rv, @dirs);
|
||||
push(@rv, { 'line', $_[1]-1,
|
||||
'eline', $_[1]-1,
|
||||
'file', $_[2],
|
||||
'name', "</IfDefine>" });
|
||||
}
|
||||
}
|
||||
elsif ($line =~ /^\s*<(\S+)\s*(.*)>/) {
|
||||
# start of a container directive. The first member is a dummy
|
||||
# directive at the same line as the container
|
||||
local(%dir, @members);
|
||||
%dir = ('line', $_[1],
|
||||
'file', $_[2],
|
||||
'type', 1,
|
||||
'name', $1,
|
||||
'value', $2);
|
||||
$dir{'value'} =~ s/\s+$//g;
|
||||
$dir{'words'} = &wsplit($dir{'value'});
|
||||
$_[1]++;
|
||||
@members = &parse_config_file($fh, $_[1], $_[2], 1);
|
||||
$dir{'members'} = \@members;
|
||||
$dir{'eline'} = $_[1]-1;
|
||||
push(@rv, \%dir);
|
||||
}
|
||||
elsif ($line =~ /^\s*(\S+)\s*(.*)$/) {
|
||||
# normal directive
|
||||
local(%dir);
|
||||
%dir = ('line', $_[1],
|
||||
'eline', $_[1],
|
||||
'file', $_[2],
|
||||
'type', 0,
|
||||
'name', $1,
|
||||
'value', $2);
|
||||
if ($dir{'value'} =~ s/\\$//g) {
|
||||
# multi-line directive!
|
||||
while($line = <$fh>) {
|
||||
chop($line);
|
||||
$cont = ($line =~ s/\\$//g);
|
||||
$dir{'value'} .= $line;
|
||||
$dir{'eline'} = ++$_[1];
|
||||
if (!$cont) { last; }
|
||||
}
|
||||
}
|
||||
$dir{'value'} =~ s/\s+$//g;
|
||||
$dir{'words'} = &wsplit($dir{'value'});
|
||||
push(@rv, \%dir);
|
||||
$_[1]++;
|
||||
}
|
||||
else {
|
||||
# blank or comment line
|
||||
$_[1]++;
|
||||
}
|
||||
}
|
||||
return @rv;
|
||||
}
|
||||
|
||||
# wsplit(string)
|
||||
# Splits a string like foo "foo \"bar\"" bazzz into an array of words
|
||||
sub wsplit
|
||||
{
|
||||
local($s, @rv); $s = $_[0];
|
||||
$s =~ s/\\\"/\0/g;
|
||||
while($s =~ /^"([^"]*)"\s*(.*)$/ || $s =~ /^(\S+)\s*(.*)$/) {
|
||||
$w = $1; $s = $2;
|
||||
$w =~ s/\0/"/g; push(@rv, $w);
|
||||
}
|
||||
return \@rv;
|
||||
}
|
||||
|
||||
# wjoin(word, word, ...)
|
||||
sub wjoin
|
||||
{
|
||||
local(@rv, $w);
|
||||
foreach $w (@_) {
|
||||
if ($w =~ /^\S+$/) { push(@rv, $w); }
|
||||
else { push(@rv, "\"$w\""); }
|
||||
}
|
||||
return join(' ', @rv);
|
||||
}
|
||||
sub find_handler_in_httpd {
|
||||
|
||||
my $file =shift;
|
||||
my $pattern =shift;
|
||||
open $f,"< $file";
|
||||
my @l = parse_config_file ($f) ;
|
||||
foreach (@l) {
|
||||
next if $_->{name} !~ /virtualhost/i ;
|
||||
my $find;
|
||||
my @tab = @{$_->{members}} ;
|
||||
my $ok;
|
||||
foreach (@tab) {
|
||||
next if $_->{value} !~ /handlerid/i ;
|
||||
next if $_->{words}->[1] !~ /$pattern/i;
|
||||
$ok=1;
|
||||
last;
|
||||
}
|
||||
if ($ok) {
|
||||
$find=$_ ;
|
||||
return $find;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
sub get_param_httpd {
|
||||
|
||||
my $h =shift;
|
||||
return $h->{members} ;
|
||||
}
|
||||
|
||||
1;
|
||||
#my $res = find_handler("/opt/apache/conf/lemon.conf", 'edito-agent');
|
||||
|
||||
|
||||
|
||||
#my $t =Dumper ($res);
|
||||
#print $t;
|
||||
|
After Width: | Height: | Size: 15 KiB |
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 6.3 KiB |
After Width: | Height: | Size: 4.7 KiB |
After Width: | Height: | Size: 6.4 KiB |
After Width: | Height: | Size: 4.7 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 8.3 KiB |
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 94 KiB |
After Width: | Height: | Size: 296 B |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 638 B |
After Width: | Height: | Size: 9.6 KiB |
After Width: | Height: | Size: 7.8 KiB |
After Width: | Height: | Size: 4.6 KiB |
After Width: | Height: | Size: 18 KiB |
After Width: | Height: | Size: 24 KiB |
After Width: | Height: | Size: 8.3 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 8.6 KiB |
After Width: | Height: | Size: 22 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 5.8 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 66 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 282 B |
After Width: | Height: | Size: 7.8 KiB |
After Width: | Height: | Size: 7.7 KiB |
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 30 KiB |
After Width: | Height: | Size: 478 B |
After Width: | Height: | Size: 21 KiB |
After Width: | Height: | Size: 48 KiB |
After Width: | Height: | Size: 2.0 KiB |
|
@ -0,0 +1,202 @@
|
|||
#!/usr/bin/perl -w
|
||||
#use strict;
|
||||
use Template;
|
||||
use CGI;
|
||||
use Data::Dumper;
|
||||
require './lemonldap-lib.pl';
|
||||
|
||||
|
||||
#my $dump1;
|
||||
|
||||
if( !$config{'XML_file'} ){
|
||||
&redirect( "$gconfig{'webprefix'}/config.cgi?$module_name" );
|
||||
=pod
|
||||
print( "Content-type: text/html\n" );
|
||||
print( "\n" );
|
||||
print( "No XML config file $config{XML_file} <br> go to " );
|
||||
print( "<a href= $gconfig{'webprefix'}/config.cgi?$module_name> configuration</a>");
|
||||
=cut
|
||||
exit;
|
||||
}
|
||||
|
||||
#$dump1 = Dumper( %config );
|
||||
#######################################################################
|
||||
#
|
||||
my $mode;
|
||||
my $flipflop;
|
||||
my $check = 0;
|
||||
my $styl ;
|
||||
my $vars;
|
||||
my $tab_active;
|
||||
my $tt = Template->new( {# ABSOLUTE => 1,
|
||||
PREC_CHOMP =>1,
|
||||
POST_CHOMP =>1, } );
|
||||
|
||||
my $conf = &getXmlPage( "about" );
|
||||
my $filethtml = $conf->{'template'};
|
||||
my $confgenTT = $conf->{'templateConfGen'};
|
||||
my $title = $text{ &dePourCent( $conf->{title} ) };
|
||||
|
||||
#######################################################################
|
||||
#
|
||||
my $_style= CGI::param('style');
|
||||
my $tabular = [];
|
||||
if (CGI::param('mode') =~ /pert/) { # mode expert beaucoups plus d option
|
||||
|
||||
$mode='Expert' ;
|
||||
$tabular = &getTab( $conf->{tabs}->{expert} );
|
||||
$tabular = &polyGlotTab( $tabular, \%text );
|
||||
$tabular = &ajustLink ($tabular,$mode,$_style);
|
||||
|
||||
$flipflop= 'Normal';
|
||||
} else {
|
||||
$mode ='Normal';
|
||||
|
||||
$tabular = &getTab( $conf->{tabs}->{normal} );
|
||||
$tabular = &polyGlotTab( $tabular, \%text );
|
||||
$tabular = &ajustLink ($tabular,$mode,$_style);
|
||||
|
||||
$flipflop= 'Expert';
|
||||
} # end else
|
||||
|
||||
my $flagApplyModifs = &IsXMLModified( $config{'XML_file'} );
|
||||
my $flagAPACHE = &IsApacheRunning();
|
||||
|
||||
my $para3 = $config{'XML_file'};
|
||||
|
||||
$tab_active = '3' ;
|
||||
if (!$config{'Style'} ) { ## je dois rediriger la personne vers le module de config
|
||||
$styl ="conf_style" ; ## style par defaut
|
||||
$vars= { style => $styl,
|
||||
checked => $check,
|
||||
title => $title,
|
||||
mode => $mode,
|
||||
cgi => 'index.cgi',
|
||||
css => $_style,
|
||||
label => $flipflop,
|
||||
about => $text{lemonldap_invite},
|
||||
parent => $0,
|
||||
tab_about => $tabular,
|
||||
langa => \%text
|
||||
};
|
||||
##$dump1 = Dumper( $para3 );
|
||||
&redirect( "$gconfig{'webprefix'}/config.cgi?$module_name" );
|
||||
#print( "<a href= $gconfig{'webprefix'}/config.cgi?$module_name> configuration</a>");
|
||||
exit();
|
||||
|
||||
} else {
|
||||
$styl = $config{'Style'};
|
||||
my $c;
|
||||
$styl = &getStyle( $styl, $c );
|
||||
## my $para1 = $config{'XML_XSD'};
|
||||
my $para2 = $config{'httpd_conf'};
|
||||
|
||||
##############
|
||||
## controle de l'existance et de la validite du fichier XML passe en parametre
|
||||
if( &isValidXML( $para3 ) < 1 ){ ## 0 == fichier inexsistant // -1 == bad xml format
|
||||
&restoreXMLFile( $para3 );
|
||||
}
|
||||
my $message = 0;
|
||||
|
||||
#############
|
||||
# Application des modifs --> copy work file to prod file
|
||||
if( defined( CGI::param('ApplyModifs'))) {
|
||||
my $result = &ApplyXMLModifs( $config{'XML_file'} );
|
||||
if( !$result ){
|
||||
$flagApplyModifs = 0;
|
||||
} else {
|
||||
$message = $text{'lab_error_10'};
|
||||
}
|
||||
}
|
||||
|
||||
#############
|
||||
# Annulation des modifs --> copy prod file to work file
|
||||
if( defined( CGI::param('DiscardModifs'))) {
|
||||
my $result = &DiscardXMLModifs( $config{'XML_file'} );
|
||||
if( !$result ){
|
||||
$flagApplyModifs = 0;
|
||||
} else {
|
||||
$message = $text{'lab_error_10'};
|
||||
}
|
||||
}
|
||||
|
||||
#############
|
||||
# GENERATE CONFIG FILES
|
||||
if( defined( CGI::param('GenerConfigFiles'))) {
|
||||
$message = &GenerateConfigFilesWT( $config{'XML_file'}, $confgenTT );
|
||||
}
|
||||
|
||||
#############
|
||||
# STOP APACHE
|
||||
if( defined( CGI::param('StopApache'))) {
|
||||
if( !$config{'stop_cmd'} ){
|
||||
$message = "Command not defined in module config"
|
||||
} else {
|
||||
my $com = $config{'stop_cmd'} . ' 2>&1> /dev/null';
|
||||
$message = ` $com `;
|
||||
sleep( 1 );
|
||||
$flagAPACHE = &IsApacheRunning();
|
||||
}
|
||||
}
|
||||
|
||||
#############
|
||||
# START APACHE
|
||||
if( defined( CGI::param('StartApache'))) {
|
||||
if( !$config{'start_cmd'} ){
|
||||
$message = "Command not defined in module config"
|
||||
} else {
|
||||
my $com = $config{'start_cmd'} . ' 2>&1> /dev/null';
|
||||
$message = ` $com `;
|
||||
sleep( 1 );
|
||||
$flagAPACHE = &IsApacheRunning();
|
||||
}
|
||||
}
|
||||
|
||||
#############
|
||||
# RESTART APACHE
|
||||
if( defined( CGI::param('RestartApache'))) {
|
||||
if( !$config{'restart_cmd'} ){
|
||||
$message = "Command not defined in module config"
|
||||
} else {
|
||||
my $com = $config{'restart_cmd'} . ' 2>&1> /dev/null';
|
||||
$message = ` $com `;
|
||||
sleep( 2 );
|
||||
$flagAPACHE = &IsApacheRunning();
|
||||
}
|
||||
}
|
||||
|
||||
## FICHIERS XML CONFIG BAKx ????
|
||||
##-------------------------------
|
||||
my $tmodxml = &GetNumXmlConfMod( $config{'XML_file'} );
|
||||
|
||||
$vars= { style => $styl,
|
||||
checked =>$c,
|
||||
title => $title,
|
||||
mode => $mode,
|
||||
css => $_style,
|
||||
label => $flipflop,
|
||||
para3 => $para3,
|
||||
para2 => $para2,
|
||||
## para1 => $para1,
|
||||
parent => $0,
|
||||
tab_about => $tabular,
|
||||
langa => \%text,
|
||||
lab_63 => $text{'lab_63'},
|
||||
lab_65 => $text{'lab_65'},
|
||||
flagApplyModifs => $flagApplyModifs,
|
||||
flagAPACHE => $flagAPACHE,
|
||||
message => $message,
|
||||
tabDTXml => $tmodxml,
|
||||
lab_64 => $text{ 'lab_64' }
|
||||
};
|
||||
}
|
||||
if (CGI::param('style')) {
|
||||
$vars->{style} = &getStyle( CGI::param('style'), $vars->{checked} );
|
||||
}
|
||||
|
||||
print "Content-type: text/html\n";
|
||||
$tt->process($filethtml,$vars) || die $tt->error();
|
||||
|
||||
#print( "para3 = $dump1" );
|
||||
|
||||
|
|
@ -0,0 +1,137 @@
|
|||
#!/usr/bin/perl -w
|
||||
#use strict;
|
||||
use Template;
|
||||
use CGI;
|
||||
use Data::Dumper;
|
||||
require './lemonldap-lib.pl';
|
||||
|
||||
#######################################################################
|
||||
#
|
||||
my $mode;
|
||||
my $flipflop;
|
||||
my $check = 0;
|
||||
my $styl ;
|
||||
my $vars;
|
||||
my $tab_active;
|
||||
my $tt = Template->new( {# ABSOLUTE => 1,
|
||||
PREC_CHOMP =>1,
|
||||
POST_CHOMP =>1, } );
|
||||
|
||||
my $conf = &getXmlPage( "about" );
|
||||
my $filethtml = $conf->{template};
|
||||
my $title = $text{ &dePourCent( $conf->{title} ) };
|
||||
|
||||
#######################################################################
|
||||
#
|
||||
my $_style= CGI::param('style');
|
||||
my $tabular = [];
|
||||
if (CGI::param('mode') =~ /pert/) { # mode expert beaucoups plus d option
|
||||
|
||||
$mode='Expert' ;
|
||||
$tabular = &getTab( $conf->{tabs}->{expert} );
|
||||
$tabular = &polyGlotTab( $tabular, \%text );
|
||||
|
||||
$flipflop= 'Normal';
|
||||
|
||||
#$tabular=[{
|
||||
# link =>'memcached.cgi',
|
||||
# etatab=>'plain',
|
||||
# labTab=>$text{"session_server"},
|
||||
# },
|
||||
# {
|
||||
# link =>'domain.cgi',
|
||||
# etatab=>'plain',
|
||||
# labTab=>$text{"domains"},
|
||||
# },
|
||||
# {
|
||||
# link =>'ttlconfig.cgi',
|
||||
# etatab=>'plain',
|
||||
# labTab=>$text{"timelive"},
|
||||
# },
|
||||
# {
|
||||
# link =>'cluster.cgi',
|
||||
# etatab=>'plain',
|
||||
# labTab=>'Cluster',
|
||||
# },
|
||||
# {
|
||||
# link =>"/lemongui4webmin/index.cgi?mode=$mode&style=$_style",
|
||||
# etatab=>'selected',
|
||||
# labTab=>$text{"about"},
|
||||
# }];
|
||||
|
||||
} else {
|
||||
$mode ='Normal';
|
||||
|
||||
$tabular = &getTab( $conf->{tabs}->{normal} );
|
||||
$tabular = &polyGlotTab( $tabular, \%text );
|
||||
|
||||
$flipflop= 'Expert';
|
||||
# $tabular= [{
|
||||
# link =>'memcached.cgi',
|
||||
# etatab=>'plain',
|
||||
# labTab=>$text{"session_server"},
|
||||
# },
|
||||
# {
|
||||
# link =>'domain.cgi',
|
||||
# etatab=>'plain',
|
||||
# labTab=>$text{"domains"},
|
||||
# },
|
||||
# {
|
||||
# link =>"/lemongui4webmin/index.cgi?mode=$mode&style=$_style",
|
||||
# etatab=>'selected',
|
||||
# labTab=>$text{"about"},
|
||||
# }];
|
||||
|
||||
} # end else
|
||||
|
||||
$tab_active = '3' ;
|
||||
if (!$config{'Style'} ) { ## je dois rediriger la personne vers le module de config
|
||||
$styl ="conf_style" ; ## style par defaut
|
||||
$vars= { style => $styl,
|
||||
checked => $check,
|
||||
title => $title,
|
||||
mode => $mode,
|
||||
css => $_style,
|
||||
label => $flipflop,
|
||||
about => $text{lemonldap_invite},
|
||||
parent => $0,
|
||||
tab_about => $tabular,
|
||||
langa => \%text
|
||||
};
|
||||
} else {
|
||||
$styl = $config{'Style'};
|
||||
my $c;
|
||||
$styl = &getStyle( $styl, $c );
|
||||
my $para1 = $config{'XML_XSD'};
|
||||
my $para2 = $config{'httpd_conf'};
|
||||
my $para3 = $config{'XML_file'};
|
||||
|
||||
##############
|
||||
## controle de l'existance et de la validite du fichier XML passe en parametre
|
||||
if( &isValidXML( $para3 ) < 1 ){ ## 0 == fichier inexsistant // -1 == bad xml format
|
||||
&restoreXMLFile( $para3 );
|
||||
}
|
||||
|
||||
$vars= { style => $styl,
|
||||
checked =>$c,
|
||||
title => $title,
|
||||
mode => $mode,
|
||||
css => $_style,
|
||||
label => $flipflop,
|
||||
para3 => $para3,
|
||||
para2 => $para2,
|
||||
para1 => $para1,
|
||||
parent => $0,
|
||||
tab_about => $tabular,
|
||||
langa => \%text
|
||||
};
|
||||
}
|
||||
if (CGI::param('style')) {
|
||||
$vars->{style} = &getStyle( CGI::param('style'), $vars->{checked} );
|
||||
}
|
||||
|
||||
print "Content-type: text/html\n";
|
||||
$tt->process($filethtml,$vars) || die $tt->error();
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,160 @@
|
|||
index_title=lemonldap WEBSSO
|
||||
index_elemonldap=The lemonldap $1 could not be found on your system. Maybe it is not installed, or your <a href='$2'>module configuration</a> is incorrect.
|
||||
domain_manage=Domains
|
||||
session_manage=backend session
|
||||
config_manage=config cache
|
||||
|
||||
dump_of_cache=Dump of IPC cache config
|
||||
ipc_warning="WARNING : THIS OPERATION WILL DELETE AND REMOVE ALL IPC CACHES FOR USER "
|
||||
delete_all_ipc_cache=delete and remove all IPC caches
|
||||
index_domains=Domains
|
||||
creation_domain=Create domain
|
||||
index_session=session storage
|
||||
creation_session=Create session backend
|
||||
line_session=contents of the session
|
||||
line_session_access=to access session definition
|
||||
line_session_dummy=create session lines
|
||||
index_lines=Lines
|
||||
index_exp=Expressions
|
||||
create_exp=Create new expression
|
||||
create_line=Create new line
|
||||
index_config=Config
|
||||
create_config=Create config
|
||||
add_httpd=Add those lines in
|
||||
confirm=confirm
|
||||
#################### gui4webmin ##############
|
||||
lemonldap_configuration=Lemonldap Configuration
|
||||
lemonldap_invite=You must pass by module config in order to fix your parameters
|
||||
about=About
|
||||
session_server=Session server
|
||||
domains=Domains
|
||||
timelive=Time to live
|
||||
welcome=Welcome in LemonLDAP configuration
|
||||
lab_error_0=The field \"Motif OUT\" cannot be void for the type \"Combined\"
|
||||
lab_error_1=is an illegal name for handlers
|
||||
lab_error_2=is \"multi-homed\" by the multi-homing handler
|
||||
lab_error_3=HANDLER name cannot be void
|
||||
lab_error_4=is an illegal name for domain
|
||||
lab_error_5=DOMAIN name cannot be void
|
||||
lab_error_6=contains handler(s)
|
||||
lab_error_7=You MUST give a name to the handler !!
|
||||
lab_error_8=You MUST give a name to the node !!
|
||||
lab_error_9=This node already exists
|
||||
lab_error_10=copy file error
|
||||
lab_error_11=IP adress required with virtual host by IP adress !!!
|
||||
lab_error_12=Path to conf.d is void in module config!!
|
||||
lab_error_13=Path to conf.d defined in module config not exists !!
|
||||
lab_error_14=Couldn't create file :
|
||||
lab_next=Next
|
||||
lab_prev=Previous
|
||||
assist_handler_0=<h4 style="text-align: center;">HELP- 000000 -HELP</h4><br><br>texte multi lingue <br>et multi ligne<br>qui explique aux users ce qu est un handler generic/combined/multi-homing<br><br><br>
|
||||
assist_handler_1=<h4 style="text-align: center;">HELP- 111111 -HELP</h4><br><br>texte multi lingue <br> WHAT'S L W P ????<br><br>
|
||||
assist_handler_2=<h4 style="text-align: center;">HELP- 222222 -HELP</h4><br><br>texte multi lingue <br> WHAT'S LDAP Attrib && Application CODE ????<br><br>
|
||||
assist_handler_3=<h4 style="text-align: center;">HELP- 333333 -HELP</h4><br><br>texte multi lingue <br> WHAT'S PUBLIC && PRIVATE BASE ????<br><br>
|
||||
#------------------------------------ TIME TO LIVE PAGE
|
||||
lab_0=ID
|
||||
lab_1=Cache file
|
||||
lab_1_1=(Complete name with path)
|
||||
lab_2=Cache duration time
|
||||
lab_2_2=(In seconds)
|
||||
lab_3=Auto detection
|
||||
lab_3_3=(Check date modification's file)
|
||||
lab_4=Server
|
||||
lab_4_4=(or IP adress)
|
||||
lab_5=Port #
|
||||
lab_5_5=(default 12211)
|
||||
lab_6=ADD
|
||||
lab_7=Remove
|
||||
lab_8=Session
|
||||
lab_9=Servers list
|
||||
lab_10=Session list
|
||||
lab_11=Add session
|
||||
lab_12=Local server
|
||||
lab_13=Port #
|
||||
lab_13_13=(default 22122)
|
||||
lab_14=Local servers
|
||||
lab_15=Timeout
|
||||
lab_15_15=(Session timing in sec.)
|
||||
lab_16=Apply
|
||||
lab_17=Domains
|
||||
lab_18=Domain
|
||||
lab_19=Portal
|
||||
lab_19_19=(Login URL page)
|
||||
lab_20_20=(Default: lemonldap)
|
||||
lab_21=LDAP server
|
||||
lab_21_21=(Name or IP adress)
|
||||
lab_22=LDAP port
|
||||
lab_22_22=(LDAP server port / default 389)
|
||||
lab_23=LDAP people branch
|
||||
lab_23_23=(LDAP find base)
|
||||
lab_24=User ID
|
||||
lab_24_24=(LDAP user ID)
|
||||
lab_25=Password
|
||||
lab_25_25=(LDAP user password)
|
||||
lab_26=Add domain
|
||||
lab_27=APPLY
|
||||
lab_28=Slave CDA
|
||||
lab_28_28=(CGI URL / cookie for slave domain)
|
||||
lab_29=Edit handlers
|
||||
lab_30=Handlers
|
||||
lab_31=Handler
|
||||
lab_32=LWP Proxy enabled
|
||||
lab_33=Ldap attrib.
|
||||
lab_33_33=(Main access control)
|
||||
lab_34=Applic. code
|
||||
lab_34_34=(Minor access control)
|
||||
lab_35=Disabled
|
||||
lab_36=Pubic base
|
||||
lab_36_36=(Public URL of ressource to protect)
|
||||
lab_37=Private base
|
||||
lab_37_37=(Private URL of ressource to protect)
|
||||
lab_38=Stop cookie
|
||||
lab_39=External proxy
|
||||
lab_39_39=(For access to protected ressource)
|
||||
lab_40=LWP Recursive
|
||||
lab_41_41=(File ext. processed by mod_proxy)
|
||||
lab_42=List of Multi-Homed handlers
|
||||
lab_43=List of handlers available for multi homing
|
||||
lab_44=Soft control
|
||||
lab_45=LWP Time out
|
||||
lab_45_45=(Proxy LWP Time out)
|
||||
lab_46=Header
|
||||
lab_46_46=(HTTP header to include)
|
||||
lab_47=Allow
|
||||
lab_47_47=(Acces autorisation)
|
||||
lab_48=Plug-in policy
|
||||
lab_48_48=(Access management)
|
||||
lab_49_49=(HTML rewriting management)
|
||||
lab_50_50=(Sessions management)
|
||||
lab_51_51=(Headers management)
|
||||
lab_49=Plug-in HTML
|
||||
lab_50=Plug-in backend
|
||||
lab_51=Plug-in header
|
||||
lab_52=Motif IN
|
||||
lab_52_52=(URL expression IN)
|
||||
lab_53=Motif OUT
|
||||
lab_53_53=(URL expression OUT)
|
||||
lab_54=SUBMIT
|
||||
lab_55=Add handler
|
||||
lab_56=Delete handler
|
||||
lab_57=Delete domain
|
||||
lab_58=Create with help
|
||||
#--------- page cluster --------
|
||||
lab_0_1=Symbolic name (or blank for delete)
|
||||
lab_0_2=Symbolic name
|
||||
lab_21_22=Node of agregation
|
||||
lab_21_23=Simple node
|
||||
lab_60=Location
|
||||
lab_60_60=(eg : /server-status?refresh=5)
|
||||
lab_60_61=(eg : /server-status)
|
||||
lab_61=Add Node
|
||||
lab_62=Remode Node
|
||||
lab_63=Apply modifications to XML
|
||||
lab_64=XML config files history
|
||||
lab_65=Discard modifications
|
||||
lab_66=IP Adress
|
||||
lab_66_66=(Assoc. with virtual host)
|
||||
lab_67=Log level
|
||||
lab_67_67=( default 'notice' )
|
||||
lab_68=NONE
|
||||
lab_69=Client IP check
|
|
@ -0,0 +1,443 @@
|
|||
index_title=lemonldap SSO
|
||||
index_elemonldap=The lemonldap $1 could not be found on your system. Maybe it is not installed, or your <a href='$2'>module configuration</a> is incorrect.
|
||||
index_eproftpd2=The program $1 does not appear to be the ProFTPD server. Maybe it is not installed, or your <a href='$2'>module configuration</a> is incorrect. Output from the command $3 was : $4
|
||||
index_eversion=The version of ProFTPD server $1 is not supported by Webmin. Only versions 0.99 and above are supported.
|
||||
index_econf=The ProFTPD config file $1 does not exist or is not valid. Maybe your <a href='$2'>module configuration</a> is incorrect.
|
||||
index_apply=Apply Changes
|
||||
index_applymsg=Click this button to apply the current configuration by sending a SIGHUP signal to the running ProFTPD process.
|
||||
index_start=Start Server
|
||||
index_startmsg=Click this button to start the FTP server with the current configuration. You can also configure the server to be started automatically when needed using the <a href='$1'>Internet Services</a> module.
|
||||
index_startmsg2=Click this button to start the FTP server with the current configuration. You can also configure the server to be started automatically when needed using inetd or some equivalent program.
|
||||
index_return=main menu
|
||||
index_virts=Virtual Servers
|
||||
index_virt=Virtual Server
|
||||
index_type=Server type
|
||||
index_addr=Address
|
||||
index_name=Server name
|
||||
index_port=FTP port
|
||||
index_defserv=Default server
|
||||
index_defdesc=Handles any FTP connections not handled by virtual servers.
|
||||
index_any=Any
|
||||
index_vdesc=Handles all connections to $1
|
||||
index_eip=<Unknown>
|
||||
index_global=Global Configuration
|
||||
index_create=Create virtual server
|
||||
index_version=ProFTPd version $1
|
||||
|
||||
efailed=Failed to save $1
|
||||
|
||||
type_0=Networking Options
|
||||
type_1=Logging Options
|
||||
type_2=Files and Directories
|
||||
type_3=Access Control
|
||||
type_4=Miscellaneous
|
||||
type_5=User and Group
|
||||
type_6=Authentication
|
||||
|
||||
virt_title=Virtual Server Options
|
||||
virt_header1=For $1
|
||||
virt_header2=For default server
|
||||
virt_header3=$1 options
|
||||
virt_anon=Anonymous FTP
|
||||
virt_header=Per-directory and Per-command options
|
||||
virt_dir=Directory $1
|
||||
virt_limit=Commands $1
|
||||
virt_adddir=Add per-directory options for ..
|
||||
virt_addlimit=Add per-command options for ..
|
||||
virt_path=Directory path
|
||||
virt_cmds=FTP commands
|
||||
virt_return=virtual server
|
||||
virt_virt=Configure Virtual Server
|
||||
virt_edit=Edit Directives
|
||||
|
||||
vserv_title=Configure Virtual Server
|
||||
vserv_addr=Address
|
||||
vserv_name=Server name
|
||||
vserv_port=FTP port
|
||||
vserv_delete=Delete virtual server
|
||||
vserv_eaddr=Missing or invalid address
|
||||
vserv_eport=Missing or invalid port number
|
||||
vserv_ename=Missing server name
|
||||
|
||||
anon_title=Anonymous FTP Options
|
||||
anon_header1=In virtual server $1
|
||||
anon_header2=In default server
|
||||
anon_anon=Configure Anonymous FTP
|
||||
anon_return=anonymous FTP options
|
||||
anon_header3=For anonymous FTP in virtual server $1
|
||||
anon_header4=For anonymous FTP in default server
|
||||
|
||||
aserv_title=Configure Anonymous FTP
|
||||
aserv_create=Setup Anonymous FTP
|
||||
aserv_root=Limit to directory
|
||||
aserv_user=Access files as user
|
||||
aserv_group=Access files as group
|
||||
aserv_err=Failed to save anonymous FTP
|
||||
aserv_eroot=Missing or invalid chroot directory
|
||||
aserv_euser=Missing or invalid Unix user
|
||||
aserv_egroup=Missing or invalid Unix group
|
||||
aserv_desc=Anonymous FTP has not yet been setup for this virtual server. Use this form to set the initial configuration options.
|
||||
|
||||
dir_title=Per-Directory Options
|
||||
dir_header2=For directory $1 in default server
|
||||
dir_header1=For directory $1 in virtual server $2
|
||||
dir_edit=Edit Directives
|
||||
dir_return=per-directory options
|
||||
dir_header3=$1 options in $2
|
||||
dir_header=Per-command options
|
||||
dir_dir=Configure Directory
|
||||
dir_header4=For directory $1 in anonymous FTP
|
||||
dir_header5=For directory $1 globally
|
||||
|
||||
manual_title=Edit Directives
|
||||
manual_header=Use the text box below to manually edit the ProFTPD directives in $1 that apply to this virtual server, directory or commands.
|
||||
manual_configs=Edit Config Files
|
||||
manual_ecannot=You are not allowed to manually edit directives
|
||||
manual_file=Edit Directives in File:
|
||||
manual_efile=Invalid ProFTPd config file
|
||||
manual_etest=Configuration file error detected : $1
|
||||
|
||||
limit_title=Per-Command Options
|
||||
limit_header4=For commands $1 in directory $2
|
||||
limit_header2=For commands $1 in default server
|
||||
limit_header1=For commands $1 in virtual server $2
|
||||
limit_edit=Edit Directives
|
||||
limit_limit=Configure Commands
|
||||
limit_header3=$1 options for commands $2
|
||||
limit_return=per-command options
|
||||
limit_header5=For commands $1 in anonymous FTP
|
||||
limit_header6=For commands $1 in file $2
|
||||
limit_header7=For commands $1 globally
|
||||
|
||||
lserv_title=Configure Commands
|
||||
lserv_cmd=FTP commands
|
||||
lserv_delete=Delete commands config
|
||||
lserv_err=Failed to save commands
|
||||
lserv_ecmd=No commands selected
|
||||
|
||||
dserv_title=Configure Directory
|
||||
dserv_dir=Directory path
|
||||
dserv_err=Failed to save directory
|
||||
dserv_edir=Missing directory path
|
||||
dserv_delete=Delete directory config
|
||||
dserv_eanondir=Directory must be under the anonymous FTP directory
|
||||
|
||||
mod_core_type=Server type
|
||||
mod_core_inetd=Run from Inetd
|
||||
mod_core_stand=Stand-alone daemon
|
||||
mod_core_port=Listen on port
|
||||
mod_core_eport=Missing or invalid port number
|
||||
mod_core_servername=Server name displayed to users
|
||||
mod_core_eservername=Missing server name
|
||||
mod_core_defaultserver=Use this virtual server by default?
|
||||
mod_core_instances=Maximum concurrent sessions
|
||||
mod_core_einstances=Missing or invalid number of sessions
|
||||
mod_core_umask=New file umask
|
||||
mod_core_octal=Octal mask
|
||||
mod_core_umask_d=New directory mask
|
||||
mod_core_eumask=Missing or invalid umask
|
||||
mod_core_user=Run as Unix user
|
||||
mod_core_uname=User name
|
||||
mod_core_uid=UID
|
||||
mod_core_group=Run as Unix group
|
||||
mod_core_gname=Group name
|
||||
mod_core_gid=GID
|
||||
mod_core_tlog=FTP transfers logfile
|
||||
mod_core_nowhere=Logging disabled
|
||||
mod_core_etlog=Missing or invalid transfers logfile
|
||||
mod_core_accessdeny=Failed login message
|
||||
mod_core_accessgrant=Successful login message
|
||||
mod_core_adall=Access control policy
|
||||
mod_core_addefault=Same as parent
|
||||
mod_core_allowall=Allow all clients
|
||||
mod_core_denyall=Deny all clients
|
||||
mod_core_filter=Allowed FTP commands regexp
|
||||
mod_core_foreign=Allow foreign data transfers?
|
||||
mod_core_overwrite=Allow overwriting of files?
|
||||
mod_core_restart=Allow restarted downloads?
|
||||
mod_core_restart2=Allow restarted uploads?
|
||||
mod_core_require=Require password for anonymous login?
|
||||
mod_core_anongroup=Groups to treat members as anonymous
|
||||
mod_core_eanongroup=No anonymous group entered
|
||||
mod_core_authalias=Only allow aliased users to login?
|
||||
mod_core_authusingalias=Use alias password for anonymous login?
|
||||
mod_core_bind=Bind to address
|
||||
mod_core_bind_all=All addresses
|
||||
mod_core_ebind=Missing or invalid bind address
|
||||
mod_core_cdpath=Shortcut CD directories
|
||||
mod_core_classes=Enable classes for access control?
|
||||
mod_core_cls=Access control classes
|
||||
mod_core_cname=Class name
|
||||
mod_core_ctype=Type and value
|
||||
mod_core_climit=Max connections
|
||||
mod_core_cregex=Client hostname match
|
||||
mod_core_cip=Client IP network/CIDR
|
||||
mod_core_eclimit=Missing or invalid max connections
|
||||
mod_core_ecregex=Missing client hostname match
|
||||
mod_core_ecip=Missing or invalid client IP network/CIDR
|
||||
mod_core_buffer=Maximum FTP command length
|
||||
mod_core_ebuffer=Missing or invalid maximum command length
|
||||
mod_core_transfer=Default transfer mode
|
||||
mod_core_binary=Binary
|
||||
mod_core_ascii=ASCII
|
||||
mod_core_defer=Defer welcome message until after login?
|
||||
mod_core_aborted=Delete aborted uploads?
|
||||
mod_core_dfilter=Denied FTP commands regexp
|
||||
mod_core_display=Pre-login message file
|
||||
mod_core_none=None
|
||||
mod_core_edisplay=Missing pre-login message file
|
||||
mod_core_firstcd=Directory README filename
|
||||
mod_core_efirstcd=Missing directory README filename
|
||||
mod_core_goaway=Too many connections message file
|
||||
mod_core_egoaway=Missing too many connections file
|
||||
mod_core_login=Post-login message file
|
||||
mod_core_elogin=Missing post-login message file
|
||||
mod_core_quit=Logout message file
|
||||
mod_core_equit=Missing logout message file
|
||||
mod_core_gowner=Group owner of uploaded files
|
||||
mod_core_egowner=Missing or invalid group for uploaded files
|
||||
mod_core_grouppassword=Group passwords
|
||||
mod_core_gpname=Unix group
|
||||
mod_core_gppass=Password
|
||||
mod_core_gpdef=Leave unchanged
|
||||
mod_core_egpname=Invalid Unix group name
|
||||
mod_core_hstor=Hide files during upload?
|
||||
mod_core_hgroup=Hide files owned by groups
|
||||
mod_core_ehgroup=Invalid group name to hide files of
|
||||
mod_core_hnoaccess=Hide files that cannot be accessed?
|
||||
mod_core_huser=Hide files owned by users
|
||||
mod_core_ehuser=Invalid user name to hide files of
|
||||
mod_core_ident=Lookup remote Ident username?
|
||||
mod_core_ihidden=Make hidden files inaccessible?
|
||||
mod_core_masq=Masquerade as address
|
||||
mod_core_masq_def=Use real address
|
||||
mod_core_emasq=Missing or invalid masquerade address
|
||||
mod_core_maxc=Maximum concurrent logins
|
||||
mod_core_maxc1=Unlimited
|
||||
mod_core_maxcmsg=Login error message
|
||||
mod_core_emaxc=Missing or invalid maximum number of logins
|
||||
mod_core_maxch=Maximum concurrent logins per host
|
||||
mod_core_maxcu=Maximum concurrent logins per user
|
||||
mod_core_logins=Maximum failed logins per session
|
||||
mod_core_elogins=Missing or invalid number of failed logins
|
||||
mod_core_rfc2228=Send RFC2228-style responses?
|
||||
mod_core_pasv=PASV port range
|
||||
mod_core_pasvr=Min - max
|
||||
mod_core_epasv=Missing or invalid PASV port number
|
||||
mod_core_pathallow=Allowed uploaded filename regex
|
||||
mod_core_any=Any
|
||||
mod_core_pathdeny=Denied uploaded filename regex
|
||||
mod_core_pidfile=Write PID to file
|
||||
mod_core_epidfile=Missing or invalid PID file
|
||||
mod_core_shell=Only allow login by users with valid shell?
|
||||
mod_core_cpulimit=CPU resource limits
|
||||
mod_core_ecpulimit=CPU resource limit
|
||||
mod_core_memlimit=Memory resource limits
|
||||
mod_core_ememlimit=memory resource limit
|
||||
mod_core_filelimit=Open files limits
|
||||
mod_core_efilelimit=open files limit
|
||||
mod_core_soft=Soft limit:
|
||||
mod_core_hard=Hard limit:
|
||||
mod_core_max=Maximum
|
||||
mod_core_esoft=Missing or invalid soft $1
|
||||
mod_core_ehard=Missing or invalid hard $1
|
||||
mod_core_score=Path to scoreboard directory
|
||||
mod_core_escore=Missing or invalid scoreboard directory
|
||||
mod_core_admin=Server administrator's email address
|
||||
mod_core_eadmin=Missing or invalid email address
|
||||
mod_core_identmsg=Client connection message
|
||||
mod_core_identmsg_def=Show default message
|
||||
mod_core_links=Show symbolic links?
|
||||
mod_core_tight=Only bind to needed ports?
|
||||
mod_core_facility=System log facility
|
||||
mod_core_level=System log level
|
||||
mod_core_backlog=TCP backlog queue length
|
||||
mod_core_ebacklog=Missing or invalid backlog queue length
|
||||
mod_core_nodelay=Use TCP_NODELAY socket option?
|
||||
mod_core_rwindow=TCP receive window size
|
||||
mod_core_erwindow=Missing or invalid receive window size
|
||||
mod_core_swindow=TCP send window size
|
||||
mod_core_eswindow=Missing or invalid send window size
|
||||
mod_core_gmt=Show times in GMT?
|
||||
mod_core_tidle=Idle time before disconnecting
|
||||
mod_core_etidle=Missing or invalid idle time
|
||||
mod_core_secs=seconds
|
||||
mod_core_tlogin=Time to wait for authentication
|
||||
mod_core_etlogin=Missing or invalid authentication time
|
||||
mod_core_ttransfer=Time to wait for first transfer
|
||||
mod_core_ettransfer=Missing or invalid first transfer time
|
||||
mod_core_tstalled=Time to wait for stalled data transfer
|
||||
mod_core_etstalled=Missing or invalid stalled transfer time
|
||||
mod_core_ftpusers=Deny users in /etc/ftpusers file?
|
||||
mod_core_hostsallow=Hosts to allow file
|
||||
mod_core_ehostsallow=Hosts to allow file does not exist
|
||||
mod_core_hostsdeny=Hosts to deny file
|
||||
mod_core_ehostsdeny=Hosts to deny file does not exist
|
||||
mod_core_revdns=Do reverse DNS lookups of client addresses?
|
||||
mod_core_userdir=Chroot to username subdirectory?
|
||||
mod_core_ualias=Username aliases
|
||||
mod_core_afrom=Login username
|
||||
mod_core_ato=Real username
|
||||
mod_core_eafrom=Invalid login username in alias
|
||||
mod_core_eato=Missing or invalid real username in alias
|
||||
mod_core_uowner=Owner of uploaded files
|
||||
mod_core_euowner=Missing or invalid owner for uploaded files
|
||||
mod_core_userpassword=User passwords overrides
|
||||
mod_core_upname=Unix user
|
||||
mod_core_uppass=Password
|
||||
mod_core_updef=Leave unchanged
|
||||
mod_core_eupname=Invalid Unix user name
|
||||
mod_core_wtmp=Record logins in wtmp?
|
||||
mod_core_allow_deny=Restrict access
|
||||
mod_core_allowdeny=Allow then deny
|
||||
mod_core_denyallow=Deny then allow
|
||||
mod_core_allow=Allow
|
||||
mod_core_deny=Deny
|
||||
mod_core_mode_0=All
|
||||
mod_core_mode_1=None
|
||||
mod_core_mode_2=IP address
|
||||
mod_core_mode_3=Network
|
||||
mod_core_mode_4=Hostname
|
||||
mod_core_cond=Condition
|
||||
mod_core_action=Action
|
||||
mod_core_agroup=Only allow groups
|
||||
mod_core_auser=Only allow users
|
||||
mod_core_all=All
|
||||
mod_core_dgroup=Deny groups
|
||||
mod_core_duser=Deny users
|
||||
mod_core_eip='$1' is not a valid IP address
|
||||
mod_core_enet='$1' is not a valid network address
|
||||
mod_core_ehost='$1' is not a valid hostname
|
||||
|
||||
mod_ls_fakegroup=Fake group in directory listings?
|
||||
mod_ls_fakeuser=Fake user in directory listings?
|
||||
mod_ls_fakemode=Fake permissions in directory listings
|
||||
mod_ls_nofake=Real permissions
|
||||
mod_ls_efakemode=Fake permissions must be in octal
|
||||
mod_ls_dotfiles=Show files starting with . in listings?
|
||||
mod_ls_ls=Additional ls options
|
||||
mod_ls_els=Missing additional ls options
|
||||
mod_ls_fakeasuser=Yes, as user ..
|
||||
mod_ls_fakesameuser=Connected user
|
||||
mod_ls_fakeasgroup=Yes, as group ..
|
||||
mod_ls_fakesamegroup=Connected group
|
||||
mod_ls_efakeuser=Missing or invalid fake user
|
||||
mod_ls_efakegroup=Missing or invalid fake group
|
||||
mod_ls_options=Directory list options
|
||||
mod_ls_strict=Override user options?
|
||||
|
||||
mod_auth_chdir=Initial login directory
|
||||
mod_auth_echdir=Missing or invalid initial directory
|
||||
mod_auth_chroot=Limit users to directories
|
||||
mod_auth_home=Home directory
|
||||
mod_auth_none=None
|
||||
mod_auth_dir=Directory
|
||||
mod_auth_groups=Unix groups
|
||||
mod_auth_all=Everyone
|
||||
mod_auth_edir=Invalid chroot directory
|
||||
mod_auth_egroups=No Unix groups for chroot entered
|
||||
mod_auth_echroot=Missing or invalid chroot directory
|
||||
mod_auth_login=Don't ask for password if login is denied?
|
||||
mod_auth_root=Allow login by root?
|
||||
|
||||
mod_site_chmod=Allow chmod command?
|
||||
|
||||
mod_unixpw_ufile=Alternate Unix password file
|
||||
mod_unixpw_eufile=Missing or invalid Unix password file
|
||||
mod_unixpw_gfile=Alternate Unix group file
|
||||
mod_unixpw_egfile=Missing or invalid Unix group file
|
||||
mod_unixpw_none=None
|
||||
mod_unixpw_pam=Always treat PAM as authorative?
|
||||
mod_unixpw_persist=Keep password file open persistently?
|
||||
|
||||
mod_log_syslog=Log errors to file
|
||||
mod_log_sysdef=System log
|
||||
mod_log_esyslog=Missing or invalid log file
|
||||
mod_log_extended=Custom logfiles
|
||||
mod_log_file=Logfile
|
||||
mod_log_cmd=For FTP commands
|
||||
mod_log_nick=Log format
|
||||
mod_log_all=All
|
||||
mod_log_ecmd=Missing FTP commands
|
||||
mod_log_enick=Missing or invalid log format name
|
||||
mod_log_ecmdnick=You must enter a log format when specifying commands to log
|
||||
mod_log_nickname=Format name
|
||||
mod_log_fmt=Format string
|
||||
mod_log_format=Custom log formats
|
||||
mod_log_enickname=Missing or invalid format name
|
||||
mod_log_efmt=Missing format string
|
||||
|
||||
mod_pam_pam=Use PAM for authentication?
|
||||
mod_pam_config=Authenticate using PAM service
|
||||
mod_pam_econfig=Missing or invalid PAM service
|
||||
|
||||
mod_readme_display=Notify user of readme files matching
|
||||
mod_readme_none=None
|
||||
mod_readme_edisplay=Missing readme files pattern
|
||||
|
||||
start_err=Failed to start FTP server
|
||||
start_einetd=You cannot start the server daemon when in inetd mode.
|
||||
|
||||
ftpaccess_title=Per-Directory Options Files
|
||||
ftpaccess_desc=Additional per-directory options can be specified in a file (usually called <tt>.ftpaccess</tt>) in each directory. The options apply to all files in that directory and any sub-directories, unless overridden by another options file.
|
||||
ftpaccess_create=Create Options File
|
||||
ftpaccess_find=Find Options Files
|
||||
ftpaccess_auto=Under anonymous
|
||||
ftpaccess_from=From directory
|
||||
ftpaccess_return=options file list
|
||||
|
||||
ftpusers_title=Denied FTP Users
|
||||
ftpusers_desc=If enabled under the <tt>Authentication</tt> icon, the users listed below from the file $1 will be denied login access to the FTP user.
|
||||
|
||||
ftpindex_title=Per-Directory Options File
|
||||
ftpindex_delete=Delete File
|
||||
ftpindex_opts=Per-Directory Options
|
||||
ftpindex_edit=Edit Directives
|
||||
ftpindex_limit=Per-command options
|
||||
ftpindex_addlimit=Add per-command options for ..
|
||||
ftpindex_header2=$1 in $2
|
||||
ftpindex_return=per-directory options file
|
||||
ftpindex_header=For $1
|
||||
|
||||
find_err=Failed to find options files
|
||||
find_eanon=Anonymous FTP is not setup in any virtual server
|
||||
|
||||
log_global=Changed global $1 options
|
||||
log_ftpusers=Changed denied FTP users
|
||||
log_virtc=Created server $1
|
||||
log_virts=Reconfigured server $1
|
||||
log_virtd=Deleted server $1
|
||||
log_virtm=Manually edited server $1
|
||||
log_virt=Changed $1 in server $2
|
||||
log_dirc=Created directory $1
|
||||
log_dirc_l=Created directory $1 in server $2
|
||||
log_dirs=Changed directory $1
|
||||
log_dirs_l=Changed directory $1 in server $2
|
||||
log_dird=Deleted directory $1
|
||||
log_dird_l=Deleted directory $1 in server $2
|
||||
log_dirm=Manually edited directory $1
|
||||
log_dirm_l=Manually edited directory $1 in server $2
|
||||
log_dir=Changed $1 in directory $2
|
||||
log_dir_l=Changed $1 in directory $2 in server $3
|
||||
log_limitc=Created per-command options for $1
|
||||
log_limits=Reconfigured per-command options for $1
|
||||
log_limitd=Deleted per-command options for $1
|
||||
log_limitm=Manually edited per-command options for $1
|
||||
log_limit=Changed $1 in per-command options for $2
|
||||
log_ftpaccessc=Created options file $1
|
||||
log_ftpaccessd=Deleted options file $1
|
||||
log_ftpaccessm=Manually edited options file $1
|
||||
log_ftpaccess=Changed $1 in options file $2
|
||||
log_anonc=Setup anonymous FTP for server $1
|
||||
log_anons=Reconfigured anonymous FTP for server $1
|
||||
log_anond=Deleted anonymous FTP for server $1
|
||||
log_anonm=Manually edited anonymous FTP for server $1
|
||||
log_anon=Changed $1 in anonymous FTP for server $2
|
||||
log_start=Started proftpd
|
||||
log_apply=Applied changes
|
||||
|
||||
eafter=Configuration verification failed : $1 Changes have not been saved.
|
||||
proftpd_apply=Apply Changes
|
||||
proftpd_stop=Stop ProFTPd
|
||||
proftpd_start=Start ProFTPd
|
||||
|
|
@ -0,0 +1,137 @@
|
|||
#################### gui4webmin ##############
|
||||
lemonldap_configuration=Configuration du Lemonldap
|
||||
lemonldap_invite=Vous devez passer par le module de configuration pour fixer vos parametres
|
||||
about=A propos
|
||||
session_server=Serveur de session
|
||||
domains=Domaines
|
||||
timelive=Durée de vie
|
||||
welcome=Bienvenue dans la configuration de LemonLDAP
|
||||
lab_error_0=Le champ \"Motif OUT\" ne peut être vide pour le type \"Combined\"
|
||||
lab_error_1=n'est pas un nom de handler autorisé
|
||||
lab_error_2=fait partie du handler \"multi-homing\"
|
||||
lab_error_3=Le Nom du HANDLER ne peut être nul
|
||||
lab_error_4=n'est pas un nom de domaine autorisé
|
||||
lab_error_5=Le Nom du DOMAINE ne peut être nul
|
||||
lab_error_6=contient de(s) handler(s)
|
||||
lab_error_7=Vous DEVEZ nommer le handler !!
|
||||
lab_error_8=Vous DEVEZ nommer le noeud !!
|
||||
lab_error_9=Ce noeud existe déjà
|
||||
lab_error_10=erreur de copie de fichier
|
||||
lab_error_11=Adresse IP requise avec un virtual host par adresse IP !!!
|
||||
lab_error_12=Le chemin vers conf.d est vide dans la config du module !!
|
||||
lab_error_13=Le chemin vers con.d défini dans la config du module n'existe pas !!
|
||||
lab_error_14=Impossible de créer le fichier :
|
||||
lab_next=Suivant
|
||||
lab_prev=Précédant
|
||||
assist_handler_0=<h4 style="text-align: center;">HELP- 000000 -HELP</h4><br><br>texte multi lingue <br>et multi ligne<br>qui explique aux users ce qu est un handler generic/combined/multi-homing<br><br><br>
|
||||
assist_handler_1=<h4 style="text-align: center;">HELP- 111111 -HELP</h4><br><br>texte multi lingue <br> WHAT'S L W P ????<br><br>
|
||||
assist_handler_2=<h4 style="text-align: center;">HELP- 222222 -HELP</h4><br><br>texte multi lingue <br> WHAT'S LDAP Attrib && Application CODE ????<br><br>
|
||||
assist_handler_4=<h4 style="text-align: center;">HELP- 333333 -HELP</h4><br><br>texte multi lingue <br> WHAT'S PUBLIC && PRIVATE BASE ????<br><br>
|
||||
|
||||
#------------------------------------------ page DUREE DE VIE
|
||||
lab_0=Identifiant
|
||||
lab_1=Fichier de cache
|
||||
lab_1_1=(Nom complet avec chemin)
|
||||
lab_2=Validité de la config.
|
||||
lab_2_2=(En secondes)
|
||||
lab_3=Auto détection
|
||||
lab_3_3=(Vérification de la date de modif. du fichier)
|
||||
lab_4=Serveur
|
||||
lab_4_4=(ou adresse IP)
|
||||
lab_5=Port n°
|
||||
lab_5_5=(12211 par défaut)
|
||||
lab_6=Ajouter
|
||||
lab_7=Supprimer
|
||||
lab_8=Session
|
||||
lab_9=Liste des serveurs
|
||||
lab_10=Liste des sesions
|
||||
lab_11=Ajouter une session
|
||||
lab_12=Serveur local
|
||||
lab_13=Port n°
|
||||
lab_13_13=(22122 par défaut)
|
||||
lab_14=Serveurs locaux
|
||||
lab_15=Timeout
|
||||
lab_15_15=(Durée de la session en sec.)
|
||||
lab_16=Appliquer
|
||||
lab_17=Domaines
|
||||
lab_18=Domaine
|
||||
lab_19=Portaillab_error_9=This node already exists
|
||||
lab_19_19=(URL de la page de login)
|
||||
lab_20_20=(Defaut: lemonldap)
|
||||
lab_21=Serveur LDAP
|
||||
lab_21_21=(Nom ou adresse IP)
|
||||
lab_22=Port LDAP
|
||||
lab_22_22=(Port du serveurLDAP / 389 par défaut)
|
||||
lab_23=Branche des personnes
|
||||
lab_23_23=(Base de recherche LDAP)
|
||||
lab_24=Utilisateur
|
||||
lab_24_24=(ID de l'utilisateur LDAP)
|
||||
lab_25=Mot de passe
|
||||
lab_25_25=(Mot de passe de l'utilisateur LDAP)
|
||||
lab_26=Nouveau domaine
|
||||
lab_27=APPLIQUER
|
||||
lab_28=CDA esclave
|
||||
lab_28_28=(URL du CGI / cookie du domaine esclave)
|
||||
lab_29=Edition handlers
|
||||
lab_30=Handlers
|
||||
lab_31=Handler
|
||||
lab_32=LWP Proxy actif
|
||||
lab_33=Attrib. Ldap
|
||||
lab_33_33=(Identifiant majeur / contrôle d'accès)
|
||||
lab_34=Code applic.
|
||||
lab_34_34=(Identifiant mineur / contrôle d'accès)
|
||||
lab_35=Inactif
|
||||
lab_36=Base publique
|
||||
lab_36_36=(URL publique de la ressource à protéger)
|
||||
lab_37=Base privée
|
||||
lab_37_37=(URL privée de la ressource à protéger)
|
||||
lab_38=Stop cookie
|
||||
lab_39=Proxy externe
|
||||
lab_39_39=(Pour accès à la ressource protégée)
|
||||
lab_40=LWP Recursif
|
||||
lab_41_41=(Ext. des fichiers traitées par mod_proxy)
|
||||
lab_42=Liste des handlers "Multi-Homés"
|
||||
lab_43=Liste des handlers disponibles pour le multi homing
|
||||
lab_44=Contrôle soft
|
||||
lab_45=LWP Time out
|
||||
lab_45_45=(Time out du Proxy LWP)
|
||||
lab_46=Entête
|
||||
lab_46_46=(Entête HTTP à inclure)
|
||||
lab_47=Autorise
|
||||
lab_47_47=(Accessibilité)
|
||||
lab_48=Plug-in policy
|
||||
lab_49=Plug-in HTML
|
||||
lab_48_48=(Gestion des accès)
|
||||
lab_49_49=(Gestion des ré-écritures HTML)
|
||||
lab_50_50=(Gestion des sessions)
|
||||
lab_51_51=(Gestion des entêtes)
|
||||
lab_50=Plug-in backend
|
||||
lab_51=Plug-in header
|
||||
lab_52=Motif IN
|
||||
lab_52_52=Expression URL d'entrée
|
||||
lab_53=Motif OUT
|
||||
lab_53_53=Expression URL de sortie
|
||||
lab_54=ENVOYER
|
||||
lab_55=Nouveau handler
|
||||
lab_56=Supprimer handler
|
||||
lab_57=Supprimer domaine
|
||||
lab_58=Creation assistée
|
||||
#--------- page cluster --------
|
||||
lab_0_1=Nom symbolique (ou espace pour supprimer)
|
||||
lab_0_2=Nom symbolique
|
||||
lab_21_22=Noeud d'agrégation
|
||||
lab_21_23=Simple noeud
|
||||
lab_60=Location
|
||||
lab_60_60=(exemple : /server-status?refresh=5)
|
||||
lab_60_61=(exemple : /server-status)
|
||||
lab_61=Ajouter Noeud
|
||||
lab_62=Supprimer Noeud
|
||||
lab_63=Appliquer les modifications au XML
|
||||
lab_64=Historique des fcihiers de config XML
|
||||
lab_65=Annuler les modifi.s
|
||||
lab_66=Adresse IP
|
||||
lab_66_66=(Assoc. avec le virtual host)
|
||||
lab_67=Niveau de log
|
||||
lab_67_67=( par défaut 'notice' )
|
||||
lab_68=AUCUN
|
||||
lab_69=Attach. IP Client
|
|
@ -0,0 +1 @@
|
|||
/var/www/lemonconfig
|
|
@ -0,0 +1,699 @@
|
|||
use File::Copy;
|
||||
use XML::Simple;
|
||||
use File::Copy;
|
||||
use File::Basename;
|
||||
|
||||
my $PREFIX = (-e '/etc/debian_version') ? '/usr/share/webmin/' : '../';
|
||||
|
||||
do ( $PREFIX . 'web-lib.pl' );
|
||||
|
||||
#do './httpd-lib.pl';
|
||||
&init_config();
|
||||
|
||||
###################################################################
|
||||
#
|
||||
|
||||
sub getStyle {
|
||||
if ($_[0] =~ /map/i) {
|
||||
$_[1] = 0;
|
||||
return "conf_style";
|
||||
}
|
||||
if ($_[0] =~ /lectro/i) {
|
||||
$_[1] = 1;
|
||||
return "simpage";
|
||||
}
|
||||
if ($_[0] =~ /golf/i) {
|
||||
$_[1] = 2;
|
||||
return "golf_style";
|
||||
}
|
||||
}
|
||||
|
||||
sub Nerror
|
||||
{
|
||||
print "Content-type: text/html\n";
|
||||
print "\n";
|
||||
print "<h3>","motif : ",@_,"</h3>\n";
|
||||
print "<hr>\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
########################################################################
|
||||
#
|
||||
|
||||
sub isValidXML { # return 1 == OK
|
||||
my $namef = $_[0]; # 0 == fichier inexsitant
|
||||
# -1 == XML invalide
|
||||
|
||||
if( !-e $namef ){
|
||||
return 0;
|
||||
}
|
||||
|
||||
my $pxml = XMLin( $namef, "ForceArray" => "1" );
|
||||
|
||||
if( ! %{$pxml} ) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
################################################################################################
|
||||
# GENERATION DES FICHIERS DE CONF APACHE
|
||||
#
|
||||
sub GenerateConfigFiles {
|
||||
my $confile = $_[0];
|
||||
my $pxml = XMLin( $confile, "ForceArray" => "1" );
|
||||
my $path = $config{'httpd_conf'};
|
||||
|
||||
if( !length($path) ){ ## pas de path pour conf.d dans les params du module !!!
|
||||
return $text{'lab_error_12'};
|
||||
}
|
||||
|
||||
## completer si necessaire le path avec le / de fin
|
||||
my @lpath = split(//, $path );
|
||||
if( $lpath[ @lpath - 1 ] ne '/' ){
|
||||
$path .= '/';
|
||||
}
|
||||
|
||||
## tester l existance du path vers conf.d
|
||||
if( ! -e $path ){
|
||||
return $text{'lab_error_13'};
|
||||
}
|
||||
|
||||
my %kk = ( 'Portal' => 'portal' ,
|
||||
'BasePub' => 'basepub' ,
|
||||
'BasePriv' => 'basepriv' ,
|
||||
'EnableLWPProxy' => 'enablelwpproxy' ,
|
||||
'Organization' => 'organization' ,
|
||||
'AppliCode' => 'applicode' ,
|
||||
'DisableAccessControl' => 'disableaccesscontrol',
|
||||
'StopCookie' => 'stopcookie' ,
|
||||
'ChaseRedirect' => 'chaseredirect' ,
|
||||
'ProxyExt' => 'proxyext' ,
|
||||
'ProxyPatterns' => 'proxypatterns' ,
|
||||
'MultiHoming' => 'multihoming' ,
|
||||
'LWPTimeout' => 'lwptimeout' ,
|
||||
'SoftControl' => 'softcontrol' ,
|
||||
'Header' => 'header' ,
|
||||
'Allow' => 'allow' ,
|
||||
'PolicyPlugIn' => 'policyplugin' ,
|
||||
'RewritePlugIn' => 'rewriteplugin' ,
|
||||
'HeaderPlugIn' => 'headerplugin' ,
|
||||
'BackendPlugIn' => 'backendplugin'
|
||||
);
|
||||
|
||||
my @igk = keys( %kk );
|
||||
|
||||
## recup ts les noms de domaines
|
||||
my @doms = keys( %{ $pxml->{'domain'} } );
|
||||
|
||||
## BIG LOOP
|
||||
##-----------
|
||||
my $nbgen = 0;
|
||||
|
||||
for( @doms ){
|
||||
# domaine
|
||||
my $dom = $_;
|
||||
|
||||
# recup ts les handlers d un domaine
|
||||
my @hands = keys( %{ $pxml->{'domain'}->{ $dom }->{ 'handler' } } );
|
||||
for( @hands ){
|
||||
|
||||
my $hand = $_;
|
||||
|
||||
my $typHand = $pxml->{'domain'}->{ $dom }->{ 'handler' }->{ $hand }->{ 'MultiHomer' };
|
||||
|
||||
if( $typHand eq 'CombinedType' ){
|
||||
next;
|
||||
}
|
||||
|
||||
# contruct file name
|
||||
my $fname = $path . $hand . '.conf';
|
||||
# create file (erase if exists)
|
||||
open( F, ">$fname" ) || return( $text{ 'lab_error_14' } . $fname );
|
||||
$nbgen++;
|
||||
# recup keys and values for the handler
|
||||
my %hand = %{ $pxml->{'domain'}->{ $dom }->{ 'handler' }->{ $hand } };
|
||||
|
||||
## by name or by IPAdress ???
|
||||
my $type = $hand{'VirtualHost'};
|
||||
|
||||
if( !$type ){
|
||||
print( F "<virtualhost *:80>\n" );
|
||||
} else {
|
||||
if( $type eq 'byIPAdress' ){
|
||||
my $ip = $hand{'IPAdress'};
|
||||
print( F "<virtualhost $ip>\n" );
|
||||
} else {
|
||||
print( F "<virtualhost *:80>\n" );
|
||||
}
|
||||
}
|
||||
|
||||
## ServerName
|
||||
my $basePub = $hand{ 'BasePub' };
|
||||
if( $basePub ){
|
||||
my ($sn) = $basePub =~ /\/\/(.*)$/ ;
|
||||
print( F " ServerName \t\t$sn\n" );
|
||||
}
|
||||
|
||||
## constant
|
||||
print( F " perltranshandler \tLemonldap::Handlers::Generic4a2\n\n" );
|
||||
|
||||
## all PerlSetVar
|
||||
##----------------
|
||||
for( @igk ){
|
||||
my $ka = $_;
|
||||
|
||||
if( exists($hand{ $ka }) ){
|
||||
my $val = $hand{ $ka };
|
||||
if( $val ){
|
||||
my $pl = $kk{ $ka };
|
||||
my $tab = length( $pl ) > 16 ? "\t" : "\t\t";
|
||||
print( F " PerlSetVar $pl $tab $val\n" );
|
||||
}
|
||||
}
|
||||
}
|
||||
## close virtualhost
|
||||
print( F "</virtualhost>\n" );
|
||||
close( F );
|
||||
}
|
||||
}
|
||||
return( "$nbgen ''Apache config files'' generated in $path" );
|
||||
}
|
||||
|
||||
################################################################################################
|
||||
# GENERATION DES FICHIERS DE CONF APACHE WITH TEMPLATES
|
||||
#
|
||||
|
||||
sub GenerateConfigFilesWT {
|
||||
my $confile = $_[0];
|
||||
my $confgenTT = $_[1];
|
||||
my $pxml = XMLin( $confile, "ForceArray" => "1" );
|
||||
my $path = $config{'httpd_conf'};
|
||||
|
||||
if( !length($path) ){ ## pas de path pour conf.d dans les params du module !!!
|
||||
return $text{'lab_error_12'};
|
||||
}
|
||||
|
||||
## completer si necessaire le path avec le / de fin
|
||||
my @lpath = split(//, $path );
|
||||
if( $lpath[ @lpath - 1 ] ne '/' ){
|
||||
$path .= '/';
|
||||
}
|
||||
|
||||
## tester l existance du path vers conf.d
|
||||
if( ! -e $path ){
|
||||
return $text{'lab_error_13'};
|
||||
}
|
||||
|
||||
## recup ts les noms de domaines
|
||||
my @doms = keys( %{ $pxml->{'domain'} } );
|
||||
|
||||
## BIG LOOP
|
||||
##-----------
|
||||
my $nbgen = 0;
|
||||
|
||||
my $TT = Template->new( OUTPUT_PATH => $path );
|
||||
|
||||
for( @doms ){
|
||||
# domaine
|
||||
my $dom = $_;
|
||||
|
||||
# recup ts les handlers d un domaine
|
||||
my @hands = keys( %{ $pxml->{'domain'}->{ $dom }->{ 'handler' } } );
|
||||
for( @hands ){
|
||||
|
||||
my $hand = $_;
|
||||
|
||||
my $typHand = $pxml->{'domain'}->{ $dom }->{ 'handler' }->{ $hand }->{ 'MultiHomer' };
|
||||
|
||||
if( $typHand eq 'CombinedType' ){
|
||||
next;
|
||||
}
|
||||
|
||||
# contruct file name
|
||||
my $fname = $hand . '.conf';
|
||||
$nbgen++;
|
||||
# recup keys and values for the handler
|
||||
my %hhand = %{ $pxml->{'domain'}->{ $dom }->{ 'handler' }->{ $hand } };
|
||||
|
||||
## by name or by IPAdress ???
|
||||
my $type = $hhand{'VirtualHost'};
|
||||
if( !$type ){
|
||||
$type = 'byName';
|
||||
}
|
||||
## ServerName
|
||||
my $basePub = $hhand{ 'BasePub' };
|
||||
|
||||
my $sn = 'servername';
|
||||
if( $basePub ){
|
||||
($sn) = $basePub =~ /\/\/(.*)$/ ;
|
||||
}
|
||||
|
||||
for( keys( %hhand ) ){
|
||||
if( !length( $hhand{ $_ } ) ){
|
||||
delete( $hhand{ $_ } );
|
||||
}
|
||||
}
|
||||
|
||||
delete $hhand{'IPAdress'};
|
||||
delete $hhand{'MultiHomer'};
|
||||
delete $hhand{'VirtualHost'};
|
||||
|
||||
my $vars= { type => $type ,
|
||||
serverName => $sn ,
|
||||
handler => \%hhand
|
||||
};
|
||||
|
||||
$TT->process( $confgenTT, $vars, $fname );
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return( "$nbgen ''Apache config files'' generated in $path" );
|
||||
}
|
||||
|
||||
|
||||
########################################################################
|
||||
# retourne une H table correspondant à une page complete dans le XML
|
||||
|
||||
sub getXmlPage {
|
||||
my $page = $_[0];
|
||||
my $pxml = XMLin( "guiconfig.xml", "ForceArray" => "1" );
|
||||
return($pxml->{page}->{$page});
|
||||
}
|
||||
|
||||
########################################################################
|
||||
# RETOURNE TOUT LE XML D UN FICHIER
|
||||
|
||||
sub getXML {
|
||||
my $confile = $_[0];
|
||||
my $base = basename( $confile );
|
||||
my $workfile = './templates/' . $base;
|
||||
|
||||
if( ! -e $workfile ){
|
||||
system("cp -p $confile $workfile");
|
||||
}
|
||||
|
||||
my $pxml = XMLin( $workfile, "ForceArray" => "1" );
|
||||
UpdateOldXml( $pxml, $confile );
|
||||
return( $pxml );
|
||||
}
|
||||
|
||||
########################################################################
|
||||
# RETOURNE 1 si le fichier de travail est plus recent que le fichier
|
||||
# en production
|
||||
|
||||
sub IsXMLModified {
|
||||
my $confile = $_[0];
|
||||
my $base = basename( $confile );
|
||||
my $workfile = './templates/' . $base;
|
||||
|
||||
my $prodmt = (stat($confile))[ 9 ];
|
||||
my $workmt = (stat($workfile))[ 9 ];
|
||||
|
||||
return ( $workmt > $prodmt ? 1 : 0 );
|
||||
}
|
||||
|
||||
########################################################################
|
||||
# Met à niveau les fichiers XML avec le param MultiHomer ( type de Handler )
|
||||
|
||||
sub UpdateOldXml {
|
||||
my $xmlemon = $_[0];
|
||||
my $confile = $_[1];
|
||||
my $chapter = getChapterXML( $xmlemon, "domain" );
|
||||
|
||||
my @kdom = keys( %{$chapter} );
|
||||
my $flagREWRITE = 0;
|
||||
|
||||
for( @kdom ){
|
||||
my $dom = $_;
|
||||
my $hdom = $chapter->{ $dom }->{ 'handler' };
|
||||
if( $hdom ){
|
||||
my @khand = keys( %{$hdom} );
|
||||
for( @khand ){
|
||||
my $hand = $_;
|
||||
my $typeh = $chapter->{ $dom }->{ 'handler' }->{ $hand }->{ 'MultiHomer' };
|
||||
if( !$typeh ){
|
||||
my $multi = $chapter->{ $dom }->{ 'handler' }->{ $hand }->{ 'MultiHoming' };
|
||||
if( $multi ){
|
||||
$chapter->{ $dom }->{ 'handler' }->{ $hand }->{ 'MultiHomer' } = 'MultiHomingType';
|
||||
} else {
|
||||
my $combi = $chapter->{ $dom }->{ 'handler' }->{ $hand }->{ 'MotifOut' };
|
||||
if( $combi ){
|
||||
$chapter->{ $dom }->{ 'handler' }->{ $hand }->{ 'MultiHomer' } = 'CombinedType';
|
||||
} else {
|
||||
$chapter->{ $dom }->{ 'handler' }->{ $hand }->{ 'MultiHomer' } = 'GenericType';
|
||||
}
|
||||
}
|
||||
$flagREWRITE = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if( $flagREWRITE ){
|
||||
&writeXML( $xmlemon, $confile );
|
||||
}
|
||||
}
|
||||
|
||||
########################################################################
|
||||
# donne le numero de sequence "bak#" pour sauvegardes auto lors des modifs
|
||||
|
||||
sub getNumBakSequence {
|
||||
my $confile = $_[0];
|
||||
my $numbk = $_[1];
|
||||
|
||||
my $surch = $confile . '.bak?';
|
||||
|
||||
my @list = glob( $surch );
|
||||
|
||||
my $numseq = @list;
|
||||
if( $numseq < $numbk ){
|
||||
return $numseq;
|
||||
}
|
||||
|
||||
my %h;
|
||||
my @tabdt;
|
||||
|
||||
for( @list ){
|
||||
my $dt = (stat($_))[9];
|
||||
$h{ $dt } = $_;
|
||||
push( @tabdt, $dt );
|
||||
}
|
||||
|
||||
@tabdt = sort( @tabdt );
|
||||
|
||||
my $last = substr($h{ $tabdt[0] }, -1, 1 );
|
||||
return $last;
|
||||
}
|
||||
|
||||
|
||||
########################################################################
|
||||
# copie le fichier WORK sur le fichier de PROD
|
||||
|
||||
sub ApplyXMLModifs {
|
||||
my $confile = $_[0];
|
||||
my $base = basename( $confile );
|
||||
my $workfile = './templates/' . $base;
|
||||
|
||||
my $numseq = getNumBakSequence( $confile, 3 );
|
||||
my $backf = $confile . '.bak' . $numseq;
|
||||
copy( $confile, $backf );
|
||||
|
||||
my $status = system("cp -p $workfile $confile");
|
||||
return $status;
|
||||
}
|
||||
|
||||
########################################################################
|
||||
# copie le fichier de PROD sur le fichier WORK
|
||||
|
||||
sub DiscardXMLModifs {
|
||||
my $confile = $_[0];
|
||||
my $base = basename( $confile );
|
||||
my $workfile = './templates/' . $base;
|
||||
|
||||
my $status = system("cp -p $confile $workfile");
|
||||
return $status;
|
||||
}
|
||||
########################################################################
|
||||
# retourne un tableau de dates de modif des fichiers BAKx du conf
|
||||
|
||||
sub GetNumXmlConfMod {
|
||||
my $confile = $_[0];
|
||||
|
||||
my $surch = $confile . '.bak?';
|
||||
my @list = glob( $surch );
|
||||
|
||||
my $tabdt;
|
||||
for( @list ){
|
||||
my $dt = (stat($_))[9];
|
||||
my $str = localtime($dt);
|
||||
push( @{$tabdt}, $str );
|
||||
}
|
||||
@{$tabdt} = sort( @{$tabdt} );
|
||||
return $tabdt;
|
||||
}
|
||||
|
||||
########################################################################
|
||||
# ECRIT UN PXML DANS UN FICHIER XML après en avoir fait une copie "bak"
|
||||
|
||||
sub writeXML {
|
||||
my $pxml = $_[0];
|
||||
my $namef = $_[1];
|
||||
|
||||
my $base = basename( $namef );
|
||||
$namef = './templates/' . $base;
|
||||
|
||||
my $backf = $namef.'.bak';
|
||||
my $rootN = $_[2] || "lemonldapconfig";
|
||||
|
||||
# copie du fichier
|
||||
if( !copy( $namef, $backf )){
|
||||
## ????
|
||||
}
|
||||
|
||||
open( $fout, ">$namef" ) || Nerror( $! );
|
||||
|
||||
XMLout( $pxml, OutputFile => $fout,
|
||||
AttrIndent => 1,
|
||||
RootName => $rootN,
|
||||
KeyAttr => { session =>'id',
|
||||
cache =>'id',
|
||||
handler =>'id',
|
||||
application =>'id',
|
||||
domain =>'id',
|
||||
cluster =>'id',
|
||||
node => 'id',
|
||||
} );
|
||||
close( $fout );
|
||||
}
|
||||
|
||||
########################################################################
|
||||
# RETOURNE UN CHAPITRE DANS LE XML PASSE EN PARAM
|
||||
|
||||
sub getChapterXML {
|
||||
my $pxml = $_[0];
|
||||
my $nam = $_[1];
|
||||
my $mod = $_[2];
|
||||
if( !$mod ){
|
||||
return( $pxml->{$nam} );
|
||||
} else {
|
||||
return( $pxml->{$nam}->{ $mod } );
|
||||
}
|
||||
}
|
||||
|
||||
########################################################################
|
||||
# retourne une H table correspondant à un composant tabulations
|
||||
|
||||
sub getTab {
|
||||
my $tab = $_[0];
|
||||
|
||||
my @k = keys( %{$tab->{tab}} );
|
||||
@k = sort( @k );
|
||||
|
||||
my @tablo;
|
||||
for(my $i=0; $i< @k; $i++){
|
||||
$tablo[ $i ] = $tab->{tab}->{ $k[$i] };
|
||||
}
|
||||
|
||||
return(\@tablo);
|
||||
}
|
||||
|
||||
########################################################################
|
||||
# comme son nom l indique
|
||||
|
||||
sub keyToVal {
|
||||
my $h = $_[0];
|
||||
|
||||
my @k = keys( %{$h} );
|
||||
@k = sort( @k );
|
||||
my @tab;
|
||||
my $firstL = $k[ 0 ];
|
||||
|
||||
for( @k ){
|
||||
my %hs;
|
||||
$hs{ "idValue" } = $_;
|
||||
$hs{ "labOption" } = $_;
|
||||
push( @tab, \%hs );
|
||||
}
|
||||
$_[1] = \@tab;
|
||||
return $firstL;
|
||||
}
|
||||
|
||||
#---------------------------------------------------------------------
|
||||
# CONTROLE DE L'APARTENANCE D'UN HANDLER COMBINED A UN MULTI-HOMING
|
||||
# POUR AUTORISATION DE CHANGEMENT DE TYPE OU SUPPRESSION
|
||||
#---------------------------------------------------------------------
|
||||
|
||||
sub OkToChange {
|
||||
my $allHandlersChapters = $_[0];
|
||||
my $selectedHand = $_[1];
|
||||
|
||||
my @auxall = keys( %{ $allHandlersChapters } );
|
||||
for( @auxall ){
|
||||
my $loc = $_;
|
||||
my $str = $allHandlersChapters->{ $loc }->{ 'MultiHoming' };
|
||||
my @tabH = split( /,/, $str );
|
||||
for( @tabH ){
|
||||
if( $selectedHand eq $_ ){
|
||||
$_[2] = 'ERROR: ' . $selectedHand . ' ' . $text{lab_error_2} . ' ' . $loc;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$_[2] = 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
########################################################################
|
||||
# retourne tous les composants graph. d'une page (après les tabs)
|
||||
|
||||
sub getAllComposants {
|
||||
my $comps = $_[0];
|
||||
|
||||
my @k = keys( %{$comps->{comp}} );
|
||||
@k = sort( @k );
|
||||
|
||||
my @tablo;
|
||||
for(my $i=0; $i< @k; $i++){
|
||||
$tablo[ $i ] = $comps->{comp}->{ $k[$i] };
|
||||
}
|
||||
return(\@tablo);
|
||||
}
|
||||
|
||||
########################################################################
|
||||
# retourne une ref sur une valeur d un composant
|
||||
|
||||
sub getRefValueInCompo {
|
||||
my $composs = $_[0];
|
||||
my $idcompo = $_[1]; #"LastModified"
|
||||
|
||||
for( @{$composs} ){
|
||||
my $h = $_;
|
||||
if( $h->{ id_input } eq $idcompo ){
|
||||
return( $h );
|
||||
}
|
||||
}
|
||||
|
||||
return( undef );
|
||||
}
|
||||
|
||||
########################################################################
|
||||
# supprime le caractère % en début et fin de chaine
|
||||
|
||||
sub dePourCent {
|
||||
my $line = $_[0];
|
||||
$line =~ s/%(.+)%/$1/;
|
||||
return( $line );
|
||||
}
|
||||
|
||||
########################################################################
|
||||
# teste la présence du caractère % en début et fin de chaine
|
||||
|
||||
sub isPourCented {
|
||||
my $line = $_[0];
|
||||
|
||||
my $newline = $line =~ /^%.+%$/;
|
||||
return $newline;
|
||||
}
|
||||
|
||||
########################################################################
|
||||
# remplace une variable %xxxx% par le texte EN /FR
|
||||
|
||||
sub polyGlotTab {
|
||||
my @tabular = @{$_[0]};
|
||||
my %text = %{$_[1]};
|
||||
|
||||
for(@tabular) { # 0,1 ,2
|
||||
my $hash = $_;
|
||||
for(keys %{$hash} ) {
|
||||
if( isPourCented( $hash->{$_} ) ){
|
||||
$hash->{$_} = $text{ dePourCent( $hash->{$_} ) };
|
||||
}
|
||||
}
|
||||
}
|
||||
return( \@tabular );
|
||||
}
|
||||
|
||||
###################################################################
|
||||
# remplace les attributs link dans une URL
|
||||
|
||||
sub ajustLink {
|
||||
my @tabular = @{$_[0]};
|
||||
my $mode = $_[1];
|
||||
my $style = $_[2];
|
||||
|
||||
my $dom = $_[3];
|
||||
|
||||
for(@tabular) { # 0,1 ,2
|
||||
my $hash = $_;
|
||||
$hash->{link} =~ s/\$mode/$mode/;
|
||||
$hash->{link} =~ s/\$_style/$style/;
|
||||
if( $dom ){
|
||||
$hash->{link} =~ s/\$dom/$dom/;
|
||||
}
|
||||
}
|
||||
return( \@tabular );
|
||||
}
|
||||
|
||||
########################################################################
|
||||
# crochets certifies // substitue les valeurs def et hid par defaut
|
||||
|
||||
sub TransformVars {
|
||||
my @composs = @{$_[0]};
|
||||
my $chapter = $_[1];
|
||||
my @tabk = keys(%{$chapter});
|
||||
my $clebase = $tabk[0];
|
||||
|
||||
for( @composs ){
|
||||
my $comp = $_;
|
||||
|
||||
for( keys(%{$comp} )) {
|
||||
my $k = $_;
|
||||
if( $comp->{ $k } =~ /^\$def(.+)/ ||
|
||||
$comp->{ $k } =~ /^\$hid(.+)/ ){
|
||||
my $cle = $1;
|
||||
if( $cle eq "id" ) {
|
||||
$comp->{ $k } = $clebase;
|
||||
} else {
|
||||
if( $chapter->{ $clebase }->{ $cle } ){
|
||||
$comp->{ $k } = $chapter->{ $clebase }->{ $cle };
|
||||
} else {
|
||||
$comp->{ $k } = "";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
###################################################################
|
||||
#
|
||||
sub IsApacheRunning {
|
||||
if( !($config{'pid_file'}) ) {
|
||||
return 0;
|
||||
}
|
||||
if( -e $config{'pid_file'} ){
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
###################################################################
|
||||
# RAZ du fichier de conf XML en recopiant le fichier template_conf.xml
|
||||
|
||||
sub restoreXMLFile() {
|
||||
copy( "./templates/template_conf.xml", $_[0] );
|
||||
}
|
||||
|
||||
###################################################################
|
||||
#
|
||||
|
||||
1;
|
||||
|
||||
# C FINI !!! ooops PERL FINI !!!!
|
||||
###################################################################
|
||||
|
|
@ -0,0 +1,193 @@
|
|||
#!/usr/bin/perl -w
|
||||
#use strict;
|
||||
use Template;
|
||||
use CGI;
|
||||
use Data::Dumper;
|
||||
require './lemonldap-lib.pl';
|
||||
my $l =Dumper (%gconfig) ;
|
||||
|
||||
if ( !$config{XML_file} )
|
||||
{
|
||||
print "Content-type: text/html\n";
|
||||
|
||||
print "\n";
|
||||
print "No XML config file $config{XML_file} <br> go to ";
|
||||
print " <a href= $gconfig{'webprefix'}/config.cgi?$module_name> configuration</a>";
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
#######################################################################
|
||||
#
|
||||
my $mode;
|
||||
my $flipflop;
|
||||
my $check = 0;
|
||||
my $styl ;
|
||||
my $vars;
|
||||
my $tab_active;
|
||||
my $tt = Template->new( {# ABSOLUTE => 1,
|
||||
PREC_CHOMP =>1,
|
||||
POST_CHOMP =>1, } );
|
||||
|
||||
my $conf = &getXmlPage( "about" );
|
||||
my $filethtml = $conf->{'template'};
|
||||
my $confgenTT = $conf->{'templateConfGen'};
|
||||
my $title = $text{ &dePourCent( $conf->{title} ) };
|
||||
|
||||
#######################################################################
|
||||
#
|
||||
my $_style= CGI::param('style');
|
||||
my $tabular = [];
|
||||
if (CGI::param('mode') =~ /pert/) { # mode expert beaucoups plus d option
|
||||
|
||||
$mode='Expert' ;
|
||||
$tabular = &getTab( $conf->{tabs}->{expert} );
|
||||
$tabular = &polyGlotTab( $tabular, \%text );
|
||||
$tabular = &ajustLink ($tabular,$mode,$_style);
|
||||
|
||||
$flipflop= 'Normal';
|
||||
} else {
|
||||
$mode ='Normal';
|
||||
|
||||
$tabular = &getTab( $conf->{tabs}->{normal} );
|
||||
$tabular = &polyGlotTab( $tabular, \%text );
|
||||
$tabular = &ajustLink ($tabular,$mode,$_style);
|
||||
|
||||
$flipflop= 'Expert';
|
||||
} # end else
|
||||
|
||||
my $flagApplyModifs = &IsXMLModified( $config{'XML_file'} );
|
||||
my $flagAPACHE = &IsApacheRunning();
|
||||
|
||||
$tab_active = '3' ;
|
||||
if (!$config{'Style'} ) { ## je dois rediriger la personne vers le module de config
|
||||
$styl ="conf_style" ; ## style par defaut
|
||||
$vars= { style => $styl,
|
||||
checked => $check,
|
||||
title => $title,
|
||||
mode => $mode,
|
||||
cgi => 'index.cgi',
|
||||
css => $_style,
|
||||
label => $flipflop,
|
||||
about => $text{lemonldap_invite},
|
||||
parent => $0,
|
||||
tab_about => $tabular,
|
||||
langa => \%text
|
||||
};
|
||||
} else {
|
||||
$styl = $config{'Style'};
|
||||
my $c;
|
||||
$styl = &getStyle( $styl, $c );
|
||||
my $para1 = $config{'XML_XSD'};
|
||||
my $para2 = $config{'httpd_conf'};
|
||||
my $para3 = $config{'XML_file'};
|
||||
|
||||
##############
|
||||
## controle de l'existance et de la validite du fichier XML passe en parametre
|
||||
if( &isValidXML( $para3 ) < 1 ){ ## 0 == fichier inexsistant // -1 == bad xml format
|
||||
&restoreXMLFile( $para3 );
|
||||
}
|
||||
my $message = 0;
|
||||
|
||||
#############
|
||||
# Application des modifs --> copy work file to prod file
|
||||
if( defined( CGI::param('ApplyModifs'))) {
|
||||
my $result = &ApplyXMLModifs( $config{'XML_file'} );
|
||||
if( !$result ){
|
||||
$flagApplyModifs = 0;
|
||||
} else {
|
||||
$message = $text{'lab_error_10'};
|
||||
}
|
||||
}
|
||||
|
||||
#############
|
||||
# Annulation des modifs --> copy prod file to work file
|
||||
if( defined( CGI::param('DiscardModifs'))) {
|
||||
my $result = &DiscardXMLModifs( $config{'XML_file'} );
|
||||
if( !$result ){
|
||||
$flagApplyModifs = 0;
|
||||
} else {
|
||||
$message = $text{'lab_error_10'};
|
||||
}
|
||||
}
|
||||
|
||||
#############
|
||||
# GENERATE CONFIG FILES
|
||||
if( defined( CGI::param('GenerConfigFiles'))) {
|
||||
$message = &GenerateConfigFilesWT( $config{'XML_file'}, $confgenTT );
|
||||
}
|
||||
|
||||
#############
|
||||
# STOP APACHE
|
||||
if( defined( CGI::param('StopApache'))) {
|
||||
if( !$config{'stop_cmd'} ){
|
||||
$message = "Command not defined in module config"
|
||||
} else {
|
||||
my $com = $config{'stop_cmd'} . ' 2>&1> /dev/null';
|
||||
$message = ` $com `;
|
||||
sleep( 1 );
|
||||
$flagAPACHE = &IsApacheRunning();
|
||||
}
|
||||
}
|
||||
|
||||
#############
|
||||
# START APACHE
|
||||
if( defined( CGI::param('StartApache'))) {
|
||||
if( !$config{'start_cmd'} ){
|
||||
$message = "Command not defined in module config"
|
||||
} else {
|
||||
my $com = $config{'start_cmd'} . ' 2>&1> /dev/null';
|
||||
$message = ` $com `;
|
||||
sleep( 1 );
|
||||
$flagAPACHE = &IsApacheRunning();
|
||||
}
|
||||
}
|
||||
|
||||
#############
|
||||
# RESTART APACHE
|
||||
if( defined( CGI::param('RestartApache'))) {
|
||||
if( !$config{'restart_cmd'} ){
|
||||
$message = "Command not defined in module config"
|
||||
} else {
|
||||
my $com = $config{'restart_cmd'} . ' 2>&1> /dev/null';
|
||||
$message = ` $com `;
|
||||
sleep( 2 );
|
||||
$flagAPACHE = &IsApacheRunning();
|
||||
}
|
||||
}
|
||||
|
||||
## FICHIERS XML CONFIG BAKx ????
|
||||
##-------------------------------
|
||||
my $tmodxml = &GetNumXmlConfMod( $config{'XML_file'} );
|
||||
|
||||
$vars= { style => $styl,
|
||||
checked =>$c,
|
||||
title => $title,
|
||||
mode => $mode,
|
||||
css => $_style,
|
||||
label => $flipflop,
|
||||
para3 => $para3,
|
||||
para2 => $para2,
|
||||
para1 => $para1,
|
||||
parent => $0,
|
||||
tab_about => $tabular,
|
||||
langa => \%text,
|
||||
lab_63 => $text{'lab_63'},
|
||||
lab_65 => $text{'lab_65'},
|
||||
flagApplyModifs => $flagApplyModifs,
|
||||
flagAPACHE => $flagAPACHE,
|
||||
message => $message,
|
||||
tabDTXml => $tmodxml,
|
||||
lab_64 => $text{ 'lab_64' }
|
||||
};
|
||||
}
|
||||
if (CGI::param('style')) {
|
||||
$vars->{style} = &getStyle( CGI::param('style'), $vars->{checked} );
|
||||
}
|
||||
|
||||
print "Content-type: text/html\n";
|
||||
$tt->process($filethtml,$vars) || die $tt->error();
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,92 @@
|
|||
#!/usr/bin/perl
|
||||
# index.cgi
|
||||
# Display the icons for various types of lemonldapconfig options
|
||||
use Data::Dumper;
|
||||
require './lemonldap-lib.pl';
|
||||
&header($text{'index_title'}, "", undef, 1, 1, 0,
|
||||
&help_search_link("lemonldap", "man", "doc", "google"));
|
||||
print "<hr>\n";
|
||||
|
||||
print "<h3>$text{'index_lines'}</h3>\n";
|
||||
%lines = %{&get_session_line};
|
||||
|
||||
my @attr1 = @{&get_ligne_attr()} ;
|
||||
#$l =Dumper(@attr) ;
|
||||
#print "eric $l";
|
||||
|
||||
|
||||
print "<h3>$text{'index_line'}</h3>\n";
|
||||
#foreach (keys %lines) {
|
||||
# print "$_ <br>";
|
||||
|
||||
#}
|
||||
|
||||
print "<table border=1 bgcolor='orange'>";
|
||||
my $ligne=&formcolonne(\@attr1,'name') ;
|
||||
print "$ligne";
|
||||
|
||||
foreach (keys %lines) {
|
||||
my @a;
|
||||
push @a,"<a href=/lemonldap/modif_line.cgi?line=$_>$_</a>" ;
|
||||
my $ctr =$_;
|
||||
foreach (@attr1) {
|
||||
next if $_->{name}=~/^id/i;
|
||||
push @a,$lines{$ctr}->{$_->{name}}||" ";
|
||||
# push @a,$lines{$_}->{cle} ;
|
||||
# push @a,$lines{$_}->{valeur} ;
|
||||
# push @a,$lines{$_}->{primarykey}||' ' ;
|
||||
}
|
||||
my $ligne=&formline(\@a,) ;
|
||||
print "$ligne";
|
||||
|
||||
}
|
||||
|
||||
|
||||
print "</table>";
|
||||
print "<h3>$text{'index_exp'}</h3>\n";
|
||||
%exp = %{&get_session_exp};
|
||||
|
||||
# Display global category icons
|
||||
@attr = @{&get_exp_attr()} ;
|
||||
|
||||
print "<table border=1 bgcolor='grey'>";
|
||||
my $ligne=&formcolonne(\@attr,'name') ;
|
||||
print "$ligne";
|
||||
|
||||
|
||||
foreach (keys %exp) {
|
||||
my @a;
|
||||
push @a,"<a href=/lemonldap/modif_exp.cgi?exp=$_>$_</a>" ;
|
||||
my $ctr=$_;
|
||||
foreach (@attr) {
|
||||
next if $_->{name}=~/^id/i;
|
||||
push @a,$exp{$ctr}->{$_->{name}}||" ";
|
||||
}
|
||||
|
||||
|
||||
my $ligne=&formline(\@a,) ;
|
||||
print "$ligne";
|
||||
|
||||
}
|
||||
|
||||
|
||||
print "</table>";
|
||||
my $table = tablemaj(@attr1) ;
|
||||
print "<h3>$text{'create_line'}</h3>\n";
|
||||
|
||||
print "<form method=get target= line_create.cgi>";
|
||||
|
||||
print $table ;
|
||||
print "<p><input type=submit>";
|
||||
|
||||
print "</form>";
|
||||
my $table = tablemaj(@attr) ;
|
||||
print "<h3>$text{'create_exp'}</h3>\n";
|
||||
|
||||
print "<form method=get target= exp_create.cgi>";
|
||||
|
||||
print $table ;
|
||||
print "<p><input type=submit>";
|
||||
print "</form>";
|
||||
|
||||
&footer("/lemonldap/session.cgi", $text{'index'});
|
|
@ -0,0 +1,5 @@
|
|||
category=servers
|
||||
desc=lemonldap websso
|
||||
longdesc=Configure the powerful lemonldap websso . Supports all options in most of the standard modules.
|
||||
os_support=redhat-linux mandrake-linux debian-linux
|
||||
name=lemonldap
|
|
@ -0,0 +1,274 @@
|
|||
#!/usr/bin/perl -w
|
||||
#use strict;
|
||||
use Template;
|
||||
use CGI;
|
||||
use Data::Dumper;
|
||||
require './lemonldap-lib.pl';
|
||||
|
||||
|
||||
my $tt = Template->new( {# ABSOLUTE => 1,
|
||||
PREC_CHOMP =>1,
|
||||
POST_CHOMP =>1, } );
|
||||
|
||||
##########################################
|
||||
# chargement des infos de la page #
|
||||
##########################################
|
||||
|
||||
if (! defined (CGI::param ("submitSession")) ) {
|
||||
|
||||
my $conf = &getXmlPage( "session" );
|
||||
my $filethtml = $conf->{template};
|
||||
my $title = $text{ &dePourCent( $conf->{title} ) };
|
||||
my $_style = CGI::param('style')||$config{Style};
|
||||
my $tabular = [];
|
||||
my $composs;
|
||||
my $mode;
|
||||
|
||||
my $refTimeOut;
|
||||
|
||||
if (CGI::param('mode') =~ /pert/) { # mode expert beaucoups plus d option
|
||||
$mode='Expert' ;
|
||||
$tabular = &getTab( $conf->{tabs}->{expert} );
|
||||
$flipflop= 'Normal';
|
||||
$composs = &getAllComposants( $conf->{composants}->{expert} );
|
||||
$refTimeOut = &getRefValueInCompo( $composs, 'idTimeOut' );
|
||||
} else {
|
||||
$mode ='Normal';
|
||||
$tabular = &getTab( $conf->{tabs}->{normal} );
|
||||
$flipflop= 'Expert';
|
||||
$composs = &getAllComposants( $conf->{composants}->{normal} );
|
||||
}
|
||||
|
||||
$tabular = &polyGlotTab( $tabular, \%text );
|
||||
$tabular = &ajustLink ($tabular,$mode,$_style);
|
||||
$styl = $config{'Style'};
|
||||
|
||||
$composs = &polyGlotTab( $composs, \%text );
|
||||
|
||||
my $xmlemon = getXML( $config{'XML_file'} );
|
||||
my $chapter = getChapterXML( $xmlemon, "session" );
|
||||
|
||||
#############################################################################
|
||||
#
|
||||
# TEST SUR BOUTONS " ADD / REMOVE / APPLY " SERVERS / LOCAL / TIMEOUT
|
||||
# ( mode normal/expert )
|
||||
#
|
||||
#############################################################################
|
||||
my $flagADD = ( CGI::param( bAdd ) || CGI::param( bAddLoc ) );
|
||||
my $flagREMO = ( CGI::param( bRemove ) || CGI::param( bRemoveLoc ) );
|
||||
my $flagAPPLY_TO = ( CGI::param( bApplyTimeOut ));
|
||||
my $sess;
|
||||
|
||||
my $chactif;
|
||||
my $chaux;
|
||||
my $idEditServ;
|
||||
my $idEditPort;
|
||||
my $laListeServers;
|
||||
|
||||
#############################################################################
|
||||
#
|
||||
# CHARGEMENT DES VARIABLES SUIVANT LE PARAGRAPHE XML A MODIFIER
|
||||
#
|
||||
#############################################################################
|
||||
if( CGI::param( bAdd ) || CGI::param( bRemove ) ){
|
||||
$chactif = 'servers';
|
||||
$chaux = 'local';
|
||||
$idEditServ = 'idServer';
|
||||
$idEditPort = 'idPort';
|
||||
$laListeServers = 'listServers';
|
||||
} elsif ( CGI::param( bAddLoc ) || CGI::param( bRemoveLoc ) ){
|
||||
$chactif = 'local';
|
||||
$chaux = 'servers';
|
||||
$idEditServ = 'idServerLoc';
|
||||
$idEditPort = 'idPortLoc';
|
||||
$laListeServers = 'listServersLoc';
|
||||
}
|
||||
if( $flagAPPLY_TO ){
|
||||
#############################################################################
|
||||
#
|
||||
# MAJ du paragraphe timeout
|
||||
#
|
||||
#############################################################################
|
||||
my $timou = CGI::param( 'idTimeOut' );
|
||||
$sess = CGI::param( idSession );
|
||||
my $ch;
|
||||
|
||||
if( $chapter ){
|
||||
$ch = $chapter->{ $sess }->{ SessionParams } ;
|
||||
}
|
||||
my %ches = eval( $ch );
|
||||
|
||||
if( !$timou ){
|
||||
delete( $ches{ 'timeout' } );
|
||||
}else{
|
||||
$ches{ 'timeout' } = $timou;
|
||||
}
|
||||
|
||||
$Data::Dumper::Terse = 1;
|
||||
$Data::Dumper::Purity = 1;
|
||||
$Data::Dumper::Indent = 2;
|
||||
my $ligne = Dumper( \%ches );
|
||||
my $lg = length( $ligne );
|
||||
substr( $ligne, 0, 1 ) = '(';
|
||||
substr( $ligne, $lg-2, 1 ) = ')';
|
||||
|
||||
if($chapter) {
|
||||
$chapter->{ $sess }->{ SessionParams } = $ligne;
|
||||
} else {
|
||||
$xmlemon->{session}->{$sess}->{SessionParams} = $ligne ;
|
||||
}
|
||||
&writeXML( $xmlemon, $config{'XML_file'});
|
||||
$chapter = getChapterXML( $xmlemon, "session" );
|
||||
|
||||
} elsif( $flagADD ){
|
||||
#############################################################################
|
||||
#
|
||||
# MAJ (ADD) du paragraphe servers OU local suivant le contenu $chactif et $chaux
|
||||
#
|
||||
#############################################################################
|
||||
my $nserv = CGI::param( $idEditServ );
|
||||
my $nport = CGI::param( $idEditPort );
|
||||
|
||||
$sess = CGI::param( idSession );
|
||||
|
||||
my $ch;
|
||||
if( $chapter ){
|
||||
$ch = $chapter->{ $sess }->{ SessionParams } ;
|
||||
}
|
||||
my %ches = eval( $ch );
|
||||
|
||||
my @tch = @{$ches{ $chactif }};
|
||||
push( @tch, ($nserv.":".$nport) );
|
||||
my %h = ( $chactif => \@tch );
|
||||
|
||||
if( exists( $ches{ $chaux } )) {
|
||||
$h{ $chaux } = $ches{ $chaux };
|
||||
}
|
||||
if( exists( $ches{ 'timeout' } )) {
|
||||
$h{ 'timeout' } = $ches{ 'timeout' };
|
||||
}
|
||||
|
||||
$Data::Dumper::Terse = 1;
|
||||
$Data::Dumper::Purity = 1;
|
||||
$Data::Dumper::Indent = 2;
|
||||
my $ligne = Dumper( \%h );
|
||||
my $lg = length( $ligne );
|
||||
substr( $ligne, 0, 1 ) = '(';
|
||||
substr( $ligne, $lg-2, 1 ) = ')';
|
||||
|
||||
if($chapter) {
|
||||
$chapter->{ $sess }->{ SessionParams } = $ligne;
|
||||
} else {
|
||||
$xmlemon->{session}->{$sess}->{SessionParams} = $ligne ;
|
||||
}
|
||||
&writeXML( $xmlemon, $config{'XML_file'});
|
||||
$chapter = getChapterXML( $xmlemon, "session" );
|
||||
|
||||
}elsif( $flagREMO ){
|
||||
#############################################################################
|
||||
#
|
||||
# MAJ (REMOVE) du paragraphe servers OU local suivant le contenu $chactif et $chaux
|
||||
#
|
||||
#############################################################################
|
||||
my $serpor = CGI::param( $laListeServers );
|
||||
|
||||
my $sess = CGI::param( idSession );
|
||||
my $ch = $chapter->{ $sess }->{ SessionParams };
|
||||
my %ches = eval( $ch );
|
||||
my @tch = @{$ches{ $chactif }};
|
||||
my @NT;
|
||||
for( @tch ){
|
||||
if( !($_ eq $serpor)){
|
||||
push( @NT, $_ );
|
||||
}
|
||||
}
|
||||
if( !@NT ){
|
||||
delete( $chapter->{ $sess } );
|
||||
if( !keys( %{$xmlemon->{session}} )){
|
||||
delete( $xmlemon->{session} );
|
||||
}
|
||||
} else {
|
||||
my %h = ( $chactif => \@NT );
|
||||
if( exists( $ches{ $chaux } )) {
|
||||
$h{ $chaux } = $ches{ $chaux };
|
||||
}
|
||||
if( exists( $ches{ 'timeout' } )) {
|
||||
$h{ 'timeout' } = $ches{ 'timeout' };
|
||||
}
|
||||
|
||||
$Data::Dumper::Terse = 1;
|
||||
$Data::Dumper::Purity = 1;
|
||||
my $ligne = Dumper( \%h );
|
||||
my $lg = length( $ligne );
|
||||
substr( $ligne, 0, 1 ) = '(';
|
||||
substr( $ligne, $lg-2, 1 ) = ')';
|
||||
$chapter->{ $sess }->{ SessionParams } = $ligne;
|
||||
}
|
||||
|
||||
&writeXML( $xmlemon, $config{'XML_file'});
|
||||
}
|
||||
#
|
||||
################################################################### FIN DE TEST ET MAJ
|
||||
my $combo_sessions;
|
||||
|
||||
##
|
||||
## sélection de la bonne ligne dans la comboBox des sessions et ajout de l'item "ADD NEW"
|
||||
##
|
||||
my $firstL = &keyToVal( $chapter, $combo_sessions );
|
||||
my $addnew = { "labOption" => $text{ lab_11 }, "idValue" => $text{ lab_11 } };
|
||||
push( @{$combo_sessions}, $addnew );
|
||||
|
||||
#
|
||||
########################################## TEST POUR CHANGEMENT de session
|
||||
#
|
||||
my $cbs = CGI::param( cbSession );
|
||||
if( !$cbs ){
|
||||
$cbs = $firstL;
|
||||
}
|
||||
if( $flagADD ){
|
||||
$cbs = $sess;
|
||||
}
|
||||
my $line = $chapter->{ $cbs }->{SessionParams};
|
||||
my %lines = eval( $line );
|
||||
|
||||
my @tabser = @{$lines{ 'servers' }}; # liste des serveurs "standard"
|
||||
my @tablocser = @{$lines{ 'local' }}; # liste des serveurs "locaux"
|
||||
|
||||
$refTimeOut->{ 'defValue' } = $lines{ 'timeout' };
|
||||
|
||||
#
|
||||
####### VARIABLES PASSES EN PARAMETRE AU TEMPLATE
|
||||
|
||||
$vars= { style => $styl,
|
||||
checked => $check,
|
||||
title => $title,
|
||||
mode => $mode,
|
||||
cgi => 'session.cgi',
|
||||
css => $_style,
|
||||
label => $flipflop,
|
||||
parent => $0,
|
||||
tab_session => $tabular,
|
||||
langa => \%text,
|
||||
composall => $composs,
|
||||
combo_session => $combo_sessions,
|
||||
list_servers => \@tabser,
|
||||
list_locservers => \@tablocser,
|
||||
option_selected => $cbs,
|
||||
label_combo => $text{ lab_10 }
|
||||
};
|
||||
|
||||
$vars->{style} = &getStyle($styl, $vars->{checked});
|
||||
|
||||
print "Content-type: text/html\n";
|
||||
$tt->process($filethtml,$vars) || die $tt->error();
|
||||
|
||||
} else { ## Traitement du "SUBMIT"
|
||||
##########################################################
|
||||
|
||||
my $_style = CGI::param('style');
|
||||
my $mode = CGI::param('mode');
|
||||
|
||||
&redirect( "index.cgi?mode=$mode&style=$_style" );
|
||||
}
|
||||
#
|
||||
############ C FINI
|
|
@ -0,0 +1,125 @@
|
|||
[% tab_about = tab_about %]
|
||||
[% PROCESS templates/mycomposant.tt -%]
|
||||
[%- PROCESS header
|
||||
title => title
|
||||
style => style
|
||||
-%]
|
||||
|
||||
<script>
|
||||
|
||||
function ShowMess( leMess )
|
||||
{
|
||||
if( leMess != 0 ){
|
||||
alert( leMess );
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<h1> [% title %] </h1>
|
||||
|
||||
[% IF flagAPACHE %]
|
||||
<p class="alive" style='font-size: 1.1em;'><br>APACHE IS RUNNING<br><br></p>
|
||||
[% ELSE %]
|
||||
<p class="dead" style='font-size: 1.1em;'><br>APACHE IS DEAD<br><br></p>
|
||||
[% END %]
|
||||
|
||||
[% WRAPPER vari_tabs %]
|
||||
[% FOREACH item IN tab_about %]
|
||||
[% PROCESS one_tab
|
||||
link= item.link
|
||||
etatab= item.etatab
|
||||
labTab= item.labTab
|
||||
%]
|
||||
[% END %]
|
||||
[% END %]
|
||||
[% WRAPPER div_pre %]
|
||||
<FORM action="index.cgi" method=get >
|
||||
[%- PROCESS radio_col
|
||||
autosubmit => '1'
|
||||
title =>'Styles'
|
||||
nom => 'style'
|
||||
label_0 => 'Old Maps'
|
||||
label_1 => 'Electro'
|
||||
label_2 => 'Golf'
|
||||
checked => checked
|
||||
-%]
|
||||
<input type=hidden name=mode value="[% mode %]" >
|
||||
</FORM>
|
||||
<H5>
|
||||
[% langa.welcome %]<p> <table border=0><tr><td class="tdg">config xml</td><td class="tdd">[% para3 %]</td></tr><tr><td class="tdg">config httpd</td><td class="tdd">[% para2 %]</td></tr>
|
||||
</table><p>
|
||||
[%PROCESS bouton_plus
|
||||
nom => 'noname'
|
||||
label => 'module config'
|
||||
link => '/config.cgi?lemongui4webmin'
|
||||
-%]</H5>
|
||||
|
||||
[% IF tabDTXml.size > 0 %]
|
||||
[% WRAPPER tcombo150B
|
||||
idLabel= lab_64
|
||||
idSelect= "cbHistor"
|
||||
%]
|
||||
[% FOREACH item IN tabDTXml %]
|
||||
[% PROCESS one_option
|
||||
idValue= item
|
||||
labOption= item
|
||||
isSelected= ''
|
||||
%]
|
||||
[% END %]
|
||||
[% END %]
|
||||
[% END %]
|
||||
|
||||
|
||||
|
||||
<FORM>
|
||||
<DIV class="ExpertStyle">
|
||||
<BR>
|
||||
<BR>
|
||||
[% IF flagApplyModifs %]
|
||||
<table>
|
||||
<tr style='font-size: 0.7em;'>
|
||||
<td >
|
||||
<input type='Submit' name='ApplyModifs' value="[% lab_63 %]" class="bouton_0">
|
||||
<input type='Submit' name='DiscardModifs' value="[% lab_65 %]" class="bouton_0" >
|
||||
[% INCLUDE ForApache %]
|
||||
</tr>
|
||||
</table>
|
||||
[% ELSE %]
|
||||
<table>
|
||||
<tr style='font-size: 0.7em;'>
|
||||
<td >
|
||||
<input type='Submit' name='ApplyModifs' value="[% lab_63 %]" class="bouton_0dd" DISABLED>
|
||||
<input type='Submit' name='DiscardModifs' value="[% lab_65 %]" class="bouton_0dd" DISABLED>
|
||||
[% INCLUDE ForApache %]
|
||||
</tr>
|
||||
</table>
|
||||
[% END %]
|
||||
<BR><BR>
|
||||
</DIV>
|
||||
<input type=hidden name=mode value="[% mode %]" >
|
||||
<input type=hidden name=style value="[% css %]" >
|
||||
</FORM>
|
||||
|
||||
<br><a class="PetiFont">[[% parent %] with [% template.name %] ] (version 0.01)</a>
|
||||
[% END %]
|
||||
|
||||
<script>
|
||||
document.forms[0].elements[0].focus();
|
||||
ShowMess( "[% message %]" );
|
||||
</script>
|
||||
|
||||
[%- PROCESS footer -%]
|
||||
|
||||
[% BLOCK ForApache %]
|
||||
|
||||
<input type='Submit' name='GenerConfigFiles' value="Gener. Apache config files" class="bouton_0" >
|
||||
[% IF flagAPACHE %]
|
||||
<input type='Submit' name='StopApache' value="STOP Apache-perl" class="bouton_0" >
|
||||
<input type='Submit' name='RestartApache' value="RESTART Apache-perl" class="bouton_0" >
|
||||
[% ELSE %]
|
||||
<input type='Submit' name='StartApache' value="START Apache-perl" class="bouton_0" >
|
||||
[% END %]
|
||||
|
||||
[% END %]
|
|
@ -0,0 +1,10 @@
|
|||
<lemonldapconfig>
|
||||
<cache id="config0" />
|
||||
<session id="unServerDeSess"
|
||||
SessionParams="(
|
||||
'servers' => [
|
||||
'localhost:11211'
|
||||
]
|
||||
)
|
||||
" />
|
||||
</lemonldapconfig>
|
|
@ -0,0 +1,139 @@
|
|||
[% PROCESS templates/mycomposant.tt -%]
|
||||
|
||||
[%- PROCESS header
|
||||
title => title
|
||||
style => style
|
||||
-%]
|
||||
|
||||
<script>
|
||||
|
||||
function ShowMess( leMess )
|
||||
{
|
||||
if( leMess != 0 ){
|
||||
alert( leMess );
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<h1> [% title %] </h1>
|
||||
[% WRAPPER vari_tabs %]
|
||||
[% FOREACH item IN tab_about %]
|
||||
[% PROCESS one_tab
|
||||
link= item.link
|
||||
etatab= item.etatab
|
||||
labTab= item.labTab
|
||||
%]
|
||||
[% END %]
|
||||
[% END %]
|
||||
|
||||
<div class="ConfStyle">
|
||||
<form method=get>
|
||||
<input type=hidden name=mode value="[% mode %]" >
|
||||
<input type=hidden name=style value="[% css %]" >
|
||||
|
||||
[% FOREACH item IN composall %]
|
||||
[% SWITCH item.type %]
|
||||
[% CASE "labedit" %]
|
||||
[% laValue = item.defValue %]
|
||||
[% IF item.id_input == 'idn' AND nodeID %]
|
||||
[% laValue = nodeID %]
|
||||
[% END %]
|
||||
[% IF item.id_input == 'Addressn' AND nodeSimple %]
|
||||
[% laValue = nodeSimple %]
|
||||
[% END %]
|
||||
[% IF item.id_input == 'Locationn' AND nodeLoc %]
|
||||
[% laValue = nodeLoc %]
|
||||
[% END %]
|
||||
|
||||
[% PROCESS lab_edit
|
||||
labLabel = item.labLabel
|
||||
labHint = item.labHint
|
||||
id_input = item.id_input
|
||||
defValue = laValue
|
||||
hidDefValue = item.defValue
|
||||
%]
|
||||
[% CASE "labcheck" %]
|
||||
[% PROCESS lab_check
|
||||
labLabel = item.labLabel
|
||||
labHint = item.labHint
|
||||
id_input = item.id_input
|
||||
isChecked= item.isChecked
|
||||
%]
|
||||
[% CASE "tListe" %]
|
||||
[% idLab = item.labLabel %]
|
||||
[% idVis = item.nbVisible %]
|
||||
[% idSel = item.idSelect %]
|
||||
[% FuncJS = item.FuncJS %]
|
||||
|
||||
<HR>
|
||||
<BR>
|
||||
[% IF combonodes.size > "0" %]
|
||||
[% nbVis = idVis %]
|
||||
[% IF combonodes.size < 9 %]
|
||||
[% nbVis = combonodes.size + 1 %]
|
||||
[% END %]
|
||||
[% WRAPPER tlistIL
|
||||
idLabel = idLab
|
||||
idSelect = idSel
|
||||
nbVisible = nbVis
|
||||
|
||||
%]
|
||||
|
||||
[% FOREACH item IN combonodes %]
|
||||
[% PROCESS one_item
|
||||
idValue = item
|
||||
%]
|
||||
[% END %]
|
||||
[% END %]
|
||||
|
||||
[% END %]
|
||||
<BR><BR><HR><BR>
|
||||
<DIV class="ExpertStyle">
|
||||
<h5>New node</H5>
|
||||
|
||||
[% CASE "apply" %]
|
||||
<BR><BR>
|
||||
[% PROCESS buton_apply
|
||||
id_input = item.id_input
|
||||
id_value = item.id_value
|
||||
%]
|
||||
<BR><BR>
|
||||
|
||||
[% CASE "addRemove" %]
|
||||
<BR>
|
||||
[% BType = 'Hidden' %]
|
||||
[% nomRemo = 'NillName' %]
|
||||
[% IF flagShowRemo %]
|
||||
[% BType = 'Submit' %]
|
||||
[% nomRemo = item.nom_r %]
|
||||
[% END %]
|
||||
|
||||
[% PROCESS bouton_addRemove2
|
||||
nom_a = item.nom_a
|
||||
label_a = item.label_a
|
||||
nom_r = nomRemo
|
||||
label_r = item.label_r
|
||||
idBRemo = item.idBRemo
|
||||
btype = BType
|
||||
%]
|
||||
|
||||
<BR><BR> </DIV>
|
||||
|
||||
[% END %]
|
||||
[% END %]
|
||||
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<script>
|
||||
document.forms[0].elements[0].focus();
|
||||
ShowMess( "[% message %]" );
|
||||
</script>
|
||||
|
||||
[%- PROCESS footer -%]
|
||||
<br><a class="PetiFont">[[% parent %] with [% template.name %] ] (version 0.01)</a>
|
||||
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
[% KK = { Portal = ' portal '
|
||||
BasePub = ' basepub '
|
||||
BasePriv = ' basepriv '
|
||||
EnableLWPProxy = ' enablelwpproxy '
|
||||
Organization = ' organization '
|
||||
AppliCode = ' applicode '
|
||||
DisableAccessControl = ' disableaccesscontrol '
|
||||
StopCookie = ' stopcookie '
|
||||
ChaseRedirect = ' chaseredirect '
|
||||
ProxyExt = ' proxyext '
|
||||
ProxyPatterns = ' proxypatterns '
|
||||
MultiHoming = ' multihoming '
|
||||
LWPTimeout = ' lwptimeout '
|
||||
SoftControl = ' softcontrol '
|
||||
Header = ' header '
|
||||
Allow = ' allow '
|
||||
PolicyPlugIn = ' policyplugin '
|
||||
RewritePlugIn = ' rewriteplugin '
|
||||
HeaderPlugIn = ' headerplugin '
|
||||
BackendPlugIn = ' backendplugin '
|
||||
} %] [% para = handler %]
|
||||
[% IF type == 'byIPAdress' %]<virtualhost [% handler.IPAdress %]>[% ELSE %]<virtualhost *:80>[% END %]
|
||||
ServerName [% serverName %]
|
||||
perltranshandler Lemonldap::Handlers::Generic4a2
|
||||
|
||||
[% FOREACH key = para.keys %] PerlSetVar [% KK.$key %] [% para.$key %]
|
||||
[% END %]
|
||||
</virtualhost>
|
|
@ -0,0 +1,5 @@
|
|||
<div class="ConfStyle">
|
||||
<pre>
|
||||
[% CONTENT %]
|
||||
</pre>
|
||||
</div>
|
|
@ -0,0 +1,196 @@
|
|||
[% PROCESS templates/mycomposant.tt -%]
|
||||
|
||||
[%- PROCESS header
|
||||
title => title
|
||||
style => style
|
||||
-%]
|
||||
|
||||
<script>
|
||||
|
||||
function ShowRemoveHandler()
|
||||
{
|
||||
var cop = document.getElementById( 'idRemoHandler' );
|
||||
cop.type = "Submit";
|
||||
cop.name = "DeleteHandler";
|
||||
return false;
|
||||
}
|
||||
|
||||
function ShowMess( leMess )
|
||||
{
|
||||
if( leMess != 0 ){
|
||||
alert( leMess );
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<h1> [% title %] </h1>
|
||||
|
||||
[% WRAPPER vari_tabs %]
|
||||
[% FOREACH item IN tab_session %]
|
||||
[% PROCESS one_tab
|
||||
link= item.link
|
||||
etatab= item.etatab
|
||||
labTab= item.labTab
|
||||
%]
|
||||
[% END %]
|
||||
[% END %]
|
||||
|
||||
<form name="laForm" method=get>
|
||||
|
||||
[% flagExpert = 0 %]
|
||||
[% itemToSel = option_selected %]
|
||||
[% labCombo = label_combo %]
|
||||
[% labComboSel = label_comboSess %]
|
||||
[% itemSessionSel = selected_session %]
|
||||
|
||||
|
||||
[% WRAPPER tcombo
|
||||
idLabel= labCombo
|
||||
idSelect="cbDomain"
|
||||
%]
|
||||
[% FOREACH item IN combo_domain %]
|
||||
[% tosel = '' %]
|
||||
[% IF item.idValue == itemToSel %]
|
||||
[% tosel = 'SELECTED' %]
|
||||
[% END %]
|
||||
|
||||
[% PROCESS one_option
|
||||
idValue= item.idValue
|
||||
labOption= item.labOption
|
||||
isSelected= tosel
|
||||
%]
|
||||
[% END %]
|
||||
[% END %]
|
||||
|
||||
<div class="ConfStyle">
|
||||
|
||||
<input type=hidden name=mode value="[% mode %]" >
|
||||
<input type=hidden name=style value="[% css %]" >
|
||||
|
||||
[% FOREACH item IN composall %]
|
||||
[% SWITCH item.type %]
|
||||
|
||||
[% CASE "labcheck" %]
|
||||
[% PROCESS lab_check
|
||||
labLabel = item.labLabel
|
||||
labHint = item.labHint
|
||||
id_input = item.id_input
|
||||
isChecked= item.isChecked
|
||||
%]
|
||||
|
||||
[% CASE "tListe" %]
|
||||
[% idLab = item.labLabel %]
|
||||
[% idVis = 0 %]
|
||||
[% idSel = item.idSelect %]
|
||||
[% FuncJS = item.FuncJS %]
|
||||
|
||||
<HR>
|
||||
<BR>
|
||||
|
||||
[% WRAPPER tlistIL
|
||||
idLabel = idLab
|
||||
idSelect = idSel
|
||||
nbVisible = idVis
|
||||
%]
|
||||
|
||||
[% FOREACH item IN list_handlers %]
|
||||
[% PROCESS one_itemA
|
||||
idValue = item.idValue
|
||||
%]
|
||||
[% END %]
|
||||
[% END %]
|
||||
|
||||
|
||||
[% CASE "applyIL" %]
|
||||
[% IF flag_ShowEditHandler == 1 %]
|
||||
[% PROCESS buton_applyIL
|
||||
id_input = item.id_input
|
||||
id_value = item.id_value
|
||||
%]
|
||||
[% END %]
|
||||
<input id="idRemoHandler" type="hidden" name="hidDeleteHandler" value="[% lab_56 %]" class="bouton_0" >
|
||||
<BR>
|
||||
<HR>
|
||||
|
||||
|
||||
[% CASE "labedit" %]
|
||||
[% valdef = item.defValue %]
|
||||
|
||||
[% IF item.id_input == 'idDomain' %]
|
||||
[% valdef = itemToSel %]
|
||||
[% END %]
|
||||
|
||||
[% PROCESS lab_edit
|
||||
labLabel = item.labLabel
|
||||
labHint = item.labHint
|
||||
id_input = item.id_input
|
||||
defValue = valdef
|
||||
hidDefValue = item.defValue
|
||||
%]
|
||||
[% IF item.id_input == 'idDomain' %]
|
||||
<input id="idDelDom" type="submit" name="DeleteDomain" value="[% lab_57 %]" class="bouton_0"
|
||||
style="position: absolute; left: 50%;" >
|
||||
<BR><BR>
|
||||
[% END %]
|
||||
|
||||
[% CASE "labedit54" %]
|
||||
|
||||
[% IF item.id_input == 'slavecda' %]
|
||||
[% flagExpert = 1 %]
|
||||
<HR>
|
||||
<DIV class="ExpertStyle">
|
||||
[% END %]
|
||||
|
||||
[% PROCESS lab_edit54
|
||||
labLabel = item.labLabel
|
||||
labHint = item.labHint
|
||||
id_input = item.id_input
|
||||
defValue = item.defValue
|
||||
hidDefValue = item.defValue
|
||||
%]
|
||||
|
||||
[% CASE "combo_sessions" %]
|
||||
[% WRAPPER tcombo150B
|
||||
idLabel= labComboSel
|
||||
idSelect="cbSessions"
|
||||
%]
|
||||
[% FOREACH item IN combo_sessions %]
|
||||
[% tosel = '' %]
|
||||
[% IF item.idValue == itemSessionSel %]
|
||||
[% tosel = 'SELECTED' %]
|
||||
[% END %]
|
||||
[% PROCESS one_option
|
||||
idValue= item.idValue
|
||||
labOption= item.labOption
|
||||
isSelected= tosel
|
||||
%]
|
||||
[% END %]
|
||||
[% END %]
|
||||
|
||||
[% CASE "apply" %]
|
||||
<BR><BR>
|
||||
[% IF flagExpert == 1 %]
|
||||
</DIV>
|
||||
[% END %]
|
||||
|
||||
[% PROCESS buton_apply
|
||||
id_input = item.id_input
|
||||
id_value = item.id_value
|
||||
%]
|
||||
<BR><BR>
|
||||
|
||||
[% END %]
|
||||
[% END %]
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<script>
|
||||
document.forms[0].elements[0].focus();
|
||||
ShowMess( "[% message %]" );
|
||||
</script>
|
||||
|
||||
[%- PROCESS footer -%]
|
||||
<br><a class="PetiFont">[[% parent %] with [% template.name %] ] (version 0.01)</a>
|
||||
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
</BODY>
|
||||
</HTML>
|
||||
|
|
@ -0,0 +1,336 @@
|
|||
[% PROCESS templates/mycomposant.tt -%]
|
||||
|
||||
[%- PROCESS header
|
||||
title => title
|
||||
style => style
|
||||
-%]
|
||||
|
||||
<script>
|
||||
|
||||
function ShowRemoveHomed()
|
||||
{
|
||||
var cop = document.getElementById( 'bRemoveHomed' );
|
||||
cop.type = "Submit";
|
||||
cop.name = "RemoveHomed";
|
||||
}
|
||||
|
||||
function ShowAddDispo()
|
||||
{
|
||||
var cop = document.getElementById( 'bAddDispo' );
|
||||
cop.type = "Submit";
|
||||
cop.name = "AddDispo";
|
||||
}
|
||||
|
||||
function ShowMess( leMess )
|
||||
{
|
||||
if( leMess != 0 ){
|
||||
alert( leMess );
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<h1> [% title %] </h1>
|
||||
[% WRAPPER vari_tabs %]
|
||||
[% FOREACH item IN tab_session %]
|
||||
[% PROCESS one_tab
|
||||
link= item.link
|
||||
etatab= item.etatab
|
||||
labTab= item.labTab
|
||||
%]
|
||||
[% END %]
|
||||
[% END %]
|
||||
|
||||
|
||||
<form method=get>
|
||||
|
||||
<div class="ConfStyle">
|
||||
|
||||
[% lab6 = lab_6 %]
|
||||
[% lab7 = lab_7 %]
|
||||
[% lab42 = lab_42 %]
|
||||
[% lab43 = lab_43 %]
|
||||
[% flagExpert = 0 %]
|
||||
|
||||
[% itemToSel = option_selected %]
|
||||
[% flagHOMER = flag_homer %]
|
||||
[% homerChecked = '' %]
|
||||
[% IF flagHOMER == 1 %]
|
||||
[% homerChecked = 'CHECKED' %]
|
||||
[% END %]
|
||||
|
||||
[% WRAPPER tcombo150
|
||||
idLabel = labCombo
|
||||
idSelect = "cbHandlers"
|
||||
%]
|
||||
[% FOREACH item IN combo_handlers %]
|
||||
[% tosel = '' %]
|
||||
[% IF item.idValue == itemToSel %]
|
||||
[% tosel = 'SELECTED' %]
|
||||
[% END %]
|
||||
|
||||
[% PROCESS one_option
|
||||
idValue = item.idValue
|
||||
labOption = item.labOption
|
||||
isSelected = tosel
|
||||
%]
|
||||
[% END %]
|
||||
[% END %]
|
||||
|
||||
|
||||
[% selHOMING = '' %]
|
||||
[% selCOMBO = '' %]
|
||||
[% selGENER = '' %]
|
||||
|
||||
[% IF type_homer == 'MultiHomingType' %]
|
||||
[% selHOMING = 'SELECTED' %]
|
||||
[% ELSIF type_homer == 'GenericType' %]
|
||||
[% selGENER = 'SELECTED' %]
|
||||
[% ELSE %]
|
||||
[% selCOMBO = 'SELECTED' %]
|
||||
[% END %]
|
||||
|
||||
<B style="padding-left: 20px;">Type</B>
|
||||
<SELECT name=selTypeHandler class="ListSELECT" style="font-size: 1.0em;" onChange='this.form.submit();' >
|
||||
<OPTION value=MultiHomingType class="ListSELECTO" style="font-size: 1.0em;" [% selHOMING %] >Multi homing</OPTION>
|
||||
<OPTION value=CombinedType class="ListSELECTO" style="font-size: 1.0em;" [% selCOMBO %] >Combined</OPTION>
|
||||
<OPTION value=GenericType class="ListSELECTO" style="font-size: 1.0em;" [% selGENER %] >Generic</OPTION>
|
||||
</SELECT>
|
||||
|
||||
[% selHostName = '' %]
|
||||
[% selHostIPA = '' %]
|
||||
[% flagBYIP = 0 %]
|
||||
[% IF virtual_host == 'byName' %]
|
||||
[% selHostName = 'SELECTED' %]
|
||||
[% ELSE %]
|
||||
[% selHostIPA = 'SELECTED' %]
|
||||
[% flagBYIP = 1 %]
|
||||
[% END %]
|
||||
|
||||
<B style="padding-left: 20px;">Virtual Host</B>
|
||||
<SELECT name=selVirtualHost class="ListSELECT" style="font-size: 1.1em;" onChange='this.form.submit();' >
|
||||
<OPTION value=byIPAdress class="ListSELECTO" style="font-size: 1.1em;" [% selHostIPA %] >By IP adress</OPTION>
|
||||
<OPTION value=byName class="ListSELECTO" style="font-size: 1.1em;" [% selHostName %] >By Name</OPTION>
|
||||
</SELECT>
|
||||
|
||||
[% IF flagAddHandler %]
|
||||
<BR>
|
||||
<input id="idAssistCreate" type="submit" name="AssistCreator" value="[% lab_58 %]" class="bouton_0"
|
||||
style="position: absolute; left: 22%;" >
|
||||
[% END %]
|
||||
|
||||
<BR><BR><HR>
|
||||
|
||||
<input type=hidden name=mode value="[% mode %]" >
|
||||
<input type=hidden name=style value="[% css %]" >
|
||||
<input type=hidden name=idDomain value="[% domaine %]" >
|
||||
<input type=hidden name=ExHandler value="[% exHandler %]" >
|
||||
|
||||
|
||||
[% ENABLED_PROXY = 0 %]
|
||||
|
||||
[% FOREACH item IN composall %]
|
||||
[% SWITCH item.type %]
|
||||
|
||||
[% CASE "logLevList" %]
|
||||
<BR>
|
||||
<LABEL>[% item.labLabel %]</LABEL>
|
||||
<SELECT name='[% item.id_input %]' class="ListSELECT" >
|
||||
[% selElem = item.defValue %]
|
||||
[% IF !selElem %] [% selElem = 'notice' %] [% END %]
|
||||
[% FOREACH elem IN logLevels %]
|
||||
[% select = '' %]
|
||||
[% IF elem == selElem %] [% select = 'SELECTED' %] [% END %]
|
||||
<OPTION value='[% elem %]' class="ListSELECTA" [% select %] >[% elem %]</OPTION>
|
||||
[% END %]
|
||||
</SELECT>
|
||||
<i>[% item.labHint %]</i>
|
||||
<BR>
|
||||
|
||||
[% CASE "listAllNone" %]
|
||||
<BR>
|
||||
<LABEL>[% item.labLabel %]</LABEL>
|
||||
<SELECT name=selAllow class="ListSELECT" >
|
||||
[% selallnone = '' %]
|
||||
[% IF item.defValue == 'ALL' %] [% selallnone = 'SELECTED' %] [% END %]
|
||||
<OPTION value=ALL class="ListSELECTA" [% selallnone %] >ALL</OPTION>
|
||||
[% selallnone = '' %]
|
||||
[% IF item.defValue == 'NONE' %] [% selallnone = 'SELECTED' %] [% END %]
|
||||
<OPTION value=NONE class="ListSELECTA" [% selallnone %] >NONE</OPTION>
|
||||
</SELECT>
|
||||
<i>[% item.labHint %]</i>
|
||||
<BR>
|
||||
|
||||
[% CASE "labeditLWP" %]
|
||||
[% IF ENABLED_PROXY %]
|
||||
[% PROCESS lab_edit
|
||||
labLabel = item.labLabel
|
||||
labHint = item.labHint
|
||||
id_input = item.id_input
|
||||
defValue = item.defValue
|
||||
hidDefValue = item.defValue
|
||||
%]
|
||||
[% END %]
|
||||
|
||||
[% CASE "labedit" %]
|
||||
[% valdef = item.defValue %]
|
||||
|
||||
[% IF item.id_input == 'idHandler' %]
|
||||
[% valdef = itemToSel %]
|
||||
[% END %]
|
||||
|
||||
[% IF item.id_input == 'PlugInPolicy' %]
|
||||
[% flagExpert = 1 %]
|
||||
<BR>
|
||||
<DIV class="ExpertStyle">
|
||||
<p style='font-size: 1.5em; text-align: center; font-weight: bold;'>C O R E</p>
|
||||
[% END %]
|
||||
|
||||
[% IF item.id_input == 'MotifIn' OR item.id_input == 'MotifOut' %]
|
||||
[% IF selCOMBO == 'SELECTED' %]
|
||||
[% PROCESS lab_edit
|
||||
labLabel = item.labLabel
|
||||
labHint = item.labHint
|
||||
id_input = item.id_input
|
||||
defValue = valdef
|
||||
hidDefValue = item.defValue
|
||||
%]
|
||||
[% END %]
|
||||
[% ELSE %]
|
||||
|
||||
[% IF item.id_input == 'IPAdress' %]
|
||||
[% IF flagBYIP %]
|
||||
[% PROCESS lab_edit
|
||||
labLabel = item.labLabel
|
||||
labHint = item.labHint
|
||||
id_input = item.id_input
|
||||
defValue = valdef
|
||||
hidDefValue = item.defValue
|
||||
%]
|
||||
[% END %]
|
||||
[% ELSE %]
|
||||
[% PROCESS lab_edit
|
||||
labLabel = item.labLabel
|
||||
labHint = item.labHint
|
||||
id_input = item.id_input
|
||||
defValue = valdef
|
||||
hidDefValue = item.defValue
|
||||
%]
|
||||
[% END %]
|
||||
[% END %]
|
||||
|
||||
|
||||
[% IF item.id_input == 'idHandler' AND !flagAddHandler AND flagHOMER == 1 %]
|
||||
[% INCLUDE DeuxListes %]
|
||||
[% END %]
|
||||
|
||||
[% CASE "labedit54" %]
|
||||
|
||||
[% PROCESS lab_edit54
|
||||
labLabel = item.labLabel
|
||||
labHint = item.labHint
|
||||
id_input = item.id_input
|
||||
defValue = item.defValue
|
||||
hidDefValue = item.defValue
|
||||
%]
|
||||
|
||||
[% CASE "labcheck" %]
|
||||
[% IF item.id_input == 'Recursive' %]
|
||||
[% IF ENABLED_PROXY %]
|
||||
[% PROCESS lab_check
|
||||
labLabel = item.labLabel
|
||||
labHint = item.labHint
|
||||
id_input = item.id_input
|
||||
isChecked= item.isChecked
|
||||
%]
|
||||
</DIV>
|
||||
[% END %]
|
||||
[% ELSE %]
|
||||
[% PROCESS lab_check
|
||||
labLabel = item.labLabel
|
||||
labHint = item.labHint
|
||||
id_input = item.id_input
|
||||
isChecked= item.isChecked
|
||||
%]
|
||||
[% END %]
|
||||
|
||||
[% CASE "labcheckLWP" %]
|
||||
[% IF item.isChecked == 'CHECKED' %]
|
||||
[% ENABLED_PROXY = 1 %]
|
||||
<DIV class="ExpertStyle">
|
||||
[% END %]
|
||||
[% PROCESS lab_checkLWP
|
||||
labLabel = item.labLabel
|
||||
labHint = item.labHint
|
||||
id_input = item.id_input
|
||||
isChecked= item.isChecked
|
||||
%]
|
||||
|
||||
[% CASE "apply" %]
|
||||
<BR><BR>
|
||||
[% IF flagExpert == 1 %]
|
||||
</DIV>
|
||||
[% END %]
|
||||
|
||||
[% PROCESS buton_apply
|
||||
id_input = item.id_input
|
||||
id_value = item.id_value
|
||||
%]
|
||||
<BR><BR>
|
||||
|
||||
[% END %]
|
||||
[% END %]
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<script>
|
||||
document.forms[0].elements[0].focus();
|
||||
ShowMess( "[% message %]" );
|
||||
</script>
|
||||
|
||||
|
||||
[%- PROCESS footer -%]
|
||||
<br><a class="PetiFont">[[% parent %] with [% template.name %] ] (version 0.01)</a>
|
||||
|
||||
|
||||
[% BLOCK DeuxListes %]
|
||||
|
||||
<DIV class="ExpertStyle">
|
||||
<BR><BR>
|
||||
[% WRAPPER tlistIL
|
||||
idLabel = lab42
|
||||
idSelect = 'listHomed'
|
||||
FuncJS = 'ShowRemoveHomed();'
|
||||
nbVisible = 5
|
||||
%]
|
||||
|
||||
[% FOREACH item IN homed_handlers %]
|
||||
[% PROCESS one_item
|
||||
idValue = item
|
||||
%]
|
||||
[% END %]
|
||||
[% END %]
|
||||
|
||||
<input id="bRemoveHomed" type="hidden" name="RemoveHomedHid" value="[% lab7 %]" class="bouton_0" >
|
||||
|
||||
<BR><BR><HR><BR><BR>
|
||||
|
||||
[% WRAPPER tlistIL
|
||||
idLabel = lab43
|
||||
idSelect = 'listDispo'
|
||||
FuncJS = 'ShowAddDispo();'
|
||||
nbVisible = 5
|
||||
%]
|
||||
|
||||
[% FOREACH item IN dispo_handlers %]
|
||||
[% PROCESS one_item
|
||||
idValue = item
|
||||
%]
|
||||
[% END %]
|
||||
[% END %]
|
||||
|
||||
<input id="bAddDispo" type="hidden" name="AddDispoHid" value="[% lab6 %]" class="bouton_0" >
|
||||
<BR><BR>
|
||||
</DIV>
|
||||
|
||||
[% END %]
|
|
@ -0,0 +1,172 @@
|
|||
[% PROCESS templates/mycomposant.tt -%]
|
||||
|
||||
[%- PROCESS header
|
||||
title => title
|
||||
style => style
|
||||
-%]
|
||||
|
||||
<script>
|
||||
|
||||
function ShowMess( leMess )
|
||||
{
|
||||
if( leMess != 0 ){
|
||||
alert( leMess );
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<h1> [% title %] </h1>
|
||||
[% WRAPPER vari_tabs %]
|
||||
[% FOREACH item IN tab_session %]
|
||||
[% PROCESS one_tab
|
||||
link= item.link
|
||||
etatab= item.etatab
|
||||
labTab= item.labTab
|
||||
%]
|
||||
[% END %]
|
||||
[% END %]
|
||||
|
||||
|
||||
<div class="ConfStyle">
|
||||
[% helpText %]
|
||||
</div>
|
||||
|
||||
<form method=get>
|
||||
|
||||
<div class="ConfStyle">
|
||||
|
||||
[% lab6 = lab_6 %]
|
||||
[% lab7 = lab_7 %]
|
||||
[% lab42 = lab_42 %]
|
||||
[% lab43 = lab_43 %]
|
||||
[% flagExpert = 0 %]
|
||||
|
||||
<BR><BR>
|
||||
<B style="padding-left: 20px;">Type</B>
|
||||
<SELECT name=selTypeHandler class="ListSELECT" style="font-size: 1.0em;" >
|
||||
|
||||
<OPTION value=GenericType class="ListSELECTO" style="font-size: 1.0em;" SELECTED >Generic</OPTION>
|
||||
|
||||
</SELECT>
|
||||
|
||||
[% selHostName = '' %]
|
||||
[% selHostIPA = '' %]
|
||||
[% IF virtual_host == 'byName' %]
|
||||
[% selHostName = 'SELECTED' %]
|
||||
[% ELSE %]
|
||||
[% selHostIPA = 'SELECTED' %]
|
||||
[% END %]
|
||||
|
||||
<B style="padding-left: 20px;">Virtual Host</B>
|
||||
<SELECT name=selVirtualHost class="ListSELECT" style="font-size: 1.1em;" >
|
||||
<OPTION value=byIPAdress class="ListSELECTO" style="font-size: 1.1em;" [% selHostIPA %] >By IP adress</OPTION>
|
||||
<OPTION value=byName class="ListSELECTO" style="font-size: 1.1em;" [% selHostName %] >By Name</OPTION>
|
||||
</SELECT>
|
||||
|
||||
|
||||
<BR><BR><HR>
|
||||
|
||||
<input type=hidden name=mode value="[% mode %]" >
|
||||
<input type=hidden name=style value="[% css %]" >
|
||||
<input type=hidden name=idDomain value="[% domaine %]" >
|
||||
<input type=hidden name=ExHandler value="[% exHandler %]" >
|
||||
|
||||
|
||||
[% FOREACH item IN composall %]
|
||||
[% SWITCH item.type %]
|
||||
|
||||
[% CASE "listAllNone" %]
|
||||
<BR>
|
||||
<LABEL>[% item.labLabel %]</LABEL>
|
||||
<SELECT name=selAllow class="ListSELECT" >
|
||||
[% selallnone = '' %]
|
||||
[% IF item.defValue == 'ALL' %] [% selallnone = 'SELECTED' %] [% END %]
|
||||
<OPTION value=ALL class="ListSELECTO" [% selallnone %] >ALL</OPTION>
|
||||
[% selallnone = '' %]
|
||||
[% IF item.defValue == 'NONE' %] [% selallnone = 'SELECTED' %] [% END %]
|
||||
<OPTION value=NONE class="ListSELECTO" [% selallnone %] >NONE</OPTION>
|
||||
</SELECT>
|
||||
<i>[% item.labHint %]</i>
|
||||
<BR>
|
||||
|
||||
[% CASE "labedit" %]
|
||||
[% PROCESS lab_edit
|
||||
labLabel = item.labLabel
|
||||
labHint = item.labHint
|
||||
id_input = item.id_input
|
||||
defValue = item.defValue
|
||||
hidDefValue = item.defValue
|
||||
%]
|
||||
|
||||
|
||||
[% CASE "labedit54" %]
|
||||
|
||||
[% PROCESS lab_edit54
|
||||
labLabel = item.labLabel
|
||||
labHint = item.labHint
|
||||
id_input = item.id_input
|
||||
defValue = item.defValue
|
||||
hidDefValue = item.defValue
|
||||
%]
|
||||
|
||||
[% CASE "labcheck" %]
|
||||
[% PROCESS lab_check
|
||||
labLabel = item.labLabel
|
||||
labHint = item.labHint
|
||||
id_input = item.id_input
|
||||
isChecked= item.isChecked
|
||||
%]
|
||||
|
||||
[% CASE "labcheckLWP" %]
|
||||
[% PROCESS lab_check
|
||||
labLabel = item.labLabel
|
||||
labHint = item.labHint
|
||||
id_input = item.id_input
|
||||
isChecked= item.isChecked
|
||||
%]
|
||||
|
||||
[% CASE "apply" %]
|
||||
<BR><BR>
|
||||
[% IF flagExpert == 1 %]
|
||||
</DIV>
|
||||
[% END %]
|
||||
|
||||
[% PROCESS buton_apply
|
||||
id_input = item.id_input
|
||||
id_value = item.id_value
|
||||
%]
|
||||
<BR><BR>
|
||||
|
||||
[% END %]
|
||||
[% END %]
|
||||
<BR><BR>
|
||||
|
||||
<input type="Hidden" name="IDX_WIZARD" value="[% IDX_ASSIST %]" >
|
||||
|
||||
<div align="center">
|
||||
[% IF IDX_ASSIST > 0 %]
|
||||
<input type="Button" name="AssistCreate_Back" value="[% lab_prev %]" class="bouton_0"
|
||||
onClick="self.location.href='javascript:history.back()'">
|
||||
[% END %]
|
||||
[% IF IDX_ASSIST < 3 %]
|
||||
<input type="Submit" name="AssistCreate_Next" value="[% lab_next %]" class="bouton_0">
|
||||
[% END %]
|
||||
[% IF IDX_ASSIST == 3 %]
|
||||
<input type="Submit" name="AssistCreate_Next" value="[% lab_27 %]" class="bouton_0">
|
||||
[% END %]
|
||||
</div>
|
||||
|
||||
<BR><BR>
|
||||
</form>
|
||||
</div>
|
||||
<script>
|
||||
document.forms[0].elements[0].focus();
|
||||
ShowMess( "[% message %]" );
|
||||
</script>
|
||||
|
||||
|
||||
[%- PROCESS footer -%]
|
||||
<br><a class="PetiFont">[[% parent %] with [% template.name %] ] (version 0.01)</a>
|
||||
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<LINK rel="stylesheet" type="text/css" href="/lemonconf/css/conf_style.css">
|
||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
|
||||
<META NAME="Description" CONTENT="The initial installation of Debian apache-perl.">
|
||||
<TITLE>[% title %]</TITLE>
|
||||
</HEAD>
|
||||
<BODY BGCOLOR="#FFFFFF" LINK="#0000EF" VLINK="#55188A" ALINK="#FF0000">
|
||||
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
[% PROCESS templates/mycomposant.tt -%]
|
||||
[%- PROCESS header
|
||||
title => title
|
||||
style => style
|
||||
-%]
|
||||
<h1> [% title %] </h1>
|
||||
[% PROCESS tabs_4 %]
|
||||
[% WRAPPER div_pre %]
|
||||
<FORM action="index.cgi" method=get >
|
||||
[%- PROCESS radio_col
|
||||
autosubmit => '1'
|
||||
title =>'Style:'
|
||||
nom => 'style'
|
||||
label_0 => 'Old Maps'
|
||||
label_1 => 'Electro'
|
||||
label_2 => 'Golf'
|
||||
checked => checked
|
||||
-%]
|
||||
</FORM>
|
||||
[% about %]
|
||||
[% END %]
|
||||
[%- PROCESS footer -%]
|
|
@ -0,0 +1,21 @@
|
|||
[% PROCESS /var/www/lemonconfig/templates/mycomposant.tt -%]
|
||||
[%- PROCESS header
|
||||
style => 'simpage'
|
||||
title => 'ma premiere lemon'
|
||||
-%]
|
||||
<h1> Lemonldap configurateur</h1>
|
||||
<hr>
|
||||
<FORM action="/guilemon/index.cgi" method=get >
|
||||
|
||||
[%- PROCESS radio
|
||||
autosubmit => '1'
|
||||
title =>'Style:'
|
||||
nom => 'style'
|
||||
label_0 => 'Old Maps'
|
||||
label_1 => 'Electro'
|
||||
checked => '1'
|
||||
-%]
|
||||
|
||||
</FORM>
|
||||
<hr>
|
||||
[%- PROCESS footer -%]
|
|
@ -0,0 +1,21 @@
|
|||
[% PROCESS /var/www/lemonconfig/templates/mycomposant.tt -%]
|
||||
[%- PROCESS header
|
||||
style => 'conf_style'
|
||||
title => 'ma premiere lemon'
|
||||
-%]
|
||||
<h1> Lemonldap configurateur</h1>
|
||||
<hr>
|
||||
<FORM action="/guilemon/index.cgi" method=get >
|
||||
|
||||
[%- PROCESS radio
|
||||
autosubmit => '1'
|
||||
title =>'Style:'
|
||||
nom => 'style'
|
||||
label_0 => 'Old Maps'
|
||||
label_1 => 'Electro'
|
||||
checked => '0'
|
||||
-%]
|
||||
|
||||
</FORM>
|
||||
<hr>
|
||||
[%- PROCESS footer -%]
|
|
@ -0,0 +1,425 @@
|
|||
[%# --------header ------------------------------------------------------ %]
|
||||
[% BLOCK header %]
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<LINK rel="stylesheet" type="text/css" href="/lemongui4webmin/css/[% style %].css">
|
||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
|
||||
<META NAME="Description" CONTENT="The initial installation of Debian apache-perl.">
|
||||
<TITLE>[% title %]</TITLE>
|
||||
</HEAD>
|
||||
<BODY BGCOLOR="#FFFFFF" LINK="#0000EF" VLINK="#55188A" ALINK="#FF0000">
|
||||
[% PROCESS double_bouton_tl
|
||||
nom_0 =>'module_config'
|
||||
label_0 =>'module config'
|
||||
link_0 => '/config.cgi?lemongui4webmin'
|
||||
nom_1 =>'webmin'
|
||||
label_1 =>'webmin'
|
||||
link_1 => '/'
|
||||
%]
|
||||
|
||||
[% haut= {
|
||||
nom = 'switch_mode'
|
||||
label = label
|
||||
link = '/lemongui4webmin/'
|
||||
cgi =cgi
|
||||
style= css
|
||||
}
|
||||
haut.link ="$haut.link$haut.cgi?mode=$haut.label&style=$haut.style"
|
||||
%]
|
||||
[% IF label != '0' %]
|
||||
[% PROCESS bouton_tr
|
||||
nom =>haut.nom
|
||||
label =>haut.label
|
||||
link => haut.link
|
||||
%]
|
||||
[% END %]
|
||||
|
||||
[% IF mode == 'Expert' %]
|
||||
<img src='/lemongui4webmin/images/theExpert.jpg' style="position:absolute ; left: 40%; top: 2px;">
|
||||
[% ELSE %]
|
||||
<img src='/lemongui4webmin/images/theNormal.jpg' style="position:absolute ; left: 40%; top: 2px;">
|
||||
[% END %]
|
||||
|
||||
|
||||
|
||||
[% END %]
|
||||
|
||||
[%# --------footer ------------------------------------------------------ %]
|
||||
|
||||
[% BLOCK footer %]
|
||||
</BODY>
|
||||
</HTML>
|
||||
[% END %]
|
||||
|
||||
[%# --------radio 2 ------------------------------------------------------ %]
|
||||
[% BLOCK radio_2 %]
|
||||
<LABEL>[%- title -%]</LABEL>
|
||||
[% IF vertical == 1 %]
|
||||
<P>
|
||||
[% END %]
|
||||
<SPAN class = "OPTION">[% label_0 %]</SPAN>
|
||||
<input type="radio" name="[% nom %]" value="[% label_0 %]"
|
||||
[%- IF checked == '0' -%]
|
||||
checked
|
||||
[%- END -%]
|
||||
[% IF autosubmit == '1' %]
|
||||
onChange ="this.form.submit()"
|
||||
[% END %]
|
||||
|
||||
class="OPTION">
|
||||
[% IF vertical == 1 %]
|
||||
<P>
|
||||
[% END %]
|
||||
<SPAN class = "OPTION">[% label_1 %]</SPAN>
|
||||
<input type="radio" name="[% nom %]" value="[% label_1 %]"
|
||||
[%- IF checked == '1' -%]
|
||||
checked
|
||||
[%- END -%]
|
||||
[% IF autosubmit == '1' %]
|
||||
onChange ="this.form.submit()"
|
||||
[% END %]
|
||||
|
||||
class="OPTION">
|
||||
[% IF vertical == 1 %]
|
||||
<P>
|
||||
[% END %]
|
||||
[% END %]
|
||||
|
||||
|
||||
[%# --------radio 3 ------------------------------------------------------ %]
|
||||
[% BLOCK radio_3 %]
|
||||
<LABEL>[%- title -%]</LABEL>
|
||||
[% IF vertical == 1 %]
|
||||
<BR>
|
||||
[% END %]
|
||||
<SPAN class = "OPTION">[% label_0 %]</SPAN>
|
||||
<input type="radio" name="[% nom %]" value="[% label_0 %]"
|
||||
[%- IF checked == '0' -%]
|
||||
checked
|
||||
[%- END -%]
|
||||
[% IF autosubmit == '1' %]
|
||||
onChange ="this.form.submit()"
|
||||
[% END %]
|
||||
|
||||
class="OPTION">
|
||||
[% IF vertical == 1 %]
|
||||
<BR>
|
||||
[% END %]
|
||||
<SPAN class = "OPTION">[% label_1 %]</SPAN>
|
||||
<input type="radio" name="[% nom %]" value="[% label_1 %]"
|
||||
[%- IF checked == '1' -%]
|
||||
checked
|
||||
[%- END -%]
|
||||
[% IF autosubmit == '1' %]
|
||||
onChange ="this.form.submit()"
|
||||
[% END %]
|
||||
|
||||
class="OPTION">
|
||||
[% IF vertical == 1 %]
|
||||
<BR>
|
||||
[% END %]
|
||||
<SPAN class = "OPTION">[% label_2 %]</SPAN>
|
||||
<input type="radio" name="[% nom %]" value="[% label_2 %]"
|
||||
[%- IF checked == '2' -%]
|
||||
checked
|
||||
[%- END -%]
|
||||
[% IF autosubmit == '1' %]
|
||||
onChange ="this.form.submit()"
|
||||
[% END %]
|
||||
|
||||
class="OPTION">
|
||||
[% IF vertical == 1 %]
|
||||
<BR>
|
||||
[% END %]
|
||||
[% END %]
|
||||
|
||||
[%# --------Presentation extrait de code DIV - PRE -------------- %]
|
||||
[% BLOCK div_pre %]
|
||||
<div class="ConfStyle">
|
||||
<pre>
|
||||
[% content %]
|
||||
</pre>
|
||||
</div>
|
||||
[% END %]
|
||||
|
||||
[%# ------------------ ONGLETS nb variable vari_tabs -------------- %]
|
||||
[% BLOCK vari_tabs %]
|
||||
<div class="tabs">
|
||||
[% content %]
|
||||
</div>
|
||||
[% END %]
|
||||
|
||||
[% BLOCK one_tab %]
|
||||
<a href= "[% link %]" class="[% etatab %]" >
|
||||
[% labTab %]
|
||||
</a>
|
||||
[% END %]
|
||||
|
||||
|
||||
[%# ------------------ SELECT-OPTION nb variable tcombo -------------- %]
|
||||
[% BLOCK tcombo %]
|
||||
<BR>
|
||||
<LABEL style="width: 180px; ">[% idLabel %]</LABEL>
|
||||
<SELECT name=[% idSelect %] class="SELECT" onChange ="this.form.submit()">
|
||||
|
||||
[% content %]
|
||||
|
||||
</SELECT>
|
||||
<BR>
|
||||
<BR>
|
||||
[% END %]
|
||||
|
||||
[%# ------------------ SELECT-OPTION nb variable tcombo -------------- %]
|
||||
[% BLOCK tcombo150 %]
|
||||
<BR>
|
||||
<LABEL style="width: 150px; ">[% idLabel %]</LABEL>
|
||||
<SELECT name=[% idSelect %] class="SELECT" onChange ="this.form.submit()">
|
||||
|
||||
[% content %]
|
||||
|
||||
</SELECT>
|
||||
[% END %]
|
||||
|
||||
[% BLOCK tcombo150B %]
|
||||
<BR>
|
||||
<LABEL style="width: 150px; ">[% idLabel %]</LABEL>
|
||||
<SELECT name=[% idSelect %] class="SELECT" >
|
||||
|
||||
[% content %]
|
||||
|
||||
</SELECT>
|
||||
[% END %]
|
||||
|
||||
|
||||
[% BLOCK one_option %]
|
||||
<OPTION value="[% idValue %]" class="SELECTO" [% isSelected %]>[% labOption %]</OPTION>
|
||||
[% END %]
|
||||
|
||||
[%# ------------------ SELECT-OPTION WITH SIZE variable tlist -------------- %]
|
||||
[% BLOCK tlist %]
|
||||
<BR>
|
||||
<LABEL style="width: 200px; font-size: 0.9em; ">[% idLabel %]</LABEL>
|
||||
<SELECT name=[% idSelect %] class="ListSELECT" SIZE=[% nbVisible %] " onChange="[% FuncJS %]">
|
||||
|
||||
[% content %]
|
||||
|
||||
</SELECT>
|
||||
<BR>
|
||||
<BR>
|
||||
[% END %]
|
||||
|
||||
[% BLOCK tlistIL %]
|
||||
|
||||
<LABEL style="width: 150px; font-size: 0.9em; ">[% idLabel %]</LABEL>
|
||||
<SELECT name=[% idSelect %] class="ListSELECT" SIZE=[% nbVisible %] " onChange="[% FuncJS %]">
|
||||
|
||||
[% content %]
|
||||
|
||||
</SELECT>
|
||||
[% END %]
|
||||
|
||||
[% BLOCK one_item %]
|
||||
<OPTION value=[% idValue %] class="ListSELECTO" >[% idValue %]</OPTION>
|
||||
[% END %]
|
||||
[% BLOCK one_itemA %]
|
||||
<OPTION value=[% idValue %] class="ListSELECTA" >[% idValue %]</OPTION>
|
||||
[% END %]
|
||||
|
||||
[%# ------------------ TROIS PETITS ONGLETS tabs_3 -------------- %]
|
||||
[% BLOCK tabs_3 %]
|
||||
<div class="tabs">
|
||||
<a href= "[% link_0 %]" class="[% etatab_0 %]" >
|
||||
[% labTab_0 %]
|
||||
</a>
|
||||
<a href= "[% link_1 %]" class="[% etatab_1 %]">
|
||||
[% labTab_1 %]
|
||||
</a>
|
||||
<a href= "[% link_2 %]" class="[% etatab_2 %]">
|
||||
[% labTab_2 %]
|
||||
</a>
|
||||
</div>
|
||||
[% END %]
|
||||
|
||||
[%# ------------------ QUATRE PETITS ONGLETS tabs_4 -------------- %]
|
||||
[% BLOCK tabs_4 %]
|
||||
<div class="tabs">
|
||||
<a href= "[% link_0 %]" class="[% etatab_0 %]" >
|
||||
[% labTab_0 %]
|
||||
</a>
|
||||
<a href= "[% link_1 %]" class="[% etatab_1 %]">
|
||||
[% labTab_1 %]
|
||||
</a>
|
||||
<a href= "[% link_2 %]" class="[% etatab_2 %]">
|
||||
[% labTab_2 %]
|
||||
</a>
|
||||
<a href= "[% link_3 %]" class="[% etatab_3 %]">
|
||||
[% labTab_3 %]
|
||||
</a>
|
||||
</div>
|
||||
[% END %]
|
||||
|
||||
[%# ------------------ DOUBLE-BOUTON - TOP LEFT -------------- %]
|
||||
[% BLOCK double_bouton_tl %]
|
||||
<div class="posit_TL">
|
||||
<input type="button" name="[% nom_0 %]" value="[% label_0 %]"
|
||||
onClick="self.location.href='[% link_0 %]'" class="bouton_0" >
|
||||
<input type="button" name="[% nom_1 %]" value="[% label_1 %]"
|
||||
onClick="self.location.href='[% link_1 %]'" class="bouton_0" >
|
||||
</div>
|
||||
[% END %]
|
||||
|
||||
[%# ------------------ SIMPLE-BOUTON - TOP RIGHT-------------- %]
|
||||
[% BLOCK bouton_tr %]
|
||||
<div class="posit_TR">
|
||||
<input type="button" name="[% nom %]" value="[% label %]"
|
||||
onClick="self.location.href='[% link %]'" class="bouton_0" >
|
||||
</div>
|
||||
[% END %]
|
||||
|
||||
[%# ------------------ BOUTON "EN LIGNE" -------------- %]
|
||||
[% BLOCK bouton_plus %]
|
||||
<input type="button" name="[% nom %]" value="[% label %]"
|
||||
onClick="self.location.href='[% link %]'" class="bouton_0" >
|
||||
[% END %]
|
||||
|
||||
[%# ------------------ BOUTON "ADD" -------------- %]
|
||||
[% BLOCK bouton_add %]
|
||||
<input type="button" name="[% nom %]" value="[% label %]"
|
||||
onClick="addServeurPort()" class="bouton_0" >
|
||||
[% END %]
|
||||
|
||||
|
||||
[%# ------------------ 3 ligne de boutons radios -------------- %]
|
||||
[% BLOCK radio_col %]
|
||||
<div class="LABG">[% title %]</div><BR>
|
||||
<input type="radio" name="[% nom %]" value="[% label_0 %]"
|
||||
[%- IF checked == '0' -%]
|
||||
checked
|
||||
[%- END -%]
|
||||
[% IF autosubmit == '1' %]
|
||||
onChange ="this.form.submit()"
|
||||
[% END %]
|
||||
<SPAN class = "OPTION">[% label_0 %]</SPAN><BR>
|
||||
<input type="radio" name="[% nom %]" value="[% label_1 %]"
|
||||
[%- IF checked == '1' -%]
|
||||
checked
|
||||
[% END %]
|
||||
[% IF autosubmit == '1' %]
|
||||
onChange ="this.form.submit()"
|
||||
[% END %]
|
||||
<SPAN class = "OPTION">[% label_1 %]</SPAN><BR>
|
||||
<input type="radio" name="[% nom %]" value="[% label_2 %]"
|
||||
[%- IF checked == '2' -%]
|
||||
checked
|
||||
[%- END -%]
|
||||
[% IF autosubmit == '1' %]
|
||||
onChange ="this.form.submit()"
|
||||
[% END %]
|
||||
<SPAN class = "OPTION">[% label_2 %]</SPAN>
|
||||
[% END %]
|
||||
|
||||
[%# ------------------ LABEL et INPUT ------------- %]
|
||||
[% BLOCK lab_edit %]
|
||||
<br>
|
||||
<LABEL>[% labLabel %]</LABEL>
|
||||
<INPUT name="[% id_input %]" size="27" maxlength="27" VALUE="[% defValue %]" class="INPUTR" >
|
||||
<i>[% labHint %]</i>
|
||||
<INPUT type=hidden name=_[% id_input %] VALUE="[% hidDefValue %]" >
|
||||
<BR>
|
||||
[% END %]
|
||||
|
||||
|
||||
|
||||
[%# ------------------ LABEL et INPUT 54 car ------------- %]
|
||||
[% BLOCK lab_edit54 %]
|
||||
<br>
|
||||
<LABEL>[% labLabel %]</LABEL>
|
||||
<INPUT name="[% id_input %]" size="40" maxlength="54" VALUE="[% defValue %]" class="INPUTR" >
|
||||
<i>[% labHint %]</i>
|
||||
<INPUT type=hidden name=_[% id_input %] VALUE="[% hidDefValue %]" >
|
||||
<BR>
|
||||
[% END %]
|
||||
|
||||
[%# ----------------- CHECK BOX ------------------- %]
|
||||
[% BLOCK lab_check %]
|
||||
<br>
|
||||
<LABEL>[% labLabel %]</LABEL>
|
||||
<INPUT type="checkbox" name=[% id_input %] class="OPTION" [% isChecked %]>
|
||||
<i>[% labHint %]</i>
|
||||
<BR>
|
||||
[% END %]
|
||||
|
||||
[% BLOCK lab_checkLWP %]
|
||||
<br>
|
||||
<LABEL>[% labLabel %]</LABEL>
|
||||
<INPUT type="checkbox" name=[% id_input %] class="OPTION" [% isChecked %] OnChange='this.form.submit();' >
|
||||
<i>[% labHint %]</i>
|
||||
<BR>
|
||||
[% END %]
|
||||
|
||||
|
||||
[%# ----------------- CHECK BOX inline ------------------- %]
|
||||
[% BLOCK lab_checkIL %]
|
||||
<B style="Display: inline; Margin-left: 25px;">[% labLabel %]</B>
|
||||
<INPUT type="checkbox" name=[% id_input %] class="OPTION" [% isChecked %] OnChange="[% funcOnChange %]" >
|
||||
<i>[% labHint %]</i>
|
||||
[% END %]
|
||||
|
||||
|
||||
[%# ----------------- BUTTON SUBMIT ------------------- %]
|
||||
[% BLOCK buton_submit %]
|
||||
<br>
|
||||
<br>
|
||||
<div class="posit_C">
|
||||
<INPUT type="Submit" name=[% id_input %] class="bouton_0" >
|
||||
</div>
|
||||
<br>
|
||||
[% END %]
|
||||
|
||||
[%# ----------------- BUTTON APPLY ------------------- %]
|
||||
[% BLOCK buton_apply %]
|
||||
<div class="posit_C">
|
||||
<INPUT type="Submit" name=[% id_input %] class="bouton_0" Value="[% id_value %]">
|
||||
</div>
|
||||
[% END %]
|
||||
|
||||
[% BLOCK buton_applyIL %]
|
||||
<div style="DISPLAY: inline; Margin-left: 25px;">
|
||||
<INPUT type="Submit" name=[% id_input %] class="bouton_0" Value="[% id_value %]">
|
||||
</div>
|
||||
[% END %]
|
||||
|
||||
[%# ------------------ BOUTON "ADD_REMOVE" -------------- %]
|
||||
[% BLOCK bouton_addRemove %]
|
||||
<br>
|
||||
<br>
|
||||
<div class="posit_C">
|
||||
<input type="Submit" name=[% nom_a %] value=[% label_a %]
|
||||
onClick="[% funcJS_a %]" class="bouton_0" >
|
||||
<input id="[% idBRemo %]" type="hidden" name=[% nom_r %] value=[% label_r %]
|
||||
onClick="[% funcJS_r %]" class="bouton_0" >
|
||||
</div>
|
||||
<BR>
|
||||
[% END %]
|
||||
|
||||
[% BLOCK bouton_addRemove2 %]
|
||||
<br>
|
||||
<br>
|
||||
<div class="posit_C">
|
||||
<input type="Submit" name="[% nom_a %]" value="[% label_a %]"
|
||||
onClick="[% funcJS_a %]" class="bouton_0" >
|
||||
<input id="[% idBRemo %]" type="[% btype %]" name="[% nom_r %]" value="[% label_r %]"
|
||||
onClick="[% funcJS_r %]" class="bouton_0" >
|
||||
</div>
|
||||
<BR>
|
||||
[% END %]
|
||||
|
||||
[% BLOCK bouton_addRemoveIL %]
|
||||
<div class="posit_C">
|
||||
<input type="Submit" name=[% nom_a %] value="[% label_a %]"
|
||||
onClick="[% funcJS_a %]" class="bouton_0" >
|
||||
<input id="[% idBRemo %]" type="hidden" name="[% nom_r %]" value="[% label_r %]"
|
||||
onClick="[% funcJS_r %]" class="bouton_0" >
|
||||
</div>
|
||||
[% END %]
|
|
@ -0,0 +1,4 @@
|
|||
<SPAN class = "OPTION">[% label_0 %]</SPAN>
|
||||
<input type="radio" name=[% nom %] value="0" class="OPTION">
|
||||
<SPAN class = "OPTION">[% label_1 %]</SPAN>
|
||||
<input type="radio" name=[% nom %] value="1" class="OPTION">
|
|
@ -0,0 +1,5 @@
|
|||
<LABEL>[% label %]</LABEL>
|
||||
<SPAN class = "OPTION">OUI</SPAN>
|
||||
<input type="radio" name=[% nom %] value="1" class="OPTION">
|
||||
<SPAN class = "OPTION">NON</SPAN>
|
||||
<input type="radio" name=[% nom %] value="0" class="OPTION">
|
|
@ -0,0 +1,158 @@
|
|||
[% PROCESS templates/mycomposant.tt -%]
|
||||
|
||||
[%- PROCESS header
|
||||
title => title
|
||||
style => style
|
||||
-%]
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
function ShowRemoveServer()
|
||||
{
|
||||
var cop = document.getElementById( 'idRemo' );
|
||||
cop.type = "Submit";
|
||||
cop.name = "bRemove";
|
||||
}
|
||||
function ShowRemoveLocalServer()
|
||||
{
|
||||
var cop = document.getElementById( 'idRemoLoc' );
|
||||
cop.type = "Submit";
|
||||
cop.name = "bRemoveLoc";
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<h1> [% title %] </h1>
|
||||
[% WRAPPER vari_tabs %]
|
||||
[% FOREACH item IN tab_session %]
|
||||
[% PROCESS one_tab
|
||||
link= item.link
|
||||
etatab= item.etatab
|
||||
labTab= item.labTab
|
||||
%]
|
||||
[% END %]
|
||||
[% END %]
|
||||
|
||||
<form method=get>
|
||||
|
||||
[% itemToSel = option_selected %]
|
||||
[% labCombo = label_combo %]
|
||||
|
||||
[% WRAPPER tcombo
|
||||
idLabel= labCombo
|
||||
idSelect="cbSession"
|
||||
%]
|
||||
[% FOREACH item IN combo_session %]
|
||||
[% tosel = '' %]
|
||||
[% IF item.idValue == itemToSel %]
|
||||
[% tosel = 'SELECTED' %]
|
||||
[% END %]
|
||||
|
||||
[% PROCESS one_option
|
||||
idValue= item.idValue
|
||||
labOption= item.labOption
|
||||
isSelected= tosel
|
||||
%]
|
||||
[% END %]
|
||||
[% END %]
|
||||
|
||||
<div class="ConfStyle">
|
||||
|
||||
<input type=hidden name=mode value="[% mode %]" >
|
||||
<input type=hidden name=style value="[% css %]" >
|
||||
|
||||
[% flagFirst = 1 %]
|
||||
|
||||
[% FOREACH item IN composall %]
|
||||
[% SWITCH item.type %]
|
||||
[% CASE "labedit" %]
|
||||
|
||||
[% valdef = item.defValue %]
|
||||
[% IF item.id_input == 'idSession' %]
|
||||
[% valdef = itemToSel %]
|
||||
[% END %]
|
||||
|
||||
[% PROCESS lab_edit
|
||||
labLabel = item.labLabel
|
||||
labHint = item.labHint
|
||||
id_input = item.id_input
|
||||
defValue = valdef
|
||||
hidDefValue = item.defValue
|
||||
%]
|
||||
[% IF item.id_input == 'idTimeOut' %]
|
||||
<HR>
|
||||
[% END %]
|
||||
|
||||
|
||||
[% CASE "addRemove" %]
|
||||
[% PROCESS bouton_addRemove
|
||||
nom_a = item.nom_a
|
||||
label_a = item.label_a
|
||||
funcJS_a = item.funcJS_a
|
||||
nom_r = item.nom_r
|
||||
label_r = item.label_r
|
||||
funcJS_r = item.funcJS_r
|
||||
idBRemo = item.idBRemo
|
||||
%]
|
||||
|
||||
|
||||
[% CASE "tListe" %]
|
||||
[% idLab = item.labLabel %]
|
||||
[% idVis = item.nbVisible %]
|
||||
[% idSel = item.idSelect %]
|
||||
[% FuncJS = item.FuncJS %]
|
||||
[% laListe = list_servers %]
|
||||
<HR>
|
||||
|
||||
[% WRAPPER tlist
|
||||
idLabel= idLab
|
||||
idSelect= idSel
|
||||
nbVisible = idVis
|
||||
%]
|
||||
|
||||
[% IF flagFirst == 1 %]
|
||||
[% laListe = list_servers %]
|
||||
[% ELSE %]
|
||||
[% laListe = list_locservers %]
|
||||
[% END %]
|
||||
|
||||
[% FOREACH item IN laListe %]
|
||||
[% PROCESS one_item
|
||||
idValue= item
|
||||
%]
|
||||
[% END %]
|
||||
[% END %]
|
||||
[% IF mode == 'Expert' AND flagFirst == 1 %]
|
||||
[% flagFirst = 0 %]
|
||||
<HR>
|
||||
<DIV class="ExpertStyle">
|
||||
[% END %]
|
||||
|
||||
[% CASE "apply" %]
|
||||
|
||||
[% IF mode == 'Expert' AND flagFirst == 0 %]
|
||||
</DIV>
|
||||
[% END %]
|
||||
|
||||
[% PROCESS buton_apply
|
||||
id_input = item.id_input
|
||||
id_value = item.id_value
|
||||
%]
|
||||
<BR><BR>
|
||||
<BR>
|
||||
|
||||
[% END %]
|
||||
[% END %]
|
||||
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<script>
|
||||
document.forms[0].elements[0].focus();
|
||||
</script>
|
||||
|
||||
[%- PROCESS footer -%]
|
||||
<br><a class="PetiFont">[[% parent %] with [% template.name %] ] (version 0.01)</a>
|
||||
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
<lemonldapconfig>
|
||||
<cache id="config0" />
|
||||
</lemonldapconfig>
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
[% PROCESS templates/mycomposant.tt -%]
|
||||
|
||||
[%- PROCESS header
|
||||
title => title
|
||||
style => style
|
||||
-%]
|
||||
|
||||
|
||||
<h1> [% title %] </h1>
|
||||
[% WRAPPER vari_tabs %]
|
||||
[% FOREACH item IN tab_about %]
|
||||
[% PROCESS one_tab
|
||||
link= item.link
|
||||
etatab= item.etatab
|
||||
labTab= item.labTab
|
||||
%]
|
||||
[% END %]
|
||||
[% END %]
|
||||
|
||||
<div class="ConfStyle">
|
||||
<form method=get>
|
||||
<input type=hidden name=mode value="[% mode %]" >
|
||||
<input type=hidden name=style value="[% css %]" >
|
||||
|
||||
[% FOREACH item IN composall %]
|
||||
[% SWITCH item.type %]
|
||||
[% CASE "labedit" %]
|
||||
[% PROCESS lab_edit
|
||||
labLabel = item.labLabel
|
||||
labHint = item.labHint
|
||||
id_input = item.id_input
|
||||
defValue = item.defValue
|
||||
hidDefValue = item.defValue
|
||||
%]
|
||||
[% CASE "labcheck" %]
|
||||
[% PROCESS lab_check
|
||||
labLabel = item.labLabel
|
||||
labHint = item.labHint
|
||||
id_input = item.id_input
|
||||
isChecked= item.isChecked
|
||||
%]
|
||||
[% CASE "apply" %]
|
||||
<BR>
|
||||
[% PROCESS buton_apply
|
||||
id_input = item.id_input
|
||||
id_value = item.id_value
|
||||
%]
|
||||
<BR><BR>
|
||||
[% END %]
|
||||
[% END %]
|
||||
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<script>
|
||||
document.forms[0].elements[0].focus();
|
||||
</script>
|
||||
|
||||
[%- PROCESS footer -%]
|
||||
<br><a class="PetiFont">[[% parent %] with [% template.name %] ] (version 0.01)</a>
|
||||
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
|
||||
<DIV class="ExpertStyle">
|
||||
<BR><BR>
|
||||
[% WRAPPER tlistIL
|
||||
idLabel = lab42
|
||||
idSelect = 'listHomed'
|
||||
FuncJS = 'ShowRemoveHomed();'
|
||||
nbVisible = 5
|
||||
%]
|
||||
|
||||
[% FOREACH item IN homed_handlers %]
|
||||
[% PROCESS one_item
|
||||
idValue = item
|
||||
%]
|
||||
[% END %]
|
||||
[% END %]
|
||||
|
||||
<input id="bRemoveHomed" type="hidden" name="RemoveHomedHid" value="[% lab7 %]" class="bouton_0" >
|
||||
|
||||
<BR><BR><HR><BR><BR>
|
||||
|
||||
[% WRAPPER tlistIL
|
||||
idLabel = lab43
|
||||
idSelect = 'listDispo'
|
||||
FuncJS = 'ShowAddDispo();'
|
||||
nbVisible = 5
|
||||
%]
|
||||
|
||||
[% FOREACH item IN dispo_handlers %]
|
||||
[% PROCESS one_item
|
||||
idValue = item
|
||||
%]
|
||||
[% END %]
|
||||
[% END %]
|
||||
|
||||
<input id="bAddDispo" type="hidden" name="AddDispoHid" value="[% lab6 %]" class="bouton_0" >
|
||||
<BR><BR>
|
||||
</DIV>
|
|
@ -0,0 +1,111 @@
|
|||
#!/usr/bin/perl -w
|
||||
#use strict;
|
||||
use Template;
|
||||
use CGI;
|
||||
use Data::Dumper;
|
||||
require './lemonldap-lib.pl';
|
||||
|
||||
|
||||
my $tt = Template->new( {# ABSOLUTE => 1,
|
||||
PREC_CHOMP =>1,
|
||||
POST_CHOMP =>1, } );
|
||||
|
||||
##########################################
|
||||
# chargement des infos de la page #
|
||||
##########################################
|
||||
|
||||
if (! defined (CGI::param ("submitTtlConfig")) ) {
|
||||
|
||||
my $conf = &getXmlPage( "ttlconfig" );
|
||||
my $filethtml = $conf->{template};
|
||||
my $title = $text{ &dePourCent( $conf->{title} ) };
|
||||
my $_style = CGI::param('style')||$config{Style};
|
||||
my $tabular = [];
|
||||
|
||||
$mode = 'Expert' ;
|
||||
$tabular = &getTab( $conf->{tabs}->{expert} );
|
||||
$tabular = &polyGlotTab( $tabular, \%text );
|
||||
$tabular = &ajustLink ($tabular,$mode,$_style);
|
||||
$flipflop = 'Normal';
|
||||
$tab_active = '2' ;
|
||||
|
||||
$styl = $config{'Style'};
|
||||
|
||||
my $composs = &getAllComposants( $conf->{composants}->{expert} );
|
||||
$composs = &polyGlotTab( $composs, \%text );
|
||||
|
||||
my $xmlemon = getXML( $config{'XML_file'} );
|
||||
my $chapter = getChapterXML( $xmlemon, "cache" );
|
||||
|
||||
&TransformVars( $composs, $chapter );
|
||||
|
||||
# my $dump1 = Dumper( $composs );
|
||||
# my $dump2 = Dumper( $chapter );
|
||||
|
||||
my $valab = getRefValueInCompo( $composs, "LastModified" );
|
||||
my @fk = keys( %{$chapter} );
|
||||
$valab->{ isChecked } = $chapter->{ $fk[0] }->{ LastModified } ? "CHECKED" : "";
|
||||
|
||||
$vars= { style => $styl,
|
||||
title => $title,
|
||||
mode => $mode,
|
||||
css => $_style,
|
||||
label => $flipflop,
|
||||
parent => $0,
|
||||
tab_about => $tabular,
|
||||
langa => \%text,
|
||||
composall => $composs
|
||||
};
|
||||
|
||||
$vars->{style} = &getStyle($styl, $vars->{checked});
|
||||
|
||||
print "Content-type: text/html\n";
|
||||
$tt->process($filethtml,$vars) || die $tt->error();
|
||||
|
||||
# print("<BR><HR>Dump = $dump1 <HR><BR>");
|
||||
# print("<BR><HR>Dump = $dump2 <HR><BR>");
|
||||
|
||||
} else { ## Traitement du "SUBMIT"
|
||||
##########################################################
|
||||
|
||||
# print "Content-type: text/html\n";
|
||||
# print( "\n" );
|
||||
my @lo =CGI::param();
|
||||
# my $l =Dumper(@lo);
|
||||
# print "$l";
|
||||
# print( "<BR>" );
|
||||
my $_style = CGI::param('style');
|
||||
my $mode = CGI::param('mode');
|
||||
my $old_clexml = CGI::param('_id');
|
||||
my $new_clexml = CGI::param('id');
|
||||
my $ttl = CGI::param('ConfigTtl') ;
|
||||
(my $lastm) = CGI::param('LastModified')=~ /on/i;
|
||||
my $path=CGI::param('ConfigIpcKey');
|
||||
my $hash = {} ;
|
||||
|
||||
$hash->{'ConfigTtl'} = $ttl if $ttl;
|
||||
$hash->{'LastModified'} = $lastm if $lastm;
|
||||
$hash->{'ConfigFile'} = $path if $path;
|
||||
|
||||
my $xmlemon = getXML( $config{'XML_file'} );
|
||||
my $chapter = getChapterXML( $xmlemon, "cache" );
|
||||
# my $l= Dumper ($chapter);
|
||||
# print "avant <BR>$l";
|
||||
# print( "<BR>" );
|
||||
delete $chapter->{$old_clexml};
|
||||
# print "old $old_clexml";
|
||||
# print( "<BR>" );
|
||||
$chapter->{$new_clexml}= $hash;
|
||||
# $l= Dumper ($chapter);
|
||||
# print "apres <BR> $l";
|
||||
###### ecriture par XMLOUT #############
|
||||
|
||||
&writeXML( $xmlemon, $config{'XML_file'});
|
||||
|
||||
#### affichage de la page ttconfig sur param
|
||||
# $l= Dumper ($xmlemon);
|
||||
# print "final $l";
|
||||
&redirect( "index.cgi?mode=$mode&style=$_style" );
|
||||
}
|
||||
#
|
||||
############ C FINI
|
|
@ -0,0 +1,135 @@
|
|||
#!/usr/bin/perl
|
||||
# un_domain.cgi
|
||||
# Display the icons for various types of lemonldapconfig options
|
||||
use Data::Dumper;
|
||||
require './lemonldap-lib.pl';
|
||||
|
||||
# Check if lemonlap is installed
|
||||
&ReadParse();
|
||||
|
||||
my $domain = $in{'domain'};
|
||||
&header($text{'index_title'}, "", undef, 1, 1, 0,
|
||||
&help_search_link("lemonldap", "man", "doc", "google"));
|
||||
print "<hr>\n";
|
||||
#my $l=Dumper (%in) ;
|
||||
#print "eric $l" ;
|
||||
|
||||
|
||||
|
||||
%un_domain= %{&get_un_domain($domain)};
|
||||
print "<h3>$domain</h3>\n";
|
||||
print "<form method=get action=delete_domain.cgi>";
|
||||
print "<b>$text{confirm}:</b><input type=checkbox name=confirm value=yes>";
|
||||
print "<input type=hidden name=domain value=$domain>";
|
||||
print "<input type=submit name=delete value=delete>";
|
||||
print "</form>";
|
||||
#$l =Dumper (%un_domain);
|
||||
#print "eric1 $l";
|
||||
my @tab= @{&get_domain_attr()} ;
|
||||
#$l = Dumper(@tab);
|
||||
#print "$l eric2";
|
||||
print "<form method=get action=update_domain.cgi >" ;
|
||||
print "<table border=1>";
|
||||
my %cle;
|
||||
foreach (keys %un_domain) {
|
||||
$cle{lc($_)} = $un_domain{$_};
|
||||
}
|
||||
#$l= Dumper (%cle);
|
||||
#print "eric $l\n";
|
||||
|
||||
foreach (@tab) {
|
||||
my $ligne;
|
||||
my %control =%{$_};
|
||||
next if $control{name} eq 'id';
|
||||
$control{mxlength}=70;
|
||||
$control{length}=60;
|
||||
$control{value} = $cle{lc($control{name})} if exists $cle{lc($control{name})} ;
|
||||
if ($control{liste}) { $ligne=&formradiomaj(%control);
|
||||
|
||||
} else { $ligne=&formtextmaj(%control) ;}
|
||||
print "$ligne\n";
|
||||
#$l = Dumper(%control);
|
||||
#print "<p>$l eric3";
|
||||
|
||||
|
||||
|
||||
}
|
||||
print "</table>";
|
||||
print "<p>";
|
||||
print "<input type=hidden name=domain value=$domain>";
|
||||
print "<input type=submit>";
|
||||
print "</form>";
|
||||
print "<hr>";
|
||||
print "<h3>Hanlders</h3>\n";
|
||||
|
||||
my %hand =%{$un_domain{handler}};
|
||||
#$l = Dumper(%hand);
|
||||
#print "<p>$l eric3";
|
||||
print "<table border =1>";
|
||||
|
||||
foreach (keys %hand){
|
||||
print "<tr><td><a href=\"/lemonldap/un_handler.cgi?domain=$domain&handler=$_\" >$_</a></td></tr>";
|
||||
|
||||
}
|
||||
print "</table>";
|
||||
print "<hr>";
|
||||
print "<h3>Add hanlder</h3>\n";
|
||||
my @tab= @{&get_handler_attr()} ;
|
||||
#my $l = Dumper(@tab);
|
||||
#print "$l eric";
|
||||
print "<form method=get action=create_handler.cgi >" ;
|
||||
print "<table border=1>";
|
||||
|
||||
foreach (@tab) {
|
||||
my $ligne;
|
||||
my %control =%{$_};
|
||||
$control{mxlength}=70;
|
||||
$control{length}=60;
|
||||
|
||||
if ($control{liste}) { $ligne=&formradio(%control);
|
||||
|
||||
} else { $ligne=&formtext(%control) ;}
|
||||
print $ligne;
|
||||
|
||||
|
||||
|
||||
}
|
||||
print "</table>";
|
||||
print "<p>";
|
||||
print "<p><b> $text{add_httpd} $config{httpd_conf}<b></p>" ;
|
||||
print "<input type=hidden name=domain value=$domain>";
|
||||
print "<table>";
|
||||
%control='';
|
||||
$control{name} ="virtualhost_line" ;
|
||||
$control{value} = '';
|
||||
$control{mxlength}=80;
|
||||
$control{length}=70;
|
||||
$ligne=&formtextmaj(%control) ;
|
||||
print "$ligne";
|
||||
|
||||
%control='';
|
||||
$control{name} ="servername" ;
|
||||
$control{value} = '';
|
||||
$control{mxlength}=80;
|
||||
$control{length}=70;
|
||||
$ligne=&formtextmaj(%control) ;
|
||||
print $ligne;
|
||||
%control='';
|
||||
$control{name} ="perltranshandler" ;
|
||||
$control{value} = 'Lemonldap::Handlers::Generic';
|
||||
$control{mxlength}=80;
|
||||
$control{length}=70;
|
||||
$ligne=&formtextmaj(%control) ;
|
||||
print $ligne;
|
||||
%control='';
|
||||
$control{name} ="lemonldaphandlerid" ;
|
||||
$control{value} = 'yes';
|
||||
$ligne=&formcasemaj(%control) ;
|
||||
print $ligne;
|
||||
print "</table>";
|
||||
print "<input type=submit>";
|
||||
print "</form>";
|
||||
|
||||
|
||||
|
||||
&footer("/lemonldap", $text{'index'});
|
|
@ -0,0 +1,158 @@
|
|||
#!/usr/bin/perl
|
||||
# un_handler.cgi
|
||||
# Display the icons for various types of lemonldapconfig options
|
||||
use Data::Dumper;
|
||||
require './lemonldap-lib.pl';
|
||||
|
||||
# Check if lemonlap is installed
|
||||
&ReadParse();
|
||||
|
||||
my $domain = $in{'domain'};
|
||||
my $handler= $in{'handler'};
|
||||
&header($text{'index_title'}, "", undef, 1, 1, 0,
|
||||
&help_search_link("lemonldap", "man", "doc", "google"));
|
||||
print "<hr>\n";
|
||||
print "$domain -- $handler";
|
||||
my %hand = %{&get_un_handler($domain,$handler)};
|
||||
|
||||
my @tab= @{&get_handler_attr()} ;
|
||||
print "<form method=get action=delete_handler.cgi>";
|
||||
print "<b>$text{confirm}:</b><input type=checkbox name=confirm value=yes>";
|
||||
print "<input type=hidden name=domain value=$domain>";
|
||||
print "<input type=hidden name=handler value=$handler>";
|
||||
print "<input type=submit name=delete value=delete>";
|
||||
print "</form>";
|
||||
|
||||
print "<form method=get action=update_handler.cgi >" ;
|
||||
print "<table border=1>";
|
||||
my %cle;
|
||||
foreach (keys %hand) {
|
||||
$cle{lc($_)} = $hand{$_};
|
||||
}
|
||||
#$l= Dumper (%cle);
|
||||
#print "eric $l\n";
|
||||
|
||||
foreach (@tab) {
|
||||
my $ligne;
|
||||
my %control =%{$_};
|
||||
next if $control{name} eq 'id';
|
||||
$control{mxlength}=70;
|
||||
$control{length}=60;
|
||||
$control{value} = $cle{lc($control{name})} if exists $cle{lc($control{name})} ;
|
||||
if ($control{liste}) { $ligne=&formradiomaj(%control);
|
||||
|
||||
} else { $ligne=&formtextmaj(%control) ;}
|
||||
print $ligne;
|
||||
#$l = Dumper(%control);
|
||||
#print "<p>$l eric3";
|
||||
|
||||
|
||||
|
||||
}
|
||||
print "</table>";
|
||||
print "<p>";
|
||||
print "<input type=hidden name=domain value=$domain>";
|
||||
print "<input type=hidden name=handler value=$handler>";
|
||||
|
||||
print "<input type=submit>";
|
||||
print "</form>";
|
||||
print "<hr>";
|
||||
print "<h3>$config{httpd_conf}</h3>\n";
|
||||
my $c= &find_handler_in_httpd($config{httpd_conf},$handler);
|
||||
|
||||
|
||||
my @httpd =@{&get_param_httpd($c)};
|
||||
|
||||
my @htab= @{&get_handler_attr_httpd()} ;
|
||||
my %hcle;
|
||||
foreach (@httpd) {
|
||||
next if $_->{name} !~ /perlsetvar/i ;
|
||||
my $cle = lc($_->{words}->[0] ) ;
|
||||
my $value = $_->{words}->[1];
|
||||
$hcle{$cle}= $value;
|
||||
}
|
||||
|
||||
print "<form method=get action=update_handler_httpd.cgi >" ;
|
||||
print "<table border=1>";
|
||||
foreach (@htab) {
|
||||
my $ligne;
|
||||
my %control =%{$_};
|
||||
$control{mxlength}=70;
|
||||
$control{length}=60;
|
||||
$control{value} = $hcle{$control{name}} if exists $hcle{$control{name}} ;
|
||||
if ($control{liste}) { $ligne=&formradiomaj(%control);
|
||||
|
||||
} else { $ligne=&formtextmaj(%control) ;}
|
||||
print "$ligne\n";
|
||||
#$l = Dumper(%control);
|
||||
#print "<p>$l eric3";
|
||||
|
||||
|
||||
|
||||
}
|
||||
print "</table>";
|
||||
print "<p>";
|
||||
print "<input type=hidden name=domain value=$domain>";
|
||||
print "<input type=hidden name=handler value=$handler>";
|
||||
|
||||
print "<input type=submit>";
|
||||
print "</form>";
|
||||
print "<hr>";
|
||||
print "<h3>$config{httpd_conf} features</h3>\n";
|
||||
print "<form method=get action=update_handler_httpd_ng.cgi >" ;
|
||||
print "<input type=hidden name=domain value=$domain>";
|
||||
print "<input type=hidden name=handler value=$handler>";
|
||||
print "<table border=1>";
|
||||
my $lh = "<" .$c->{name}." ".$c->{value}.">";
|
||||
$control{name} =$c->{line} ;
|
||||
$control{value} = $lh;
|
||||
$control{mxlength}=80;
|
||||
$control{length}=70;
|
||||
|
||||
$ligne=&formtextfixed(%control) ;
|
||||
print $ligne;
|
||||
my @httpdng =@{&get_param_httpd($c)};
|
||||
foreach (@httpdng) {
|
||||
next if $_->{name} eq 'dummy';
|
||||
my %control;
|
||||
my $lh = $_->{name}." ".$_->{value};
|
||||
$control{name} =$_->{line} ;
|
||||
$control{value} = $lh;
|
||||
$control{mxlength}=80;
|
||||
$control{length}=70;
|
||||
my $ligne=&formtextmaj(%control) ;
|
||||
print $ligne;
|
||||
|
||||
|
||||
}
|
||||
my $fin=$c->{eline} ;
|
||||
my $enplus=$fin;
|
||||
$lh ="";
|
||||
$control{name} =$fin;
|
||||
$control{value} = $lh;
|
||||
$control{mxlength}=80;
|
||||
$control{length}=70;
|
||||
$ligne=&formtextmaj(%control) ;
|
||||
print $ligne;
|
||||
$fin ++;
|
||||
|
||||
my $lh = "</virtualhost>";
|
||||
$control{name} =$fin ;
|
||||
$control{value} = $lh;
|
||||
$control{mxlength}=80;
|
||||
$control{length}=70;
|
||||
|
||||
$ligne=&formtextfixed(%control) ;
|
||||
print "$ligne\n";
|
||||
|
||||
|
||||
print "</table>";
|
||||
print "<input type=hidden name=valmax value=$enplus>";
|
||||
print "<p>";
|
||||
print "<input type=submit>";
|
||||
|
||||
print "</form>";
|
||||
|
||||
|
||||
|
||||
&footer("/lemonldap", $text{'index'});
|
|
@ -0,0 +1,52 @@
|
|||
#!/usr/bin/perl
|
||||
# une_session.cgi
|
||||
# Display the icons for various types of lemonldapconfig options
|
||||
use Data::Dumper;
|
||||
require './lemonldap-lib.pl';
|
||||
|
||||
|
||||
&ReadParse();
|
||||
|
||||
my $session = $in{'session'};
|
||||
|
||||
&header($text{'index_title'}, "", undef, 1, 1, 0,
|
||||
&help_search_link("lemonldap", "man", "doc", "google"));
|
||||
print "<hr>\n";
|
||||
%une_session= %{&get_une_session($session)};
|
||||
print "<h3>$session</h3>\n";
|
||||
#$l =Dumper (%une_session);
|
||||
#print "eric1 $l";
|
||||
#exit;
|
||||
my @tab= @{&get_session_attr()} ;
|
||||
|
||||
print "<form method=get target=update_session.cgi >" ;
|
||||
print "<table border=1>";
|
||||
my %cle;
|
||||
foreach (keys %une_session) {
|
||||
$cle{lc($_)} = $une_session{$_};
|
||||
}
|
||||
#$l= Dumper (%cle);
|
||||
#print "eric $l\n";
|
||||
|
||||
foreach (@tab) {
|
||||
my $ligne;
|
||||
my %control =%{$_};
|
||||
next if $control{name} eq 'id';
|
||||
$control{mxlength}=70;
|
||||
$control{length}=60;
|
||||
$control{value} = $cle{lc($control{name})} if exists $cle{lc($control{name})} ;
|
||||
if ($control{liste}) { $ligne=&formradiomaj(%control);
|
||||
|
||||
} else { $ligne=&formtextmaj(%control) ;}
|
||||
print $ligne;
|
||||
#$l = Dumper(%control);
|
||||
#print "<p>$l eric3";
|
||||
|
||||
|
||||
|
||||
}
|
||||
print "</table>";
|
||||
print "<p>";
|
||||
print "<input type=submit>";
|
||||
print "</form>";
|
||||
&footer("/lemonldap", $text{'index'});
|
|
@ -0,0 +1,46 @@
|
|||
#!/usr/bin/perl
|
||||
#update_domain.cgi
|
||||
# Display the icons for various types of lemonldapconfig options
|
||||
use Data::Dumper;
|
||||
require './lemonldap-lib.pl';
|
||||
|
||||
# Check if lemonlap is installed
|
||||
&ReadParse();
|
||||
|
||||
my $domain = $in{'domain'};
|
||||
|
||||
%un_domain= %{&get_un_domain($domain)};
|
||||
my @tab= @{&get_domain_attr()} ;
|
||||
my %cle;
|
||||
foreach (keys %un_domain) {
|
||||
$cle{lc($_)} = $un_domain{$_};
|
||||
}
|
||||
my $maj=0;
|
||||
my %majh;
|
||||
foreach (@tab) {
|
||||
my $cle1 =$_->{name};
|
||||
my $cle2="_$cle1";
|
||||
if ($in{$cle1} ne $in{"$cle2"})
|
||||
{ # maj needed
|
||||
$maj=1;
|
||||
|
||||
}
|
||||
$majh{$cle1} = $in{$cle1} if $in{$cle1} ;
|
||||
|
||||
}
|
||||
if ($maj) {
|
||||
$majh{handler} = $un_domain{handler} ;
|
||||
$majh{id} = $domain;
|
||||
my $c = &get_config;
|
||||
$c->{domain}->{$domain} = \%majh ;
|
||||
|
||||
my $res =&writexml($config{XML_file},$c);
|
||||
unless ($res) {
|
||||
system ("mv $config{XML_file} $config{XML_file}.bak");
|
||||
system ("mv $config{XML_file}.tmp $config{XML_file} ");
|
||||
}
|
||||
|
||||
}
|
||||
&redirect("un_domain.cgi?domain=$domain");
|
||||
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
#!/usr/bin/perl
|
||||
#update_handler.cgi
|
||||
# Display the icons for various types of lemonldapconfig options
|
||||
use Data::Dumper;
|
||||
require './lemonldap-lib.pl';
|
||||
|
||||
# Check if lemonlap is installed
|
||||
&ReadParse();
|
||||
|
||||
my $domain = $in{'domain'};
|
||||
my $handler = $in{'handler'};
|
||||
my %hand = %{&get_un_handler($domain,$handler)};
|
||||
my @tab= @{&get_handler_attr()} ;
|
||||
|
||||
my %cle;
|
||||
foreach (keys %hand) {
|
||||
$cle{lc($_)} = $hand{$_};
|
||||
}
|
||||
my $maj=0;
|
||||
my %majh;
|
||||
foreach (@tab) {
|
||||
my $cle1 =$_->{name};
|
||||
my $cle2="_$cle1";
|
||||
if ($in{$cle1} ne $in{"$cle2"})
|
||||
{ # maj needed
|
||||
$maj=1;
|
||||
|
||||
}
|
||||
$majh{$cle1} = $in{$cle1} if $in{$cle1} ;
|
||||
|
||||
}
|
||||
if ($maj) {
|
||||
$majh{id} = $handler;
|
||||
my $c = &get_config;
|
||||
$c->{domain}->{$domain}->{handler}->{$handler} = \%majh ;
|
||||
|
||||
my $res =&writexml($config{XML_file},$c);
|
||||
unless ($res) {
|
||||
system ("mv $config{XML_file} $config{XML_file}.bak");
|
||||
system ("mv $config{XML_file}.tmp $config{XML_file} ");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
&redirect("un_handler.cgi?domain=$domain&handler=$handler");
|
||||
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
#!/usr/bin/perl
|
||||
#update_handler.cgi
|
||||
# Display the icons for various types of lemonldapconfig options
|
||||
use Data::Dumper;
|
||||
require './lemonldap-lib.pl';
|
||||
|
||||
# Check if lemonlap is installed
|
||||
&ReadParse();
|
||||
my $domain = $in{'domain'};
|
||||
my $handler = $in{'handler'};
|
||||
my $c= &find_handler_in_httpd($config{httpd_conf},$handler);
|
||||
my @httpd =@{&get_param_httpd($c)};
|
||||
my @htab= @{&get_handler_attr_httpd()} ;
|
||||
my %hcle;
|
||||
my %_ligne ;
|
||||
foreach (@httpd) {
|
||||
next if $_->{name} !~ /perlsetvar/i ;
|
||||
$_ligne{$_->{'line'}} = '' ;
|
||||
$_ligne{debut}= $_->{'line'} unless $_ligne{debut} ;
|
||||
my $cle = lc($_->{words}->[0] ) ;
|
||||
my $value = $_->{words}->[1];
|
||||
$hcle{$cle}= $value;
|
||||
}
|
||||
unless ($_ligne{debut}) { $_ligne{debut} = $httpd[0]->{eline} +1 ;}
|
||||
my %cle;
|
||||
foreach (@htab) {
|
||||
$cle{lc($_->{name})} =1;
|
||||
}
|
||||
my $maj;
|
||||
foreach (keys %in) {
|
||||
next unless /^_/ ;
|
||||
my $cle1 = $_;
|
||||
my ($cle2) = $cle1=~/_(.+)/;
|
||||
if ($in{$cle1} ne $in{$cle2} ) {
|
||||
$maj =1;
|
||||
}
|
||||
}
|
||||
## supress blank
|
||||
foreach (keys %in) {
|
||||
delete $in{$_} if $in{$_} =~ /^$/;
|
||||
delete $in{$_} unless $cle{lc($_)} ;
|
||||
}
|
||||
#add ID handler
|
||||
$in{lemonldaphandlerid} =$handler;
|
||||
# now add ligne in %_ligne
|
||||
my $debut = $_ligne{debut} ;
|
||||
my $lv ;
|
||||
foreach (keys %in) {
|
||||
my $cle =$_;
|
||||
$lv.= "perlsetvar $cle $in{$_}\n" ;
|
||||
}
|
||||
$_ligne{$debut} = $lv;
|
||||
&rewrite_httpd($config{httpd_conf}, \%_ligne);
|
||||
&redirect("un_handler.cgi?domain=$domain&handler=$handler");
|
||||
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
#!/usr/bin/perl
|
||||
#update_handler_httpd_ng.cgi
|
||||
# Display the icons for various types of lemonldapconfig options
|
||||
use Data::Dumper;
|
||||
require './lemonldap-lib.pl';
|
||||
|
||||
# Check if lemonlap is installed
|
||||
&ReadParse();
|
||||
|
||||
my $domain = $in{'domain'};
|
||||
my $handler = $in{'handler'};
|
||||
#my $c= &find_handler_in_httpd($config{httpd_conf},$handler);
|
||||
#my @httpd =@{&get_param_httpd($c)};
|
||||
my %_ligne ;
|
||||
|
||||
my $lv ;
|
||||
|
||||
foreach (keys %in) {
|
||||
next if !/^\d+/;
|
||||
my $cle =$_;
|
||||
$_ligne{$cle} = $in{$cle} ;
|
||||
}
|
||||
|
||||
|
||||
my $b = $in{valmax};
|
||||
$_ligne{$b-1} .="\n$_ligne{$b}" if $_ligne{$b};
|
||||
delete $_ligne{$b};
|
||||
|
||||
&rewrite_httpd($config{httpd_conf}, \%_ligne);
|
||||
&redirect("un_handler.cgi?domain=$domain&handler=$handler");
|
||||
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
#!/usr/bin/perl
|
||||
# view_cache .cgi
|
||||
# Display the icons for various types of lemonldapconfig options
|
||||
|
||||
require './lemonldap-lib.pl';
|
||||
&ReadParse();
|
||||
# Check if lemonlap is installed
|
||||
|
||||
&header($text{'index_title'}, "", undef, 1, 1, 0,
|
||||
&help_search_link("lemonldap", "man", "doc", "google"));
|
||||
print "<hr>\n";
|
||||
#$conf = &get_config();
|
||||
my $key= $in{'key'}||$in{ipckey};
|
||||
# Display global category icons
|
||||
print "<h3>$text{'dump_of_cache'}: $key </h3>\n";
|
||||
my %hashkey ;
|
||||
my $file_httpd= $config{httpd_conf} ;
|
||||
open CONF , "< $file_httpd";
|
||||
my @tab = <CONF> ;
|
||||
close CONf;
|
||||
my @tab1 ;
|
||||
@tab1 = map { /lemonldapipckey(\s+)?(.+)/i } @tab ;
|
||||
foreach (@tab1) {
|
||||
next if /^\s+$/ ;
|
||||
$hashkey{$_} = 1;
|
||||
}
|
||||
my $a= `$config{scripts_IPC}/dump_cache.pl $key` ;
|
||||
my @ipckey;
|
||||
@ipckey = ($a=~ /\'ipckey\'\s=>\s\'(\w+)\'/ig) ;
|
||||
foreach (@ipckey) {
|
||||
next if /^\s+$/ ;
|
||||
$hashkey{$_} = 1;
|
||||
}
|
||||
|
||||
$a=~ s/\n/<br>\n/g;
|
||||
$a=~ s/\\'/\'/g;
|
||||
$a=~ s/\s/ /g;
|
||||
|
||||
|
||||
print " $a ";
|
||||
print "<hr>";
|
||||
|
||||
print "<form action=view_ipc_cache.cgi method=post>\n";
|
||||
print "<input type=text name=key size=4 maxlength=4>\n";
|
||||
print "<select name=ipckey>";
|
||||
foreach (keys %hashkey ) {
|
||||
print "<option>$_\n";
|
||||
}
|
||||
print "</select>";
|
||||
|
||||
|
||||
print "<input type=submit name=view value=$text{'view_ipc_cache'}>\n";
|
||||
print "</form>";
|
||||
print "<p>";
|
||||
print "<hr>";
|
||||
print "<form action=clean_IPC.cgi method=post>\n";
|
||||
print "<input type=submit name=view value=\"$text{'delete_all_ipc_cache'}\">\n";
|
||||
print "$text{'ipc_warning'}";
|
||||
print "</form>";
|
||||
print "<p>";
|
||||
print "<hr>";
|
||||
|
||||
&footer("/", $text{'index'});
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
Revision history for Perl extension Lemonldap::Config::Parameters.
|
||||
|
||||
2.0.0 Fri Oct 7 14:19:09 2005
|
||||
- original version; created by h2xs 1.23 with options
|
||||
-XAn Lemonldap::Config::Parameters
|
||||
3.0.0 Thu Jun 29 15:08:00 2006
|
||||
- bigbang in parameters
|
||||
|