--- /dev/null
+Installation :\r
+\r
+1 - Decompacter AnaisWeb dans un sous-repertoire du repertoire DOCUMENT_ROOT d Apache.\r
+\r
+2 - Dans le fichier ./../CommunWeb/Commun/Session/creesessionanais.inc\r
+ modifier la variable :\r
+ $_SESSION['maitre_serv_a'] = "N° IP du serveur LDAP";\r
+\r
+Les pages Exemple.htm et Simple.htm doivent alors etre operationnelles.
\ No newline at end of file
--- /dev/null
+<?
+// if(PHP_OS != "WINNT") @session_save_path("/session/anaisweb");
+ @session_start();
+ require("../../Commun/Session/creesessionanais.inc");
+?>
+<html>
+<head>
+<title>Exemple</title>
+ <script src="../../Commun/Js/local.js"></script>
+ <script src="../../Commun/Js/amedee.js"></script>
+ <script>lienFeuilleDeStyles();</script>
+</head>
+<body>
+<big>Page appelante</big><br><br>
+<a href="javascript:AppelAnais('pour','RetourAnais')">Choix destinataires Pour</a>
+<a href="javascript:AppelAnais('cc', 'RetourAnais')">Choix destinataires Cc</a><br>
+<a href="javascript:fermerFen('pour');">Fermer fenetre Pour</a><br>
+<a href="javascript:fermerFen('cc');">Fermer fenetre Cc</a><br><br>
+<a href="javascript:location.replace('./quitter_a.php'); onclick=fermerFen('pour');fermerFen('cc');">Quitter</a><br><br>
+<FORM name="saisieExemple">
+ <table border=0 cellpading=0 cellspacing=2>
+ <tr>
+ <u>Informations de la boîte sélectionnée dans la fenêtre annuaire :</u>
+ </tr>
+ <tr>
+ <td height="15"></td>
+ </tr>
+ <tr>
+ <td>type</td><td><input TYPE=TEXT readonly name="type" size=60></td>
+ </tr>
+ <tr>
+ <td>cn</td><td><input TYPE=TEXT readonly name="cn" size=60></td>
+ </tr>
+ <tr>
+ <td>dn</td><td><input TYPE=TEXT readonly name="dn" size=60></td>
+ </tr>
+ <tr>
+ <td>mel</td><td><input TYPE=TEXT readonly name="mail" size=60></td>
+ </tr>
+ <tr>
+ <td>uid</td><td><input TYPE=TEXT readonly name="uid" size=60></td>
+ </tr>
+ <tr>
+ <td>sn</td><td><input TYPE=TEXT readonly name="sn" size=60></td>
+ </tr>
+ <tr>
+ <td>givenname</td><td><input TYPE=TEXT readonly name="givenname" size=60></td>
+ </tr>
+ <tr>
+ <td height="15"></td>
+ </tr>
+ </table>
+ <table>
+ <tr>
+ <u>Destinataires Pour sélectionnés :</u>
+ </tr>
+ <tr>
+ <td height="15"></td>
+ </tr>
+ <tr>
+ <td><SELECT class="saisie" NAME="choix_pour" style="width:380px" SIZE="6"></SELECT></td>
+ </tr>
+ <tr>
+ <td height="15"></td>
+ </tr>
+ <tr>
+ <td height="15"></td>
+ </tr>
+ </table>
+ <table>
+ <tr>
+ <u>Destinataires Cc sélectionnés :</u>
+ </tr>
+ <tr>
+ <td><SELECT class="saisie" name="choix_cc" style="width:380px" SIZE="6"></SELECT></td>
+ </tr>
+ </table>
+</FORM>
+</body>
+</html>
--- /dev/null
+<?
+// if(PHP_OS != "WINNT") @session_save_path("/session/anaisweb");
+ @session_start();
+// require("../../Commun/Session/creesessionanais.inc");
+?>
+<html>
+<head>
+<title>Exemple simple</title>
+ <script src="../../Commun/Js/local.js"></script>
+ <script>lienFeuilleDeStyles();</script>
+</head>
+<body>
+<script language="JavaScript">
+///////////////////////////////////////////////////////////////////////////////////
+// PARTIE A RENSEIGNER PAR LE DEVELOPPEUR CI-DESSOUS
+///////////////////////////////////////////////////////////////////////////////////
+ var m_champ;
+// m_champ = 'cn,dn,mail,uid,sn,givenname'; // champs Ldap souhaités
+ m_champ = 'mail,uid,sn,givenname'; // champs Ldap souhaités
+ var id_fen;
+ var nom_fen;
+ nom_fen = "Fenetre";
+
+ function foncAppel( foncRetour )
+ {
+ m_nom = 'Titre,Tous objets';
+ m_data = 'data1';
+ m_type = 'Pour';
+ m_nature = '';
+ m_agenda = '0';
+ lien = '../../Admin/Autres/aideFonc.php?m_fonc=' + foncRetour + '&m_data=' + m_data + '&m_type=' + m_type + '&m_nom=' + m_nom + '&m_champ=' + m_champ + '&m_nature=' + m_nature + '&m_agenda' + m_agenda + '#mon_etiquette';
+ id_fen = window.open(lien,
+ nom_fen,
+ 'width=350, height=600, left=10 ,top=10 ,toolbar=no, dependent=yes, menubar=no, location=no, resizable=yes, scrollbars=yes, directories=no, status=no');
+ if(id_fen) id_fen.focus();
+ }
+ function foncAppel2( foncRetour )
+ {
+ m_nom = 'Titre2,Boites ressource et application';
+ m_data = 'data1';
+ m_type = 'Pour';
+ m_nature = 'BALR,BALA';
+ m_agenda = '0';
+ lien = '../../Admin/Autres/aideFonc.php?m_fonc=' + foncRetour + '&m_data=' + m_data + '&m_type=' + m_type + '&m_nom=' + m_nom + '&m_champ=' + m_champ + '&m_nature=' + m_nature + '&m_agenda' + m_agenda + '#mon_etiquette';
+ id_fen = window.open(lien,
+ nom_fen,
+ 'width=350, height=600, left=10 ,top=10 ,toolbar=no, dependent=yes, menubar=no, location=no, resizable=yes, scrollbars=yes, directories=no, status=no');
+ if(id_fen) id_fen.focus();
+ }
+ function foncRetour()
+ {
+ var typ = arguments[0];
+ var cn = arguments[1];
+ document.forms['saisieExemple'].elements['type'].value=typ;
+ // champs a la demande ....
+ if( cn )
+ { // on verifie que cn est bien renseigne pour la boite
+ document.forms['saisieExemple'].elements['cn'].value=arguments[1];
+ document.forms['saisieExemple'].elements['dn'].value=arguments[2];
+ document.forms['saisieExemple'].elements['mail'].value=arguments[3];
+ document.forms['saisieExemple'].elements['uid'].value=arguments[4];
+ document.forms['saisieExemple'].elements['sn'].value=arguments[5];
+ document.forms['saisieExemple'].elements['givenname'].value=arguments[6];
+ }\r
+ else
+ alert('Pas de nom d affichage pour cette boite');
+ }
+ function fermerAnais()
+ {
+ if(id_fen) id_fen.close();
+ }
+</script>
+<big>Page appelante</big><br><br>
+<a href="javascript:foncAppel('foncRetour')">Choix d'une boîte</a>
+<a href="javascript:foncAppel2('foncRetour')">Choix d'une ressource/application</a>
+<a href="javascript:location.replace('./quitter_a.php'); onclick=fermerAnais();">Quitter</a><br><br>
+<FORM name="saisieExemple">
+ <table border=0 cellpading=0 cellspacing=2>
+ <tr>
+ <u>Informations de la boîte sélectionnée dans la fenêtre annuaire :</u>
+ </tr>
+ <tr>
+ <td height="15"></td>
+ </tr>
+ <tr>
+ <td>type</td><td><input TYPE=TEXT readonly name="type" size=60></td>
+ </tr>
+ <tr>
+ <td>cn</td><td><input TYPE=TEXT readonly name="cn" size=60></td>
+ </tr>
+ <tr>
+ <td>dn</td><td><input TYPE=TEXT readonly name="dn" size=60></td>
+ </tr>
+ <tr>
+ <td>mel</td><td><input TYPE=TEXT readonly name="mail" size=60></td>
+ </tr>
+ <tr>
+ <td>uid</td><td><input TYPE=TEXT readonly name="uid" size=60></td>
+ </tr>
+ <tr>
+ <td>sn</td><td><input TYPE=TEXT readonly name="sn" size=60></td>
+ </tr>
+ <tr>
+ <td>givenname</td><td><input TYPE=TEXT readonly name="givenname" size=60></td>
+ </tr>
+ <tr>
+ <td height="15"></td>
+ </tr>
+ </table>
+</FORM>
+</body>
+</html>
--- /dev/null
+<?
+// if(PHP_OS != "WINNT") @session_save_path("/session/anaisweb");
+ @session_start();
+ require("../../Commun/Session/creesessionanais.inc");
+ nettoie_session();
+?>
+<html>
+<head>
+ <title>Balade</title>
+ <script src="../../Commun/Js/local.js"></script>\r
+</head>
+<body>
+<hr><br>
+Sortie du programme.<br>
+<hr>
+</body>
+
+</html>
--- /dev/null
+<?
+// if(PHP_OS != "WINNT") @session_save_path("/session/anaisweb");
+ @session_start();
+ require("../../Commun/Session/creesessionanais.inc");
+ $m_data=$_GET['m_data'];
+ $m_nom=$_GET['m_nom'];
+ $noms=explode(",", $m_nom);
+ $fen="fen_arb".$m_data;
+ $cible="majArb.php?fen=".$fen;
+ $_SESSION[$fen]=1;
+?>
+<html>
+<head>
+<title><? echo $noms[0]; ?></title>
+<script src="../../Commun/Js/local.js"></script>\r
+<script src="../../Commun/Js/amedee.js"></script>\r
+<script>lienFeuilleDeStyles();</script>\r
+<style>
+ BODY { font-family : Verdana,Arial; color: #000000;}
+ TD { font-family : Verdana,Arial; font-size : 8pt; color: #000000;}
+ A { text-decoration : none; background-color : #FFFFFF; }
+a:link {
+ color: #000000;
+ text-decoration: none;
+}
+a:visited {
+ color: #000000;
+ text-decoration: none;
+}
+a:hover {
+ color: red;
+/* color: #000000;*/
+ text-decoration: none;
+}
+</style>
+</head>
+
+<body bgcolor=#ffffff LINK="BLACK" VLINK="BLACK" ALINK="AQUA">
+ <table border="0" cellspacing="0" cellpadding="0" width="100%">
+ <tr>
+ <td width="100%" class="titrePage"> <? echo $noms[1]; ?></td>
+ </tr>
+ </table>
+ <?
+ $script = "aideFonc.php";
+ $_SESSION['affiche']="FONC";
+
+// require "affarbo.php";
+ require "../../Commun/Include/affarbo.inc";
+ ?>
+ <table width="100%" border="0" cellspacing="0" cellpadding="0">
+ <hr>
+ <tr>
+ <td> </td>
+ <td width="25" align="center"><a href="javascript:location.replace('<?echo $cible;?>'); window.close()"><img src="../../Commun/Images/Pictos/picto_annuler.gif" border="0" alt="Annuler" width="21" height="21"></a></td>
+ <td class="boutonpicto" width="120"><a href="javascript:location.replace('<?echo $cible;?>'); window.close()">Fermer la fenêtre</a></td>
+ </tr>
+ </table>
+</body>
+</html>
\ No newline at end of file
--- /dev/null
+<?php
+session_cache_limiter('nocache');
+// if(PHP_OS != "WINNT") @session_save_path("/session/anaisweb");
+ @session_start();
+
+$dn = $_GET['dn'];
+$niv = $_GET['niv'];
+$m_fonc = $_GET['m_fonc'];
+$m_data = $_GET['m_data'];
+$m_nom = $_GET['m_nom'];
+$m_type=$_GET['m_type'];
+$m_champ=$_GET['m_champ'];
+$m_nature=$_GET['m_nature'];
+$m_agenda=$_GET['m_agenda'];
+
+ $arbre_data="arbre_data".$m_data;
+ $arbre="arbre".$m_data;
+ $niveau_data="niveau_data".$m_data;
+ $etiq="dn_etiq".$m_data;
+
+$_SESSION[$etiq]=$dn;
+
+ if( isset($_SESSION[$arbre][$dn]) )
+ unset( $_SESSION[$arbre][$dn] );
+
+ if( isset($_SESSION[$niveau_data][$niv]) && ( strcasecmp( $_SESSION[$niveau_data][$niv], $dn) == 0 ) )
+ {
+ unset( $_SESSION[$niveau_data][$niv] );
+ }
+
+ $_SESSION[$niveau_data][$niv] = $dn;
+// $_SESSION['niveau_data_anais'] = $niveau_data_anais;
+
+
+//$_SESSION['arbre_anais'] = $arbre_anais;
+session_write_close();
+$cible="aideFonc.php?m_fonc=".$m_fonc."&m_data=".$m_data."&m_nom=".$m_nom."&m_type=".$m_type."&m_champ=".$m_champ."&m_nature=".$m_nature."&m_agenda=".$m_agenda."#mon_etiquette";
+
+if($_SESSION['affiche']=="FONC") $cible="aideFonc.php?m_fonc=".$m_fonc."&m_data=".$m_data."&m_nom=".$m_nom."&m_type=".$m_type."&m_champ=".$m_champ."&m_nature=".$m_nature."&m_agenda=".$m_agenda."#mon_etiquette";
+//if($_SESSION['affiche']==7) $cible="aideFonc.php?m_fonc=".$m_fonc."#mon_etiquette";
+// evite peut etre le flash provoque par location.replace ....
+//header( "Location: $cible" );
+?>
+<script>
+ javascript:location.replace('<?echo $cible;?>')
+</script>
+?>
--- /dev/null
+<?php
+session_cache_limiter('nocache');
+// if(PHP_OS != "WINNT") @session_save_path("/session/anaisweb");
+ @session_start();
+
+$dn = $_GET['dn'];
+$niv = $_GET['niv'];
+//$affiche = $_GET['affiche'];
+$m_fonc = $_GET['m_fonc'];
+$m_data = $_GET['m_data'];
+$m_nom = $_GET['m_nom'];
+$m_type=$_GET['m_type'];
+$m_champ=$_GET['m_champ'];
+$m_nature=$_GET['m_nature'];
+$m_agenda=$_GET['m_agenda'];
+
+ $arbre_data="arbre_data".$m_data;
+ $arbre="arbre".$m_data;
+ $niveau_data="niveau_data".$m_data;
+ $etiq="dn_etiq".$m_data;
+
+require "../../CommunWeb/Include/expandfonc.inc";
+
+ $_SESSION[$etiq]=$dn;
+
+//$_SESSION['dn_etiq_anais']=$dn;
+
+ if( isset($_SESSION[$niveau_data][$niv]) && isset($_SESSION[$arbre][$_SESSION[$niveau_data][$niv]]) )
+ {
+ // remove this instance of the dn as well
+ unset( $_SESSION[$arbre][$_SESSION[$niveau_data][$niv]] );
+ }
+
+ $_SESSION[$niveau_data][$niv] = $dn;
+
+ traiteAnaisDN( $dn, $m_data, $m_type, $m_champ, $m_nature, $m_agenda );
+
+// $_SESSION['niveau_data_anais'] = $niveau_data_anais;
+
+
+session_write_close();
+
+$cible="aideFonc.php?m_fonc=".$m_fonc."&m_data=".$m_data."&m_nom=".$m_nom."&m_type=".$m_type."&m_champ=".$m_champ."&m_nature=".$m_nature."&m_agenda=".$m_agenda."#mon_etiquette";
+
+if($_SESSION['affiche']=="FONC") $cible="aideFonc.php?m_fonc=".$m_fonc."&m_data=".$m_data."&m_nom=".$m_nom."&m_type=".$m_type."&m_champ=".$m_champ."&m_nature=".$m_nature."&m_agenda=".$m_agenda."#mon_etiquette";
+// evite peut etre le flash provoque par location.replace ....
+//header( "Location: $cible" );
+?>
+<script>
+ javascript:location.replace('<?echo $cible;?>')
+</script>
--- /dev/null
+<?
+// if(PHP_OS != "WINNT") @session_save_path("/session/anaisweb");
+ @session_start();
+ $nom=$_GET['fen'];
+ $fen_arb="fen_arb".$nom;
+ $_SESSION[$fen_arb]=0;
+?>\r
--- /dev/null
+<?
+// if(PHP_OS != "WINNT") @session_save_path("/session/anaisweb");
+ @session_start();
+ $_SESSION['fen_mem']=0;
+?>\r
--- /dev/null
+<?
+// if(PHP_OS != "WINNT") @session_save_path("/session/anaisweb");
+ @session_start();
+ $fen=$_GET['fen'];
+ if($fen && ($fen!="")) $_SESSION[$fen]=0;
+?>\r
--- /dev/null
+<?
+// if(PHP_OS != "WINNT") @session_save_path("/session/anaisweb");
+ @session_start();
+ $_SESSION['fen_mem']=0;
+?>\r
--- /dev/null
+<?
+// if(PHP_OS != "WINNT") @session_save_path("/session/anaisweb");
+ @session_start();
+?>
+<html>
+<head>
+<title>Annuaire</title>
+<script src="../../Commun/Js/amedee.js"></script>
+<script>lienFeuilleDeStyles();</script>\r
+<style>
+ BODY { font-family : Verdana,Arial; color: #000000;}
+ TD { font-family : Verdana,Arial; font-size : 8pt; color: #000000;}
+ A { text-decoration : none; background-color : #FFFFFF; }
+a:link {
+ color: #000000;
+ text-decoration: none;
+}
+a:visited {
+ color: #000000;
+ text-decoration: none;
+}
+a:hover {
+ color: red;
+ text-decoration: none;
+}
+</style>
+</head>
+<!--<body bgcolor=#ffffff link=#000000 alink=#339933 vlink=#000000>-->
+<body bgcolor=#ffffff LINK="BLACK" VLINK="BLACK" ALINK="AQUA">
+ <table border="0" cellspacing="0" cellpadding="0" width="100%">
+ <tbody><tr>
+ <td width="100%" class="titrePage"> Annuaire</td>
+ </tr>
+ </tbody>
+ <tr>
+ <td><br>Pas de sélection en cours<br></td>
+ </tr>
+ </table>
+ <hr>
+ <table width="100%" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td> </td>
+ <td width="25" align="center"><a href="javascript:location.replace('majArb.php'); window.close()"><img src="../../Commun/Images/Pictos/picto_annuler.gif" border="0" alt="Annuler" width="21" height="21"></a></td>
+
+ <td class="boutonpicto" width="120"><a href="javascript:location.replace('majArb.php'); window.close()">Fermer la fenêtre</a></td>
+ </tr>
+ </table>
+</body>
+</html>
+
--- /dev/null
+<?
+function trace_log( $type, $mess )
+{
+ openlog("BaladeWeb", LOG_PID, LOG_USER);\r
+// $acces = date("Y/m/d H:i:s");\r
+// syslog(LOG_WARNING, "$acces IP : $_SERVER[REMOTE_ADDR] $mess");\r
+ syslog(LOG_WARNING, "IP : $_SERVER[REMOTE_ADDR] $mess");\r
+ closelog();\r
+}
+
+/*
+function ChercheDescription( $dn )\r
+{\r
+
+ $wdesc=$dn;
+ $connect=@ldap_connect($_SESSION['maitre_serv_a']);
+
+ if($connect)
+ {
+ ldap_set_option($connect, LDAP_OPT_PROTOCOL_VERSION, 3);
+
+ $bind=@ldap_bind($connect);
+ if($bind)
+ {
+ $search=ldap_read($connect, $dn, "objectclass=organizationalUnit");
+
+ if($search)
+ {
+ $boites=ldap_get_entries($connect, $search);
+
+ if($boites["count"]==1)
+ {
+ $wdesc=$boites[0]["description"][0];
+ }
+ ldap_free_result($search);
+ }
+ }
+ ldap_close($connect);
+ }
+
+ return $wdesc;\r
+}
+*/
+function msgalerte( $type, $lib1, $connect, $dn, $lib2 )
+{
+
+ switch ($type) {\r
+ case 0: // alerte simple affichage du message\r
+ ?>\r
+ <script>
+ javascript:alert('<?echo $lib1?>');\r
+ </script>\r
+ <?
+ break;\r
+ case 1:\r
+ $tmp=$lib1."\\nerreur = ".ldap_error($connect)."(code=".ldap_errno($connect).")";\r
+ ?>\r
+ <script>\r
+ javascript:alert('<?echo $tmp;?>');\r
+ </script>\r
+ <?
+ break;\r
+ case 2:\r
+ $tmp=$lib1."\\ndn = ".$dn."\\nerreur = ".ldap_error($connect)."(code=".ldap_errno($connect).")";\r
+ ?>\r
+ <script>\r
+ javascript:alert('<?echo $tmp;?>');\r
+ </script>\r
+ <?
+ break;\r
+ case 3:\r
+ $tmp=$lib1."\\ndn = ".$dn."\\n".$lib2;\r
+ ?>\r
+ <script>\r
+ javascript:alert('<?echo $tmp;?>');\r
+ </script>\r
+ <?
+ break;\r
+ }\r
+
+}
+
+function chercherServeurRoutage()
+{
+ $MelRoutage="amelie-ida01.melanie2.i2";
+
+ return $MelRoutage;
+}
+\r
+function uniciteSmtp( $dn, $adresseSmtp )
+{
+ @session_start();
+
+ $retour="1";
+
+ $champs=array("cn");
+
+ $connect=ldap_connect($_SESSION['maitre_serv_a']);
+
+ if($connect)
+ {
+
+ ldap_set_option($connect, LDAP_OPT_PROTOCOL_VERSION, 3);
+ $bind=ldap_bind($connect);
+ if($bind)
+ {
+ $mess="";
+ for($i=0; $i < count($adresseSmtp); $i++)
+ {
+ $filtre="mail=".$adresseSmtp[$i];
+ $smtps=ldap_search($connect, $_SESSION['base_annu'], $filtre, $champs);
+ if( $smtps )
+ {
+ $entrees=ldap_first_entry($connect, $smtps);
+
+ while($entrees)
+ {
+ $wdn=ldap_get_dn($connect,$entrees);
+ if( strcasecmp($dn, $wdn) != 0 )
+ {
+ $retour="0";
+ $cn=ldap_get_values($connect,$entrees,"cn");
+ $tmp="Adresse SMTP ".$adresseSmtp[$i]." deja utilisée par : ".$cn[0];
+ @msgalerte( 0, $tmp );
+ }
+
+ $entrees=ldap_next_entry($connect, $entrees);
+// $_SESSION['n_onglet']=2;
+ }
+ ldap_free_result($smtps);
+ }
+ }
+ }
+ else
+ {
+ @msgalerte( 0, "Problème lors de la connection au serveur ldap\\nUnicité des adresses SMTP non vérifiée ..." );
+ }
+ ldap_close($connect);
+ }
+ else
+ {
+ @msgalerte( 0, "Problème lors de la connection au serveur ldap\\nUnicité des adresses SMTP non vérifiée ..." );
+ }
+ return $retour;
+}
+
+function chercheDNdeMail( $MelMembres )
+{
+ @session_start();
+
+ $ret="";
+ $champs = array( "cn" );
+ $filtre = "mail=".$MelMembres;
+
+ $connect=ldap_connect($_SESSION['maitre_serv_a']);
+
+ if($connect)
+ {
+ ldap_set_option($connect, LDAP_OPT_PROTOCOL_VERSION, 3);
+
+ $bind=ldap_bind($connect);
+ if($bind)
+ {
+ $search=ldap_search($connect, $_SESSION['base_annu'], $filtre, $champs);
+
+ if($search)
+ {
+ $boites=ldap_get_entries($connect, $search);
+
+ if($boites["count"] == 1)
+ {
+ $ret=$boites[0]["dn"];
+ }
+ else
+ {
+ $tmp="dn non trouve a partir de l\'adresse mail\\n".$MelMembres;
+ @msgalerte( 0, $tmp );
+ }
+ ldap_free_result($search);
+ }
+ }
+ ldap_close($connect);
+ }
+ return $ret;
+}
+
+function heriteBalI()\r
+{
+ $service =$_SESSION["tb_service"];
+ $niv1 =$_SESSION["tb_niv1"];\r
+ $niv2 =$_SESSION["tb_niv2"];\r
+ $niv3 =$_SESSION["tb_niv3"];
+ $niv4 =$_SESSION["tb_niv4"];\r
+ $niv5 =$_SESSION["tb_niv5"];
+ $adresse =$_SESSION["tb_adresse"];
+ $codePostal=$_SESSION["tb_codePostal"];
+ $ville =$_SESSION["tb_ville"];\r
+ $telephone =$_SESSION["tb_telephone"];\r
+ $telecopie =$_SESSION["tb_telecopie"];\r
+ $nom =$_SESSION["tb_nom"];
+ $doms =$_SESSION["tb_doms"];
+ return array($service,
+ $niv1,
+ $niv2,
+ $niv3,
+ $niv4,
+ $niv5,
+ $adresse,
+ $codePostal,
+ $ville,
+ $telephone,
+ $telecopie,
+ $nom,
+ $doms);
+}
+
+function nbreFils( $vdn )\r
+{\r
+ $nb = -1;
+ $champs = array( "description" );
+ $filtre = "objectclass=*";
+
+ $connect=ldap_connect($_SESSION['maitre_serv_a']);
+
+ if($connect)
+ {
+ ldap_set_option($connect, LDAP_OPT_PROTOCOL_VERSION, 3);
+
+ $bind=ldap_bind($connect);
+ if($bind)
+ {
+ $search=ldap_list($connect, $vdn, $filtre, $champs);
+
+ if($search)
+ {
+ $boites=ldap_get_entries($connect, $search);
+
+ $nb=$boites["count"];
+
+ ldap_free_result($search);
+ }
+
+ }
+ ldap_close($connect);
+ }
+ if($nb == -1)
+ {
+ @msgalerte( 0, "Problème lors de la connection au serveur ldap.\\nL\'entité n\'a pas pu être vérifiée ..." );
+ }
+ else if ($nb > 0)
+ {
+ @msgalerte( 0, "L\'entité n est pas vide\\nLa suppression ne peut être effectuée ..." );
+ }
+ return $nb;\r
+}\r
+
+function chercheEntitesDN( $vdn )\r
+{\r
+ $service=""; $niv1=""; $niv2=""; $niv3=""; $niv4=""; $niv5="";\r
+ $adresse=""; $codePostal=""; $ville=""; $telephone=""; $telecopie="";
+
+ if( strpos($vdn, $_SESSION['base_annu']) > -1 )
+ {
+ $dif=substr( $vdn, 0, strpos($vdn, $_SESSION['base_annu']) );
+ if( strpos($dif, "ou=") > 0 )
+ {
+ $dif=substr( $dif, strpos($dif, "ou=") );
+ }
+
+ $connect=ldap_connect($_SESSION['maitre_serv_a']);
+
+ if($connect)
+ {
+ ldap_set_option($connect, LDAP_OPT_PROTOCOL_VERSION, 3);
+
+ $bind=ldap_bind($connect);
+ if($bind)
+ {
+ $ous = spliti("ou=", $dif );
+
+ $nb = count($ous)-1;
+
+ if($nb>1)
+ {
+ $wdn="ou=".$ous[$nb-1]."ou=".$ous[$nb].$_SESSION['base_annu']; \r
+ $wnom="Inconnu ?";
+
+ $search=ldap_read($connect, $wdn, "objectclass=organizationalUnit");
+
+ if($search)
+ {
+ $boites=ldap_get_entries($connect, $search);
+
+ if($boites["count"]==1)
+ {
+ $wnom=utf8_decode($boites[0]["description"][0]);
+ if( isset($boites[0]["street"]) ) $adresse=utf8_decode($boites[0]["street"][0]);
+ if( isset($boites[0]["postalcode"]) ) $codePostal=utf8_decode($boites[0]["postalcode"][0]);
+ if( isset($boites[0]["l"]) ) $ville=utf8_decode($boites[0]["l"][0]);
+ if( isset($boites[0]["telephonenumber"]) ) $telephone=utf8_decode($boites[0]["telephonenumber"][0]);
+ if( isset($boites[0]["facsimiletelephonenumber"]) ) $telecopie=utf8_decode($boites[0]["facsimiletelephonenumber"][0]);
+ }
+ ldap_free_result($search);
+ }
+ $service=$wnom;
+
+ for($i = $nb-2; $i > 0; $i--) \r
+ {
+ $wnom="Inconnu ?";
+ $wdn="ou=".$ous[$i].$wdn;
+ \r
+ $search=ldap_read($connect, $wdn, "objectclass=organizationalUnit");
+
+ if($search)
+ {
+ $boites=ldap_get_entries($connect, $search);
+
+ if($boites["count"]==1)
+ {
+ $wnom=utf8_decode($boites[0]["description"][0]);
+ if( isset($boites[0]["street"]) ) $adresse=utf8_decode($boites[0]["street"][0]);
+ if( isset($boites[0]["postalcode"]) ) $codePostal=utf8_decode($boites[0]["postalcode"][0]);
+ if( isset($boites[0]["l"]) ) $ville=utf8_decode($boites[0]["l"][0]);
+ if( isset($boites[0]["telephonenumber"]) ) $telephone=utf8_decode($boites[0]["telephonenumber"][0]);
+ if( isset($boites[0]["facsimiletelephonenumber"]) ) $telecopie=utf8_decode($boites[0]["facsimiletelephonenumber"][0]);
+ }
+ ldap_free_result($search);
+ }
+ if($i == $nb-2) $niv1=$wnom;
+ else if($i == $nb-3) $niv2=$wnom;
+ else if($i == $nb-4) $niv3=$wnom;
+ else if($i == $nb-5) $niv4=$wnom;
+ else if($i == $nb-6) $niv5=$wnom;
+ }
+ }
+ }
+ ldap_close($connect);
+ }
+ }
+ return array( $service,
+ $niv1,
+ $niv2,
+ $niv3,
+ $niv4,
+ $niv5,
+ $adresse,
+ $codePostal,
+ $ville,
+ $telephone,
+ $telecopie );\r
+}\r
+
+function chercheDomainesSMTP( $vdn )\r
+{\r
+
+ $doms=array();\r
+
+ $dif=substr( $vdn, strpos($vdn, "ou=") );
+
+ $connect=ldap_connect($_SESSION['maitre_serv_a']);
+
+ if($connect)
+ {
+ ldap_set_option($connect, LDAP_OPT_PROTOCOL_VERSION, 3);
+
+ $bind=ldap_bind($connect);
+ if($bind)
+ {
+ $search=ldap_read($connect, $dif, "objectclass=organizationalUnit");
+
+ if($search)
+ {
+ $boites=ldap_get_entries($connect, $search);
+
+ if($boites["count"]==1)
+ {
+ $doms=$boites[0]["mineqdomainessmtp"];
+ }
+ ldap_free_result($search);
+ }
+ }
+ ldap_close($connect);
+ }
+ return $doms;\r
+}\r
+
+function isGroupOfNames( $vdn )\r
+{\r
+
+ $ret=FALSE;\r
+
+ $connect=ldap_connect($_SESSION['maitre_serv_a']);
+
+ if($connect)
+ {
+ ldap_set_option($connect, LDAP_OPT_PROTOCOL_VERSION, 3);
+
+ $bind=ldap_bind($connect);
+ if($bind)
+ {
+ $search=ldap_read($connect, $vdn, "objectclass=groupOfNames");
+
+ if($search)
+ {
+ $boites=ldap_get_entries($connect, $search);
+
+ if($boites["count"]==1)
+ {
+ $ret=TRUE;
+ }
+ ldap_free_result($search);
+ }
+ }
+ ldap_close($connect);
+ }
+ return $ret;\r
+}\r
+
+function calculDepartNumber( $service, $niv1, $niv2, $niv3, $niv4, $niv5 )\r
+{\r
+ $departmtnumber="";\r
+ if(isset($service) && ($service != ""))\r
+ {\r
+ $departmtnumber=$service;\r
+ if(isset($niv1) && ($niv1 != "")) \r
+ {\r
+ $lg=strpos($niv1, "(");\r
+ if($lg > 0)\r
+ $departmtnumber=$departmtnumber."/".trim(substr($niv1,0,$lg));\r
+ else\r
+ $departmtnumber=$departmtnumber."/".$niv1;\r
+ if(isset($niv2) && ($niv2 != "")) \r
+ {\r
+ $lg=strpos($niv2, "(");\r
+ if($lg > 0)\r
+ $departmtnumber=$departmtnumber."/".trim(substr($niv2,0,$lg));\r
+ else \r
+ $departmtnumber=$departmtnumber."/".$niv2;\r
+ if(isset($niv3) && ($niv3 != "")) \r
+ {\r
+ $lg=strpos($niv3, "(");\r
+ if($lg > 0)\r
+ $departmtnumber=$departmtnumber."/".trim(substr($niv3,0,$lg));\r
+ else \r
+ $departmtnumber=$departmtnumber."/".$niv3;\r
+ if(isset($niv4) && ($niv4 != "")) \r
+ {\r
+ $lg=strpos($niv4, "(");\r
+ if($lg > 0)\r
+ $departmtnumber=$departmtnumber."/".trim(substr($niv4,0,$lg));\r
+ else \r
+ $departmtnumber=$departmtnumber."/".$niv4;\r
+ if(isset($niv5) && ($niv5 != "")) \r
+ {\r
+ $lg=strpos($niv5, "(");\r
+ if($lg > 0)\r
+ $departmtnumber=$departmtnumber."/".trim(substr($niv5,0,$lg));\r
+ else \r
+ $departmtnumber=$departmtnumber."/".$niv5;\r
+ }\r
+ }\r
+ }\r
+ }\r
+ }\r
+ }\r
+ return $departmtnumber;\r
+}\r
+
+function retourCible( $cod_typ, $n_onglet )\r
+{\r
+ if( isBali($cod_typ) )
+ {
+ if($n_onglet==0) $cible = "../Boites/boiteBoite.php?vmvt=2";
+ else if($n_onglet==1) $cible = "../Boites/boiteAdresse.php?vmvt=2";
+ else if($n_onglet==2) $cible = "../Boites/boiteMessagerie.php?vmvt=2";
+ }
+ else if( isBalr($cod_typ) )
+ {
+ if($n_onglet==0) $cible = "../Boites/boiteBoite.php?vmvt=2";
+ else if($n_onglet==1) $cible = "../Boites/boiteAdresse.php?vmvt=2";
+ else if($n_onglet==2) $cible = "../Boites/boiteMessagerie.php?vmvt=2";
+ }
+ else if( isBals($cod_typ) )
+ {
+ if($n_onglet==0) $cible = "../Boites/boiteBoite.php?vmvt=2";
+ else if($n_onglet==1) $cible = "../Boites/boiteAdresse.php?vmvt=2";
+ else if($n_onglet==2) $cible = "../Boites/boiteMessagerie.php?vmvt=2";
+ }
+ else if( isBalf($cod_typ) )
+ {
+ if($n_onglet==0) $cible = "../BalF/balfBoite.php?vmvt=2";
+ else if($n_onglet==1) $cible = "../BalF/balfAdresse.php?vmvt=2";
+ else if($n_onglet==2) $cible = "../BalF/balfMessagerie.php?vmvt=2";
+ }
+ else if( isBalu($cod_typ) )
+ {
+ if($n_onglet==0) $cible = "../Boites/boiteBoite.php?vmvt=2";
+ else if($n_onglet==1) $cible = "../Boites/boiteAdresse.php?vmvt=2";
+ else if($n_onglet==2) $cible = "../Boites/boiteMessagerie.php?vmvt=2";
+ }
+ else if( isBala($cod_typ) )
+ {
+ if($n_onglet==0) $cible = "../Boites/boiteBoite.php?vmvt=2";
+ else if($n_onglet==1) $cible = "../Boites/boiteAdresse.php?vmvt=2";
+ else if($n_onglet==2) $cible = "../Boites/boiteMessagerie.php?vmvt=2";
+ }
+ else if( isLdis($cod_typ) )
+ {
+ if($n_onglet==0) $cible = "../Listes/listeBoite.php?vmvt=2";
+ else if($n_onglet==1) $cible = "../Listes/listeMembres.php?vmvt=2";
+ else if($n_onglet==2) $cible = "../Listes/listeMessagerie.php?vmvt=2";
+ }
+ else if( isLdab($cod_typ) )
+ {
+ if($n_onglet==0) $cible = "../Listes/listeBoite.php?vmvt=2";
+ else if($n_onglet==1) $cible = "../Listes/listeMembres.php?vmvt=2";
+ else if($n_onglet==2) $cible = "../Listes/listeMessagerie.php?vmvt=2";
+ }
+ else if( isNser($cod_typ) )
+ {
+ if($n_onglet==0) $cible = "../Services/entiteBoite.php?vmvt=2";
+ else if($n_onglet==1) $cible = "../Services/entiteAdresse.php?vmvt=2";
+ else if($n_onglet==2) $cible = "../Services/entiteMessagerie.php?vmvt=2";
+ }
+ else if( isNuni($cod_typ) )
+ {
+ if($n_onglet==0) $cible = "../Services/entiteBoite.php?vmvt=2";
+ else if($n_onglet==1) $cible = "../Services/entiteAdresse.php?vmvt=2";
+ else if($n_onglet==2) $cible = "../Services/entiteMessagerie.php?vmvt=2";
+ }
+ return $cible;\r
+}\r
+\r
+/*
+function retourCible( $cod_typ, $n_onglet )\r
+{\r
+ if($cod_typ==1)
+ {
+ if($n_onglet==0) $cible = "../Boites/boiteBoite.php?vmvt=2";
+ else if($n_onglet==1) $cible = "../Boites/boiteAdresse.php?vmvt=2";
+ else if($n_onglet==2) $cible = "../Boites/boiteMessagerie.php?vmvt=2";
+ }
+ else if($cod_typ==10)
+ {
+ if($n_onglet==0) $cible = "../Boites/boiteBoite.php?vmvt=2";
+ else if($n_onglet==1) $cible = "../Boites/boiteAdresse.php?vmvt=2";
+ else if($n_onglet==2) $cible = "../Boites/boiteMessagerie.php?vmvt=2";
+ }
+ else if($cod_typ==11)
+ {
+ if($n_onglet==0) $cible = "../Boites/boiteBoite.php?vmvt=2";
+ else if($n_onglet==1) $cible = "../Boites/boiteAdresse.php?vmvt=2";
+ else if($n_onglet==2) $cible = "../Boites/boiteMessagerie.php?vmvt=2";
+ }
+ else if($cod_typ==12)
+ {
+ if($n_onglet==0) $cible = "../Boites/boiteBoite.php?vmvt=2";
+ else if($n_onglet==1) $cible = "../Boites/boiteAdresse.php?vmvt=2";
+ else if($n_onglet==2) $cible = "../Boites/boiteMessagerie.php?vmvt=2";
+ }
+ else if($cod_typ==13)
+ {
+ if($n_onglet==0) $cible = "../BalF/balfBoite.php?vmvt=2";
+ else if($n_onglet==1) $cible = "../BalF/balfAdresse.php?vmvt=2";
+ else if($n_onglet==2) $cible = "../BalF/balfMessagerie.php?vmvt=2";
+ }
+ else if($cod_typ==14)
+ {
+ if($n_onglet==0) $cible = "../Boites/boiteBoite.php?vmvt=2";
+ else if($n_onglet==1) $cible = "../Boites/boiteAdresse.php?vmvt=2";
+ else if($n_onglet==2) $cible = "../Boites/boiteMessagerie.php?vmvt=2";
+ }
+ else if($cod_typ==15)
+ {
+ if($n_onglet==0) $cible = "../Boites/boiteBoite.php?vmvt=2";
+ else if($n_onglet==1) $cible = "../Boites/boiteAdresse.php?vmvt=2";
+ else if($n_onglet==2) $cible = "../Boites/boiteMessagerie.php?vmvt=2";
+ }
+ else if($cod_typ==2)
+ {
+ if($n_onglet==0) $cible = "../Listes/listeBoite.php?vmvt=2";
+ else if($n_onglet==1) $cible = "../Listes/listeMembres.php?vmvt=2";
+ else if($n_onglet==2) $cible = "../Listes/listeMessagerie.php?vmvt=2";
+ }
+ else if($cod_typ==0)
+ {
+ if($n_onglet==0) $cible = "../Services/entiteBoite.php?vmvt=2";
+ else if($n_onglet==1) $cible = "../Services/entiteAdresse.php?vmvt=2";
+ else if($n_onglet==2) $cible = "../Services/entiteMessagerie.php?vmvt=2";
+ }
+ return $cible;\r
+}\r
+*/\r
+function chercheServGeres()
+{
+ if( strcasecmp( $_SESSION["dn_auth"], "uid=pamela,ou=ET,ou=DI,ou=CETE Lyon,ou=CETE,ou=melanie,ou=organisation,dc=equipement,dc=gouv,dc=fr") == 0 )
+ {
+ unset($_SESSION['serv_geres']);
+ unset($_SESSION['dn_geres']);
+ $_SESSION['serv_geres'][]=$_SESSION['base_annu'];
+ $_SESSION['dn_geres'][]=$_SESSION['base_annu'];
+ }
+ else
+ {
+ $connect=@ldap_connect($_SESSION['maitre_serv_a']);
+
+ if($connect)
+ {
+ ldap_set_option($connect, LDAP_OPT_PROTOCOL_VERSION, 3);
+ $bind=@ldap_bind($connect);
+ if($bind)
+ {
+
+ $champs_b=array("cn");
+ $filtre="(&(objectClass=mineqMelListe)(mineqrdn=".utf8_encode("ACL.Opérateurs Mélanie2").")(member=".$_SESSION["dn_auth"]."))";
+
+ $search_l=ldap_search($connect,
+ $_SESSION['base_annu'],
+ $filtre,
+ $champs_b);
+
+ if( $search_l )
+ {
+ unset($_SESSION['serv_geres']);
+ unset($_SESSION['dn_geres']);
+ $liste=ldap_first_entry($connect, $search_l);
+ while($liste)
+ {
+ $cnl=ldap_get_values($connect,$liste,"cn");
+ $dn4=utf8_decode(ldap_get_dn($connect,$liste));
+ $dns=substr( $dn4, 1+strpos($dn4, ",ou=") );
+ $des=ChercheDescription( $dns );
+
+ $_SESSION['serv_geres'][]=$dns;
+ $_SESSION['dn_geres'][]=$dns;
+
+ $liste=ldap_next_entry($connect, $liste);
+ }
+ ldap_free_result($search_l);
+ }
+ else
+ {
+ @msgalerte( 0, "Problème lors de la connection au serveur ldap" );
+ }
+ }
+ else
+ {
+ @msgalerte( 0, "Problème lors de la connection au serveur ldap" );
+ }
+ ldap_close($connect);
+ }
+ else
+ {
+ @msgalerte( 0, "Problème lors de la connection au serveur ldap" );
+ }
+ }
+
+ return ;\r
+}
+
+function valideDN( $uid, $anc_mdp )\r
+{\r
+// @session_start();\r
+
+ $_SESSION["flag_auth"]="0";\r
+
+ $maitre_serv_a = $_SESSION['maitre_serv_a'];\r
+ $base_annu = $_SESSION['base_annu'];\r
+ $retour = 0;\r
+\r
+ $_SESSION["cn_auth"]="";\r
+ \r
+ /////////////////////////////////// essai du 13 Octobre 2004 /////////////\r
+ // on retire les anti-slashes des champs anciens et nouveau mots de passe\r
+ //////////////////////////////////////////////////////////////////////////\r
+ $anc_mdp = stripslashes($anc_mdp);\r
+ \r
+ $champs=array("cn", "mineqpassworddoitchanger");\r
+\r
+ $connect=ldap_connect($maitre_serv_a);\r
+ \r
+ if( !($connect) )\r
+ {\r
+ @msgalerte( 0, "Problème lors de la connection (ldap_connect) au serveur ldap" );
+ return $retour;\r
+ }\r
+\r
+ ldap_set_option($connect, LDAP_OPT_PROTOCOL_VERSION, 3);\r
+ $bind=ldap_bind($connect);\r
+ if( !($bind) )\r
+ {\r
+ ldap_close($connect);\r
+ @msgalerte( 0, "Problème lors de la connection (ldap_bind) au serveur ldap" );
+ return $retour;\r
+ }\r
+ $filtre="uid=".$uid;\r
+ $boites=ldap_search($connect, $base_annu, $filtre, $champs);\r
+ if( !($boites) )\r
+ {\r
+ ldap_close($connect);\r
+ @msgalerte( 0, "boite non trouvee (ldap_search)" );
+ return $retour;\r
+ }\r
+ if(ldap_count_entries($connect, $boites) == 1)\r
+ {\r
+ $entrees=ldap_get_entries($connect, $boites);\r
+ $cn=$entrees[0]["cn"];\r
+ $vdn=$entrees[0]["dn"];\r
+ $tmp=$cn[0];\r
+ \r
+ ldap_close($connect);\r
+\r
+\r
+ $connect2=ldap_connect($maitre_serv_a);\r
+ \r
+ if($connect2)\r
+ {\r
+ ldap_set_option($connect2, LDAP_OPT_PROTOCOL_VERSION, 3);\r
+ \r
+ $bind2=@ldap_bind($connect2, $vdn, $anc_mdp);\r
+ if($bind2)\r
+ {\r
+ $msg="";\r
+ $filtre="objectclass=*";\r
+ $champs=array("cn", "mineqpassworddoitchanger");\r
+ $boites2=ldap_read($connect2, $vdn, $filtre, $champs);\r
+ if( !($boites2) )\r
+ {\r
+ ldap_close($connect2);\r
+ @msgalerte( 0, "boite non trouvee (ldap_read)" );
+ }\r
+ else\r
+ {\r
+ if(ldap_count_entries($connect2, $boites2) == 1)\r
+ {\r
+ $entrees=ldap_get_entries($connect2, $boites2);\r
+ $msg=utf8_decode($entrees[0]["mineqpassworddoitchanger"][0]);\r
+// $_SESSION["anc_mdp"]="";\r
+ if( strlen($msg) == 0 )\r
+ {\r
+ $_SESSION["dn_auth"]=$entrees[0]["dn"];\r
+ $_SESSION["cn_auth"]=$entrees[0]["cn"][0];
+// $_SESSION["flag_auth"]="1";\r
+ $retour=1;
+// $tmp="Félicitation, M. ".$_SESSION["cn_auth"]."\\n".$_SESSION["dn_auth"]."\\nauthentification reussie";\r
+// @msgalerte( 0, $tmp );
+ chercheServGeres();
+ }\r
+ else\r
+ {\r
+ @msgalerte( 0, $msg );
+// $_SESSION["n_onglet"]=3;\r
+ }\r
+ }\r
+ else\r
+ {\r
+ @msgalerte( 0, "boite non trouvee (ldap_read)" );
+ }\r
+ ldap_free_result($boites2);\r
+ }\r
+\r
+ }\r
+ else\r
+ {\r
+ if( ldap_errno($connect2) == 49 )\r
+ {
+ @msgalerte( 0, "login ou mot de passe incorrect" );
+ }\r
+ else\r
+ {\r
+ $tmp="problème d\'acces à l\'annuaire (ldap_bind 2) code=".ldap_errno($connect2).".";\r
+ @msgalerte( 0, $tmp );
+ }\r
+ }\r
+\r
+ ldap_close($connect2);\r
+ }\r
+ else\r
+ {\r
+// $tmp="problème d acces à l annuaire (ldap_connect 2) ".ldap_error($connect2)."(code=".ldap_errno($connect2).")";\r
+ $tmp="problème d\'acces à l\'annuaire (ldap_connect 2) ";\r
+ @msgalerte( 0, $tmp );
+ }\r
+\r
+ }\r
+ else\r
+ {\r
+ @msgalerte( 0, "boite non trouvee (identifiant inconnu)" );
+ }\r
+ ldap_free_result($boites);\r
+ return $retour;\r
+}\r
+\r
+function changePwd( $serv, $base, $uid, $anc_mdp, $new_mdp, $affic=1 )\r
+{\r
+// @session_start();\r
+ \r
+ if( $serv == "" )\r
+ $serv = $_SESSION['maitre_serv_a'];\r
+ if( $base == "" )\r
+ $base = $_SESSION['base_annu'];\r
+ $retour = 0;\r
+\r
+ /////////////////////////////////// essai du 13 Octobre 2004 /////////////\r
+ // on retire les anti-slashes des champs anciens et nouveau mots de passe\r
+ //////////////////////////////////////////////////////////////////////////\r
+ $anc_mdp = stripslashes($anc_mdp);\r
+ $new_mdp = stripslashes($new_mdp);\r
+\r
+ $_SESSION["cn_auth"]="";\r
+ \r
+ $champs=array("cn");\r
+\r
+ $connect=ldap_connect($serv);\r
+ \r
+ if( !($connect) )\r
+ {\r
+ if( $affic == 1 )\r
+ {\r
+ @msgalerte( 0, "Problème lors de la connection (ldap_connect) au serveur ldap" );
+ } \r
+ /** anaismoz */\r
+ else{\r
+ $GLOBALS["err_code"]=-1;\r
+ $GLOBALS["err_msg"]="Problème lors de la connection (ldap_connect) au serveur ldap";\r
+ }\r
+ return $retour;\r
+ }\r
+\r
+ ldap_set_option($connect, LDAP_OPT_PROTOCOL_VERSION, 3);\r
+ $bind=ldap_bind($connect);\r
+ if( !($bind) )\r
+ {\r
+ //ldap_close($connect);\r
+ if( $affic == 1 )\r
+ {\r
+ @msgalerte( 0, "Problème lors de la connection (ldap_bind) au serveur ldap" );
+ }\r
+ \r
+ /** anaismoz */\r
+ else{\r
+ $GLOBALS["err_code"]=@ldap_errno($connect);\r
+ $GLOBALS["err_msg"]="Problème lors de la connection (ldap_bind) au serveur ldap\n".@ldap_error($connect);\r
+ }\r
+ ldap_close($connect);\r
+ \r
+ return $retour;\r
+ }\r
+ $filtre="uid=".$uid;\r
+ $boites=ldap_search($connect, $base, $filtre, $champs);\r
+ if( !($boites) )\r
+ {\r
+ //ldap_close($connect);\r
+ if( $affic == 1 )\r
+ {\r
+ @msgalerte( 0, "Problème lors de la connection (ldap_search) au serveur ldap" );
+ }\r
+ /** anaismoz */\r
+ else{\r
+ $GLOBALS["err_code"]=@ldap_errno($connect);\r
+ $GLOBALS["err_msg"]="boite non trouvee (ldap_search)\n".@ldap_error($connect);\r
+ }\r
+ ldap_close($connect);\r
+ \r
+ return $retour;\r
+ }\r
+ if(ldap_count_entries($connect, $boites) == 1)\r
+ {\r
+ $entrees=ldap_get_entries($connect, $boites);\r
+ $cn=$entrees[0]["cn"];\r
+ $vdn=$entrees[0]["dn"];\r
+ $tmp=$cn[0];\r
+\r
+ ldap_close($connect);\r
+\r
+\r
+ $connect2=ldap_connect($serv);\r
+ \r
+ if($connect2)\r
+ {\r
+ ldap_set_option($connect2, LDAP_OPT_PROTOCOL_VERSION, 3);\r
+ \r
+ $bind2=@ldap_bind($connect2, $vdn, $anc_mdp);\r
+ if($bind2)\r
+ {\r
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\r
+ mt_srand((double) microtime()*1000000);\r
+ $salt=mhash_keygen_s2k(MHASH_SHA1,$new_mdp,substr(pack("h*",md5(mt_rand())),0,8),4);\r
+ $password="{ssha}".base64_encode(mhash(MHASH_SHA1, $new_mdp.$salt).$salt);\r
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\r
+\r
+\r
+ $info["userpassword"]=$password;\r
+// mise a jour des champs mineqPasswordDoitChanger et mineqPasswordModifyTimestamp\r
+ $info["mineqpasswordmodifytimestamp"]=gmstrftime("%Y%m%d%H%M%SZ");\r
+ $info["mineqpassworddoitchanger"]=array(); // a mettre a vide\r
+ if( $r=ldap_modify($connect2, $vdn, $info) )\r
+ {\r
+ $_SESSION["dn_auth"]=$entrees[0]["dn"];\r
+ $_SESSION["cn_auth"]=$entrees[0]["cn"];\r
+ if( $affic == 1 )\r
+ {
+ $tmp2="Mot de passe modifié pour la boite\\n".$tmp;\r
+ @msgalerte( 0, $tmp2 );
+ } \r
+ /** anaismoz */\r
+ else{\r
+ $GLOBALS["err_code"]=0;\r
+ $GLOBALS["err_msg"]="Mot de passe modifié pour la boite:\n".$tmp;\r
+ }\r
+ \r
+ $retour=1;\r
+ }\r
+ else\r
+ { //echo "code ldap=<". ldap_errno($connect2)."> message=<".ldap_error($connect2).">";\r
+ if( $affic == 1 )\r
+ {\r
+ $tmp2="Problème lors de la modification de la boite\\n".$tmp;\r
+ @msgalerte( 0, $tmp2 );
+ } \r
+ /** anaismoz */\r
+ else{\r
+ $GLOBALS["err_code"]=@ldap_errno($connect2);\r
+ $GLOBALS["err_msg"]="Problème lors de la modification de la boite\n".@ldap_error($connect2);\r
+ }\r
+ \r
+ }\r
+\r
+ }\r
+ else\r
+ {\r
+ if( ldap_errno($connect2) == 49 )\r
+ {\r
+ if( $affic == 1 )\r
+ {\r
+ @msgalerte( 0, "identifiant ou mot de passe incorrect" );
+ }\r
+ /** anaismoz */\r
+ else{\r
+ $GLOBALS["err_code"]=49;\r
+ $GLOBALS["err_msg"]="identifiant ou mot de passe incorrect\n".@ldap_error($connect);\r
+ }\r
+ }\r
+ else\r
+ {\r
+ if( $affic == 1 )\r
+ {
+ $tmp="problème d\'acces à l\'annuaire (ldap_bind 2) "."(code=".ldap_errno($connect2).")";\r
+ @msgalerte( 0, $tmp );
+ }\r
+ /** anaismoz */\r
+ else{\r
+ $GLOBALS["err_code"]=@ldap_errno($connect2);\r
+ $GLOBALS["err_msg"]="problème d acces à l annuaire (ldap_bind 2) \n".@ldap_error($connect2);\r
+ }\r
+ }\r
+ }\r
+\r
+ ldap_close($connect2);\r
+ }\r
+ else\r
+ {\r
+ if( $affic == 1 )\r
+ {\r
+ $tmp="problème d\'acces à l\'annuaire (ldap_connect 2) "."(code=".ldap_errno($connect2).")";\r
+ @msgalerte( 0, $tmp );
+ }\r
+ /** anaismoz */\r
+ else{\r
+ $GLOBALS["err_code"]=@ldap_errno($connect2);\r
+ $GLOBALS["err_msg"]="problème d acces à l annuaire (ldap_connect 2)";\r
+ }\r
+ }\r
+ }\r
+ else\r
+ {\r
+ if( $affic == 1 )\r
+ {\r
+ @msgalerte( 0, "boite non trouvee (ldap_count_entries # 1)" );
+ }\r
+ /** anaismoz */\r
+ else{\r
+ $GLOBALS["err_code"]=-1;\r
+ $GLOBALS["err_msg"]="boite non trouvee (ldap_count_entries # 1)";\r
+ }\r
+ \r
+ }\r
+ ldap_free_result($boites);\r
+ return $retour;\r
+}\r
+
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+function traiteDN( $dn )\r
+{\r
+ session_cache_limiter('nocache');
+
+ $sep="\t";
+
+ //******************************************************************************************************************//
+ $connect=@ldap_connect($_SESSION['maitre_serv']);
+
+ if($connect)
+ {
+ ldap_set_option($connect, LDAP_OPT_PROTOCOL_VERSION, 3);
+ $bind=@ldap_bind($connect);
+ if($bind)
+ {
+ if(isset($_SESSION['arbre'][$dn]))
+ {
+ unset($_SESSION['arbre'][$dn]);
+ }
+ $w_arbre=array();
+
+ $champs_u=array("mineqTypeEntree", "mineqPortee", "ou", "description");
+
+ $search_o=ldap_list($connect, $dn, "objectClass=organizationalUnit", $champs_u);
+ //if(TRACE==1) $nb_r++;
+ if( $search_o )
+ {
+ $unites=ldap_first_entry($connect, $search_o);
+
+ while($unites)
+ {
+ $entree=@ldap_get_values($connect,$unites,"mineqTypeEntree");
+ $portee=@ldap_get_values($connect,$unites,"mineqPortee");
+ $description=ldap_get_values($connect,$unites,"description");
+ $dn4=ldap_get_dn($connect,$unites);
+ $w_arbre[]=$dn4;
+ $typeb=$entree[0].",".$portee[0];
+ $_SESSION['arbre_data'][$dn4]="<b>".utf8_decode($description[0])."</b>".$sep.$typeb.$sep."litentite.php?vmvt=2&vtyp=".$typeb."&vdn=".$sep."BaladePhp";
+
+ $unites=ldap_next_entry($connect, $unites);
+ }
+ ldap_free_result($search_o);
+ }
+
+ $champs_b=array("mineqTypeEntree", "mineqPortee", "cn", "givenname");
+
+ $search_b=ldap_list($connect, $dn, "objectClass=organizationalperson", $champs_b);
+// $search_b=ldap_list($connect, $dn, "mail=*", $champs_b);
+// $search_b=ldap_list($connect, $dn, "objectClass=mineqMelDP", $champs_b);
+ if( $search_b )
+ {
+ $boite=ldap_first_entry($connect, $search_b);
+ while($boite)
+ {
+ $cnb=ldap_get_values($connect,$boite,"cn");
+ $prenomb=@ldap_get_values($connect,$boite,"givenname");
+ $entree=ldap_get_values($connect,$boite,"mineqTypeEntree");
+ $portee=@ldap_get_values($connect,$boite,"mineqPortee");
+ $dn4=ldap_get_dn($connect,$boite);
+ $w_arbre[]=$dn4;
+ $typeb=$entree[0].",".$portee[0];
+ if( strcasecmp( $entree[0], "BALI" ) == 0 )
+ $_SESSION['arbre_data'][$dn4]=utf8_decode($cnb[0]).$sep.$typeb.$sep."litboite.php?vmvt=2&vtyp=".$typeb."&vdn=".$sep."BaladePhp";
+ else if( strcasecmp( $entree[0], "BALS" ) == 0 )
+ $_SESSION['arbre_data'][$dn4]=utf8_decode($cnb[0]).$sep.$typeb.$sep."litbals.php?vmvt=2&vtyp=".$typeb."&vdn=".$sep."BaladePhp";
+ else if( strcasecmp( $entree[0], "BALU" ) == 0 )
+ $_SESSION['arbre_data'][$dn4]=utf8_decode($cnb[0]).$sep.$typeb.$sep."litbalu.php?vmvt=2&vtyp=".$typeb."&vdn=".$sep."BaladePhp";
+ else if( strcasecmp( $entree[0], "BALF" ) == 0 )
+ $_SESSION['arbre_data'][$dn4]=utf8_decode($cnb[0]).$sep.$typeb.$sep."litbalf.php?vmvt=2&vtyp=".$typeb."&vdn=".$sep."BaladePhp";
+ else if( strcasecmp( $entree[0], "BALA" ) == 0 )
+ $_SESSION['arbre_data'][$dn4]=utf8_decode($cnb[0]).$sep.$typeb.$sep."litbala.php?vmvt=2&vtyp=".$typeb."&vdn=".$sep."BaladePhp";
+ else if( strcasecmp( $entree[0], "BALR" ) == 0 )
+ $_SESSION['arbre_data'][$dn4]=utf8_decode($cnb[0]).$sep.$typeb.$sep."litbalr.php?vmvt=2&vtyp=".$typeb."&vdn=".$sep."BaladePhp";
+ else
+ $_SESSION['arbre_data'][$dn4]=utf8_decode($cnb[0]).$sep.$typeb.$sep."litboite.php?vmvt=2&vtyp=".$typeb."&vdn=".$sep."BaladePhp";
+ $boite=ldap_next_entry($connect, $boite);
+ }
+ ldap_free_result($search_b);
+ }
+
+ $champs_b=array("mineqTypeEntree", "mineqPortee", "cn");
+
+ $search_l=ldap_list($connect,
+ $dn,
+ "objectClass=mineqmelliste",
+ $champs_b);
+ if( $search_l )
+ {
+ $liste=ldap_first_entry($connect, $search_l);
+ while($liste)
+ {
+ $cnl=ldap_get_values($connect,$liste,"cn");
+ $entree=ldap_get_values($connect,$liste,"mineqTypeEntree");
+ $portee=@ldap_get_values($connect,$liste,"mineqPortee");
+ $dn4=ldap_get_dn($connect,$liste);
+ $w_arbre[]=$dn4;
+ $typeb=$entree[0].",".$portee[0];
+ $_SESSION['arbre_data'][$dn4]=utf8_decode($cnl[0]).$sep.$typeb.$sep."litliste.php?vmvt=2&vtyp=".$typeb."&vdn=".$sep."BaladePhp";
+ $liste=ldap_next_entry($connect, $liste);
+ }
+ ldap_free_result($search_l);
+ }
+
+ usort( $w_arbre, 'compare' );
+ $_SESSION['arbre'][$dn] = $w_arbre;
+// session_write_close();
+
+ }
+ else
+ {
+ @msgalerte( 0, "Problème lors de la connection au serveur ldap" );
+ }
+ ldap_close($connect);
+ }
+ else
+ {
+ @msgalerte( 0, "Problème lors de la connection au serveur ldap" );
+ }
+
+ return ;\r
+}
+\r
+function compare( $dn1, $dn2 )
+{
+ $sep="\t";
+ $sep2=",";
+
+ $wdn1 = explode( $sep, $_SESSION['arbre_data'][$dn1] );
+ $wdn2 = explode( $sep, $_SESSION['arbre_data'][$dn2] );
+
+ assert( is_array( $wdn1 ) );
+ assert( is_array( $wdn2 ) );
+
+ if( 0 === strcasecmp( $wdn1[0], $wdn2[0] ) )
+ return 0;
+
+ $wtyp1 = explode( $sep2, $wdn1[1] );
+ $wtyp2 = explode( $sep2, $wdn2[1] );
+
+ assert( is_array( $wtyp1 ) );
+ assert( is_array( $wtyp2 ) );
+
+ switch ($wtyp1[0]) {\r
+ case "NGRO": $wtmp1="00".$wdn1[0]; break;\r
+ case "NSER": $wtmp1="00".$wdn1[0]; break;\r
+ case "NUNI": $wtmp1="00".$wdn1[0]; break;\r
+ case "BALI": $wtmp1="01".$wdn1[0]; break;\r
+ case "BALF": $wtmp1="02".$wdn1[0]; break;\r
+ case "BALR": $wtmp1="03".$wdn1[0]; break;\r
+ case "BALA": $wtmp1="04".$wdn1[0]; break;\r
+ case "BALS": $wtmp1="05".$wdn1[0]; break;\r
+ case "BALU": $wtmp1="06".$wdn1[0]; break;\r
+ case "LDIS": $wtmp1="07".$wdn1[0]; break;\r
+ case "LDAB": $wtmp1="07".$wdn1[0]; break;
+ default: $wtmp1="10".$wdn1[0];\r
+ }
+
+ switch ($wtyp2[0]) {\r
+ case "NGRO": $wtmp2="00".$wdn2[0]; break;\r
+ case "NSER": $wtmp2="00".$wdn2[0]; break;\r
+ case "NUNI": $wtmp2="00".$wdn2[0]; break;\r
+ case "BALI": $wtmp2="01".$wdn2[0]; break;\r
+ case "BALF": $wtmp2="02".$wdn2[0]; break;\r
+ case "BALR": $wtmp2="03".$wdn2[0]; break;\r
+ case "BALA": $wtmp2="04".$wdn2[0]; break;\r
+ case "BALS": $wtmp2="05".$wdn2[0]; break;\r
+ case "BALU": $wtmp2="06".$wdn2[0]; break;\r
+ case "LDIS": $wtmp2="07".$wdn2[0]; break;\r
+ case "LDAB": $wtmp2="07".$wdn2[0]; break;
+ default: $wtmp2="10".$wdn2[0];\r
+ }
+
+ return strcasecmp( $wtmp1, $wtmp2 );
+}
+?>
\ No newline at end of file
--- /dev/null
+<?
+
+function traiteAnaisDN( $dn, $m_data, $type, $champ, $nature, $agenda )\r
+{\r
+ session_cache_limiter('nocache');
+
+ $sep="\t";
+
+ $arbre = "arbre".$m_data;
+ $arbre_data = "arbre_data".$m_data;
+ $niveau_data = "niveau_data".$m_data;
+
+ $champs=explode(",", $champ);
+
+ $champs_b=array("mineqTypeEntree", "mineqPortee", "cn");
+ for($i=0; $i < count($champs); $i++)
+ {
+ $champs[$i]=trim($champs[$i]);
+ if(strlen($champs[$i]) > 0)
+ $champs_b[]=$champs[$i];
+ }
+
+ if( $nature == "" )
+ $filtre = "(&(|(objectClass=mineqmelliste)(objectClass=organizationalperson))(mail=*))";
+ else
+ {
+ $t_filtre = explode(",", $nature);
+ $filtre = "(&(mail=*)";
+ if( count($t_filtre) > 1 )
+ {
+ $filtre = $filtre . "(|";
+ for($i=0; $i < count($t_filtre); $i++)
+ {
+ $filtre = $filtre . "(mineqTypeEntree=".$t_filtre[$i].")";
+ }
+ $filtre = $filtre . ")";
+ }
+ else
+ {
+ $filtre = $filtre . "(mineqTypeEntree=$nature)";
+ }
+ $filtre = $filtre . ")";
+ }
+
+// filtre positionne provisoirement sans prendre le parametre nature
+ $filtre = "(&(|(objectClass=mineqmelliste)(objectClass=organizationalperson))(mail=*))";
+
+ //******************************************************************************************************************//
+ $connect=ldap_connect($_SESSION['maitre_serv']);
+
+ if($connect)
+ {
+ ldap_set_option($connect, LDAP_OPT_PROTOCOL_VERSION, 3);
+ $bind=ldap_bind($connect);
+ if($bind)
+ {
+ if(isset($_SESSION[$arbre][$dn]))
+ {
+ unset($_SESSION[$arbre][$dn]);
+ }
+ $w_arbre=array();
+
+ $champs_u=array("mineqTypeEntree", "mineqPortee", "ou", "description");
+
+ $search_o=ldap_list($connect, $dn, "objectClass=organizationalUnit", $champs_u);
+ //if(TRACE==1) $nb_r++;
+ if( $search_o )
+ {
+ $unites=ldap_first_entry($connect, $search_o);
+
+ while($unites)
+ {
+ $entree=@ldap_get_values($connect,$unites,"mineqTypeEntree");
+ $portee=@ldap_get_values($connect,$unites,"mineqPortee");
+ $description=ldap_get_values($connect,$unites,"description");
+ $dn4=ldap_get_dn($connect,$unites);
+ $w_arbre[]=$dn4;
+ $typeb=$entree[0].",".$portee[0];
+ $_SESSION[$arbre_data][$dn4]="<b>".utf8_decode($description[0])."</b>".$sep.$typeb;/*.$sep."litentite.php?vmvt=2&vtyp=0&vdn=".$sep."PageUn";*/
+
+ $unites=ldap_next_entry($connect, $unites);
+ }
+ ldap_free_result($search_o);
+ }
+
+// $champs_b=array("mineqTypeEntree", "mineqPortee", "cn", "mail", "uid");
+
+ $search_b=ldap_list($connect, $dn, $filtre, $champs_b);
+// $search_b=ldap_list($connect, $dn, "(&(|(objectClass=mineqmeldp)(objectClass=mineqmelliste)(objectClass=organizationalperson))(mail=*))", $champs_b);
+ if( $search_b )
+ {
+ $boite=ldap_first_entry($connect, $search_b);
+ while($boite)
+ {
+ $dn4=ldap_get_dn($connect,$boite);
+ $t_dn=array( $dn4 );
+
+ $cnb=ldap_get_values($connect,$boite,"cn");
+ $entree=@ldap_get_values($connect,$boite,"mineqTypeEntree");
+ $portee=@ldap_get_values($connect,$boite,"mineqPortee");
+
+ for($j=0; $j < count($champs); $j++)
+ if( strcasecmp($champs[$j], "dn") == 0 )
+ $val[$j]=$t_dn;
+ else
+ $val[$j]=@ldap_get_values($connect,$boite,"$champs[$j]");
+
+ $w_arbre[]=$dn4;
+ $typeb=$entree[0].",".$portee[0];
+ $tmp=utf8_decode($cnb[0]).$sep.$typeb.$sep.$dn4;
+ for($j=0; $j < count($champs); $j++)
+ $tmp=$tmp.$sep.utf8_decode($val[$j][0]);
+ $_SESSION[$arbre_data][$dn4]=$tmp;
+
+ $boite=ldap_next_entry($connect, $boite);
+ }
+ ldap_free_result($search_b);
+ }
+
+ $_SESSION['w_arbre_data']=$arbre_data;
+ usort( $w_arbre, 'compareAnais' );
+ $_SESSION[$arbre][$dn] = $w_arbre;
+ session_write_close();
+ }
+ else
+ {
+ @msgalerte( 0, "Problème lors de la connection au serveur ldap" );
+ }
+ ldap_close($connect);
+ }
+ else
+ {
+ @msgalerte( 0, "Problème lors de la connection au serveur ldap" );
+ }
+
+ return ;\r
+}
+\r
+function compareAnais( $dn1, $dn2 )
+{
+ $sep="\t";
+ $sep2=",";
+ $arbre_data=$_SESSION['w_arbre_data'];
+
+ $wdn1 = explode( $sep, $_SESSION[$arbre_data][$dn1] );
+ $wdn2 = explode( $sep, $_SESSION[$arbre_data][$dn2] );
+
+ assert( is_array( $wdn1 ) );
+ assert( is_array( $wdn2 ) );
+
+ if( 0 === strcasecmp( $wdn1[0], $wdn2[0] ) )
+ return 0;
+
+ $wtyp1 = explode( $sep2, $wdn1[1] );
+ $wtyp2 = explode( $sep2, $wdn2[1] );
+
+ assert( is_array( $wtyp1 ) );
+ assert( is_array( $wtyp2 ) );
+
+ switch ($wtyp1[0]) {\r
+ case "NGRO": $wtmp1="00".$wdn1[0]; break;\r
+ case "NSER": $wtmp1="00".$wdn1[0]; break;\r
+ case "NUNI": $wtmp1="00".$wdn1[0]; break;\r
+ case "BALI": $wtmp1="01".$wdn1[0]; break;\r
+ case "BALF": $wtmp1="02".$wdn1[0]; break;\r
+ case "BALR": $wtmp1="03".$wdn1[0]; break;\r
+ case "BALA": $wtmp1="04".$wdn1[0]; break;\r
+ case "BALS": $wtmp1="05".$wdn1[0]; break;\r
+ case "BALU": $wtmp1="06".$wdn1[0]; break;\r
+ case "LDIS": $wtmp1="07".$wdn1[0]; break;\r
+ case "LDAB": $wtmp1="07".$wdn1[0]; break;
+ default: $wtmp1="10".$wdn1[0];\r
+ }
+
+ switch ($wtyp2[0]) {\r
+ case "NGRO": $wtmp2="00".$wdn2[0]; break;\r
+ case "NSER": $wtmp2="00".$wdn2[0]; break;\r
+ case "NUNI": $wtmp2="00".$wdn2[0]; break;\r
+ case "BALI": $wtmp2="01".$wdn2[0]; break;\r
+ case "BALF": $wtmp2="02".$wdn2[0]; break;\r
+ case "BALR": $wtmp2="03".$wdn2[0]; break;\r
+ case "BALA": $wtmp2="04".$wdn2[0]; break;\r
+ case "BALS": $wtmp2="05".$wdn2[0]; break;\r
+ case "BALU": $wtmp2="06".$wdn2[0]; break;\r
+ case "LDIS": $wtmp2="07".$wdn2[0]; break;\r
+ case "LDAB": $wtmp2="07".$wdn2[0]; break;
+ default: $wtmp2="10".$wdn2[0];\r
+ }
+
+ return strcasecmp( $wtmp1, $wtmp2 );
+}
+?>
\ No newline at end of file
--- /dev/null
+<?
+ session_cache_limiter('nocache');
+ require( "../../Commun/Include/ico.inc");
+ require( "../../CommunWeb/Include/FoncType.inc");
+ require( "../../Commun/Fonctions/Fonc.inc");
+
+// $time1=time();
+ $affiche = $_SESSION['affiche'];
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+ $dn=$_SESSION['base_serv'] ;
+
+ ob_start();
+ $maxlevel=20;
+ echo "<table cellspacing=0 cellpadding=0 border=0 cols=".($maxlevel).">\n";
+ echo "<tr>";
+ for ($i=0; $i<$maxlevel; $i++) echo "<td width=16></td>";
+ echo "\n<td width=600></td>";
+ echo "</tr>\n";
+
+ arbre_html( $dn, $level=0, $m_fonc, $affiche, $m_data, $m_nom, $m_type, $m_champ, $m_nature, $m_agenda );
+
+ ob_end_flush();
+
+// $time2=time();\r
+// printf("construction arbre en %4d secondes<br>", $time2-$time1);
+
+//************************************************************************************************************************************************
+function arbre_html( $dn, $level=0, $m_fonc, $affiche, $m_data, $m_nom, $m_type, $m_champ, $m_nature, $m_agenda )
+{
+ require( "../../Commun/Include/ico.inc");
+
+ $sep="\t";
+ $sep2=",";
+ $arbre_data="arbre_data".$m_data;
+ $arbre="arbre".$m_data;
+ $etiq="dn_etiq".$m_data;
+
+ if( $_SESSION['affiche'] == "POSI" )
+ $chemin=$_GET['chemin'];
+ else
+ $chemin="";
+
+ $data=""; $type=""; $edit=""; $cible=""; $mail=""; $uid="";
+
+// 08-01-2005 debut ////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+if($level==0)
+{
+ if( $_SESSION['affiche'] == "FONC" )
+ {
+ $m_fonc=$_GET['m_fonc'];
+ $m_nom=$_GET['m_nom'];
+ $m_data=$_GET['m_data'];
+ $m_type=$_GET['m_type'];
+ $m_champ=$_GET['m_champ'];
+ $m_nature=$_GET['m_nature'];
+ if( isset($_GET['m_agenda']) ) $m_agenda=$_GET['m_agenda'];
+ else $m_agenda="";
+ $arbre="arbre".$m_data;
+ }
+ else
+ {
+ $m_fonc="";
+ $m_nom="";
+ $m_data="";
+ $m_type="";
+ $m_champ="";
+ $m_nature="";
+ $m_agenda="";
+ $arbre="arbre";
+ }
+
+ $type="NSER,50";
+ $libe="<B>".utf8_decode($_SESSION['lib_serv'])."</B>";
+ if($_SESSION['affiche'] == "POSI") $edit=$chemin."?vdn=".$dn; else $edit="";
+}
+else
+{
+// 08-01-2005 fin ////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+ if($_SESSION['affiche']=="FONC")
+ { // on eclate les parametres suivant le type d affichage, ici fonction retour
+ if( isset($_SESSION[$arbre_data][$dn]) )
+ {
+ $data = explode( $sep, $_SESSION[$arbre_data][$dn] );
+ if( isset( $data[0] ) ) $libe = $data[0]; // libelle
+ if( isset( $data[1] ) ) $type = $data[1]; // type de boite
+ if( isset( $data[2] ) ) $zdn = $data[2]; // dn
+ }
+ else
+ {
+ $libe="inconnu"; $type=""; $mail=""; $uid=""; $cible="PageUn";
+ }
+ }
+ else
+ { // on eclate les parametres suivant le type d affichage, ici affichage de l objet ou positionnement dans l arbre
+ if( isset($_SESSION[$arbre_data][$dn]) )
+ {
+ $data = explode( $sep, $_SESSION[$arbre_data][$dn] );
+ if( isset( $data[0] ) ) $libe = $data[0]; // libelle
+ if( isset( $data[1] ) ) $type = $data[1]; // type de boite
+ if( isset( $data[2] ) ) { $edit = $data[2]; if($_SESSION['affiche'] == "POSI") $edit=$chemin."?vdn=".$dn; else $edit=$edit.$dn; } // lien
+ if( isset( $data[3] ) ) $cible=$data[3]; // cible
+ }
+ else
+ {
+ $libe="inconnu"; $type=""; $edit=""; $cible="BaladePhp";
+ }
+ }
+
+// 08-01-2005 debut ////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+}
+// 08-01-2005 fin ////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+ $wtype = explode( $sep2, $type );
+
+ assert( is_array( $wtype ) );
+
+ if( $_SESSION['affiche'] == "FONC" )
+ {
+ $t_nature = explode(",", $m_nature);
+ }
+
+ if( ($affiche == "TOUT") || // arborescence complete
+ ( ($affiche == "ENTI") && isArbo($wtype[0]) ) || // entites
+ ( ($affiche == "BOIT") && !isList($wtype[0]) ) || // boites
+ ( ($affiche == "LIST") && !isBoit($wtype[0]) ) || // listes
+ ( ($affiche == "FONC") &&
+ ( isArbo($wtype[0]) ||
+ in_array($wtype[0], $t_nature) ||
+ $m_nature=="" ||
+ $m_nature=="MEL1" ||
+ $m_nature=="MEL2") ) || // aideFonc
+ ( ($affiche == "POSI") && isArbo($wtype[0]) ) ) // aidePosi
+ { // on affiche l objet a traiter suivant le type d affichage souhaite
+ if(intval($wtype[1]) < 40)
+ $ext_portee = "_l.gif";
+ else
+ $ext_portee = ".gif";
+
+ echo '<tr>';
+
+ for( $i=0; $i<=$level; $i++ ) {
+ echo '<td class="spacer"></td>' . "\n";
+ }
+
+ if(isArbo($wtype[0]))
+ { // on traite une entite ou un noeud
+ $niv=1+$level;
+ if( $_SESSION['affiche'] == "FONC" )
+ { // on prepare le lien en fonction du traitement desire, ici passage de la fonction retour
+ if( isset( $_SESSION[$arbre][$dn] ) ) {
+ $expand_href = "collapsefonc.php?" . "affiche=". $_SESSION['affiche'] ."&niv=" . $niv . "&dn=" . $dn .
+ "&m_fonc=" . $m_fonc . "&m_data=" . $m_data . "&m_nom=" . $m_nom . "&m_type=" . $m_type .
+ "&m_champ=" . $m_champ ."&m_nature=" . $m_nature . "&m_agenda=" . $m_agenda;
+ $expand_img = $img_collapse;
+ } else {
+ $expand_href = "expandfonc.php?" . "affiche=". $_SESSION['affiche'] ."&niv=" . $niv . "&dn=" . $dn .
+ "&m_fonc=" . $m_fonc . "&m_data=" . $m_data . "&m_nom=" . $m_nom . "&m_type=" . $m_type .
+ "&m_champ=" . $m_champ ."&m_nature=" . $m_nature . "&m_agenda=" . $m_agenda;
+ $expand_img = $img_expand;
+ }
+ }
+ else
+ { // on prepare le lien en fonction du traitement desire
+ if( isset( $_SESSION[$arbre][$dn] ) ) {
+ $expand_href = "collapse.php?" . "affiche=". $_SESSION['affiche'] ."&niv=" . $niv . "&dn=" . $dn;
+ if($_SESSION['affiche'] == "POSI") $expand_href=$expand_href."&chemin=".$chemin;
+ $expand_img = $img_collapse;
+ } else {
+ $expand_href = "expand.php?" . "affiche=". $_SESSION['affiche'] ."&niv=" . $niv . "&dn=" . $dn;
+ if($_SESSION['affiche'] == "POSI") $expand_href=$expand_href."&chemin=".$chemin;
+ $expand_img = $img_expand;
+ }
+ }
+
+ // on affiche le signe + ou - (deplie / plie) ainsi que l icone dossier
+ echo "<td><a href=\"".$expand_href."\" ondblclick=\"dClic()\"";
+ if(strcasecmp($dn,$_SESSION[$etiq])==0)
+ echo " name=\"mon_etiquette\"";
+
+ echo "><img src=\"".$expand_img."\" border=no></a></td>"; // signe plus ou moins
+ echo "<td><a href=\"".$expand_href."\" ondblclick=\"dClic()\"><img src=\"".$img_dossier."\" border=no></a></td>\n"; // icone dossier
+ }
+ // on traite un type de boite ou liste : on affiche l icone qui va bien
+ elseif(isBali($wtype[0]))
+ echo "<td></td><td><img src=\"".$img_bali.$ext_portee."\"></td>\n";
+ elseif(isBals($wtype[0]))
+ echo "<td></td><td><img src=\"".$img_bals.$ext_portee."\"></td>\n";
+ elseif(isBalu($wtype[0]))
+ echo "<td></td><td><img src=\"".$img_balu.$ext_portee."\"></td>\n";
+ elseif(isBalf($wtype[0]))
+ echo "<td></td><td><img src=\"".$img_balf.$ext_portee."\"></td>\n";
+ elseif(isBala($wtype[0]))
+ echo "<td></td><td><img src=\"".$img_bala.$ext_portee."\"></td>\n";
+ elseif(isBalr($wtype[0]))
+ echo "<td></td><td><img src=\"".$img_balr.$ext_portee."\"></td>\n";
+ elseif(isList($wtype[0]))
+ echo "<td></td><td><img src=\"".$img_liste.$ext_portee."\"></td>\n";
+ else
+ echo "<td></td><td><img src=\"".$img_leaf."\"></td>\n";
+
+ echo "<td align=left colspan=\"98\">";
+
+ $aref=TRUE;
+
+ if ( ($_SESSION['affiche'] == "TOUT") || // arborescence avec liens complets sur tous les objets
+ ($_SESSION['affiche'] == "ENTI") ) // entites
+ {
+ $aref=FALSE;
+ if( lienACreer( $dn ) && $edit!="" )
+ { // on cree le lien sur l entite si c est un service ou une unite
+ $aref=TRUE;
+ echo "<a href=\"".$edit."\" ondblclick=\"dClic()\" target=\"BaladePhp\">";
+ }
+ }
+ else if ( ( ($_SESSION['affiche'] == "BOIT") && ( !isArbo($wtype[0]) ) ) || // boites -> affichage entites
+ ( ($_SESSION['affiche'] == "LIST") && ( !isArbo($wtype[0]) ) ) || // listes -> affichage
+ ($_SESSION['affiche'] == "POSI") ) // aidePosi
+ { // on cree le lien en fonction su type d objet
+ if( $edit!="" ) echo "<a href=\"".$edit."\" ondblclick=\"dClic()\" target=\"BaladePhp\">";
+ }
+ else if ( ($_SESSION['affiche'] == "FONC") && ( !isArbo($wtype[0]) ) )
+ { // on cree le lien avec la fonction retour
+ $tmp=addslashes($libe);
+ echo "<a href=\"javascript:opener.window.$m_fonc('$m_type'";
+ for($k=3; $k < count($data); $k++)
+ {
+ $tmp=addslashes($data[$k]);
+ echo ", '$tmp'";
+ }
+ echo ");\" ondblclick=\"dClic()\">";
+ }
+
+ if($aref)
+ echo " <nobr>".$libe."</nobr></a></td>\n";
+ else
+ echo " <nobr>".$libe."</nobr></td>\n";
+
+ echo "</tr>\n";
+
+ // on appelle recursivement la fonction d affichage pour chaque sous-dossier
+ if( isset( $_SESSION[$arbre][$dn] ) && is_array( $_SESSION[$arbre][$dn] ) )
+ foreach( $_SESSION[$arbre][$dn] as $dn ) {
+ arbre_html( $dn, $level+1, $m_fonc, $affiche, $m_data, $m_nom, $m_type, $m_champ, $m_nature, $m_agenda );
+ }
+
+ echo '</tr>';
+ }
+ else
+ {
+ if($_SESSION['grise']==1)
+ {
+ echo '<tr>';
+
+ for( $i=0; $i<=$level; $i++ ) {
+ echo '<td class="spacer"></td>' . "\n";
+ }
+ if(isBali($wtype[0]))
+ echo "<td></td><td><img src=\"".$img_bali.$ext_portee."\"></td>\n";
+ elseif(isBals($wtype[0]))
+ echo "<td></td><td><img src=\"".$img_bals.$ext_portee."\"></td>\n";
+ elseif(isBalu($wtype[0]))
+ echo "<td></td><td><img src=\"".$img_balu.$ext_portee."\"></td>\n";
+ elseif(isBalf($wtype[0]))
+ echo "<td></td><td><img src=\"".$img_balf.$ext_portee."\"></td>\n";
+ elseif(isBala($wtype[0]))
+ echo "<td></td><td><img src=\"".$img_bala.$ext_portee."\"></td>\n";
+ elseif(isBalr($wtype[0]))
+ echo "<td></td><td><img src=\"".$img_balr.$ext_portee."\"></td>\n";
+ elseif(isList($wtype[0]))
+ echo "<td></td><td><img src=\"".$img_liste.$ext_portee."\"></td>\n";
+ else
+ echo "<td></td><td><img src=\"".$img_leaf."\"></td>\n";
+
+ echo "<td align=left colspan=\"98\">";
+
+ echo " <nobr><i>".$libe."</i></nobr></td>\n";
+ echo "</tr>\n";
+ }
+ }
+
+}
+?>
\ No newline at end of file
--- /dev/null
+<?
+ $img_expand = "../../CommunWeb/Images/Arbo/tree_expand.gif";
+ $img_collapse = "../../CommunWeb/Images/Arbo/tree_collapse.gif";
+ $img_line = "../../CommunWeb/Images/Arbo/tree_vertline.gif";
+ $img_hline = "../../CommunWeb/Images/Arbo/tree_horiline.gif";
+ $img_split = "../../CommunWeb/Images/Arbo/tree_split.gif";
+ $img_end = "../../CommunWeb/Images/Arbo/tree_end.gif";
+ $img_leaf = "../../CommunWeb/Images/Arbo/tree_leaf.gif";
+ $img_spc = "../../CommunWeb/Images/Arbo/tree_space.gif";
+ $img_bali = "../../CommunWeb/Images/Arbo/bali";
+ $img_bals = "../../CommunWeb/Images/Arbo/bals";
+ $img_balu = "../../CommunWeb/Images/Arbo/balu";
+ $img_balf = "../../CommunWeb/Images/Arbo/balf";
+ $img_bala = "../../CommunWeb/Images/Arbo/bala";
+ $img_balr = "../../CommunWeb/Images/Arbo/balr";
+ $img_liste = "../../CommunWeb/Images/Arbo/liste";
+ $img_dossier = "../../CommunWeb/Images/Arbo/tree_dossier.gif";
+?>
\ No newline at end of file
--- /dev/null
+/* amedeeIE.css 16/02/2003
+*/
+
+a:link {
+ color: #0000cc;
+ text-decoration: none;
+}
+a:visited {
+/* color: #990000;*/
+ color: #0000cc;
+ text-decoration: none;
+}
+a:hover {
+ color: red;
+ text-decoration: underline;
+}
+
+body {
+ background-color: white;
+}
+form {
+ border-spacing: 30pt;
+ margin: 10 0 10 0;
+}
+
+h1,.titrePage,.titre1,.Titre {
+ FONT-WEIGHT: normal;
+ FONT-SIZE: medium;
+ COLOR: #ffffff;
+ FONT-FAMILY: Arial;
+ BACKGROUND-COLOR: #003399;
+}
+.titreBoite {
+ FONT-WEIGHT: normal;
+ FONT-SIZE: medium;
+ COLOR: #ffffff;
+ FONT-FAMILY: Arial;
+ BACKGROUND-COLOR: #003399;
+ border-width:0;
+}
+h2,.titreGauche,.titre2,.Titre2 {
+ FONT-WEIGHT: bold;
+ FONT-SIZE: x-small;
+ COLOR: #ffffff;
+ FONT-FAMILY: Arial;
+ BACKGROUND-COLOR: #999999;
+}
+td,p,.textecourant {
+ font-family: Arial;
+ font-size: x-small;
+ font-style: normal;
+ font-weight: normal;
+ color: black;
+ empty-cells: show;
+}
+/* pas pour IE
+hr {
+ color: white;
+ border-style: solid;
+ background-color: #999999;
+ border-width: 2;
+ border-collapse: collapse;
+}
+*/
+
+i {
+ color:#909090;
+}\r
+
+
+.tableBleue {
+ border-collapse: collapse;
+ border-color: #003399;
+ border-style: solid;
+ border-width: 2;
+}
+.nomintranet {
+ FONT-WEIGHT: bold;
+ FONT-SIZE: 18pt;
+ MARGIN-LEFT: 0px;
+ WIDTH: 100px;
+ COLOR: #003399;
+ FONT-FAMILY: Arial;
+ TEXT-ALIGN: right;
+}
+.signature {
+ font-family: Arial;
+ font-size: x-small;
+ font-weight: normal;
+ color: black;
+}
+.onglet {
+ FONT-WEIGHT: bold;
+ FONT-SIZE: x-small;
+ COLOR: #ffffff;
+ FONT-FAMILY: Arial;
+ TEXT-ALIGN: left;
+ TEXT-DECORATION: none;
+ background-color: #999999;
+}
+.onglet:selected {
+ color:white;
+ text-decoration: none;
+}
+.ongletSelecte,.tdOngletSelecte {
+ FONT-WEIGHT: bold;
+ FONT-SIZE: x-small;
+ COLOR: white;
+ FONT-FAMILY: Arial;
+ TEXT-ALIGN: left;
+ TEXT-DECORATION: none;
+ background-color: #003399;
+}
+.ongletRenvoi {
+ FONT-WEIGHT: bold;
+ FONT-SIZE: x-small;
+ COLOR: white;
+ FONT-FAMILY: Arial;
+ TEXT-ALIGN: left;
+ TEXT-DECORATION: none;
+ background-color: #cccccc;
+}
+.lienonglet {
+ FONT-WEIGHT: bold;
+ FONT-SIZE: 10pt;
+ COLOR: #FFFFFF;
+ FONT-FAMILY: Arial;
+ TEXT-ALIGN: left;
+ TEXT-DECORATION: none;
+}
+.voirAussi {
+ text-align: right;
+ font-family: Arial;
+ font-size: x-small;
+ font-style: normal;
+ font-weight: normal;
+ color: #000000;
+ text-decoration: none;
+ text-align: right;
+}
+.MenuGaucheSelect {
+ FONT-SIZE: 8pt;
+ FONT-FAMILY: Arial;
+ TEXT-ALIGN: right;
+ font-style: normal;
+ font-weight: normal
+}
+.margeGauche{
+ width: 105pt;
+ FONT-FAMILY: Arial;
+ TEXT-ALIGN: left;
+ font-style: normal;
+ font-weight: normal;
+}
+.menuGauche{
+ width: 100pt;
+}
+.boutonpicto {
+ font-family: Arial;
+ font-size: x-small; //12px;
+ font-style: normal;
+ font-weight: bold;
+ color: #000000;
+ text-decoration: none;
+}
+.boutonpicto a:link,.boutonpicto a:visited { text-decoration: none; color : #0000cc; }\r
+.boutonpicto a:hover { text-decoration: none; color : red; }
+.ligne0 {
+ background-color: #ffffff;
+}
+.ligne1 {
+ background-color: #eeeeee;
+}
+.modificationchamp {
+ font-family: Arial;
+ font-size: 8pt;
+ font-style: normal;
+ font-weight: bold;
+ color: #FF0000;
+ text-decoration: none;
+}
+th,.entetetableau {
+ font-family: Arial;
+ font-size: x-small;
+ font-style: normal;
+ font-weight: bold;
+ color: #003399;
+ text-decoration: none;
+}
+.Lien {
+ color:black;
+ text-decoration:none;
+ font-size: x-small;
+ FONT-FAMILY: Arial;
+ font-style: normal;
+ font-weight: normal;
+}
+//.Lien:hover {
+// color:red;
+// text-decoration:underline;
+//}
+.Lien:visited {
+ color:#660066;
+ text-decoration:none; //underline;
+}
+.TDBleu0
+{
+ background-color: #ffff00;
+ background-repeat:repeat-x;
+}
+.TDBleu {
+ background-IMAGE: url("../../CommunWeb/Images/background_piedpage.gif");
+ background-repeat:repeat-x;
+}
+.TDBleu1
+{
+ background-IMAGE: url("../../CommunWeb/Images/pixel_bleu_fonce.gif");
+ background-repeat:repeat-x;
+}
+.Libelle
+{
+ font-family : Arial;
+ font-size : 10pt;
+ color: #003399;
+ background-color : #FFFFFF;
+}
+.Saisie
+{
+ font-family : Verdana,Arial;
+ font-size : 8pt;
+ background-color : #E4E4E4;
+ font-weight: bold
+}
+.Tableau {
+ FONT-SIZE: x-small; //8pt;
+ COLOR: #FFFFFF;
+ FONT-FAMILY: Verdana;
+ background-color: #003399;
+ font-weight: bold
+}
+.TableauActif {
+ FONT-SIZE: x-small; //8pt;
+ COLOR: #FFFF00;
+ FONT-FAMILY: Verdana;
+ background-color: #003399;
+ font-weight: bold;
+}
+.textegrasbleu {
+ font-family: Arial;
+ font-size: 12px;
+ font-style: normal;
+ font-weight: bold;
+ color: #003399;
+ text-decoration: none
+}
+.textegrasgris {
+ font-family: Arial;
+ font-size: 12px;
+ font-style: normal;
+ font-weight: bold;
+ color: #999999;
+ text-decoration: none
+}
+.Libellebouton {
+ FONT-SIZE: 8pt;
+ COLOR: #000000;
+ FONT-FAMILY: Verdana;
+ font-style: normal;
+ font-weight: bold;
+ text-decoration: none
+}
+.Visible {
+}
+.Invisible {
+ display: none;
+}
\ No newline at end of file
--- /dev/null
+/* amedeeNS.css 10/02/2003
+*/
+
+a:link {
+ color: #0000cc;
+ text-decoration: none;
+}
+a:visited {
+ color: #0000cc;
+ text-decoration: none;
+}
+a:hover {
+ color: red;
+ text-decoration: underline;
+}
+
+body {
+ background-color: white;
+}
+form {
+ border-spacing: 30pt;
+ margin: 10 0 10 0;
+}
+
+h1,.titrePage,.titre1,.Titre {
+ FONT-WEIGHT: normal;
+ FONT-SIZE: large;
+ COLOR: #ffffff;
+ FONT-FAMILY: Arial;
+ BACKGROUND-COLOR: #003399;
+}
+.titreBoite {
+ FONT-WEIGHT: normal;
+ FONT-SIZE: large;
+ COLOR: #ffffff;
+ FONT-FAMILY: Arial;
+ BACKGROUND-COLOR: #003399;
+ border-width: 0;
+}
+h2,.titreGauche,.titre2,.Titre2 {
+ FONT-WEIGHT: bold;
+ FONT-SIZE: small;
+ COLOR: #ffffff;
+ FONT-FAMILY: Arial;
+ BACKGROUND-COLOR: #999999;
+}
+td,p,.textecourant {
+ font-family: Arial;
+ font-size: small;
+ font-weight: normal;
+ color: black;
+ empty-cells: show;
+}
+hr {
+ color: #AFAFAF;
+ border-style: solid;
+ background-color: #999999;
+ border-width: 1;
+ border-collapse: collapse;
+}
+
+i {
+ color:#909090;
+}\r
+
+
+.tableBleue {
+ border-collapse: collapse;
+ border-color: #003399;
+ border-style: solid;
+ border-width: 2;
+}
+.nomintranet {
+ FONT-WEIGHT: bold;
+ FONT-SIZE: 18pt;
+ MARGIN-LEFT: 0px;
+ WIDTH: 100px;
+ COLOR: #003399;
+ FONT-FAMILY: Arial;
+ TEXT-ALIGN: right
+}
+.signature {
+ font-family: Arial;
+ font-size: small;
+ font-weight: normal;
+ color: black;
+}
+.onglet {
+ FONT-WEIGHT: bold;
+ FONT-SIZE: small;
+ COLOR: #ffffff;
+ FONT-FAMILY: Arial;
+ TEXT-ALIGN: left;
+ TEXT-DECORATION: none;
+ background-color: #999999;
+}
+.onglet:selected {
+ color:white;
+ text-decoration: none;
+}
+.ongletSelecte,.tdOngletSelecte {
+ FONT-WEIGHT: bold;
+ FONT-SIZE: small;
+ COLOR: white;
+ FONT-FAMILY: Arial;
+ TEXT-ALIGN: left;
+ TEXT-DECORATION: none;
+ background-color: #003399;
+}
+.ongletRenvoi {
+ FONT-WEIGHT: bold;
+ FONT-SIZE: small;
+ COLOR: white;
+ FONT-FAMILY: Arial;
+ TEXT-ALIGN: left;
+ TEXT-DECORATION: none;
+ background-color: #cccccc;
+}
+.lienonglet {
+ FONT-WEIGHT: bold;
+ FONT-SIZE: 10pt;
+ COLOR: #FFFFFF;
+ FONT-FAMILY: Arial;
+ TEXT-ALIGN: left;
+ TEXT-DECORATION: none;
+}
+.voirAussi {
+ text-align: right;
+ font-family: Arial;
+ font-size: x-small;
+ font-style: normal;
+ font-weight: normal;
+ color: #000000;
+ text-decoration: none;
+ text-align: right;
+}
+.MenuGaucheSelect {
+ FONT-SIZE: 8pt;
+ FONT-FAMILY: Arial;TEXT-ALIGN: right;
+ font-style: normal;
+ font-weight: normal
+}
+.margeGauche{
+ width: 105pt;
+ FONT-FAMILY: Arial;
+ TEXT-ALIGN: left;
+ font-style: normal;
+ font-weight: normal;
+}
+.menuGauche{
+ width: 100pt;
+}
+.boutonpicto {
+ font-size: 12px;
+ font-style: normal;
+ font-weight: bold;
+ color: #000000;
+ text-decoration: none
+}
+.boutonpicto a:link,.boutonpicto a:visited { text-decoration: none; color : #0000cc; }\r
+.boutonpicto a:hover { text-decoration: none; color : red; }
+.ligne0 {
+ background-color: #ffffff;
+}
+.ligne1 {
+ background-color: #eeeeee;
+}
+.modificationchamp {
+ font-family: Arial;
+ font-size: 8pt;
+ font-style: normal;
+ font-weight: bold;
+ color: #FF0000;
+ text-decoration: none
+}
+th,.entetetableau {
+ font-family: Arial;
+ font-size: x-small;
+ font-style: normal;
+ font-weight: bold;
+ color: #003399;
+ text-decoration: none
+}
+.Lien {
+ color:blue;
+ text-decoration:underline;
+ font-size:8pt;
+ FONT-FAMILY: Arial;
+ font-style: normal;
+ font-weight: normal;
+}
+.Lien:hover {
+ color:red;
+ text-decoration:underline;
+ font-size:8pt;
+ FONT-FAMILY: Arial;
+}
+.Lien:visited {
+ color:660066;
+ text-decoration:underline;
+ font-size:8pt;
+ FONT-FAMILY: Arial;
+}
+.lienonglet {
+ FONT-WEIGHT: bold;
+ FONT-SIZE: 10pt;
+ COLOR: #FFFFFF;
+ FONT-FAMILY: Arial;
+ TEXT-ALIGN: left;
+ TEXT-DECORATION: none
+}
+.TDBleu0
+{
+ background-color: #ffff00;
+ background-repeat:repeat-x;
+}
+.TDBleu {
+ background-IMAGE: url("../../CommunWeb/Images/background_piedpage.gif");
+ background-repeat:repeat-x;
+}
+.TDBleu1
+{
+ background-IMAGE: url("../../CommunWeb/Images/pixel_bleu_fonce.gif");
+ background-repeat:repeat-x;
+}
+.Libelle
+{
+ font-family : Arial;
+ font-size : 10pt;
+ color: #003399;
+ background-color : #FFFFFF;
+}
+.Saisie
+{
+ font-family : Verdana,Arial;
+ font-size : 8pt;
+ background-color : #E4E4E4;
+ font-weight: bold
+}
+.Tableau {
+ FONT-SIZE: small; //8pt;
+ COLOR: #FFFFFF;
+ FONT-FAMILY: Verdana;
+ background-color: #003399;
+ font-weight: bold
+}
+.TableauActif {
+ FONT-SIZE: small; //8pt;
+ COLOR: #FFFF00;
+ FONT-FAMILY: Verdana;
+ background-color: #003399;
+ font-weight: bold;
+}
+.lienonglet { font-family: Arial; font-size: 12px; font-style: normal; font-weight: bold; color: #FFFFFF; text-decoration: none }
+.textegrasbleu { font-family: Arial; font-size: 12px; font-style: normal; font-weight: bold; color: #003399; text-decoration: none }
+.textegrasgris { font-family: Arial; font-size: 12px; font-style: normal; font-weight: bold; color: #AFAFAF; text-decoration: none }
+.Libellebouton { FONT-SIZE: 8pt; COLOR: #000000; FONT-FAMILY: Verdana; font-style: normal; font-weight: bold; text-decoration: none}
\ No newline at end of file
--- /dev/null
+// nom attribue aux donnees a obtenir
+// 'pour' et 'cc' et tableaux associes
+
+// champs Ldap demandés
+ var m_champs='cn,dn,mail,uid,sn,givenname';
+
+// nature des boites a afficher
+ var t_data=new Array;
+ t_data['pour']='pour';
+ t_data['cc']='cc';
+
+// nature des boites a afficher
+ var t_nature=new Array;
+ t_nature['pour']='BALI,BALR';
+ t_nature['cc']='BALI';
+
+// parametre 'agenda' pour OGo
+ var t_agenda=new Array;
+ t_agenda['pour']='';
+ t_agenda['cc']='';
+
+// nom des fenetres
+ var t_fen=new Array;
+ t_fen['pour']='ArboPour';
+ t_fen['cc']='ArboCc';
+
+// nom des fenetres
+ var t_nom=new Array;
+ t_nom['pour']='Titre,Bandeau';
+ t_nom['cc']='Titre,Bandeau';
+
+// tableau des identifiants des fenetres utilisees
+ var t_idfen=new Array;
+
+ function AppelAnais(m_type, FoncRetour)
+ {
+ lien = '../../Admin/Autres/aideFonc.php?m_fonc=' + FoncRetour + '&m_data=' + m_type + '&m_nom=' + t_nom[m_type] + '&m_type=' + m_type + '&m_champ=' + m_champs + '&m_nature=' + t_nature[m_type] + '&m_agenda=' + t_agenda[m_type] + '#mon_etiquette';
+ t_idfen[m_type] = window.open(lien,
+ t_fen[m_type],
+ 'width=350, height=600, left=10 ,top=10 ,toolbar=no, dependent=yes, menubar=no, location=no, resizable=yes, scrollbars=yes, directories=no, status=no');
+ if(t_idfen[m_type]) t_idfen[m_type].focus();
+ }
+ function RetourAnais()
+ {
+ var typ = arguments[0];
+ var v_champs=new Array;
+ for(i=0;i<m_champs.split(',').length;i++) v_champs[m_champs.split(',')[i]]=arguments[i+1];
+
+ document.forms['saisieExemple'].elements['type'].value=typ;
+ // champs a la demande ....
+ if( v_champs["cn"] ) { // on verifie que cn est bien renseigne pour la boite
+ var existe=0;
+ var o=new Option(v_champs["cn"],v_champs["cn"]);
+// suivant le contenu de typ, on selectionne la ListBox correspondante
+ if(typ=="pour")
+ var elem_ad=document.forms['saisieExemple'].elements['choix_pour'];
+ else if(typ=="cc")\r
+ var elem_ad=document.forms['saisieExemple'].elements['choix_cc'];
+// on teste l existance de la selection dans la ListBox concernee
+ if (elem_ad.options.length > 0) {
+ for (var i=0; i<elem_ad.options.length; i++) {
+ if(o.value==elem_ad.options[i].text)
+ existe=1;\r
+ }\r
+ }
+ if(existe==1)
+ alert('la boite est déjà sélectionnée!');
+ else
+ { // on renseigne tous les champs de la page appelante
+ for(att in v_champs)
+ if(v_champs[att]) document.forms['saisieExemple'].elements[att].value=v_champs[att];
+// on ajoute la selection dans la listbox qui va bien
+ elem_ad.options[elem_ad.options.length]=o;
+ }
+ }\r
+ else
+ alert('Pas de nom d affichage pour cette boite');
+ }
+ function fermerFen(nom_fen)
+ {
+ if( t_idfen[nom_fen] )
+ t_idfen[nom_fen].close();
+ }
+ function fermerAnais()
+ {
+ for(indice in t_idfen)
+ if( t_idfen[indice] )
+ t_idfen[indice].close();
+ }
+
+/************************************************************
+ choix de la feuille de style
+************************************************************/
+function lienFeuilleDeStyles(niveau)
+{
+ var sNiveau="";
+
+ var suffixe;
+ switch (navigator.appName)
+ {
+ case "Microsoft Internet Explorer":
+ case "Opera":
+ suffixe = "IE";
+ break;
+ default:
+ suffixe = "NS";
+ break;
+ }
+
+ document.write("<link rel='stylesheet' type='text/css' href='"
+ + sNiveau + "../../Commun/Js/local" + suffixe + ".css'>");
+}
+
--- /dev/null
+/* amedeeIE.css 16/02/2003
+*/
+
+a:link {
+ color: #0000cc;
+ text-decoration: none;
+}
+a:visited {
+/* color: #990000;*/
+ color: #0000cc;
+ text-decoration: none;
+}
+a:hover {
+ color: red;
+ text-decoration: underline;
+}
+
+body {
+ background-color: white;
+}
+form {
+ border-spacing: 30pt;
+ margin: 10 0 10 0;
+}
+
+h1,.titrePage,.titre1,.Titre {
+ FONT-WEIGHT: normal;
+ FONT-SIZE: medium;
+ COLOR: #ffffff;
+ FONT-FAMILY: Arial;
+ BACKGROUND-COLOR: #003399;
+}
+.titreBoite {
+ FONT-WEIGHT: normal;
+ FONT-SIZE: medium;
+ COLOR: #ffffff;
+ FONT-FAMILY: Arial;
+ BACKGROUND-COLOR: #003399;
+ border-width:0;
+}
+h2,.titreGauche,.titre2,.Titre2 {
+ FONT-WEIGHT: bold;
+ FONT-SIZE: x-small;
+ COLOR: #ffffff;
+ FONT-FAMILY: Arial;
+ BACKGROUND-COLOR: #999999;
+}
+td,p,.textecourant {
+ font-family: Arial;
+ font-size: x-small;
+ font-style: normal;
+ font-weight: normal;
+ color: black;
+ empty-cells: show;
+}
+/* pas pour IE
+hr {
+ color: white;
+ border-style: solid;
+ background-color: #999999;
+ border-width: 2;
+ border-collapse: collapse;
+}
+*/
+
+i {
+ color:#909090;
+}\r
+
+.tableBleue {
+ border-collapse: collapse;
+ border-color: #003399;
+ border-style: solid;
+ border-width: 2;
+}
+.nomintranet {
+ FONT-WEIGHT: bold;
+ FONT-SIZE: 18pt;
+ MARGIN-LEFT: 0px;
+ WIDTH: 100px;
+ COLOR: #003399;
+ FONT-FAMILY: Arial;
+ TEXT-ALIGN: right;
+}
+.signature {
+ font-family: Arial;
+ font-size: x-small;
+ font-weight: normal;
+ color: black;
+}
+.onglet {
+ FONT-WEIGHT: bold;
+ FONT-SIZE: x-small;
+ COLOR: #ffffff;
+ FONT-FAMILY: Arial;
+ TEXT-ALIGN: left;
+ TEXT-DECORATION: none;
+ background-color: #999999;
+}
+.onglet:selected {
+ color:white;
+ text-decoration: none;
+}
+.ongletSelecte,.tdOngletSelecte {
+ FONT-WEIGHT: bold;
+ FONT-SIZE: x-small;
+ COLOR: white;
+ FONT-FAMILY: Arial;
+ TEXT-ALIGN: left;
+ TEXT-DECORATION: none;
+ background-color: #003399;
+}
+.ongletRenvoi {
+ FONT-WEIGHT: bold;
+ FONT-SIZE: x-small;
+ COLOR: white;
+ FONT-FAMILY: Arial;
+ TEXT-ALIGN: left;
+ TEXT-DECORATION: none;
+ background-color: #cccccc;
+}
+.lienonglet {
+ FONT-WEIGHT: bold;
+ FONT-SIZE: 10pt;
+ COLOR: #FFFFFF;
+ FONT-FAMILY: Arial;
+ TEXT-ALIGN: left;
+ TEXT-DECORATION: none;
+}
+.voirAussi {
+ text-align: right;
+ font-family: Arial;
+ font-size: x-small;
+ font-style: normal;
+ font-weight: normal;
+ color: #000000;
+ text-decoration: none;
+ text-align: right;
+}
+.MenuGaucheSelect {
+ FONT-SIZE: 8pt;
+ FONT-FAMILY: Arial;
+ TEXT-ALIGN: right;
+ font-style: normal;
+ font-weight: normal
+}
+.margeGauche{
+ width: 105pt;
+ FONT-FAMILY: Arial;
+ TEXT-ALIGN: left;
+ font-style: normal;
+ font-weight: normal;
+}
+.menuGauche{
+ width: 100pt;
+}
+.boutonpicto {
+ font-family: Arial;
+ font-size: x-small; //12px;
+ font-style: normal;
+ font-weight: bold;
+ color: #000000;
+ text-decoration: none;
+}
+.boutonpicto a:link,.boutonpicto a:visited { text-decoration: none; color : #0000cc; }\r
+.boutonpicto a:hover { text-decoration: none; color : red; }
+.ligne0 {
+ background-color: #ffffff;
+}
+.ligne1 {
+ background-color: #eeeeee;
+}
+.modificationchamp {
+ font-family: Arial;
+ font-size: 8pt;
+ font-style: normal;
+ font-weight: bold;
+ color: #FF0000;
+ text-decoration: none;
+}
+th,.entetetableau {
+ font-family: Arial;
+ font-size: x-small;
+ font-style: normal;
+ font-weight: bold;
+ color: #003399;
+ text-decoration: none;
+}
+.Lien {
+ color:black;
+ text-decoration:none;
+ font-size: x-small;
+ FONT-FAMILY: Arial;
+ font-style: normal;
+ font-weight: normal;
+}
+//.Lien:hover {
+// color:red;
+// text-decoration:underline;
+//}
+.Lien:visited {
+ color:#660066;
+ text-decoration:none; //underline;
+}
+.TDBleu0
+{
+ background-color: #ffff00;
+ background-repeat:repeat-x;
+}
+.TDBleu {
+ background-IMAGE: url("./CommunWeb/Images/background_piedpage.gif");
+ background-repeat:repeat-x;
+}
+.TDBleu1
+{
+ background-IMAGE: url("./CommunWeb/Images/pixel_bleu_fonce.gif");
+ background-repeat:repeat-x;
+}
+.Libelle
+{
+ font-family : Arial;
+ font-size : 10pt;
+ color: #003399;
+ background-color : #FFFFFF;
+}
+.Saisie
+{
+ font-family : Verdana,Arial;
+ font-size : 8pt;
+ background-color : #E4E4E4;
+ font-weight: bold
+}
+.Tableau {
+ FONT-SIZE: x-small; //8pt;
+ COLOR: #FFFFFF;
+ FONT-FAMILY: Verdana;
+ background-color: #003399;
+ font-weight: bold
+}
+.TableauActif {
+ FONT-SIZE: x-small; //8pt;
+ COLOR: #FFFF00;
+ FONT-FAMILY: Verdana;
+ background-color: #003399;
+ font-weight: bold;
+}
+.textegrasbleu {
+ font-family: Arial;
+ font-size: 12px;
+ font-style: normal;
+ font-weight: bold;
+ color: #003399;
+ text-decoration: none
+}
+.textegrasgris {
+ font-family: Arial;
+ font-size: 12px;
+ font-style: normal;
+ font-weight: bold;
+ color: #999999;
+ text-decoration: none
+}
+.Libellebouton {
+ FONT-SIZE: 8pt;
+ COLOR: #000000;
+ FONT-FAMILY: Verdana;
+ font-style: normal;
+ font-weight: bold;
+ text-decoration: none
+}
+.Visible {
+}
+.Invisible {
+ display: none;
+}
\ No newline at end of file
--- /dev/null
+/* amedeeNS.css 10/02/2003
+*/
+
+a:link {
+ color: #0000cc;
+ text-decoration: none;
+}
+a:visited {
+ color: #0000cc;
+ text-decoration: none;
+}
+a:hover {
+ color: red;
+ text-decoration: underline;
+}
+
+body {
+ background-color: white;
+}
+form {
+ border-spacing: 30pt;
+ margin: 10 0 10 0;
+}
+
+h1,.titrePage,.titre1,.Titre {
+ FONT-WEIGHT: normal;
+ FONT-SIZE: large;
+ COLOR: #ffffff;
+ FONT-FAMILY: Arial;
+ BACKGROUND-COLOR: #003399;
+}
+.titreBoite {
+ FONT-WEIGHT: normal;
+ FONT-SIZE: large;
+ COLOR: #ffffff;
+ FONT-FAMILY: Arial;
+ BACKGROUND-COLOR: #003399;
+ border-width: 0;
+}
+h2,.titreGauche,.titre2,.Titre2 {
+ FONT-WEIGHT: bold;
+ FONT-SIZE: small;
+ COLOR: #ffffff;
+ FONT-FAMILY: Arial;
+ BACKGROUND-COLOR: #999999;
+}
+td,p,.textecourant {
+ font-family: Arial;
+ font-size: small;
+ font-weight: normal;
+ color: black;
+ empty-cells: show;
+}
+hr {
+ color: white;
+ border-style: solid;
+ background-color: #999999;
+ border-width: 2;
+ border-collapse: collapse;
+}
+
+i {
+ color:#909090;
+}\r
+
+.tableBleue {
+ border-collapse: collapse;
+ border-color: #003399;
+ border-style: solid;
+ border-width: 2;
+}
+.nomintranet {
+ FONT-WEIGHT: bold;
+ FONT-SIZE: 18pt;
+ MARGIN-LEFT: 0px;
+ WIDTH: 100px;
+ COLOR: #003399;
+ FONT-FAMILY: Arial;
+ TEXT-ALIGN: right
+}
+.signature {
+ font-family: Arial;
+ font-size: small;
+ font-weight: normal;
+ color: black;
+}
+.onglet {
+ FONT-WEIGHT: bold;
+ FONT-SIZE: small;
+ COLOR: #ffffff;
+ FONT-FAMILY: Arial;
+ TEXT-ALIGN: left;
+ TEXT-DECORATION: none;
+ background-color: #999999;
+}
+.onglet:selected {
+ color:white;
+ text-decoration: none;
+}
+.ongletSelecte,.tdOngletSelecte {
+ FONT-WEIGHT: bold;
+ FONT-SIZE: small;
+ COLOR: white;
+ FONT-FAMILY: Arial;
+ TEXT-ALIGN: left;
+ TEXT-DECORATION: none;
+ background-color: #003399;
+}
+.ongletRenvoi {
+ FONT-WEIGHT: bold;
+ FONT-SIZE: small;
+ COLOR: white;
+ FONT-FAMILY: Arial;
+ TEXT-ALIGN: left;
+ TEXT-DECORATION: none;
+ background-color: #cccccc;
+}
+.lienonglet {
+ FONT-WEIGHT: bold;
+ FONT-SIZE: 10pt;
+ COLOR: #FFFFFF;
+ FONT-FAMILY: Arial;
+ TEXT-ALIGN: left;
+ TEXT-DECORATION: none;
+}
+.voirAussi {
+ text-align: right;
+ font-family: Arial;
+ font-size: x-small;
+ font-style: normal;
+ font-weight: normal;
+ color: #000000;
+ text-decoration: none;
+ text-align: right;
+}
+.MenuGaucheSelect {
+ FONT-SIZE: 8pt;
+ FONT-FAMILY: Arial;TEXT-ALIGN: right;
+ font-style: normal;
+ font-weight: normal
+}
+.margeGauche{
+ width: 105pt;
+ FONT-FAMILY: Arial;
+ TEXT-ALIGN: left;
+ font-style: normal;
+ font-weight: normal;
+}
+.menuGauche{
+ width: 100pt;
+}
+.boutonpicto {
+ font-size: 12px;
+ font-style: normal;
+ font-weight: bold;
+ color: #000000;
+ text-decoration: none
+}
+.boutonpicto a:link,.boutonpicto a:visited { text-decoration: none; color : #0000cc; }\r
+.boutonpicto a:hover { text-decoration: none; color : red; }
+.ligne0 {
+ background-color: #ffffff;
+}
+.ligne1 {
+ background-color: #eeeeee;
+}
+.modificationchamp {
+ font-family: Arial;
+ font-size: 8pt;
+ font-style: normal;
+ font-weight: bold;
+ color: #FF0000;
+ text-decoration: none
+}
+th,.entetetableau {
+ font-family: Arial;
+ font-size: x-small;
+ font-style: normal;
+ font-weight: bold;
+ color: #003399;
+ text-decoration: none
+}
+.Lien {
+ color:blue;
+ text-decoration:underline;
+ font-size:8pt;
+ FONT-FAMILY: Arial;
+ font-style: normal;
+ font-weight: normal;
+}
+.Lien:hover {
+ color:red;
+ text-decoration:underline;
+ font-size:8pt;
+ FONT-FAMILY: Arial;
+}
+.Lien:visited {
+ color:660066;
+ text-decoration:underline;
+ font-size:8pt;
+ FONT-FAMILY: Arial;
+}
+.lienonglet {
+ FONT-WEIGHT: bold;
+ FONT-SIZE: 10pt;
+ COLOR: #FFFFFF;
+ FONT-FAMILY: Arial;
+ TEXT-ALIGN: left;
+ TEXT-DECORATION: none
+}
+.TDBleu0
+{
+ background-color: #ffff00;
+ background-repeat:repeat-x;
+}
+.TDBleu {
+ background-IMAGE: url("./CommunWeb/Images/background_piedpage.gif");
+ background-repeat:repeat-x;
+}
+.TDBleu1
+{
+ background-IMAGE: url("./CommunWeb/Images/pixel_bleu_fonce.gif");
+ background-repeat:repeat-x;
+}
+.Libelle
+{
+ font-family : Arial;
+ font-size : 10pt;
+ color: #003399;
+ background-color : #FFFFFF;
+}
+.Saisie
+{
+ font-family : Verdana,Arial;
+ font-size : 8pt;
+ background-color : #E4E4E4;
+ font-weight: bold
+}
+.Tableau {
+ FONT-SIZE: small; //8pt;
+ COLOR: #FFFFFF;
+ FONT-FAMILY: Verdana;
+ background-color: #003399;
+ font-weight: bold
+}
+.TableauActif {
+ FONT-SIZE: small; //8pt;
+ COLOR: #FFFF00;
+ FONT-FAMILY: Verdana;
+ background-color: #003399;
+ font-weight: bold;
+}
+.lienonglet { font-family: Arial; font-size: 12px; font-style: normal; font-weight: bold; color: #FFFFFF; text-decoration: none }
+.textegrasbleu { font-family: Arial; font-size: 12px; font-style: normal; font-weight: bold; color: #003399; text-decoration: none }
+.textegrasgris { font-family: Arial; font-size: 12px; font-style: normal; font-weight: bold; color: #AFAFAF; text-decoration: none }
+.Libellebouton { FONT-SIZE: 8pt; COLOR: #000000; FONT-FAMILY: Verdana; font-style: normal; font-weight: bold; text-decoration: none}
\ No newline at end of file
--- /dev/null
+<?
+// if(PHP_OS != "WINNT") @session_save_path("/session/anaisweb");
+ @session_start();\r
+
+if( ! isset($_SESSION['charge_a']) )
+{
+// flag precisant si l arborescence a ete deja chargee ou non
+ $_SESSION['charge_a'] = 0;
+\r
+ $_SESSION['grise'] = 1; // on affiche en grisé les objets sans lien actif\r
+
+ $_SESSION['base_serv'] = "ou=melanie,ou=organisation,dc=equipement,dc=gouv,dc=fr";
+
+// $_SESSION['maitre_serv_a'] = "x.x.x.x";
+// $_SESSION['maitre_serv'] = "127.0.0.1";\r
+ \r
+// $_SESSION['maitre_serv'] = "172.20.41.83";\r
+ $_SESSION['maitre_serv'] = "192.168.251.160";\r
+// $_SESSION['maitre_serv'] = "172.20.213.1";\r
+// $_SESSION['maitre_serv'] = "172.20.213.4";\r
+
+ $_SESSION['lib_serv'] = ChercheDescription( $_SESSION['base_serv'] );
+}
+
+function nettoie_session()
+{
+ session_unset();
+// Détruit toutes les variables de session\r
+ $_SESSION = array();\r
+\r
+// Finalement, on détruit la session.\r
+ session_destroy();\r
+}
+
+function ChercheDescription( $dn )
+{
+ $wdesc=$dn;
+ $connect=@ldap_connect($_SESSION['maitre_serv']);
+
+ if($connect)
+ {
+ ldap_set_option($connect, LDAP_OPT_PROTOCOL_VERSION, 3);
+
+ $bind=@ldap_bind($connect);
+ if($bind)
+ {
+ $search=ldap_read($connect, $dn, "objectclass=organizationalUnit");
+
+ if($search)
+ {
+ $boites=ldap_get_entries($connect, $search);
+
+ if($boites["count"]==1)
+ {
+ $wdesc=$boites[0]["description"][0];
+ }
+ ldap_free_result($search);
+ }
+ }
+ ldap_close($connect);
+ }
+
+ else
+ {
+ ?>
+ <script>
+ javascript:alert('Le serveur de messagerie ne peut etre joint.\\nRecommencez ulterieurement.');
+ </script>
+ <?
+ }
+
+ return $wdesc;
+}
+
+?>
--- /dev/null
+<?
+function isBoit( $type )\r
+{
+ $ret=FALSE;\r
+ \r
+ $typ=explode( ",", $type );\r
+\r
+ foreach($typ as $wtype)\r
+ {
+ switch (trim($wtype)) {\r
+ case "BALI": \r
+ case "BALF": \r
+ case "BALR": \r
+ case "BALA": \r
+ case "BALS": \r
+ case "BALU": $ret=TRUE; break;\r
+ }\r
+ }
+
+ return $ret;\r
+}\r
+
+function isList( $type )\r
+{
+ $ret=FALSE;\r
+
+ $typ=explode( ",", $type );\r
+ foreach($typ as $wtype)\r
+ {
+ switch (trim($wtype)) {\r
+ case "LDIS":\r
+ case "LDAB": $ret=TRUE; break;\r
+ }
+ }
+
+ return $ret;\r
+}
+
+function isEnti( $type )\r
+{
+ $ret=FALSE;\r
+
+ $typ=explode( ",", $type );\r
+\r
+ foreach($typ as $wtype)\r
+ {
+ switch (trim($wtype)) {\r
+ case "NSER":
+ case "NUNI": $ret=TRUE; break;
+ }\r
+ }
+
+ return $ret;\r
+}\r
+\r
+function isArbo( $type )\r
+{
+ $ret=FALSE;\r
+
+ $typ=explode( ",", $type );\r
+\r
+ foreach($typ as $wtype)\r
+ {
+ switch (trim($wtype)) {\r
+ case "NGRO":
+ case "NSER":
+ case "NUNI": $ret=TRUE; break;
+ }\r
+ }
+
+ return $ret;\r
+}
+
+function isNser( $type )\r
+{
+ $ret=FALSE;\r
+
+ $typ=explode( ",", $type );\r
+\r
+ foreach($typ as $wtype)\r
+ {
+ switch (trim($wtype)) {\r
+ case "NSER": $ret=TRUE; break;
+ }\r
+ }
+
+ return $ret;\r
+}\r
+\r
+function isNuni( $type )\r
+{
+ $ret=FALSE;\r
+
+ $typ=explode( ",", $type );\r
+\r
+ foreach($typ as $wtype)\r
+ {
+ switch (trim($wtype)) {\r
+ case "NUNI": $ret=TRUE; break;
+ }\r
+ }
+
+ return $ret;\r
+}\r
+\r
+function isBali( $type )\r
+{\r
+ $ret=FALSE;\r
+
+ $typ=explode( ",", $type );\r
+\r
+ foreach($typ as $wtype)\r
+ {
+ if( strcasecmp($wtype, "BALI")==0 ) $ret=TRUE;\r
+ }
+
+ return $ret;\r
+}\r
+
+function isBalf( $type )\r
+{\r
+ $ret=FALSE;\r
+
+ $typ=explode( ",", $type );\r
+\r
+ foreach($typ as $wtype)\r
+ {
+ if( strcasecmp($wtype, "BALF")==0 ) $ret=TRUE;\r
+ }
+
+ return $ret;\r
+}\r
+\r
+function isBalr( $type )\r
+{\r
+ $ret=FALSE;\r
+
+ $typ=explode( ",", $type );\r
+\r
+ foreach($typ as $wtype)\r
+ {
+ if( strcasecmp($wtype, "BALR")==0 ) $ret=TRUE;\r
+ }
+
+ return $ret;\r
+}\r
+\r
+function isBala( $type )\r
+{\r
+ $ret=FALSE;\r
+
+ $typ=explode( ",", $type );\r
+\r
+ foreach($typ as $wtype)\r
+ {
+ if( strcasecmp($wtype, "BALA")==0 ) $ret=TRUE;\r
+ }
+
+ return $ret;\r
+}\r
+\r
+function isBals( $type )\r
+{\r
+ $ret=FALSE;\r
+
+ $typ=explode( ",", $type );\r
+\r
+ foreach($typ as $wtype)\r
+ {
+ if( strcasecmp($wtype, "BALS")==0 ) $ret=TRUE;\r
+ }
+
+ return $ret;\r
+}\r
+\r
+function isBalu( $type )\r
+{\r
+ $ret=FALSE;\r
+
+ $typ=explode( ",", $type );\r
+\r
+ foreach($typ as $wtype)\r
+ {
+ if( strcasecmp($wtype, "BALU")==0 ) $ret=TRUE;\r
+ }
+
+ return $ret;\r
+}\r
+\r
+function isLdis( $type )\r
+{\r
+ $ret=FALSE;\r
+
+ $typ=explode( ",", $type );\r
+\r
+ foreach($typ as $wtype)\r
+ {
+ if( strcasecmp($wtype, "LDIS")==0 ) $ret=TRUE;\r
+ }
+
+ return $ret;\r
+}\r
+\r
+function isLdab( $type )\r
+{\r
+ $ret=FALSE;\r
+
+ $typ=explode( ",", $type );\r
+\r
+ foreach($typ as $wtype)\r
+ {
+ if( strcasecmp($wtype, "LDAB")==0 ) $ret=TRUE;\r
+ }
+
+ return $ret;\r
+}\r
+
+?>
\ No newline at end of file
--- /dev/null
+<?
+
+function traiteAnaisDN( $dn, $m_data, $type, $champ, $nature, $agenda )\r
+{\r
+ session_cache_limiter('nocache');
+
+ $sep="\t";
+
+ $arbre = "arbre".$m_data;
+ $arbre_data = "arbre_data".$m_data;
+ $niveau_data = "niveau_data".$m_data;
+
+ $champs=explode(",", $champ);
+
+ $champs_b=array("mineqTypeEntree", "mineqPortee", "cn");
+ for($i=0; $i < count($champs); $i++)
+ {
+ $champs[$i]=trim($champs[$i]);
+ if(strlen($champs[$i]) > 0)
+ $champs_b[]=$champs[$i];
+ }
+
+ $mel1=0; $mel2=0; $nbf=0;
+ if( $nature != "" )
+ {
+ $t_filtre = explode(",", $nature);
+ if( count($t_filtre) > 0 )
+ {
+ for($i=0; $i < count($t_filtre); $i++)
+ {
+ if( strcasecmp($t_filtre[$i], "MEL1") == 0 ) $mel1=1;
+ else if( strcasecmp($t_filtre[$i], "MEL2") == 0 ) $mel2=1;
+ else $nbf++;
+ }
+ }
+ }
+ if($mel1==1)
+ $filtre = "(&(objectClass=mineqmeldp)(mail=*)";
+ else if($mel2==1)
+ $filtre = "(&(|(objectClass=mineqmelliste)(objectClass=mineqmelboite))(mail=*)";
+ else
+ $filtre = "(&(|(objectClass=mineqmelliste)(objectClass=mineqmelboite)(objectClass=mineqmeldp))(mail=*)";
+
+/*
+ if( $nature != "" )
+ {
+ $t_filtre = explode(",", $nature);
+ if( $nbf > 0 )
+ {
+ if( $nbf > 1 ) $filtre = $filtre . "(|";
+ for($i=0; $i < count($t_filtre); $i++)
+ {
+ if( ( strcasecmp($t_filtre[$i], "MEL1") != 0 ) && ( strcasecmp($t_filtre[$i], "MEL2") != 0 ) )
+ $filtre = $filtre . "(mineqTypeEntree=".$t_filtre[$i].")";
+ }
+ if( $nbf > 1 ) $filtre = $filtre . ")";
+ }
+ }
+*/
+ $filtre = $filtre . ")";
+
+ //******************************************************************************************************************//
+ $connect=ldap_connect($_SESSION['maitre_serv']);
+
+ if($connect)
+ {
+ ldap_set_option($connect, LDAP_OPT_PROTOCOL_VERSION, 3);
+ $bind=ldap_bind($connect);
+ if($bind)
+ {
+ if(isset($_SESSION[$arbre][$dn]))
+ {
+ unset($_SESSION[$arbre][$dn]);
+ }
+ $w_arbre=array();
+
+ $champs_u=array("mineqTypeEntree", "mineqPortee", "ou", "description");
+
+ $search_o=ldap_list($connect, $dn, "objectClass=organizationalUnit", $champs_u);
+ //if(TRACE==1) $nb_r++;
+ if( $search_o )
+ {
+ $unites=ldap_first_entry($connect, $search_o);
+
+ while($unites)
+ {
+ $entree=@ldap_get_values($connect,$unites,"mineqTypeEntree");
+ $portee=@ldap_get_values($connect,$unites,"mineqPortee");
+ $description=ldap_get_values($connect,$unites,"description");
+ $dn4=ldap_get_dn($connect,$unites);
+ $w_arbre[]=$dn4;
+ $typeb=$entree[0].",".$portee[0];
+ $_SESSION[$arbre_data][$dn4]="<b>".utf8_decode($description[0])."</b>".$sep.$typeb;/*.$sep."litentite.php?vmvt=2&vtyp=0&vdn=".$sep."PageUn";*/
+
+ $unites=ldap_next_entry($connect, $unites);
+ }
+ ldap_free_result($search_o);
+ }
+
+// $champs_b=array("mineqTypeEntree", "mineqPortee", "cn", "mail", "uid");
+
+ $search_b=ldap_list($connect, $dn, $filtre, $champs_b);
+// $search_b=ldap_list($connect, $dn, "(&(|(objectClass=mineqmeldp)(objectClass=mineqmelliste)(objectClass=organizationalperson))(mail=*))", $champs_b);
+ if( $search_b )
+ {
+ $boite=ldap_first_entry($connect, $search_b);
+ while($boite)
+ {
+ $dn4=ldap_get_dn($connect,$boite);
+ $t_dn=array( $dn4 );
+
+ $cnb=ldap_get_values($connect,$boite,"cn");
+ $entree=@ldap_get_values($connect,$boite,"mineqTypeEntree");
+ $portee=@ldap_get_values($connect,$boite,"mineqPortee");
+
+ for($j=0; $j < count($champs); $j++)
+ if( strcasecmp($champs[$j], "dn") == 0 )
+ $val[$j]=$t_dn;
+ else
+ $val[$j]=@ldap_get_values($connect,$boite,"$champs[$j]");
+
+ $w_arbre[]=$dn4;
+ $typeb=$entree[0].",".$portee[0];
+ $tmp=utf8_decode($cnb[0]).$sep.$typeb.$sep.$dn4;
+ for($j=0; $j < count($champs); $j++)
+ $tmp=$tmp.$sep.utf8_decode($val[$j][0]);
+ $_SESSION[$arbre_data][$dn4]=$tmp;
+
+ $boite=ldap_next_entry($connect, $boite);
+ }
+ ldap_free_result($search_b);
+ }
+
+ $_SESSION['w_arbre_data']=$arbre_data;
+ usort( $w_arbre, 'compareAnais' );
+ $_SESSION[$arbre][$dn] = $w_arbre;
+ session_write_close();
+ }
+ else
+ {
+ @msgalerte( 0, "Problème lors de la connection au serveur ldap" );
+ }
+ ldap_close($connect);
+ }
+ else
+ {
+ @msgalerte( 0, "Problème lors de la connection au serveur ldap" );
+ }
+
+ return ;\r
+}
+\r
+function compareAnais( $dn1, $dn2 )
+{
+ $sep="\t";
+ $sep2=",";
+ $arbre_data=$_SESSION['w_arbre_data'];
+
+ $wdn1 = explode( $sep, $_SESSION[$arbre_data][$dn1] );
+ $wdn2 = explode( $sep, $_SESSION[$arbre_data][$dn2] );
+
+ assert( is_array( $wdn1 ) );
+ assert( is_array( $wdn2 ) );
+
+ if( 0 === strcasecmp( $wdn1[0], $wdn2[0] ) )
+ return 0;
+
+ $wtyp1 = explode( $sep2, $wdn1[1] );
+ $wtyp2 = explode( $sep2, $wdn2[1] );
+
+ assert( is_array( $wtyp1 ) );
+ assert( is_array( $wtyp2 ) );
+
+ switch ($wtyp1[0]) {\r
+ case "NGRO": $wtmp1="00".$wdn1[0]; break;\r
+ case "NSER": $wtmp1="00".$wdn1[0]; break;\r
+ case "NUNI": $wtmp1="00".$wdn1[0]; break;\r
+ case "BALI": $wtmp1="01".$wdn1[0]; break;\r
+ case "BALF": $wtmp1="02".$wdn1[0]; break;\r
+ case "BALR": $wtmp1="03".$wdn1[0]; break;\r
+ case "BALA": $wtmp1="04".$wdn1[0]; break;\r
+ case "BALS": $wtmp1="05".$wdn1[0]; break;\r
+ case "BALU": $wtmp1="06".$wdn1[0]; break;\r
+ case "LDIS": $wtmp1="07".$wdn1[0]; break;\r
+ case "LDAB": $wtmp1="07".$wdn1[0]; break;
+ default: $wtmp1="10".$wdn1[0];\r
+ }
+
+ switch ($wtyp2[0]) {\r
+ case "NGRO": $wtmp2="00".$wdn2[0]; break;\r
+ case "NSER": $wtmp2="00".$wdn2[0]; break;\r
+ case "NUNI": $wtmp2="00".$wdn2[0]; break;\r
+ case "BALI": $wtmp2="01".$wdn2[0]; break;\r
+ case "BALF": $wtmp2="02".$wdn2[0]; break;\r
+ case "BALR": $wtmp2="03".$wdn2[0]; break;\r
+ case "BALA": $wtmp2="04".$wdn2[0]; break;\r
+ case "BALS": $wtmp2="05".$wdn2[0]; break;\r
+ case "BALU": $wtmp2="06".$wdn2[0]; break;\r
+ case "LDIS": $wtmp2="07".$wdn2[0]; break;\r
+ case "LDAB": $wtmp2="07".$wdn2[0]; break;
+ default: $wtmp2="10".$wdn2[0];\r
+ }
+
+ return strcasecmp( $wtmp1, $wtmp2 );
+}
+?>
\ No newline at end of file
--- /dev/null
+<html>
+<head>
+<title>Exemple Anais</title>
+</head>
+<body>
+<script>
+ javascript:location.replace('./Admin/Accueil/Exemple.php');
+</script>
+</body>
+</html>
--- /dev/null
+<html>
+<head>
+<title>Exemple simple Anais</title>
+</head>
+<body>
+<script>
+ javascript:location.replace('./Admin/Accueil/Simple.php');
+</script>
+</body>
+</html>
}
s =
- @"function %@(type, cn, dn, email, uid, sn) {\n"
+ // @"function %@(type, cn, dn, email, uid, sn) {\n"
+ // @" addToTable('%@', type, cn, dn, email, uid, sn);\n"
+ // @"}\n";
+ @"function %@() {\n"
+ @" var type=arguments[0];\n"
+ @" var email=arguments[1];\n"
+ @" var uid=arguments[2];\n"
+ @" var sn=arguments[3];\n"
+ @" var cn=arguments[4];\n"
+ @" var dn=arguments[5];\n"
@" addToTable('%@', type, cn, dn, email, uid, sn);\n"
@"}\n";
+
[ms appendFormat:s, [self callbackName], [self tableId]];
return ms;
}
label:title="Search in Anais"
var:windowId="windowId"
var:division="division"
- var:callback="callbackName" />
+ var:callback="callbackName"
+ const:extraAttributes="cn,dn"/>
<var:if condition="withAddressBook">
<var:component className="UIxContactSelector"
label:title="Search in Addressbook"
- (NSString *)jsCode {
static NSString *codeFmt = \
@"function %@() {\n"
- @" var url = '/anais/aideAnais.php?m_fonc=%@%@&m_champ=mail,uid,sn%@#mon_etiquette';\n"
+ @" var url = '/anais/Admin/Autres/aideFonc.php?m_fonc=%@&m_data=data1&m_type=Pour&m_nom=Titre,Bandeau%@&m_champ=mail,uid,sn%@&m_nature=BALI&m_agenda0#mon_etiquette';\n"
@" var anaisWindow = window.open(url, '%@', 'width=350, height=600, left=10, top=10, toolbar=no, dependent=yes, menubar=no, location=no, resizable=yes, scrollbars=yes, directories=no, status=no');\n"
@" anaisWindow.focus();\n"
@"}";
}
- (NSString *)anaisPath {
- return @"/anais/aideAnais.php";
+ return @"/anais/Admin/Autres/aideFonc.php";
}
- (id)defaultAction {