[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/se3master/var/www/se3/annu/ -> annu.php (source)

   1  <?php
   2  
   3  
   4     /**
   5     
   6     * Affiche les utilisateurs a partir de l'annuaire
   7     * @Version $Id: annu.php 7716 2013-03-16 23:52:10Z christian.westphal $ 
   8     
   9     * @Projet LCS / SambaEdu 
  10     
  11     * @auteurs jLCF jean-luc.chretien@tice.ac-caen.fr
  12     * @auteurs oluve olivier.le_monnier@crdp.ac-caen.fr
  13     * @auteurs wawa  olivier.lecluse@crdp.ac-caen.fr
  14     * @auteurs Equipe Tice academie de Caen
  15  
  16     * @Licence Distribue selon les termes de la licence GPL
  17     
  18     * @note 
  19     */
  20  
  21     /**
  22  
  23     * @Repertoire: annu
  24     * file: annu.php
  25     */
  26  
  27  
  28  
  29  include  "entete.inc.php";
  30  include  "ldap.inc.php";
  31  include  "ihm.inc.php";
  32  
  33  require_once  ("lang.inc.php");
  34  bindtextdomain('se3-annu',"/var/www/se3/locale");
  35  textdomain ('se3-annu');
  36  
  37  if (is_admin("Annu_is_admin",$login)=="Y")
  38          $_SESSION["pageaide"]="Annuaire";
  39  else if (ldap_get_right("sovajon_is_admin",$login)=="Y")
  40          $_SESSION["pageaide"]="L%27interface_prof#Annuaire";
  41  else $_SESSION["pageaide"]="L%27interface_%C3%A9l%C3%A8ve#Acc.C3.A9der_.C3.A0_l.27annuaire";
  42  
  43  echo "<h1>".gettext("Annuaire")."</h1>\n";
  44  
  45  aff_trailer ("1");
  46  // Affichage des coordonnees de l'Etablissement
  47  /*
  48  $ldap_etab_attr = array(
  49      "ou",                 // Intitule de l'Etablissement
  50      "street",
  51      "l",
  52      "postOfficeBox",
  53      "PostalCode",
  54      "telephoneNumber"
  55    );
  56  
  57  $ds = @ldap_connect ( $ldap_server, $ldap_port );
  58  if ( $ds ) {
  59      $r = @ldap_bind ( $ds ); // Bind anonyme
  60          if ($r) {
  61                $result = @ldap_read ( $ds, $ldap_base_dn, "(objectclass=organizationalUnit)", $ldap_etab_attr );
  62                if ($result) {
  63                  $info = @ldap_get_entries ( $ds, $result );
  64                  if ( $info["count"]) {
  65                        echo "<blockquote style=\"font-size: large; font-weight: bold; text-align: center\">\n";
  66                       echo utf8_decode($info[0]["ou"][0])."<BR>\n";
  67                        echo $info[0]["street"][0]."<BR>\n";
  68                        if ( $info[0]["postofficebox"][0]) {
  69                              echo $info[0]["postofficebox"][0]."&nbsp;-&nbsp;";
  70                        }
  71                        echo $info[0]["postalcode"][0]." ".utf8_decode($info[0]["l"][0])."<BR>\n";
  72                        echo "Tel. ".$info[0]["telephonenumber"][0]."\n";
  73                        echo"</blockquote>\n";
  74                  }
  75              @ldap_free_result ( $result );
  76            }
  77  } else {
  78      $error = gettext("Echec du bind anonyme");
  79  }
  80      @ldap_close ( $ds );
  81  } else {
  82        $error = gettext("Erreur de connection au serveur LDAP");
  83  }
  84  */
  85  
  86  aff_mnu_search(is_admin("Annu_is_admin",$login));
  87  if (ldap_get_right("Annu_is_admin",$login)=="Y") {
  88      //echo "<ul><li><b>".gettext("Administration :")."</b></li>";
  89      echo "<ul><li><b>".gettext("Administration :")."</b>\n";
  90        echo "<ul>\n";
  91      echo "<li><a href=\"delete_right.php\">".gettext("Enlever un droit d'administration.")."</a></li>\n";
  92          echo "<li><a href=\"peoples_desac.php\">".gettext("D&#233;sactiver des comptes.")."</a></li>\n";
  93           echo "<li><a href=\"peoples_desac.php?action=activ\">".gettext("Activer des comptes.")."</a></li>\n";
  94           echo "<li><a href=\"../infos/infomdp.php\">".gettext("Tester les mots de passe.")."</a></li>\n";
  95           echo "<li><a href=\"reinit_mdp.php\">".gettext("R&#233;initialiser/Modifier les mots de passe.")."</a></li>\n";
  96           if (getintlevel()>=1)
  97                 echo "<li><a href=\"remplace.php\">".gettext("Attribution des droits &#224; un rempla&#231;ant.")."</a></li>\n";
  98          echo "</ul>\n";
  99      echo "</li>\n";
 100      echo "</ul>\n";
 101  
 102  include("listing.inc.php");
 103  
 104  }
 105  
 106  include ("pdp.inc.php");
 107  ?>


Generated: Tue Mar 17 22:47:18 2015 Cross-referenced by PHPXref 0.7.1