[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

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

   1  <?php
   2  
   3  
   4     /**
   5     
   6     * Export un ldif de l'annuaire
   7     * @Version $Id: export.php 8600 2015-03-16 20:12:30Z plouf $ 
   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: export.php
  25     */
  26  
  27  
  28  
  29      require ("config.inc.php");
  30      include "functions.inc.php";
  31      include  "ihm.inc.php";
  32      include  "ldap.inc.php";
  33          
  34          // HTMLPurifier
  35          require_once  ("traitement_data.inc.php");
  36          
  37      $login=isauth();
  38      if ($login == "") header("Location:$urlauth");
  39  
  40      if (is_admin("se3_is_admin",$login)=="Y") {
  41          if (isset($_POST['filtre'])) {
  42              $filtre=$_POST['filtre'];
  43              if ($filtre == "") $filtre = "objectclass=*";
  44              system("ldapsearch -xLLL -h $ldap_server -D \"$adminRdn,$ldap_base_dn\" -w $adminPw $filtre > /tmp/export.ldif");
  45              header("Content-Type: octet-stream");
  46              header("Content-Length: ".filesize ("/tmp/export.ldif") );
  47              header("Content-Disposition: attachment; filename=\"/tmp/export.ldif\"");
  48              include ("/tmp/export.ldif");
  49          }
  50      }
  51  ?>


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