epnadmin-fr
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Epnadmin-fr] CVS: epnadmin configuration.php,1.13,1.14


From: Loïc Dayot
Subject: [Epnadmin-fr] CVS: epnadmin configuration.php,1.13,1.14
Date: Wed, 11 Jun 2003 15:18:11 -0400

Update of /cvsroot/epnadmin/epnadmin
In directory subversions:/tmp/cvs-serv19722/epnadmin

Modified Files:
        configuration.php 
Log Message:
Erreur, j'avais écrasé une nouvelle version.
Voilà qui est corrigé.



Index: configuration.php
===================================================================
RCS file: /cvsroot/epnadmin/epnadmin/configuration.php,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -r1.13 -r1.14
*** configuration.php   11 Jun 2003 19:03:44 -0000      1.13
--- configuration.php   11 Jun 2003 19:18:09 -0000      1.14
***************
*** 4,8 ****
          Vincent Vairelles - Mairie de Dijon (21)
  
!     EPNadmin - Version 0.6
  
      This program is free software; you can redistribute it and/or modify
--- 4,8 ----
          Vincent Vairelles - Mairie de Dijon (21)
  
!     EPNadmin - Version 0.7
  
      This program is free software; you can redistribute it and/or modify
***************
*** 42,49 ****
        <head>
        <title>$sconfiguration - epnadmin</title>
!       <meta http-equiv=\"Content-Type\" content=\"text/html; 
charset=iso-8859-1\">";
  
  $titr = $titreconfiguration;
! $datemaj="5 mai 2003";
  define("COULEUR", COULEUR_DROITS);
  require("entete.inc.php");
--- 42,50 ----
        <head>
        <title>$sconfiguration - epnadmin</title>
!       <meta http-equiv=\"Content-Type\" content=\"text/html; 
charset=iso-8859-1\">
!   </head>";
  
  $titr = $titreconfiguration;
! $datemaj="11 juin 2003";
  define("COULEUR", COULEUR_DROITS);
  require("entete.inc.php");
***************
*** 60,191 ****
  }
  
- /*
- // Fonctions propres a la configuration
- function affiche_autorisations($id)
- {
- global 
$autorvisiteur,$autordefstructure,$autoranim,$autorusagers,$fonctionnalitesdeappli,
-       $sFonctionnalite,$smesinformations,$scellesdesautres,$sActif,
-       $sCommentaire,$sdependde,$sactive,$sinactive,$sindefinie,
-       $saucun,$svoir,$smodifier,$sindefini, $db;
-   if ($id>0) // Il s'agit d'une structure
-   {
-     // On regarde s'il y a une configuration pour cette structure
-     $req0="SELECT * FROM droits WHERE id_structure=$id";
-     $res0=executeRequete($req0);
-     if (! mysql_fetch_object($res0)); //->fetchrow(DB_FETCHMODE_OBJECT))
-       $id=-3; // On reprend la configuration par défaut.
-   }
-   switch ($id)
-   {
-   case -4 : $t=$autorvisiteur; break;
-   case -3 : $t=$autordefstructure; break;
-   case -2 : $t=$autoranim; break;
-   case -1 : $t=$autorusagers; break;
-   case 0  : $t=$fonctionnalitesdeappli; break;
-   default : $t=structure($id); break;
-   } // switch
-       echo cadre_debut($t);
-   echo "<table align=center border>";
-   echo "<tr><th>$sFonctionnalite</th>";
-   if ($id!=0)
-     echo "<th>$smesinformations</th><th>$scellesdesautres</th>";
-   else
-     echo "<th>$sActif ?</th>";
-   echo "<th>$sCommentaire</th>";
-   if ($id==0)
-     echo "<th>$sdependde</th>";
-   echo "</tr>\n";
- 
-   $req1="SELECT * FROM fonctions ORDER BY ordre";
-   $res1=executeRequete($req1);
- 
-   while ($fonction=mysql_fetch_object($res1)) 
//->fetchrow(DB_FETCHMODE_OBJECT))
-   {
-     // Retrouver les droits
-     $req2="SELECT * FROM droits WHERE id_fonction=$fonction->id AND 
id_structure=$id";
-     $res2=executeRequete($req2);
-     if (! $droit=mysql_fetch_object($res2)); 
//->fetchrow(DB_FETCHMODE_OBJECT))
-     { //N'existe pas
-       if ($id>0)
-       {
-         // Si c'est une structure, on prend la valeur par d�aut.
-         $req2="SELECT * FROM droits WHERE id_fonction=".$fonction->id." AND 
id_structure=-3";
-         $res2=executeRequete($req2);
-       }
-       if (! $droit=mysql_fetch_object($res2)); 
//->fetchrow(DB_FETCHMODE_OBJECT))
-       { // Si on n'a toujours rien, on prend les fonctionnalités
-         
//******************************************************************************0
-         $req2="SELECT * FROM droits WHERE id_fonction=$fonction->id AND 
id_structure=0";
-         
//******************************************************************************0
-         $res2=executeRequete($req2);
-         $droit=mysql_fetch_object($res2);
-       }
-     }
-     if ($droit->id_fonction)
-     {
-       // Retrouver si la fonctionnalité est active
-       
//******************************************************************************
-       $req11="SELECT * FROM droits WHERE id_fonction=$fonction->id AND 
id_structure=0";
-       
//******************************************************************************
-       $res12=executeRequete($req11);
-       $fct=mysql_fetch_object($res12); //->fetchrow(DB_FETCHMODE_OBJECT);
-       if ($fct->actif!="y")
-       {
-         echo "<tr bgcolor=\"#ADADAD\"><th>$fonction->fonction";
-         if ($id!=0)
-           echo " ($sINACTIVE)";
-         echo "</th>";
-       }
-       else
-         echo "<tr 
bgcolor=\"$fonction->couleur\"><th>$fonction->fonction</th>";
- 
-       echo "<td>";
-       if ($id==0)
-       {   // fonctionnalités
-         switch ($droit->actif)
-         {
-         case 'y' : echo "$sactive"; break;
-         case 'n' : echo "$sinactive"; break;
-         default :  echo "<i>$sindefinie</i>"; break;
-         }
-       }
-       else
-       { // autorisations
-         switch ($droit->moi)
-         {
-         case ' ' : echo "$saucun"; break;
-         case 'r' : echo "$svoir"; break;
-         case 'w' : echo "$smodifier"; break;
-         default : echo "<i>$sindefini</i>"; break;
-         }
-         echo "</td><td>";
-         switch ($droit->autres)
-         {
-         case ' ' : echo "$saucun"; break;
-         case 'r' : echo "$svoir"; break;
-         case 'w' : echo "$smodifier"; break;
-         default : echo "<i>$sindefini</i>"; break;
-         }
-       }
-       echo "</td><td>".nl2br($fonction->commentaire)."</td>";
- 
-       if ($id==0 && $fonction->depend>"")
-       { // On configure les fonctionnalit�, on affiche alors les 
d�endances.
-         echo "<td>";
-         $reqd="SELECT * FROM fonctions WHERE id IN ($fonction->depend) ORDER 
BY ordre";
-         $resd=executeRequete($reqd);
-         while ($fctd=fetch_object($resd)); //->fetchrow(DB_FETCHMODE_OBJECT))
-           echo $fctd->fonction."<br>";
-         echo "</td>";
-       }
- 
-       echo "</tr>\n";
-     }
-   }
-   echo "</table>\n";
-       echo cadre_fin();
- } // fonction affiche_autorisations
- */
- 
  function affiche_autorisations($id)
  {
--- 61,64 ----
***************
*** 310,314 ****
  {
  global 
$autorvisiteur,$autordefstructure,$autoranim,$autorusagers,$fonctionnalitesdeappli,
!       $sFonctionnalite,$sActif,
        $sCommentaire,$sdependde,$sactive,$sinactive,$sindefinie,
        $saucun,$svoir,$smodifier,$sindefini,$sconfirmer;
--- 183,187 ----
  {
  global 
$autorvisiteur,$autordefstructure,$autoranim,$autorusagers,$fonctionnalitesdeappli,
!       $sFonctionnalite,$smesinformations,$scellesdesautres,$sActif,
        $sCommentaire,$sdependde,$sactive,$sinactive,$sindefinie,
        $saucun,$svoir,$smodifier,$sindefini,$sconfirmer;
***************
*** 435,569 ****
  } // fonction affiche_autorisations
  
- /*
- function saisie_autorisations($id_stru)
- {
- global 
$autorvisiteur,$autordefstructure,$autoranim,$autorusagers,$fonctionnalitesdeappli,
-       $sFonctionnalite,$sActif,$smesinformations,$scellesdesautres,
-       $sCommentaire,$sdependde,$sactive,$sinactive,$sindefinie,
-       $saucun,$svoir,$smodifier,$sindefini,$sconfirmer;
-   if (($id=$id_stru) > 0) // Il s'agit d'une structure
-   {
-     // On regarde s'il y a une configuration pour cette structure
-     $req0="SELECT * FROM droits WHERE id_structure=$id";
-     $res0=executeRequete($req0);
-     if (! fetch_object($res0)) //->fetchrow(DB_FETCHMODE_OBJECT))
-       $id=-3; // On reprend la configuration par d�aut.
-   }
-   switch ($id)
-   {
-   case -4 : $t=$autorvisiteur; break;
-   case -3 : $t=$autordefstructure; break;
-   case -2 : $t=$autoranim; break;
-   case -1 : $t=$autorusagers; break;
-   case 0  : $t=$fonctionnalitesdeappli; break;
-   default : $t=structure($id); break;
-   } // switch
- 
-       echo cadre_debut($t);
-       echo "<form action=\"$PHP_SELF\" method=\"POST\" 
enctype=\"multipart/form-data\">
-         <input type=\"hidden\" name=\"id_stru\" value=\"$id_stru\">
-         <input type=\"hidden\" name=\"operation\" value=\"1\">
-         <table align=center border=1>";
-   echo "<tr><th>$sFonctionnalite</th>";
-       
-   if ($id!=0)
-     echo "<th>$smesinformations</th><th>$scellesdesautres</td>";
-   else
-     echo "<th>$sActif ?</th>";
-   echo "<th>$sCommentaire</th>";
-   if ($id==0)
-     echo "<th>$sdependde</th>";
-   echo "</tr>\n";
- 
-   $req1="SELECT * FROM fonctions ORDER BY ordre";
-   $res1=executeRequete($req1);
-   while ($fonction=fetch_object($res1)); //->fetchrow(DB_FETCHMODE_OBJECT))
-   {
-     // Retrouver si la fonctionnalité est active
-     $req11="SELECT * FROM droits WHERE id_fonction=$fonction->id AND 
id_structure=0";
-     $res12=executeRequete($req11);
-     $fct=fetch_object($res12); //->fetchrow(DB_FETCHMODE_OBJECT);
-     if ($fct->actif!="y")
-     {
-       echo "<tr bgcolor=\"#ADADAD\"><th>$fonction->fonction";
-       if ($id!=0)
-         echo " ($sINACTIVE)";
-       echo "</th>";
-     }
-     else
-       echo "<tr bgcolor=\"$fonction->couleur\"><th>$fonction->fonction</th>";
- 
-     // Retrouver le droit pour cette fonctionnalit
-     $req2="SELECT * FROM droits WHERE id_fonction=$fonction->id AND 
id_structure=$id";
-     $res2=executeRequete($req2);
-     $droit=fetch_object($res2); //->fetchrow(DB_FETCHMODE_OBJECT);
- 
-     if ($id==0)
-     {    // Des fonctionalit� de l'application
-       echo "<td><select name=\"fonction_$fonction->id\">
-                 <option value=\"\"";
-       if (! $droit->actif)
-         echo " selected";
-       echo ">";
-         echo "<option value=\"y\"";
-         if ($droit->actif=="y")
-           echo " selected";
-         echo ">$sactive</option><option value=\"n\"";
-         if ($droit->actif=="n")
-           echo " selected";
-         echo ">$sinactive</option>";
-     }
-     else // Des autorisations
-     {    // de structure, animateurs ou usagers
-       echo "<td><select name=\"fonction_moi_$fonction->id\">
-                 <option value=\"\"></option><option value=\"n\"";
-       if ($droit->moi=="n")
-         echo " selected";
-       echo ">$saucun</option><option value=\"r\"";
-       if ($droit->moi=="r")
-         echo " selected";
-       echo ">$svoir</option><option value=\"w\"";
-       if ($droit->moi=="w")
-         echo " selected";
-       echo ">$smodifier</option>";
- 
-       echo "</select></td>
-             <td><select name=\"fonction_autre_$fonction->id\">
-                 <option value=\"\"></option><option value=\"n\"";
-       if ($droit->autres=="n")
-         echo " selected";
-       echo ">$saucun</option><option value=\"r\"";
-       if ($droit->autres=="r")
-         echo " selected";
-       echo ">$svoir</option><option value=\"w\"";
-       if ($droit->autres=="w")
-         echo " selected";
-       echo ">$smodifier</option>";
-     }
- 
-     echo "</select></td>\n";
- 
-     echo "<td>".nl2br($fonction->commentaire)."</td>";
-     
-     if ($id==0 && $fonction->depend>"")
-     { // On configure les fonctionnalit�, on affiche alors les d�endances.
-       echo "<td>";
-       $reqd="SELECT * FROM fonctions WHERE id IN ($fonction->depend) ORDER BY 
ordre";
-       $resd=executeRequete($reqd);
-       while ($fctd=fetch_object($resd)) //->Fetchrow(DB_FETCHMODE_OBJECT))
-         echo $fctd->fonction."<br>";
-       echo "</td>";
-     }
- 
-     echo "</tr>\n";
-   }
-   echo "<tr><td colspan=\"4\" align=center><input type=\"submit\"
-           name=\"Confirmer\" value=\"$sconfirmer\"></td></tr>\n";
-   echo "</table>\n
-         </form>";
-       echo cadre_fin();
- } // fonction affiche_autorisations
- */
- 
  function verifie_dependances_fonctionnalites()
  { // On doit regarder s'il y a des d�endances
--- 308,311 ----
***************
*** 696,742 ****
    break;
  
- /*case 211 : // Affichage des droits des animateurs (par défaut)
-       if ($id)
-               affiche_autorisations($id);
- 
- case 221 : // Saisie des droits d'un animateur
-       if ($operation==210 && $id)
-         saisie_autorisations($id);
- 
- case 21 : // Voir les droits d'un animateur;
- case 22 : // Saisie des droits d'un animateur;
-       echo cadre_debut($sautoranimateur);
-       $pasbeau=FALSE;
-       if ($operation==210 || $operation==22)
-       {
-         if (DROITS_AUTRES<"w") $pasbeau=TRUE;
-       }
-       else
-               if (DROITS_AUTRES<"r") $pasbeau=TRUE;
-       if ($pasbeau)
-       {
-               echo $pasledroit;
-               echo cadre_fin();
-               break;
-       }
-       echo "<form action=\"$PHP_SELF\" method=\"POST\" 
enctype=\"multipart/form-data\">
-                                   <input type=\"hidden\" name=\"operation\" 
value=";
-       if ($operation==209 || $operation==21)
-               echo "209";
-       else
-               echo "21";
-       echo "><p align=center>";
-       choix_animateur($id, "id", "");
-       echo "</p>
-                               <p align=center><input type=\"submit\" 
value=\"";  //"
-       if ($operation==209 || $operation==21)
-               echo $svoir;
-       else
-               echo $smodifierlesdroits;
-       echo "\"></p>
-         </form>"; //"
-       echo cadre_fin();
-   break;
- */
  case 21 : // Voir les fonctionnalités de l'application
    affiche_autorisations(-2);
--- 438,441 ----
***************
*** 828,843 ****
    echo "</tr>\n";
  }
! /* Il n'est pas prévu d'attribuer des droits différents suivant l'animateur.
! // A priori pas d'intérêt ; d'ailleurs, dans quelle table les stocker ???
! if (ANIMATEURS>="~")
! {
!   echo "<tr><th>$autoranim</th>";
!   if (DROITS_AUTRES>="r" || ($is_ident=="animateur" && DROITS_MOI>="r"))
!     echo "<td><a href='$PHP_SELF?operation=21'>$svoir</a></td>";
!   if (DROITS_AUTRES>="w" || ($is_ident=="animateur" && DROITS_MOI>="w"))
!     echo "<td><a href='$PHP_SELF?operation=22'>$smodifier</a></td>";
!   echo "</tr>\n";
! }
! */
  if (FCT_STRUCTURES=="y" && DROITS_AUTRES>="w")
  {
--- 527,531 ----
    echo "</tr>\n";
  }
! 
  if (FCT_STRUCTURES=="y" && DROITS_AUTRES>="w")
  {
***************
*** 853,859 ****
      {
        echo "<tr bgcolor=\"".COULEUR_STRUCTURES."\"><th>$smesdroits</th>";
!       echo "<td><a 
href='$PHP_SELF?operation=31&id=$id_structure'>$svoir</a></td>";
        if (DROITS_MOI>="w")
!         echo "<td><a 
href='$PHP_SELF?operation=32&id=$id_structure'>$smodifier</a></td>";
        echo "</tr>\n";
      }
--- 541,547 ----
      {
        echo "<tr bgcolor=\"".COULEUR_STRUCTURES."\"><th>$smesdroits</th>";
!       echo "<td><a 
href='$PHP_SELF?operation=311&id=$id_structure'>$svoir</a></td>";
        if (DROITS_MOI>="w")
!         echo "<td><a 
href='$PHP_SELF?operation=321&id=$id_structure'>$smodifier</a></td>";
        echo "</tr>\n";
      }





reply via email to

[Prev in Thread] Current Thread [Next in Thread]