[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/se3-dhcp/sources/www/ -> import_valid.php (source)

   1  <?php
   2  
   3  
   4  /**
   5  
   6     * Verifie l'import des csv
   7     * @Version $Id: import_valid.php 8569 2015-03-15 14:40:29Z plouf $
   8     
   9     * @Projet LCS / SambaEdu
  10  
  11     * @auteurs  Philippe CHadefaux (Plouf)    
  12  
  13     * @note 
  14     
  15     * @Licence Distribue sous la licence GPL
  16     
  17  */
  18                          
  19  /**
  20     * @Repertoire: dhcp
  21  
  22     * file: import_valid.php
  23  */
  24  
  25  
  26  // loading libs and init
  27  include  "entete.inc.php";
  28  include  "ldap.inc.php";
  29  include  "ihm.inc.php";
  30  require_once "fonc_parc.inc.php";
  31  
  32  
  33  
  34  
  35  $action = $_POST['action'];
  36  $saisie = $_POST['saisie'];
  37  
  38  if (is_admin("system_is_admin",$login)=="Y")
  39  {
  40  
  41      //aide
  42          $_SESSION["pageaide"]="Le_module_DHCP#Import_.2F_Export";
  43  
  44      echo "<h1>".gettext("Importation DHCP")."</h1>";
  45  //    $content .= "<h1>".gettext("R&#233;servations existantes")."</h1>";
  46      // Prepare HTML code
  47      switch($action) {
  48      case 'cc' :
  49          
  50          require_once  "dhcpd.inc.php";
  51          $tableau=explode("\n",$saisie);
  52              traite_tableau($tableau);
  53      case 'file' :
  54          if  ( move_uploaded_file($_FILES['file_name']['tmp_name'], $_FILES['file_name']['name'])) {
  55              require_once  "dhcpd.inc.php";
  56                  $tableau=file($_FILES['file_name']['name']);
  57                  traite_tableau($tableau);
  58          }    
  59          
  60      default :
  61          // anti  hacking
  62          $title = '';
  63          $content = '';
  64          return;
  65      }
  66                                                  
  67      
  68  } else {
  69      print (gettext("Vous n'avez pas les droits n&#233;cessaires pour ouvrir cette page..."));
  70  }
  71  
  72  // Footer
  73  include ("pdp.inc.php");
  74  
  75  
  76  ?>


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