Voila, j'ai un problème .Je souhaiterai que mon moteur de recherche dans mo annuaire ldap déja mis en palce et fonctionnel filtre les utilisateurs qui auront la fonction "invisible". voici ma page annuaire en php:
<html>
<title>******- Intranet</title>
<LINK REL="StyleSheet" HREF="../intranet.css" TYPE="text/css">
<STYLE type="text/css">
</STYLE>
<head>
<!-- Inserer ici le code éventuel pour un script //-->
<script type="text/javascript" language="javascript">
<!--
function twAller(_url,_cadre,_target) {
if (_cadre) {
parent._cadre.location.href = _url;
} else if (_target) {
_target = window.open(_url,_target);
} else {
window.location.href = _url;
}
}
//-->
</script>
<?php
$aujourdhui = getdate();
$mois = $aujourdhui['mon'];
$jour = $aujourdhui['mday'];
$annee = $aujourdhui['year'];
?>
<?php
$aujourdhui = getdate();
$mois = $aujourdhui['mon'];
$jour = $aujourdhui['mday'];
$annee = $aujourdhui['year'];
?>
<!-- Fin du code script //-->
</head>
<?
echo "
</head>
<body bgcolor='#EFEFEF' text='#000000' background='../images/fond.jpg'>";
include ("menu_haut.html");
echo "
<table width='738' border='0' bgcolor='#EFEFEF'>
<tr>
<td valign='top'>";
include ("menu_gauche_public.html");
echo "
</td>
<td valign='top'>
<table width='593' height='148' border='0' cellspacing='0' cellpadding='0' align='center' >
<tr>
<td width='5' height='24'><img src='../images/rond-hg-24.gif' width='5' height='24'></td>
<td height='24' background='../images/rond-h-24.gif'> </td>
<td width='5' height='24'><img src='../images/rond-hd-24.gif' width='5' height='24'></td>
</tr>
<tr>
<td width='5' height='100' background='../images/rond-g.gif' rowspan='2'></td>
<td height='20' bgcolor='#006699' align='left' valign='top'> <span class='titre'><font color='#FFFFFF'>Trombinoscope :</font></span></td>
<td width='5' height='100' background='../images/rond-d.gif' rowspan='2'> </td>
</tr>
<tr>
<td bgcolor='#FFFFFF'>"; ?>
<!-- Inserer ici le code de la page que vous souhaiter apparaitre //-->
<br><center><a href="../Services/UtilitairePhotos.php"><b>Listes des dernières personnes arrivées dans la société<br></b></a></center>
<?
include ("include/preferences.inc");
include ("include/ldap_manager.inc");
include ("include/query_manager.inc");
include ("include/search_form.inc");
$FILE = "http://"."$HTTP_HOST$SCRIPT_NAME";
$NombreAffiche=8; // c'est le nombre d'elements à afficher sur chaque page
$IndexCourant=0; // ce nombre me permettra de gerer les pages suivantes ou precedentes de la page courante
$JPEGFILE = "http://apache/ldap/ldap-photo.php";
$qm = new query_manager;
$lm = new ldap_manager;
$prefs = new preferences;
$tableauAgence=array("Nom"=>""); // ce tableau me servira à enregistrer tous les agences qui auront le
// même emplacement géographique ( pour la recherche annuaire interne
$stringImput="";
$drapeauRecherche;
function mainToi() {
global $attrib,$stringImput,$limite,$etat,$nombre,$NombreAffiche,$imput,$drapeauRecherche,$tableauAgence,$suiteDonnee,$IndexCourant,$index; // utile le cas de la recherche d'une personne à partir de son emplacement,drapeauRecherche est false si la recherche n'a pas eu lieu
global $carte,$agence,$precisionCarte;
$main_start_time = microtime();
global $lm, $qm, $prefs, $FILE;
$qm = new query_manager;
$lm = new ldap_manager;
$prefs = new preferences;
$lm->ldap_action = $qm->get_action();
$lm->base_dn = $qm->get_base_dn();
$lm->limite=$NombreAffiche;
$lm->host = "192.168.100.1";
$lm->search_filter = $qm->get_search_filter();
$prefs->loadPreferences();
echo '<BR><table border=0 align=center cellpadding=0 cellspacing=0 width=480>
<tbody>
<tr><td align=center >
</td><tr><tbody></table>';
display_advanced_form();
if (!$lm->connect($lm->host))
{
echo "Couldn't connect to <b>".$lm->host."</b><br>\n";
echo "Bye";
return 0;
}
$ds=ldap_connect($server);
if($suiteDonnee=="VRAI") // lorsque l'utilisateur vient de la page Anuuaire Interne grâce au bouton suivant
{
if($etat=="Suivant")
{
$lm->index+=$nombre; // je remplace la valeur de l'ancien objet lm avec le nouveau
$lm->limite+=$limite;
}
$lm->ldap_action=search;
$IndexCourant=$index;
}
if (!$lm->ldapTakeAction($lm->ldap_action) || $lm->entriesCount == 0)
{
//echo "Didn't find anything for ".$lm->ldap_action." on ".$lm->search_filter." from ".$lm->base_dn."<br>\n";
echo "<BR><BR><strong> <center><font color=#CC0000>Recherche Vide !! </font></center><strong>";
return 0;
}
else
{
$get_entries_s_t = microtime();
// $lm->getEntries();
$get_entries_e_t = microtime();
$lm->disconnect();
}
if (($qm->get_mode() == "tree") && ($lm->ldap_action == "list")) {
$display_entries_s_t = microtime();
?>
<p>
<?
$tokens = array( 0 => " ", 1 => ",");
$e = $lm->entries[0];
$s = ldap_dn2ufn($e->dn);
$firstel = $lm->stripString($s, $tokens);
for ($i=0; $i<count($lm->entries); $i++) {
$c = "";
$e = $lm->entries[$i];
$s = ldap_dn2ufn($e->dn);
$tin = $lm->stripString($s, $tokens);
?>
<div id="<? echo $tin; ?>Child" class=child>
<table border=1 cellspacing=0 cellpadding=0>
<? $c .= $e->formatHTMLAttributes();
echo $c;
?>
</table>
<? $n = ldap_explode_dn($e->dn, 1); echo $n[0]; ?>
<br>
</div>
<?
}
?>
<?
}
else {
$display_entries_s_t = microtime();
$c = $lm->formatHTMLEntries();
echo $c;
}
$display_entries_e_t = microtime();
return 1;
}
$return = mainToi();
?>
<!-- Fin de l'insertion de code de la page centrale //-->
<?
echo "
</td>
<td> </td>
</tr>
<tr>
<td width='5' height='24'><img src='../images/rond-bg-24.gif' width='5' height='24'></td>
<td height='24' background='../images/rond-b-24.gif'></td>
<td width='5' height='24'><img src='../images/rond-bd-24.gif' width='5' height='24'></td>
</tr>
</table>
</td>
</body>
</html>"; ?>
j'ai essayer des commande du type
if ($title =="invisible");
{
return 0
}
ou encore if ($Fonction=="invisible") sans succès
Si vous pouvez m'aidez, je vous en remerci d'avance