[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

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

   1  <?php
   2  
   3  
   4     /**
   5     
   6     * Affiche la page de selection des drivers
   7     * @Version $Id: cups_driver.php 2944 2008-05-04 17:15:28Z plouf $ 
   8     
   9     * @Projet LCS / SambaEdu 
  10     
  11     * @auteurs Patrice Andre <h.barca@free.fr>
  12     * @auteurs Carip-Academie de Lyon
  13  
  14     * @Licence Distribue selon les termes de la licence GPL
  15     
  16     * @note 
  17     
  18     */
  19  
  20     /**
  21  
  22     * @Repertoire: printers/
  23     * file: cups_driver.php
  24  
  25    */    
  26  
  27  
  28  
  29  include  "entete.inc.php";
  30  include  "ihm.inc.php";     // pour is_admin()
  31  
  32  require_once  ("lang.inc.php");
  33  bindtextdomain('se3-printers',"/var/www/se3/locale");
  34  textdomain ('se3-printers');
  35  
  36  //aide
  37  $_SESSION["pageaide"]="Imprimantes";
  38  
  39  if (is_admin("se3_is_admin",$login)=="Y") {
  40      echo "<h1>".gettext("Pilote CUPS")."</H1>";
  41      echo "<H3>".gettext("S&#233lectionnez un pilote dans la liste")."</H3>";
  42  
  43      // Retourne le nombre de pilotes
  44      $nb_drivers=exec("lpinfo -m | wc -l");
  45      // Retourne les pilotes
  46      $return=exec ("lpinfo -m",$all_drivers);
  47  
  48      // Affichage du filtre sur constructeur        
  49      if (!isset($filtre)) {
  50              echo "<P>".gettext("Nom d'utilisateur:")." </P>";
  51              echo "<FORM ACTION=\"cups_driver.php\" METHOD=\"post\">";
  52              echo "<INPUT TYPE=\"text\" NAME=\"filtre\" VALUE=\"$filtre\" SIZE=\"20\">";
  53              echo "<INPUT TYPE=\"hidden\" NAME=\"info_imprimante\" VALUE=\"$info_imprimante\">";
  54              echo "<INPUT TYPE=\"hidden\" NAME=\"uri_imprimante\" VALUE=\"$uri_imprimante\">";
  55              echo "<INPUT TYPE=\"hidden\" NAME=\"nom_imprimante\" VALUE=\"$nom_imprimante\">";
  56              echo "<INPUT TYPE=\"hidden\" NAME=\"info_imprimante\" VALUE=\"$lieu_imprimante\">";
  57              echo "<INPUT TYPE=\"hidden\" NAME=\"protocole\" VALUE=\"$protocole\">";
  58              echo "<INPUT TYPE=\"submit\" VALUE=\"Filtrer\">";
  59              echo "</FORM>";
  60      }
  61  
  62      echo "<FORM ACTION=\"config_printer.php\" METHOD=\"post\">";
  63      echo "<SELECT NAME=\"driver_name\" SIZE=\"15\" MULTIPLE>";
  64      for ($i=0;$i<$nb_drivers;$i++) {   
  65              if ( !isset($filtre) || ( ($fabricant[$i]==$filtre) ) ) {
  66                  echo "<OPTION VALUE=\"$all_drivers[$i]\">$all_drivers[$i]";
  67                  echo "</OPTION>";
  68                  echo "<INPUT TYPE=\"hidden\" NAME=\"info_imprimante\" VALUE=\"$info_imprimante\">";
  69                  echo "<INPUT TYPE=\"hidden\" NAME=\"uri_imprimante\" VALUE=\"$uri_imprimante\">";
  70                  echo "<INPUT TYPE=\"hidden\" NAME=\"nom_imprimante\" VALUE=\"$nom_imprimante\">";
  71                  echo "<INPUT TYPE=\"hidden\" NAME=\"info_imprimante\" VALUE=\"$lieu_imprimante\">";
  72                  echo "<INPUT TYPE=\"hidden\" NAME=\"protocole\" VALUE=\"$protocole\">";
  73                  echo "<BR>"; 
  74               }
  75      }
  76      echo "</SELECT>";
  77  }
  78  
  79  include "pdp.inc.php";
  80  ?>


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