[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

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

   1  <?php
   2  
   3     /**
   4     
   5     * Edition des cles
   6     * @Version $Id: aide_cle.php 2949 2008-05-04 18:45:49Z plouf $ 
   7     
   8    
   9     * @Projet LCS / SambaEdu 
  10     
  11     * @auteurs  Cedric Bellegarde
  12     
  13     * @Licence Distribue selon les termes de la licence GPL
  14     
  15     * @note 
  16     
  17     */
  18  
  19     /**
  20  
  21     * @Repertoire: registre
  22     * file: edit_cle_grp.php
  23  
  24    */    
  25  
  26  
  27  include  "entete.inc.php";
  28  include  "ldap.inc.php";
  29  include  "ihm.inc.php";
  30  
  31  require_once  ("lang.inc.php");
  32  bindtextdomain('se3-registre',"/var/www/se3/locale");
  33  textdomain ('se3-registre');
  34  
  35  if (ldap_get_right("computers_is_admin",$login)!="Y")
  36          die (gettext("Vous n'avez pas les droits suffisants pour acc&#233;der &#224; cette fonction")."</BODY></HTML>");
  37  
  38      $_SESSION["pageaide"]="Gestion_des_clients_windows#Description_du_processus_de_configuration_du_registre_Windows";
  39  
  40  
  41  require  "include.inc.php";
  42  
  43  $cle=$_GET['cle'];
  44  $modele=$_GET['modele'];
  45  $state=$_GET['state'];
  46  $choix=$_GET['choix'];
  47  $antidote=$_GET['antidote'];
  48  
  49  $checkedA="";
  50  $checkedI="";
  51  $checkedD="";
  52  
  53  connexion();
  54  echo "<title>".gettext("Edition d'une restriction")."</title>";
  55  
  56  if ($choix != "") {
  57      $deleteSQL = "delete from modele where `cle`='$cle' and `mod`='$modele'";
  58      if ($choix == "Active") {
  59          $addSQL = "Insert into modele values ('', '$cle', '$modele', '1')";
  60          mysql_query($deleteSQL);
  61          mysql_query($addSQL);
  62      }
  63      else if ($choix == "Inactive") {
  64          $addSQL = "Insert into modele values ('', '$cle', '$modele', '0')";
  65          mysql_query($deleteSQL);
  66          mysql_query($addSQL);
  67      }
  68      else {
  69          mysql_query($deleteSQL);
  70      }
  71      ?>
  72          <script language="JavaScript" type="text/javascript">
  73              opener.location.reload(true);
  74              self.close();
  75          </script>
  76      <?php
  77  }
  78  else {
  79      if ($state == "1") $checkedA="checked";
  80      if ($state == "0") $checkedI="checked";
  81      if ($state == "-1") $checkedD="checked";
  82  
  83      $query="Select valeur, type, Intitule, antidote from corresp where CleID='$cle'";
  84      $result = mysql_query($query);
  85      $row = mysql_fetch_row($result);
  86      echo "$row[2] :\n";
  87      echo "<form method=get action=\"edit_cle_grp.php\">\n";
  88      echo "<br/>\n";
  89      echo "<input type=\"radio\" name=\"choix\" value=\"Active\" $checkedA>Active<br/>\n";
  90      if ( "$row[1]" == "config" ) { echo "<input type=\"radio\" name=\"choix\" value=\"Inactive\" $checkedI>Inactive<br/>\n"; }
  91      echo "<input type=\"radio\" name=\"choix\" value=\"Non configur&eacute;e\" $checkedD>Non configur&eacute;e<br/>";
  92      echo "<input type=\"hidden\" name=\"cle\" value=\"$cle\">";
  93      echo "<input type=\"hidden\" name=\"modele\" value=\"$modele\">";
  94  
  95      echo "<br/><input type=\"submit\" value=\"Valider\">";
  96      echo "</form>\n";
  97  }
  98  mysql_close();
  99  
 100  include("pdp.inc.php");
 101  
 102  ?>


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