LDAP - výpis skupiny

 v Common Name
Given Name
Surname
Full Name
Mail

Vytvořit soubor /apache/*.txt

CHYBA FOpen()

"; } } if (! $id = LDAP_Connect("192.168.101.3","")) { echo "CHYBA LDAP_Connect()

"; exit(); } if (! LDAP_Bind("$id")) { echo "CHYBA LDAP_Bind()

"; LDAP_Close("$id"); exit(); } $pom = "CN"; if ($Pole) { Reset($Pole); while (Current($Pole)) { if ($pom) $pom .= ",".Key($Pole); else $pom .= Key($Pole); Next($Pole); } } $retezec = '$vysledek = LDAP_Search("$id","ou=$SK,ou=users,o=gop","sn=*",Array('; $retezec .= $pom; $retezec .= '));'; eval($retezec); //$vysledek = LDAP_Search("$id","ou=3c,ou=users,o=gop","sn=*",Array("cn","mail")); if (! $vysledek) { echo "CHYBA LDAP_Search()

"; LDAP_Close("$id"); exit(); } echo ""; $pocet=0; $x = LDAP_First_Entry($id,$vysledek); if ($x) { $y = LDAP_Get_Attributes($id,$x); echo "
# CN"; for ($i=0; $i<$y[count]; $i++) { $attr = $y[$i]; if ($attr == "CN") continue; echo "",$attr; } } while ($x): $pocet++; $y = LDAP_Get_Attributes($id,$x); echo "
 $pocet  ",$y['CN'][0]," "; if ($Mkf) { FPutS($f,$y['CN'][0]."\n"); } for ($i=0; $i<$y[count]; $i++): $attr = $y[$i]; if ($attr == "CN") continue; echo " ",$y["$attr"][0]," "; endfor; echo "
"; $x = LDAP_Next_Entry($id,$x); endwhile; echo "
"; if (! LDAP_Close("$id")) { echo "CHYBA LDAP_Close()

"; exit(); } endif; // HLAVNI PODMINKA if ($Mkf) { if (! FClose($f)) { echo "CHYBA FClose()

"; } } ?>