[ Index ] |
PHP Cross Reference of Unnamed Project |
[Summary view] [Print] [Text view]
1 <?php 2 3 4 /** 5 6 * Interface de gestion des acl 7 * @Version $Id: peoples_listacls.php 8553 2015-03-15 12:36:03Z plouf $ 8 9 10 * @Projet LCS / SambaEdu 11 12 * @auteurs Equipe Tice academie de Caen 13 14 * @Licence Distribue selon les termes de la licence GPL 15 16 * @note 17 18 */ 19 20 /** 21 22 * @Repertoire: acls 23 * file: peoples_listacls.php 24 25 */ 26 27 28 include "entete.inc.php"; 29 include "ldap.inc.php"; 30 include "ihm.inc.php"; 31 32 require_once ("lang.inc.php"); 33 bindtextdomain('se3-acls',"/var/www/se3/locale"); 34 textdomain ('se3-acls'); 35 36 37 $nom = $_POST['nom']; 38 $classe = $_POST['classe']; 39 $fullname = $_POST['fullname']; 40 $priority_name = $_POST['priority_name']; 41 $priority_surname = $_POST['priority_surname']; 42 $priority_classe = $_POST['priority_classe']; 43 44 // Aide 45 $_SESSION["pageaide"]="ACL#En_utilisant_l.27interface_SambaEdu"; 46 47 48 // Convertion en utf_8 49 $nom = utf8_encode($nom); 50 $fullname = utf8_encode($fullname); 51 // Construction du filtre de la branche people 52 if ($nom && !$fullname) { 53 // Recherche sur sn 54 if ($priority_name=="contient") { 55 $filter_people="(sn=*$nom*)"; 56 } elseif($priority_name=="commence") { 57 $filter_people="(sn=$nom*)"; 58 } else { 59 $filter_people="(sn=*$nom)"; 60 } 61 } elseif ($fullname && !$nom) { 62 // Recherche sur cn 63 if ($priority_surname=="contient") { 64 $filter_people="(cn=*$fullname*)"; 65 } elseif($priority_surname=="commence") { 66 $filter_people="(cn=$fullname*)"; 67 } else { 68 $filter_people="(cn=*$fullname)"; 69 } 70 } elseif ($fullname && $nom) { 71 // Recherche sur sn ET cn 72 if ($priority_name=="contient") { 73 if ($priority_surname=="contient") { 74 $filter_people="(&(sn=*$nom*)(cn=*$fullname*))"; 75 } elseif($priority_surname=="commence") { 76 $filter_people="(&(sn=*$nom*)(cn=$fullname*))"; 77 } else { 78 $filter_people="(&(sn=*$nom*)(cn=*$fullname))"; 79 } 80 81 } elseif($priority_name=="commence") { 82 if ($priority_surname=="contient") { 83 $filter_people="(&(sn=$nom*)(cn=*$fullname*))"; 84 } elseif($priority_surname=="commence") { 85 $filter_people="(&(sn=$nom*)(cn=$fullname*))"; 86 } else { 87 $filter_people="(&(sn=$nom*)(cn=*$fullname))"; 88 } 89 } else { 90 if ($priority_surname=="contient") { 91 $filter_people="(&(sn=*$nom)(cn=*$fullname*))"; 92 } elseif($priority_surname=="commence") { 93 $filter_people="(&(sn=*$nom)(cn=$fullname*))"; 94 } else { 95 $filter_people="(&(sn=*$nom)(cn=*$fullname))"; 96 } 97 } 98 } 99 100 echo "<br><br><br><center><B><a href=\"#\" onClick=\"window.close ();\">".gettext("Fermer la fenêtre")."</a></B></center><br><br><br>"; 101 if ($filter_people ) { 102 // recherche dans la branche People 103 $users = search_people ($filter_people); 104 if (count($users)) { 105 if (count($users)==1) { 106 echo "<p><STRONG>".count($users)."</STRONG> ".gettext(" utilisateur répond à ces critères de recherche")."</p>\n"; 107 } else { 108 echo "<p><STRONG>".count($users)."</STRONG> ".gettext("utilisateurs répondent à ces critères de recherche")."</p>\n"; 109 } 110 111 echo "<UL>\n"; 112 echo"<form><select name=\"liste\" onChange=\"Reporter(this)\">"; 113 echo "<option value=\"\">".gettext("Votre choix ...")."</option>"; 114 for ($loop=0; $loop<count($users);$loop++) { 115 echo "<option value=\"".$users[$loop]["uid"]."\">".$users[$loop]["fullname"]."</option>"; 116 } 117 118 echo "<br><br><br><br><br><center><B><a href=\"#\" onClick=\"window.close ();\">".gettext("Fermer la fenêtre")."</a></B></center>"; 119 echo "</form></UL>\n"; 120 } else { 121 echo " <STRONG>".gettext("Pas de résultats")."</STRONG> ".gettext("correspondant aux critères sélectionnés.")."<BR>\n"; 122 } 123 } else { 124 // Aucun criteres de recherche 125 echo " <STRONG>".gettext("Pas de résultats !")."</STRONG><BR>".gettext(" 126 Veuillez compléter au moins l'un des deux champs (nom, prénom) du formulaire de recherche !")."<BR>\n"; 127 } 128 129 130 include ("pdp.inc.php"); 131 132 ?> 133
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Tue Mar 17 22:47:18 2015 | Cross-referenced by PHPXref 0.7.1 |