Directory

[insert_php]

// basic sequence with LDAP is connect, bind, search, interpret search

// result, close connection

//

// Tableau LETTERS

//

$alphabet = array(« a », « b », « c », « d », « e », « f », « g », « h », « i », « j », « k », « l », « m », « n », « o », « p », « q », « r », « s », « t », « u », « v », « w », « x », « y », « z »);

$sambaacctflags = « [D|L] »;

print(« 

« ); while(list($key,$val) = each($alphabet)){ print («  »);

}

print(«  »);

print(« 

« . strtoupper($val). « 

« );

reset($alphabet);

if(!isset($_GET[« lettre »])){

$_GET[« lettre »]= » »;

}

switch($_GET[« lettre »]){

case « a »: $alphabet = array(« a »); break;

case « b »: $alphabet = array(« b »); break;

case « c »: $alphabet = array(« c »); break;

case « d »: $alphabet = array(« d »); break;

case « e »: $alphabet = array(« e »); break;

case « f »: $alphabet = array(« f »); break;

case « g »: $alphabet = array(« g »); break;

case « h »: $alphabet = array(« h »); break;

case « i »: $alphabet = array(« i »); break;

case « j »: $alphabet = array(« j »); break;

case « k »: $alphabet = array(« k »); break;

case « l »: $alphabet = array(« l »); break;

case « m »: $alphabet = array(« m »); break;

case « n »: $alphabet = array(« n »); break;

case « o »: $alphabet = array(« o »); break;

case « p »: $alphabet = array(« p »); break;

case « q »: $alphabet = array(« q »); break;

case « r »: $alphabet = array(« r »); break;

case « s »: $alphabet = array(« s »); break;

case « t »: $alphabet = array(« t »); break;

case « u »: $alphabet = array(« u »); break;

case « v »: $alphabet = array(« v »); break;

case « w »: $alphabet = array(« w »); break;

case « x »: $alphabet = array(« x »); break;

case « y »: $alphabet = array(« y »); break;

case « z »: $alphabet = array(« z »); break;

case « TOUS »: break;

default: $alphabet = array(« a »);

}

if (!empty($alphabet))

{

$ds=ldap_connect(« oldmail.lrsv.ups-tlse »);

ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3);

if ($ds)

{

$r=ldap_bind($ds); // this is an « anonymous » bind, typically = read-only access

foreach($alphabet as $lettres)

{

echo « 

« . strtoupper($lettres) . « 

« ;

print (« 

« ); print («  »); $sr=ldap_search($ds, »ou=users,dc=scsv,dc=ups-tlse,dc=fr », « sn= ».$lettres. »* »); ldap_sort($ds,$sr, »sn »); $info = ldap_get_entries($ds, $sr); $j=0; for ($i=0; $i<$info[« count »]; $i++) { if (!preg_match($sambaacctflags , $info[$i][« sambaacctflags »][0]) && $info[$i][« mail »][0] && $info[$i][« description »][0]!= »FR3450″ && $info[$i][« description »][0]!= »IFR40″ && $info[$i][« description »][0]!= »FRAIB ») if ($info[$i][« mailenable »][0]== »OK »){

if ($j % 2 == 0) echo «  »; else echo «  »;if ($info[$i][« labeleduri »][0]) echo «  »;

else echo «  »;

echo «  »;

echo «  »;

echo «  »;

echo «  »;

echo «  »;

echo «  »;

$j=$j+1;

}

}

print (« 

Name Firstname Team Status Phone Email
« . strtoupper($info[$i][« sn »][0]). »  » . strtoupper($info[$i][« sn »][0]) . «   » . ucwords(strtolower($info[$i][« givenname »][0])) . «   » . ucfirst($info[$i][« description »][0]) . «   » . ucfirst($info[$i][« title »][0]) . «   » . substr($info[$i][« telephonenumber »][0],0,6). « « . substr($info[$i][« telephonenumber »][0],6,10). «   » .strstr($info[$i][« mail »][0], ‘@’,true). « 

« );

}

ldap_close($ds);

}

else {echo « 

ERROR

« ;}

}

[/insert_php]

Protection of nominative information:

  • The consultation and the use of this directory are subject to the French legal provisions in force concerning the nominative treatments (Law 78-17).
  • The use of information for the purpose of creating another nominative treatment (eg for commercial or advertising purposes) is strictly prohibited for any country.

In accordance with the law « Informatique et Libertés » of January 6, 1978, you have the right to access and rectify information concerning you. If you wish to exercise this right and obtain information about yourself, please contact the IT department of the LRSV laboratory.

     Contact Us

Laboratoire de Recherche en Sciences Végétales
UMR 5546 UPS/CNRS

Pôle de Biotechnologies Végétales
24, chemin de Borde Rouge. AUZEVILLE B.P. 42617

31326 CASTANET-TOLOSAN –
FRANCE
Tél :  +33 (0)5 34 32 38 01 Fax : +33 (0)5 34 32 38 02
Mail : lrsv.gestion@univ-tlse3.fr

Message

2 + 4 =

Email

lrsv.gestion@univ-tlse3.fr.

Phone

Standard :    +33 5.34.32.38.01
Fax           :   +33 5.34.32.38.02

Find us

24, chemin de Borde-Rouge.BP 42617 Auzeville.
31326, Castanet-Tolosan. FRANCE

Follow us