epnadmin-fr
[Top][All Lists]
Advanced

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

[Epnadmin-fr] CVS: epnadmin 6cartes.inc.php,NONE,1.1 barcode.inc.php,NO


From: Loïc Dayot
Subject: [Epnadmin-fr] CVS: epnadmin 6cartes.inc.php,NONE,1.1 barcode.inc.php,NONE,1.1 configuration.php,NONE,1.1 debug.inc.php,NONE,1.1 i25object.inc.php,NONE,1.1 basdepage.inc.php,1.3,1.4 camembert.inc.php,1.1,1.2 cartes.inc.php,1.1.1.1,1.2 constantes.inc.php,1.14,1.15 courriel.php,1.7,1.8 dateheure.inc.php,1.7,1.8 entete.inc.php,1.14,1.15 fonctions.inc.php,1.13,1.14 footer.inc.php,1.2,1.3 header.inc.php,1.12,1.13 horaires.php,1.8,1.9 image.inc.php,1.1,1.2 index.php,1.6,1.7 initiations.inc.php,1.3,1.4 initiations.php,1.3,1.4 inscription_session.php,1.13,1.14 localisations.php,1.3,1.4 logiciels.php,1.3,1.4 materiels.php,1.5,1.6 mysql.inc.php,1.1,1.2 parcours.inc.php,1.3,1.4 parcours.php,1.4,1.5 positionnement.php,1.6,1.7 prets.php,1.3,1.4 print.php,1.4,1.5 questions.php,1.2,1.3 reservations.inc.php,1.3,1.4 reservations.php,1.9,1.10 session.php,1.7,1.8 sessions.inc.php,1.3,1.4 siteweb.inc.php,1.6,1.7 siteweb.php,1.17,1.18 stats.php,1.9,1.10 structure.sql,1.3,1.4 structures.inc.php,1.2,1.3 structures.php,1.6,1.7 table_horaire.php,1.9,1.10 table_horaire_session.php,1.13,1.14 tableaux.inc.php,1.2,1.3 themes.php,1.2,1.3 usagers.inc.php,1.5,1.6 usagers.php,1.15,1.16 usages.php,1.1.1.1,1.2 6cartes.php,1.2,NONE barcode.php,1.1.1.1,NONE cartes.php,1.1.1.1,NONE commandes.php,1.2,NONE debug.php,1.1.1.1,NONE i25object.php,1.1.1.1,NONE inventaire_materiel.php,1.1.1.1,NONE test.php,1.2,NONE
Date: Sun, 05 Jan 2003 15:34:05 -0500

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

Modified Files:
        basdepage.inc.php camembert.inc.php cartes.inc.php 
        constantes.inc.php courriel.php dateheure.inc.php 
        entete.inc.php fonctions.inc.php footer.inc.php header.inc.php 
        horaires.php image.inc.php index.php initiations.inc.php 
        initiations.php inscription_session.php localisations.php 
        logiciels.php materiels.php mysql.inc.php parcours.inc.php 
        parcours.php positionnement.php prets.php print.php 
        questions.php reservations.inc.php reservations.php 
        session.php sessions.inc.php siteweb.inc.php siteweb.php 
        stats.php structure.sql structures.inc.php structures.php 
        table_horaire.php table_horaire_session.php tableaux.inc.php 
        themes.php usagers.inc.php usagers.php usages.php 
Added Files:
        6cartes.inc.php barcode.inc.php configuration.php 
        debug.inc.php i25object.inc.php 
Removed Files:
        6cartes.php barcode.php cartes.php commandes.php debug.php 
        i25object.php inventaire_materiel.php test.php 
Log Message:
De nombreuses modifications en préparation. Plus de volume que de changements 
fondammentaux.
Les fichiers inclus (require et include) sont effectué dans le strict 
nécessaire (i.e. on ne charge plus tous les scripts à chaque fois).
Quelques corrections de punaises par ci par là, notamment dans la gestion du 
parc, des statistiques et des usagers.
Un nouveau script configuration.php qui prépare une modularisation de 
l'application. Du coup, header.inc.php a été aussi adapté.



--- NEW FILE ---
<?
/*
    Copyright (C) 2001, 2002 Bertand Pallie, Loïc Dayot

    EPNadmin - Version 0.6 - 05/01/2003

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

    http://epnadmin.pierrefitte93.fr/
*/                        

// Renommé de 6cartes.php en 6cartes.inc.php

require_once("header.inc.php");   // car confidentiel !
require_once("constantes.inc.php");             // définition des constantes
//require_once("fonctions.inc.php");              // concernant des fonctions 
transversales inclassables
//require_once("mysql.inc.php");                  // concernant mysql
//require_once("sessions.inc.php");             // concernant les sessions et 
initiations
//require_once("usagers.inc.php");              // concernant la gestion des 
usagers
//require_once("reservations.inc.php");         // concernant les réservations 
des postes en accès individuel par des usagers
//require_once("tableaux.inc.php");             // Concernant l'affichage 
transposé d'un tableau
//require_once("siteweb.inc.php");              // concernant les pages perso 
des usagers et les sites web des structures
//require_once("dateheure.inc.php");            // concernant la manipulation 
des heures et des dates, formulaire, conversion...
//require_once("structures.inc.php");           // concernant les structures
//require_once("initiations.inc.php");          // concernant les initiations 
et les thèmes
//require_once("parcours.inc.php");             // concernant les parcours des 
usagers et leur positionnement

header ("Content-type: image/png");

$image = @ImageCreate (480*2, 460*3) or die ("Cannot Initialize new GD image 
stream");
for ($i=1;$i<7;$i++)
{
        $imgcarte=ImageCreateFromPNG($dir_tmp_images.$i.".png");
        $x=480 * (($i-1)%2);
        $y=460 *floor(($i-1)/2);
        ImageCopyResized($image,$imgcarte, $x,$y, 0,0, 480,460, 480,460);
        ImageDestroy ($imgcarte);
}
ImagePNG($image);
ImageDestroy ($image);

//require("footer.inc.php");
?>
--- NEW FILE ---
<?php
/*
Barcode Render Class for PHP using the GD graphics library 
Copyright (C) 2001  Karim Mribti
                
   Version  0.0.7a  2001-04-01  
                
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
                                  
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Lesser General Public License for more details.
                         
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
                                     
Copy of GNU Lesser General Public License at: 
http://www.gnu.org/copyleft/lesser.txt
                           
Source code home page: http://www.mribti.com/barcode/
Contact author at: address@hidden
*/

require_once("debug.inc.php");

/***************************** base class 
********************************************/
/** NB: all GD call's is here **/

/* Styles */

/* Global */
define("BCS_BORDER"        ,    1);
define("BCS_TRANSPARENT"    ,    2);
define("BCS_ALIGN_CENTER"   ,    4);
define("BCS_ALIGN_LEFT"     ,    8);
define("BCS_ALIGN_RIGHT"    ,   16);
define("BCS_IMAGE_JPEG"     ,   32);
define("BCS_IMAGE_PNG"      ,   64);
define("BCS_DRAW_TEXT"      ,  128);
define("BCS_STRETCH_TEXT"   ,  256);
define("BCS_REVERSE_COLOR"  ,  512);
/* For the I25 Only  */
define("BCS_I25_DRAW_CHECK" , 2048);

/* Default values */

/* Global */
define("BCD_DEFAULT_BACKGROUND_COLOR", 0xFFFFFF);
define("BCD_DEFAULT_FOREGROUND_COLOR", 0x000000);
define("BCD_DEFAULT_STYLE"           , BCS_BORDER | BCS_ALIGN_CENTER | 
BCS_IMAGE_PNG);
define("BCD_DEFAULT_WIDTH"           , 460);
define("BCD_DEFAULT_HEIGHT"          , 120);
define("BCD_DEFAULT_FONT"            ,   5);
define("BCD_DEFAULT_XRES"            ,   2);
/* Margins */
define("BCD_DEFAULT_MAR_Y1"          ,  10);
define("BCD_DEFAULT_MAR_Y2"          ,  10);
define("BCD_DEFAULT_TEXT_OFFSET"     ,   2);
/* For the I25 Only */
define("BCD_I25_NARROW_BAR"      ,   1);
define("BCD_I25_WIDE_BAR"           ,   2);

/* For the C39 Only */
define("BCD_C39_NARROW_BAR"      ,   1);
define("BCD_C39_WIDE_BAR"           ,   2);

/* For Code 128 */
define("BCD_C128_BAR_1"              ,   1);
define("BCD_C128_BAR_2"              ,   2);
define("BCD_C128_BAR_3"              ,   3);
define("BCD_C128_BAR_4"              ,   4);

  class BarcodeObject {
                 
    var $mWidth, $mHeight, $mStyle, $mBgcolor, $mBrush;
  var $mImg, $mFont;
  var $mError;
  
  function BarcodeObject ($Width = BCD_DEFAULT_Width, $Height = 
BCD_DEFAULT_HEIGHT, $Style = BCD_DEFAULT_STYLE)  {
      $this->mWidth   = $Width; 
    $this->mHeight  = $Height;
    $this->mStyle   = $Style; 
    $this->mFont    = BCD_DEFAULT_FONT;
    $this->mImg    = ImageCreate($this->mWidth, $this->mHeight);
    $dbColor        = $this->mStyle & BCS_REVERSE_COLOR ? 
BCD_DEFAULT_FOREGROUND_COLOR : BCD_DEFAULT_BACKGROUND_COLOR;
    $dfColor        = $this->mStyle & BCS_REVERSE_COLOR ? 
BCD_DEFAULT_BACKGROUND_COLOR : BCD_DEFAULT_FOREGROUND_COLOR;
    $this->mBgcolor = ImageColorAllocate($this->mImg, ($dbColor & 0xFF0000) >> 
16, 
              ($dbColor & 0x00FF00) >> 8 , $dbColor & 0x0000FF);       
    $this->mBrush   = ImageColorAllocate($this->mImg, ($dfColor & 0xFF0000) >> 
16, 
                  ($dfColor & 0x00FF00) >> 8 , $dfColor & 0x0000FF);
    if (!($this->mStyle & BCS_TRANSPARENT)) {                        
      ImageFill($this->mImg, $this->mWidth, $this->mHeight, $this->mBgcolor); 
    }
    __TRACE__("OBJECT CONSTRUCTION: ".$this->mWidth." ".$this->mHeight." 
".$this->mStyle);
  }
  
    function DrawObject ($xres)  {
    /* there is not implementation neded, is simply the asbsract function. */
   __TRACE__("OBJECT DRAW: NEED VIRTUAL FUNCTION IMPLEMENTATION");
   return false;
  }
  
  function DrawBorder () {
      ImageRectangle($this->mImg, 0, 0, $this->mWidth-1, $this->mHeight-1, 
$this->mBrush);
       __TRACE__("DRAWING BORDER");
  }
  
  function DrawChar ($Font, $xPos, $yPos, $Char) {
          ImageString($this->mImg,$Font,$xPos,$yPos,$Char,$this->mBrush);
  }
  
  function DrawText ($Font, $xPos, $yPos, $Char) {
          ImageString($this->mImg,$Font,$xPos,$yPos,$Char,$this->mBrush);
  }   
    
  function DrawSingleBar($xPos, $yPos, $xSize, $ySize) {
    if ($xPos>=0 && $xPos<=$this->mWidth  && ($xPos+$xSize)<=$this->mWidth &&
        $yPos>=0 && $yPos<=$this->mHeight && ($yPos+$ySize)<=$this->mHeight) {
        for ($i=0;$i<$xSize;$i++) {
         ImageLine($this->mImg, $xPos+$i, $yPos, $xPos+$i, $yPos+$ySize, 
$this->mBrush);
         }
         return true;
       }
        __DEBUG__("DrawSingleBar: Out of range");
     return false;    
    }            
                
  function GetError() {  
    return $this->mError;
  }             
               
  function GetFontHeight($font) {
   return ImageFontHeight($font);
  }                 
                   
  function GetFontWidth($font)  {
   return ImageFontWidth($font);
  }            
              
  function SetFont($font) {
   $this->mFont = $font;
  }            
              
  function GetStyle () {
   return $this->mStyle;
  }            
              
  function SetStyle ($Style) {
     __TRACE__("CHANGING STYLE");
   $this->mStyle = $Style;
  }        
          
  function FlushObject () {
   if (($this->mStyle & BCS_BORDER)) {
         $this->DrawBorder();
      }               
     if ($this->mStyle & BCS_IMAGE_PNG) {
         Header("Content-Type: image/png");
       ImagePng($this->mImg);
     } else if ($this->mStyle & BCS_IMAGE_JPEG) {
             Header("Content-Type: image/jpeg");
          ImageJpeg($this->mImg);
         } else __DEBUG__("FlushObject: No output type");
   }                      
                          
     function DestroyObject () {
     ImageDestroy($obj->mImg);
   }
   }
?>
--- NEW FILE ---
<?
/*
    Copyright (C) 2003 Loïc Dayot - Mairie de Pierrefitte (93)

    EPNadmin - Version 0.6

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

    http://www.nongnu.org/epnadmin/ ou http://epnadmin.pierrefitte93.fr
*/

require_once("header.inc.php"); // C'est dans header.inc.php que sont retrouvés 
les droits issus de la table droits
//require_once("constantes.inc.php");             // définition des constantes
//require_once("fonctions.inc.php");              // concernant des fonctions 
transversales inclassables
require_once("mysql.inc.php");                  // concernant mysql
//require_once("sessions.inc.php");             // concernant les sessions et 
initiations
//require_once("usagers.inc.php");              // concernant la gestion des 
usagers
//require_once("reservations.inc.php");         // concernant les réservations 
des postes en accès individuel par des usagers
//require_once("tableaux.inc.php");             // Concernant l'affichage 
transposé d'un tableau
//require_once("siteweb.inc.php");              // concernant les pages perso 
des usagers et les sites web des structures
//require_once("dateheure.inc.php");            // concernant la manipulation 
des heures et des dates, formulaire, conversion...
require_once("structures.inc.php");           // concernant les structures
//require_once("initiations.inc.php");          // concernant les initiations 
et les thèmes
//require_once("parcours.inc.php");             // concernant les parcours des 
usagers et leur positionnement

// Pour les explications, voir les commentaires dans header.inc.php //

?>
<html>
<head>
<title>configuration et droits - epnadmin</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<?
$titr = "Configuration de l'application et des autorisations";
$datemaj="5 janvier 2003";
require("entete.inc.php");

// Remarque : même si la fonctionnalité des droits (FCT_DROITS) n'est pas 
définie, on accès quand même à cette page.

if (defined("FCT_DROITS") && ((FCT_DROITS=="INACTIF") || !defined("DROITS") || 
DROITS=="AUCUN"))
{
        echo "<p>Désolé, mais vous n'avez pas les droits suffisants pour 
accéder à la configuration de l'application.
                                        Mettez-vous en relation avec 
l'administrateur si vous pensez que c'est une erreur.</p>\n";
        include("basdepage.inc.php");
        echo "</body></html>\n";
        require("footer.inc.php");
        exit;
}

// Fonctions propres à la configuration
function affiche_autorisations($id)
{
        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))
                        $id=-3; // On reprend la configuration par défaut.
        }
        echo "<table align=center border=1>
                                <tr><th align=center colspan='3'>";
        switch ($id)
        {
        case -3 : echo "Les autorisations par défaut des structures"; break;
        case -2 : echo "Les autorisations des animateurs"; break;
        case -1 : echo "Les autorisations des usagers"; break;
        case 0  : echo "Les fonctionnalités de l'application"; break;
        default : echo structure($id); break;
        } // switch
        echo "</th></tr>\n";
        $req1="SELECT * FROM fonctions";
        $res1=executeRequete($req1);
        while ($fonction=mysql_fetch_object($res1))
        {
                echo "<tr><td>$fonction->fonction</td>";
                $req2="SELECT * FROM droits WHERE id_fonction=$fonction->id AND 
id_structure=$id";
                $res2=executeRequete($req2);
                $droit=mysql_fetch_object($res2);
                echo "<td>";
                if (! $droit->droit)
                        $droit->droit="<i>Indéfini donc inactif ou aucun</i>";
                echo "$droit->droit</td><td>$fonction->commentaire</td>";
                echo "</tr>\n";
        }
        echo "</table>\n";
} // fonction affiche_autorisations

function saisie_autorisations($id_stru)
{
        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 (! mysql_fetch_object($res0))
                        $id=-3; // On reprend la configuration par défaut.
        }
        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>
                                <tr><th align=center colspan='3'>";
        switch ($id)
        {
        case -3 : echo "Les autorisations par défaut des structures"; break;
        case -2 : echo "Les autorisations des animateurs"; break;
        case -1 : echo "Les autorisations des usagers"; break;
        case 0  : echo "Les fonctionnalités de l'application"; break;
        default : echo structure($id); break;
        } // switch
        echo "</th></tr>\n";
        $req1="SELECT * FROM fonctions";
        $res1=executeRequete($req1);
        while ($fonction=mysql_fetch_object($res1))
        {
                echo "<tr><td>$fonction->fonction</td>";
                $req2="SELECT * FROM droits WHERE id_fonction=$fonction->id AND 
id_structure=$id";
                $res2=executeRequete($req2);
                $droit=mysql_fetch_object($res2);
                echo "<td><select name=\"fonction_$fonction->id\">
                                                        <option value=\"\"";
                if (! $droit->droit)
                        $droit->droit=" selected";
                echo ">";
                if ($id==0)
                {               // Des fonctionalités de l'application
                        echo "<option value=\"actif\"";
                        if ($droit->droit=="actif")
                          echo " selected";
                        echo ">Actif</option><option value=\"inactif\"";
                        if ($droit->droit=="inactif")
                          echo " selected";
                        echo ">Inactif</option>";
                }
                else // Des autorisations
                {               // de structure, animateurs ou usagers
                        echo "<option value=\"aucun\"";
                        if ($droit->droit=="aucun")
                          echo " selected";
                        echo ">Aucun</option><option value=\"voir\"";
                        if ($droit->droit=="voir")
                          echo " selected";
                        echo ">Voir</option><option value=\"ajouter\"";
                        if ($droit->droit=="ajouter")
                          echo " selected";
                        echo ">Ajouter</option><option value=\"modifier\"";
                        if ($droit->droit=="modifier")
                          echo " selected";
                        echo ">Modifier</option><option value=\"administrer\"";
                        if ($droit->droit=="administrer")
                          echo " selected";
                        echo ">Administrer</option>";
                }
        echo "</select></td>\n";

                echo "<td>$fonction->commentaire</td>";
                echo "</tr>\n";
        }
        echo "<tr><td colspan=\"3\" align=center><input type=\"submit\" 
name=\"Confirmer\" value=\"Confirmer\"></td></tr>\n";
        echo "</table>\n
              </form>";
} // fonction affiche_autorisations

switch ($operation)
{
case 1 : // Enregistrement après une saisie (retour du formulaire)
        // Quelques vérifications
        $mes="";
        // A-t-on le droit de modifier quelquechose ?
        if (defined(FCT_DROITS) && (DROITS!="MODIFIER" && 
DROITS!="ADMINISTRER"))
          $mes.="Désolé, mais vous n'avez pas les autorisations de changer des 
droits ou fonctionnalités !<br>";
        // Est-on administrateur ?
        if (defined(FCT_DROITS) && ($id_stru!=$id_structure && 
DROITS!="ADMINISTRER"))
          $mes.="Désolé, mais vous n'avez pas les autorisations de changer des 
droits des autres ou fonctionnalités !<br>";
        // A-t-on bien le numéro de la structure à qui changer les droits ?
        if (! isset($id_stru))
          $mes.="Problème, je ne comprends pas à quelle entité il faut changer 
les droits (id_stru inconnu) !<br>";
        if ($mes!="")
        {
                echo "<p>$mes</p>\n";
                break;
        }
        // Ok, alors on fait !

        // On détruit toutes les autorisations de l'entité (Est-ce bien ce 
qu'il faut faire ???)
        $req0="DELETE FROM droits WHERE id_structure=$id_stru";
        $res0=executeRequete($req0);

        //On prend chaque fonctionalité
        $req1="SELECT * FROM fonctions";
        $res1=executeRequete($req1);
        while ($fonction1=mysql_fetch_object($res1))
        {
                // et on regarde s'il y a une affectation
                $champ="fonction_$fonction1->id";
                if ($$champ && $$champ!="")
                { // Oui, un champ a été rempli
                        $req2="INSERT INTO droits (id_structure, id_fonction, 
droit)
                              VALUES (\"$id_stru\", \"$fonction1->id\", 
\"".$$champ."\")";
                        $res2=executeRequete($req2);
                }
        }
        mysql_free_result($res1);
        echo "<p>Les modifications ont été prises en compte.</p>
                                <p>Pour certaines, elles ne prendront effets 
qu'à la prochaine identification.</p>\n";
        // Et c'est fini !
  break;
case 11 : // Voir les droits des usagers
        affiche_autorisations(-1);
        break;

case 12 : // Modifier les droits des usagers
        saisie_autorisations(-1);
        break;

case 31 : // Voir les droits des structures
        affiche_autorisations($id);
        break;

case 32 : // Modifier les drotis des structures
        saisie_autorisations($id);
        break;

case 41 : // Voir les fonctionnalités de l'application
        affiche_autorisations(0);
        break;

case 42 : // Modifier les fonctionnalités de l'application
        saisie_autorisations(0);
        break;
} // switch

//default : // Affichage des éventuelles possibilités
        //'aucun', 'voir', 'ajouter', 'modifier', 'administrer'
  echo "<table align='center' border='1' bgcolor='#B6FFB2'>\n";
        if (FCT_USAGERS=="ACTIF" && defined("USAGERS") && USAGERS!="AUCUN")
        {
                echo "<tr><th>Droits des usagers</th>";
                echo "<td><a href='$PHP_SELF?operation=11'>Voir</a></td>";
                if (DROITS=="MODIFIER" || DROITS=="ADMINISTRER")
                        echo "<td><a 
href='$PHP_SELF?operation=12'>Modifier</a></td>";
                echo "</tr>\n";
        }
        if (FCT_ANIMATEURS=="ACTIF" && defined("ANIMATEURS") && 
ANIMATEURS!="AUCUN")
        {
                echo "<tr><th>Droits des animateurs</th>";
                echo "<td><a href='$PHP_SELF?operation=21'>Voir</a></td>";
                if (DROITS=="MODIFIER" || DROITS=="ADMINISTRER")
                        echo "<td><a 
href='$PHP_SELF?operation=22'>Modifier</a></td>";
                echo "</tr>\n";
        }
        if (FCT_STRUCTURES=="ACTIF" && defined("STRUCTURES") && 
STRUCTURES!="AUCUN")
        {
                echo "<tr><th>Droits par défaut des structures</th>";
                echo "<td><a href='$PHP_SELF?operation=31&id=-3'>Voir</a></td>";
                if (DROITS=="MODIFIER" || DROITS=="ADMINISTRER")
                        echo "<td><a 
href='$PHP_SELF?operation=32&id=-3'>Modifier</a></td>";
                echo "</tr>\n";
        }
        if (FCT_STRUCTURES=="ACTIF" && defined("STRUCTURES") && 
STRUCTURES!="AUCUN")
        {
                echo "<tr><th>Droits des structures</th>";
                echo "<td><a href='$PHP_SELF?operation=31'>Voir</a></td>";
                if (DROITS=="MODIFIER" || DROITS=="ADMINISTRER")
                        echo "<td><a 
href='$PHP_SELF?operation=32'>Modifier</a></td>";
                echo "</tr>\n";
        }
        if (DROITS=="ADMINISTRER" || !defined("FCT_DROITS")) // On ne s'amuse 
pas à faire une fonctionnalité FONCTIONNALITE, on ne
        {                                                                       
                                 // s'en sortirait plus !
                echo "<tr><th>Fonctionnalités de l'application</th>";
                echo "<td><a href='$PHP_SELF?operation=41'>Voir</a></td>";
                echo "<td><a href='$PHP_SELF?operation=42'>Modifier</a></td>";
                echo "</tr>\n";
        }
        echo "</table>\n";
//} // switch

// Fin de la page
include("basdepage.inc.php");
echo "</body></html>\n";
require("footer.inc.php");
?>
--- NEW FILE ---
<?
/*
Barcode Render Class for PHP using the GD graphics library
Copyright (C) 2001  Karim Mribti

   Version  0.0.7a  2001-04-01

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

Copy of GNU Lesser General Public License at: 
http://www.gnu.org/copyleft/lesser.txt

Source code home page: http://www.mribti.com/barcode/
Contact author at: address@hidden
*/

define(__DEBUG_HOST__, "localhost");
define(__DEBUG_PORT__, "9999");

define(__TRACE_HOST__, "localhost");
define(__TRACE_PORT__, "9999");

define(__TIMEOUT__, 3);

function __TRACE__ ($str) {
if (__TRACE_ENABLED__) {
  $errno  = 0;
  $errstr = "no error";

  $fp = @fsockopen(__TRACE_HOST__, __TRACE_PORT__, &$errno, &$errstr, 
__TIMEOUT__);

  if ($fp)
  {
     @fputs($fp, $str);
     @fclose($fp);
  }
 }
}

function __DEBUG__ ($str) {
if (__DEBUG_ENABLED__) {
  $errno  = 0;
  $errstr = "no error";

  $fp = @fsockopen(__DEBUG_HOST__, __DEGUB_PORT__, &$errno, &$errstr, 
__TIMEOUT__);

  if ($fp)
  {
     @fputs($fp, $str);
     @fclose($fp);
  }
 }
}
?>
--- NEW FILE ---
<?php
/*
Barcode Render Class for PHP using the GD graphics library 
Copyright (C) 2001  Karim Mribti
                
   Version  0.0.7a  2001-04-01  
                
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
                                  
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Lesser General Public License for more details.
                         
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
                                     
Copy of GNU Lesser General Public License at: 
http://www.gnu.org/copyleft/lesser.txt
                           
Source code home page: http://www.mribti.com/barcode/
Contact author at: address@hidden
*/
  
  /* 
    render for Interleaved 2 of 5     
    Interleaved 2 of 5 is a numeric only bar code with a optional check number.
  */
    
  class I25Object extends BarcodeObject {
   var $mCharSet;
   function I25Object($Width, $Height, $Style, $Value)
   {
     $this->BarcodeObject($Width, $Height, $Style);
   $this->mValue   = $Value;
   $this->mCharSet = array
   (            
     /* 0 */ "00110",
     /* 1 */ "10001",
     /* 2 */ "01001",
     /* 3 */ "11000",
     /* 4  */ "00101",
     /* 5 */ "10100",
     /* 6  */ "01100",
     /* 7  */ "00011",
     /* 8  */ "10010",
     /* 9  */ "01010" 
   );
   }
   
   function GetSize($xres)
   {
     $len = strlen($this->mValue);
   
   if ($len == 0)  {
     $this->mError = "Null value";
        __DEBUG__("GetRealSize: null barcode value");
     return false;
     }
   
   for ($i=0;$i<$len;$i++) {
    if ((ord($this->mValue[$i])<48) || (ord($this->mValue[$i])>57)) {
          $this->mError = "I25 is numeric only";
      return false;
     }
   }
   
   if (($len%2) != 0) {
      $this->mError = "The length of barcode value must be even";
         __DEBUG__("GetSize: failed I25 requiremente");
    return false;
    }     
   $StartSize = BCD_I25_NARROW_BAR * 4  * $xres;
    $StopSize  = BCD_I25_WIDE_BAR * $xres + 2 * BCD_I25_NARROW_BAR * $xres;
   $cPos = 0;
   $sPos = 0;
   do {      
    $c1    = $this->mValue[$cPos];
    $c2    = $this->mValue[$cPos+1];
    $cset1 = $this->mCharSet[$c1];
    $cset2 = $this->mCharSet[$c2];
    
    for ($i=0;$i<5;$i++) {
      $type1 = ($cset1[$i]==0) ? (BCD_I25_NARROW_BAR  * $xres) : 
(BCD_I25_WIDE_BAR * $xres);
      $type2 = ($cset2[$i]==0) ? (BCD_I25_NARROW_BAR  * $xres) : 
(BCD_I25_WIDE_BAR * $xres);
      $sPos += ($type1 + $type2);
    }
    $cPos+=2;
    } while ($cPos<$len);
    
    return $sPos + $StarSize + $StopSize;
   }
   
   function DrawStart($DrawPos, $yPos, $ySize, $xres)
   {  /* Start code is "0000" */
    $this->DrawSingleBar($DrawPos, $yPos, BCD_I25_NARROW_BAR  * $xres , $ySize);
    $DrawPos += BCD_I25_NARROW_BAR  * $xres;
    $DrawPos += BCD_I25_NARROW_BAR  * $xres;
    $this->DrawSingleBar($DrawPos, $yPos, BCD_I25_NARROW_BAR  * $xres , $ySize);
    $DrawPos += BCD_I25_NARROW_BAR  * $xres;
      $DrawPos += BCD_I25_NARROW_BAR  * $xres;
    return $DrawPos;
   }
   
   function DrawStop($DrawPos, $yPos, $ySize, $xres)
   {  /* Stop code is "100" */
    $this->DrawSingleBar($DrawPos, $yPos, BCD_I25_WIDE_BAR * $xres , $ySize);
    $DrawPos += BCD_I25_WIDE_BAR  * $xres;
    $DrawPos += BCD_I25_NARROW_BAR  * $xres;
    $this->DrawSingleBar($DrawPos, $yPos, BCD_I25_NARROW_BAR  * $xres , $ySize);
    $DrawPos += BCD_I25_NARROW_BAR  * $xres; 
    return $DrawPos;
   }
   
   function DrawObject ($xres)
   {
     $len = strlen($this->mValue);
                   
   if (($size = $this->GetSize($xres))==0) {
       __DEBUG__("GetSize: failed");
      return false;
   }    
       
   $cPos  = 0;
         
   if ($this->mStyle & BCS_DRAW_TEXT) $ysize = $this->mHeight - 
BCD_DEFAULT_MAR_Y1 - BCD_DEFAULT_MAR_Y2 - $this->GetFontHeight($this->mFont);
   else $ysize = $this->mHeight - BCD_DEFAULT_MAR_Y1 - BCD_DEFAULT_MAR_Y2;
                                       
   if ($this->mStyle & BCS_ALIGN_CENTER) $sPos = (integer)(($this->mWidth - 
$size ) / 2);
   else if ($this->mStyle & BCS_ALIGN_RIGHT) $sPos = $this->mWidth - $size;
       else $sPos = 0;
             
    if ($this->mStyle & BCS_DRAW_TEXT) {
        if ($this->mStyle & BCS_STRETCH_TEXT) {
       /* Stretch */
            for ($i=0;$i<$len;$i++) {
             $this->DrawChar($this->mFont, 
$sPos+BCD_I25_NARROW_BAR*4*$xres+($size/$len)*$i, 
             $ysize + BCD_DEFAULT_MAR_Y1 + BCD_DEFAULT_TEXT_OFFSET , 
$this->mValue[$i]);
           }         
       }else {/* Center */
         $text_width = $this->GetFontWidth($this->mFont) * 
strlen($this->mValue);
       $this->DrawText($this->mFont, 
$sPos+(($size-$text_width)/2)+(BCD_I25_NARROW_BAR*4*$xres),
                 $ysize + BCD_DEFAULT_MAR_Y1 + BCD_DEFAULT_TEXT_OFFSET, 
$this->mValue);
        }           
   }             
                         
   $sPos = $this->DrawStart($sPos, BCD_DEFAULT_MAR_Y1, $ysize, $xres); 
   do {                    
    $c1    = $this->mValue[$cPos];
    $c2    = $this->mValue[$cPos+1];
    $cset1 = $this->mCharSet[$c1];
    $cset2 = $this->mCharSet[$c2];
                
    for ($i=0;$i<5;$i++) {
      $type1 = ($cset1[$i]==0) ? (BCD_I25_NARROW_BAR * $xres) : 
(BCD_I25_WIDE_BAR * $xres);
      $type2 = ($cset2[$i]==0) ? (BCD_I25_NARROW_BAR * $xres) : 
(BCD_I25_WIDE_BAR * $xres);
      $this->DrawSingleBar($sPos, BCD_DEFAULT_MAR_Y1, $type1 , $ysize);
      $sPos += ($type1 + $type2);
    }     
    $cPos+=2;
    } while ($cPos<$len);
    $sPos =  $this->DrawStop($sPos, BCD_DEFAULT_MAR_Y1, $ysize, $xres);
    return true;
   }
  }
?>

Index: basdepage.inc.php
===================================================================
RCS file: /cvsroot/epnadmin/epnadmin/basdepage.inc.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** basdepage.inc.php   30 Sep 2002 15:56:23 -0000      1.3
--- basdepage.inc.php   5 Jan 2003 20:34:01 -0000       1.4
***************
*** 1,29 ****
! <?
! /*
!     Copyright (C) 2001, 2002 Bertand Pallie, Loïc Dayot
! 
!     EPNadmin - Version 0.1
! 
!     This program is free software; you can redistribute it and/or modify
!     it under the terms of the GNU General Public License as published by
!     the Free Software Foundation; either version 2 of the License, or
!     (at your option) any later version.
! 
!     This program is distributed in the hope that it will be useful,
!     but WITHOUT ANY WARRANTY; without even the implied warranty of
!     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
!     GNU General Public License for more details.
! 
!     You should have received a copy of the GNU General Public License
!     along with this program; if not, write to the Free Software
!     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
! 
!     http://epnadmin.pierrefitte93.fr/
! */
! ?>
! <hr>
! <center><a href="#">Retour en haut de page</a></center>
! <p class="mainpara" align="center"> Arobase Espace Public Multim&eacute;dia - 
!   124 boulevard Charles de Gaulle - 93380 Pierrefitte-sur-Seine <br>
! T&eacute;l. : 01 49 40 48 38 - Courriel : <a 
href="mailto:address@hidden";>address@hidden</a><br>
! Adresse de ce site : <? echo $url_epnadmin.$PHP_SELF; ?></a> - Dernière mise 
à jour : <? echo "$datemaj" ?></p>
--- 1,45 ----
! <?
! /*
!     Copyright (C) 2001, 2002 Bertand Pallie, Loïc Dayot
! 
!     EPNadmin - Version 0.1
! 
!     This program is free software; you can redistribute it and/or modify
!     it under the terms of the GNU General Public License as published by
!     the Free Software Foundation; either version 2 of the License, or
!     (at your option) any later version.
! 
!     This program is distributed in the hope that it will be useful,
!     but WITHOUT ANY WARRANTY; without even the implied warranty of
!     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
!     GNU General Public License for more details.
! 
!     You should have received a copy of the GNU General Public License
!     along with this program; if not, write to the Free Software
!     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
! 
!     http://epnadmin.pierrefitte93.fr/
! */
! //require_once("header.inc.php");
! require_once("constantes.inc.php");             // définition des constantes
! //require_once("fonctions.inc.php");              // concernant des fonctions 
transversales inclassables
! //require_once("mysql.inc.php");                  // concernant mysql
! //require_once("sessions.inc.php");             // concernant les sessions et 
initiations
! //require_once("usagers.inc.php");              // concernant la gestion des 
usagers
! //require_once("reservations.inc.php");         // concernant les 
réservations des postes en accès individuel par des usagers
! //require_once("tableaux.inc.php");             // Concernant l'affichage 
transposé d'un tableau
! //require_once("siteweb.inc.php");              // concernant les pages perso 
des usagers et les sites web des structures
! //require_once("dateheure.inc.php");            // concernant la manipulation 
des heures et des dates, formulaire, conversion...
! //require_once("structures.inc.php");           // concernant les structures
! //require_once("initiations.inc.php");          // concernant les initiations 
et les thèmes
! //require_once("parcours.inc.php");             // concernant les parcours 
des usagers et leur positionnement
! ?>
! <hr>
! <center><a href="#">Retour en haut de page</a></center>
! <p align="center"><a href="http://www.nongnu.org/epnadmin";>Projet 
EPNadmin</a> - <a href="http://www.pierrefitte93.fr";>Mairie de Pierrefitte 
(93)</a><br>
! T&eacute;l. : 01 49 40 48 38 -
! Courriel : <a href="mailto:address@hidden";>
! address@hidden</a><br>
! Adresse de ce site : <? echo "http://".$SERVER_NAME.$PHP_SELF; ?> -
! <i>Dernière mise à jour : <? if ($datemaj) echo "$datemaj"; else echo 
"inconnue"; ?>
! </i></p>
\ No newline at end of file

Index: camembert.inc.php
===================================================================
RCS file: /cvsroot/epnadmin/epnadmin/camembert.inc.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** camembert.inc.php   2 Jan 2003 19:01:49 -0000       1.1
--- camembert.inc.php   5 Jan 2003 20:34:01 -0000       1.2
***************
*** 59,63 ****
                    $x - $margin,$y - $margin,
                    $black);
!    /* dessin du graphe et de la legende */    
     $legende_y = $y - $margin - 20;
     $debut = 270;
--- 59,63 ----
                    $x - $margin,$y - $margin,
                    $black);
!    /* dessin du graphe et de la legende */
     $legende_y = $y - $margin - 20;
     $debut = 270;
***************
*** 147,149 ****
  
  
! ?>
--- 147,149 ----
  
  
! ?>
\ No newline at end of file

Index: cartes.inc.php
===================================================================
RCS file: /cvsroot/epnadmin/epnadmin/cartes.inc.php,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** cartes.inc.php      20 Feb 2002 14:20:11 -0000      1.1.1.1
--- cartes.inc.php      5 Jan 2003 20:34:01 -0000       1.2
***************
*** 1,99 ****
! <?
! /*
!     Copyright (C) 2001, 2002 Bertand Pallie, Loïc Dayot
! 
!     EPNadmin - Version 0.1
! 
!     This program is free software; you can redistribute it and/or modify
!     it under the terms of the GNU General Public License as published by
!     the Free Software Foundation; either version 2 of the License, or
!     (at your option) any later version.
! 
!     This program is distributed in the hope that it will be useful,
!     but WITHOUT ANY WARRANTY; without even the implied warranty of
!     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
!     GNU General Public License for more details.
! 
!     You should have received a copy of the GNU General Public License
!     along with this program; if not, write to the Free Software
!     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
! 
!     http://epnadmin.pierrefitte93.fr/
! */
! 
! require("header.php");
! 
! $isadmin=false;
! $query = "SELECT admin FROM usagers WHERE login='$viewer_login'";
! $result = mysql_query($query);
! $tab = mysql_fetch_array($result);
! if($tab["admin"]=="oui") $isadmin=true;
! if($isadmin)
! {
! header ("Content-type: image/png");
! $im = @ImageCreate (240, 230)
!     or die ("Cannot Initialize new GD image stream");
! $background_color = ImageColorAllocate ($im, 255, 255, 255);
! $text_color = ImageColorAllocate ($im, 233, 14, 91);
! ImageString ($im, 1, 5, 5,  "A Simple Text String", $text_color);
! //ImagePng ($im);
! ImageDestroy ($im);
! 
! if (!isset($output))  $output   = "png"; 
! if (!isset($barcode)) $barcode  = "0123456789";
! if (!isset($type))    $type     = "I25";
! if (!isset($width))   $width    = "460";
! if (!isset($height))  $height   = "120";
! if (!isset($xres))    $xres     = "2";
! if (!isset($font))    $font     = "5";
! 
!   define (__TRACE_ENABLED__, false);
!   define (__DEBUG_ENABLED__, false);
!   
!   require("barcode/barcode.php");  
!   require("barcode/i25object.php");
!   require("barcode/c39object.php");
!   require("barcode/c128aobject.php");
!   require("barcode/c128bobject.php");
!   require("barcode/c128cobject.php");
!                        
!   if (!isset($style))  $style   = BCD_DEFAULT_STYLE;
!   if (!isset($width))  $width   = BCD_DEFAULT_WIDTH;
!   if (!isset($height)) $height  = BCD_DEFAULT_HEIGHT;
!   if (!isset($xres))   $xres    = BCD_DEFAULT_XRES;
!   if (!isset($font))   $font    = BCD_DEFAULT_FONT;
!             
!   switch ($type)
!   {
!     case "I25":
!         $obj = new I25Object($width, $height, $style, $code);
!         break;
!     case "C39":
!         $obj = new C39Object($width, $height, $style, $code);
!         break;
!     case "C128A":
!         $obj = new C128AObject($width, $height, $style, $code);
!         break;
!     case "C128B":
!         $obj = new C128BObject($width, $height, $style, $code);
!         break;
!     case "C128C":
!               $obj = new C128CObject($width, $height, $style, $code);
!         break;
!   default:
!       echo "Need bar code type ex. C39";
!       $obj = false;
!   }
!    
!   if ($obj) {
!       $obj->SetFont($font);   
!       $obj->DrawObject($xres);
!       ImagePNG($obj->mImg);
!       $obj->DestroyObject();
!       unset($obj);  /* clean */
!   }
! }
!   ?>
! <?
! require("footer.php");
! ?>
--- 1,104 ----
! <?
! /*
!     Copyright (C) 2001, 2002 Bertand Pallie, Loïc Dayot
! 
!     EPNadmin - Version 0.6 - 05/01/2003
! 
!     This program is free software; you can redistribute it and/or modify
!     it under the terms of the GNU General Public License as published by
!     the Free Software Foundation; either version 2 of the License, or
!     (at your option) any later version.
! 
!     This program is distributed in the hope that it will be useful,
!     but WITHOUT ANY WARRANTY; without even the implied warranty of
!     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
!     GNU General Public License for more details.
! 
!     You should have received a copy of the GNU General Public License
!     along with this program; if not, write to the Free Software
!     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
! 
!     http://epnadmin.pierrefitte93.fr/
! */
! 
! require_once("header.inc.php");
! require_once("constantes.inc.php");             // définition des constantes
! //require_once("fonctions.inc.php");              // concernant des fonctions 
transversales inclassables
! //require_once("mysql.inc.php");                  // concernant mysql
! //require_once("sessions.inc.php");             // concernant les sessions et 
initiations
! //require_once("usagers.inc.php");              // concernant la gestion des 
usagers
! //require_once("reservations.inc.php");         // concernant les 
réservations des postes en accès individuel par des usagers
! //require_once("tableaux.inc.php");             // Concernant l'affichage 
transposé d'un tableau
! //require_once("siteweb.inc.php");              // concernant les pages perso 
des usagers et les sites web des structures
! //require_once("dateheure.inc.php");            // concernant la manipulation 
des heures et des dates, formulaire, conversion...
! //require_once("structures.inc.php");           // concernant les structures
! //require_once("initiations.inc.php");          // concernant les initiations 
et les thèmes
! //require_once("parcours.inc.php");             // concernant les parcours 
des usagers et leur positionnement
! 
! if($isadmin)
! {
!   header ("Content-type: image/png");
!   $im = @ImageCreate (240, 230)
!       or die ("Cannot Initialize new GD image stream");
!   $background_color = ImageColorAllocate ($im, 255, 255, 255);
!   $text_color = ImageColorAllocate ($im, 233, 14, 91);
!   ImageString ($im, 1, 5, 5,  "A Simple Text String", $text_color);
!   //ImagePng ($im);
!   ImageDestroy ($im);
! 
!   if (!isset($output))  $output   = "png";
!   if (!isset($barcode)) $barcode  = "0123456789";
!   if (!isset($type))    $type     = "I25";
!   if (!isset($width))   $width    = "460";
!   if (!isset($height))  $height   = "120";
!   if (!isset($xres))    $xres     = "2";
!   if (!isset($font))    $font     = "5";
! 
!     define (__TRACE_ENABLED__, false);
!     define (__DEBUG_ENABLED__, false);
! 
!     require("barcode/barcode.php");
!     require("barcode/i25object.php");
!     require("barcode/c39object.php");
!     require("barcode/c128aobject.php");
!     require("barcode/c128bobject.php");
!     require("barcode/c128cobject.php");
! 
!     if (!isset($style))  $style   = BCD_DEFAULT_STYLE;
!     if (!isset($width))  $width   = BCD_DEFAULT_WIDTH;
!     if (!isset($height)) $height  = BCD_DEFAULT_HEIGHT;
!     if (!isset($xres))   $xres    = BCD_DEFAULT_XRES;
!     if (!isset($font))   $font    = BCD_DEFAULT_FONT;
! 
!     switch ($type)
!     {
!       case "I25":
!           $obj = new I25Object($width, $height, $style, $code);
!           break;
!       case "C39":
!           $obj = new C39Object($width, $height, $style, $code);
!           break;
!       case "C128A":
!           $obj = new C128AObject($width, $height, $style, $code);
!           break;
!       case "C128B":
!           $obj = new C128BObject($width, $height, $style, $code);
!           break;
!       case "C128C":
!                 $obj = new C128CObject($width, $height, $style, $code);
!           break;
!     default:
!         echo "Need bar code type ex. C39";
!         $obj = false;
!     }
! 
!     if ($obj) {
!         $obj->SetFont($font);
!         $obj->DrawObject($xres);
!         ImagePNG($obj->mImg);
!         $obj->DestroyObject();
!         unset($obj);  /* clean */
!   }
! }
! //require("footer.inc.php");
! ?>
\ No newline at end of file

Index: constantes.inc.php
===================================================================
RCS file: /cvsroot/epnadmin/epnadmin/constantes.inc.php,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -r1.14 -r1.15
*** constantes.inc.php  2 Jan 2003 20:23:33 -0000       1.14
--- constantes.inc.php  5 Jan 2003 20:34:01 -0000       1.15
***************
*** 3,7 ****
      Copyright (C) 2001, 2002 Bertand Pallie, Loïc Dayot
  
!     EPNadmin - Version 0.6 - 02/01/2003
  
      This program is free software; you can redistribute it and/or modify
--- 3,7 ----
      Copyright (C) 2001, 2002 Bertand Pallie, Loïc Dayot
  
!     EPNadmin - Version 0.6 - 05/01/2003
  
      This program is free software; you can redistribute it and/or modify
***************
*** 26,61 ****
  // Paramétrage de MySQL
  $mysql_serveur="localhost";
! $mysql_identifiant="epnadmin";
! $mysql_motdepasse="epnadmin";
! $mysql_base="epnadmin";
! 
  
  // Divers chemins
! $url_epnadmin="http://localhost/epnadmin";;
! $fichier_temporaire="/var/www/php_temp"; // N'est normalement plus utilisé 
dans usagers.php
  $dirvpopmail="/usr/sbin"; // dossier des programmes de vpopmail (vadduser...)
                            // utilisé dans courriel.php
  $dircomptesvpopmail="/home/vpopmail"; // dossier des données de vpopmail 
(pour retirer des alias de dommaines
                                        // dans courriel.php
! $dir_fontes_ttf="/var/www/epnadmin/";  // utilisé dans print.php
! $dir_tmp_images="/tmp/"; // utilisé dans print.php et 6cartes.php
  $fichier_hotes_virtuels="/etc/apache-ssl/Include_VirtualHost/apache.conf"; // 
extention de la configuration
                            // d'apache pour la gestion des alias des domaines 
et sous-domaines
                            // utilisé dans siteweb.php
  
  // constantes
! define ("PASSE", "passé");
  define ("FUTUR", "futur");
  
! // Tous les tarifs possibles pour les usagers
! $tarifs[0]="tarif A";    $tarifcouleur[0][0]=254; $tarifcouleur[0][1]=227; 
$tarifcouleur[0][2]=197;
! $tarifs[1]="tarif B";        $tarifcouleur[1][0]=250; 
$tarifcouleur[1][1]=169; $tarifcouleur[1][2]=211;
! $tarifs[2]="tarif C"; $tarifcouleur[2][0]=255; $tarifcouleur[2][1]=255; 
$tarifcouleur[2][2]=0;
! 
! // Paramétrage des réservations des salles et des postes
  $unitehoraire=30; // nombre de minutes qui est l'unité de temps de 
réservation des postes individuels
! define ("MINHORAIRE", "08:00");
! define ("MAXHORAIRE", "23:00");
  
  // TODO : remplace cette constante par un calcul automatique du nombre maxi 
de thème
  //        d'après le contenu de la base.
--- 26,79 ----
  // Paramétrage de MySQL
  $mysql_serveur="localhost";
! $mysql_identifiant="epnadmin";  // Mettre le bon identifiant
! $mysql_motdepasse="epnadmin";           // Mettre le bon mot de passe
! $mysql_base="epnadmin";         // Mettre le nom de la bonne base
  
  // Divers chemins
! $dir_fontes_ttf="/var/www/html/epnadmin/";  // utilisé dans print.php
! $dir_tmp_images="/tmp/"; // utilisé dans print.php et 6cartes.php
!                                                                               
                // C'est un dossier dans lequel le user apache a des droits 
d'écriture
! 
! // Exécution des commandes bash
! // Est-ce que les commandes serveur (par sudo) sont actives ou non.
! $EXECUTION_COMMANDES_BASH = FALSE; // sert dans usagers.php, courriel.php, 
siteweb.php
!                                   // pour la création des comptes sur le 
serveur
!                       // Ca fonctionne en utilisant la commande sudo sous 
bash. Le fichier /etc/sudoers.conf doit
!                       // être configuré en conséquence.
! 
! // Gestion des usagers
! $fichier_temporaire="/tmp/php_temp"; // N'est normalement plus utilisé dans 
usagers.php
! // Tous les tarifs possibles pour les usagers
! $tarifs[0]="tarif A";    $tarifcouleur[0][0]=254; $tarifcouleur[0][1]=227; 
$tarifcouleur[0][2]=197;
! $tarifs[1]="tarif B";    $tarifcouleur[1][0]=250; $tarifcouleur[1][1]=169; 
$tarifcouleur[1][2]=211;
! $tarifs[2]="tarif C";    $tarifcouleur[2][0]=255; $tarifcouleur[2][1]=255; 
$tarifcouleur[2][2]=0;
! 
! // Gestion de la messagerie
! // Se sert de vpopmail sur qmail
  $dirvpopmail="/usr/sbin"; // dossier des programmes de vpopmail (vadduser...)
                            // utilisé dans courriel.php
  $dircomptesvpopmail="/home/vpopmail"; // dossier des données de vpopmail 
(pour retirer des alias de dommaines
                                        // dans courriel.php
! 
! // Gestion des sous-domaines de sites internet
! // Ce sert d'Apache.
  $fichier_hotes_virtuels="/etc/apache-ssl/Include_VirtualHost/apache.conf"; // 
extention de la configuration
                            // d'apache pour la gestion des alias des domaines 
et sous-domaines
                            // utilisé dans siteweb.php
+ $administrateursitesweb="address@hidden"; // courriel de l'administrateur des 
sites web
+                                                 // et des domaines de 
courriels
+               // utilisé dans courriel.(inc.)php et siteweb.(inc.)php
+ $ip_serveur="127.0.0.1"; // sert dans courriel.inc.php
  
  // constantes
! define ("PASSE", "passé"); // sert dans l'affichage des parcours et des 
utlisations d'un usager
  define ("FUTUR", "futur");
  
! // Paramétrage des horaires des salles et des postes
  $unitehoraire=30; // nombre de minutes qui est l'unité de temps de 
réservation des postes individuels
! define ("MINHORAIRE", "08:00"); // sert notamment dans horaires.inc.php
! define ("MAXHORAIRE", "23:00"); // idem
  
+ // Gestion des parcours pédagogiques
  // TODO : remplace cette constante par un calcul automatique du nombre maxi 
de thème
  //        d'après le contenu de la base.
***************
*** 63,68 ****
  
  // Design
! $logo = "./images/logoepnadmin2.png";
  
  define ("COULEUR_ACCES_INDIVIDUEL", "#70F120");  // reservations et usages
  define ("COULEUR_SESSION", "#2AA1F6");
--- 81,87 ----
  
  // Design
! $logo = "./images/logoepnadmin2.png"; // image qui est utilisée dans 
entete.inc.php
  
+ // Définition des couleurs, mais franchement, il faudrait repenser tout ça.
  define ("COULEUR_ACCES_INDIVIDUEL", "#70F120");  // reservations et usages
  define ("COULEUR_SESSION", "#2AA1F6");
***************
*** 76,104 ****
  define ("COULEUR_ADMIN", "#C0C0C0");
  
! //$ajouter     = "<img src=\"images/ajouter.png\" border=0 alt=\"Ajouter\">";
! //$retirer    = "<img src=\"images/retirer.png\" border=0 alt=\"Retirer\">";
! //$supprimer    = "<img src=\"images/supprimer.png\" border=0 
alt=\"Supprimer\">";
! //$info      = "<img src=\"images/info.png\" border=0 alt=\"Plus de 
détails\">";
! //$programmer    = "<img src=\"images/programmer.png\" border=0 
alt=\"Programmer, s'inscrire\">";
! //$deprogrammer  = "<img src=\"images/deprogrammer.png\" border=0 
alt=\"Déprogrammer, désinscrire\">";
! //$modifier    = "<img src=\"images/modifier.png\" border=0 
alt=\"Modifier\">";
! //$rien      = "<img src=\"images/noir.png\" border=0 alt=\"Rien\">";
! $ajouter="+";
! $retirer="-";
! $supprimer="s";
! $info="?";
! $programmer="p";
! $deprogrammer="x";
! $modifier="m";
! $rien="&nbsp;";
! 
! // Sitesweb
! $administrateursitesweb="address@hidden"; // courriel de l'administrateur des 
sites web
!                                                 // et des domaines de 
courriels
! $ip_serveur="192.168.0.253";
! 
! // Configurations
! // Est-ce que les commandes serveur (par sudo) sont actives ou non.
! $EXECUTION_COMMANDES_BASH = FALSE; // sert dans usagers.php, courriel.php, 
siteweb.php
!                                   // pour la création des comptes sur le 
serveur
! ?>
\ No newline at end of file
--- 95,121 ----
  define ("COULEUR_ADMIN", "#C0C0C0");
  
! // Définition des signes pour les commandes récurrentes
! // Version graphique
! if (TRUE)
! {
!   $ajouter     = "<img src=\"images/ajouter.png\" border=0 alt=\"Ajouter\">";
!   $retirer    = "<img src=\"images/retirer.png\" border=0 alt=\"Retirer\">";
!   $supprimer    = "<img src=\"images/supprimer.png\" border=0 
alt=\"Supprimer\">";
!   $info      = "<img src=\"images/info.png\" border=0 alt=\"Plus de 
détails\">";
!   $programmer    = "<img src=\"images/programmer.png\" border=0 
alt=\"Programmer, s'inscrire\">";
!   $deprogrammer  = "<img src=\"images/deprogrammer.png\" border=0 
alt=\"Déprogrammer, désinscrire\">";
!   $modifier    = "<img src=\"images/modifier.png\" border=0 
alt=\"Modifier\">";
!   $rien      = "<img src=\"images/noir.png\" border=0 alt=\"Rien\">";
! }
! else
! { // version textuelle
!   $ajouter="+";
!   $retirer="-";
!   $supprimer="s";
!   $info="?";
!   $programmer="p";
!   $deprogrammer="x";
!   $modifier="m";
!   $rien="&nbsp;";
! }
! ?>

Index: courriel.php
===================================================================
RCS file: /cvsroot/epnadmin/epnadmin/courriel.php,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** courriel.php        14 Dec 2002 12:11:27 -0000      1.7
--- courriel.php        5 Jan 2003 20:34:01 -0000       1.8
***************
*** 3,7 ****
      Copyright (C) 2002 Loïc Dayot - Mairie de Pierrefitte (93)
  
!     EPNadmin - Version 0.5.4
  
      This program is free software; you can redistribute it and/or modify
--- 3,7 ----
      Copyright (C) 2002 Loïc Dayot - Mairie de Pierrefitte (93)
  
!     EPNadmin - Version 0.6
  
      This program is free software; you can redistribute it and/or modify
***************
*** 22,26 ****
  */
  
! require("header.inc.php");
  ?>
  <html>
--- 22,39 ----
  */
  
! require_once("header.inc.php"); // C'est dans header.inc.php que sont 
retrouvés les droits issus de la table droits
! require_once("constantes.inc.php");             // définition des constantes
! require_once("fonctions.inc.php");              // concernant des fonctions 
transversales inclassables
! require_once("mysql.inc.php");                  // concernant mysql
! //require_once("sessions.inc.php");             // concernant les sessions et 
initiations
! require_once("usagers.inc.php");              // concernant la gestion des 
usagers
! //require_once("reservations.inc.php");         // concernant les 
réservations des postes en accès individuel par des usagers
! //require_once("tableaux.inc.php");             // Concernant l'affichage 
transposé d'un tableau
! require_once("siteweb.inc.php");              // concernant les pages perso 
des usagers et les sites web des structures
! //require_once("dateheure.inc.php");            // concernant la manipulation 
des heures et des dates, formulaire, conversion...
! require_once("structures.inc.php");           // concernant les structures
! //require_once("initiations.inc.php");          // concernant les initiations 
et les thèmes
! //require_once("parcours.inc.php");             // concernant les parcours 
des usagers et leur positionnement
! 
  ?>
  <html>
***************
*** 32,36 ****
  $titr = "Gestion de compte de courriel";
  
! $datemaj="13 décembre 2002";
  require("entete.inc.php");
  
--- 45,49 ----
  $titr = "Gestion de compte de courriel";
  
! $datemaj="05 janvier 2003";
  require("entete.inc.php");
  
***************
*** 40,44 ****
  function form_sousdomaine($operation, $id_sousdomaine=0, $id_domaine=1)
  {
! global $isadmin, $id_structure, $id_usager;
  echo "<table align=center bgColor=\"".COULEUR_COURRIEL."\">
        <tr><th align=center>";
--- 53,57 ----
  function form_sousdomaine($operation, $id_sousdomaine=0, $id_domaine=1)
  {
! global $isadmin, $id_structure, $id_usager, $PHP_SELF;
  echo "<table align=center bgColor=\"".COULEUR_COURRIEL."\">
        <tr><th align=center>";
***************
*** 428,432 ****
            <tr><td>Identifiant :</td><td>l'adresse de courriel entière<br>par 
exemple : address@hidden>sousdomaine.$domaine->domaine</td></tr>
            <tr><td>Mot de passe :</td><td>Le mot de passe saisi lors de la 
création <br>du compte par l'administrateur.</td></tr>\n";
!   }
    echo "</table>
        </td></tr></table>\n";
--- 441,445 ----
            <tr><td>Identifiant :</td><td>l'adresse de courriel entière<br>par 
exemple : address@hidden>sousdomaine.$domaine->domaine</td></tr>
            <tr><td>Mot de passe :</td><td>Le mot de passe saisi lors de la 
création <br>du compte par l'administrateur.</td></tr>\n";
!   } //"
    echo "</table>
        </td></tr></table>\n";
***************
*** 480,484 ****
    echo "<tr><td colspan='2' align='center'><input type=\"submit\" 
name=\"Créer\"
          value=\"Je veux créer l'adresse de courriel\"></td></tr>
!         </table>\n";
    echo "</form>\n";
  
--- 493,497 ----
    echo "<tr><td colspan='2' align='center'><input type=\"submit\" 
name=\"Créer\"
          value=\"Je veux créer l'adresse de courriel\"></td></tr>
!         </table>\n"; //'
    echo "</form>\n";
  
***************
*** 539,543 ****
    echo "<tr><td colspan='2' align='center'><input type=\"submit\" 
name=\"Créer\"
          value=\"Je veux créer l'adresse de courriel\"></td></tr>
!         </table>\n";
    echo "</form>\n";
  
--- 552,556 ----
    echo "<tr><td colspan='2' align='center'><input type=\"submit\" 
name=\"Créer\"
          value=\"Je veux créer l'adresse de courriel\"></td></tr>
!         </table>\n";    //'
    echo "</form>\n";
  
***************
*** 597,601 ****
            <tr><td>Identifiant :</td><td>$usager->courriel</td></tr>
            <tr><td>Mot de passe :</td><td>Le m&ecirc;me que celui de mon 
compte à l'EPN</td></tr>
!       </p>\n";
      else
        echo "<p>Votre courriel n'est pas hébergé sur le serveur.</p>\n";
--- 610,614 ----
            <tr><td>Identifiant :</td><td>$usager->courriel</td></tr>
            <tr><td>Mot de passe :</td><td>Le m&ecirc;me que celui de mon 
compte à l'EPN</td></tr>
!       </p>\n"; //"
      else
        echo "<p>Votre courriel n'est pas hébergé sur le serveur.</p>\n";
***************
*** 608,610 ****
  echo "</body></html>";
  require("footer.inc.php");
! ?>
--- 621,623 ----
  echo "</body></html>";
  require("footer.inc.php");
! ?>
\ No newline at end of file

Index: dateheure.inc.php
===================================================================
RCS file: /cvsroot/epnadmin/epnadmin/dateheure.inc.php,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** dateheure.inc.php   4 Jan 2003 13:24:59 -0000       1.7
--- dateheure.inc.php   5 Jan 2003 20:34:01 -0000       1.8
***************
*** 3,7 ****
      Copyright (C) 2002 Loïc Dayot - Mairie Pierrefitte (93)
  
!     EPNadmin - Version 0.5
  
      This program is free software; you can redistribute it and/or modify
--- 3,7 ----
      Copyright (C) 2002 Loïc Dayot - Mairie Pierrefitte (93)
  
!     EPNadmin - Version 0.6
  
      This program is free software; you can redistribute it and/or modify
***************
*** 22,25 ****
--- 22,39 ----
  */
  
+ //require_once("header.inc.php");
+ require_once("constantes.inc.php");             // définition des constantes
+ //require_once("fonctions.inc.php");              // concernant des fonctions 
transversales inclassables
+ //require_once("mysql.inc.php");                  // concernant mysql
+ //require_once("sessions.inc.php");             // concernant les sessions et 
initiations
+ //require_once("usagers.inc.php");              // concernant la gestion des 
usagers
+ //require_once("reservations.inc.php");         // concernant les 
réservations des postes en accès individuel par des usagers
+ //require_once("tableaux.inc.php");             // Concernant l'affichage 
transposé d'un tableau
+ //require_once("siteweb.inc.php");              // concernant les pages perso 
des usagers et les sites web des structures
+ //require_once("dateheure.inc.php");            // concernant la manipulation 
des heures et des dates, formulaire, conversion...
+ //require_once("structures.inc.php");           // concernant les structures
+ //require_once("initiations.inc.php");          // concernant les initiations 
et les thèmes
+ //require_once("parcours.inc.php");             // concernant les parcours 
des usagers et leur positionnement
+ 
  //                                                                            
 -
  //  Manipulation de dates, heures...                                          
 -
***************
*** 247,249 ****
  }
  
! ?>
--- 261,263 ----
  }
  
! ?>
\ No newline at end of file

Index: entete.inc.php
===================================================================
RCS file: /cvsroot/epnadmin/epnadmin/entete.inc.php,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -r1.14 -r1.15
*** entete.inc.php      2 Jan 2003 19:01:49 -0000       1.14
--- entete.inc.php      5 Jan 2003 20:34:01 -0000       1.15
***************
*** 3,7 ****
      Copyright (C) 2001, 2002 Loïc Dayot - Mairie de Pierrefitte (93)
  
!     EPNadmin - Version 0.6 - 01/01/2003
  
      This program is free software; you can redistribute it and/or modify
--- 3,7 ----
      Copyright (C) 2001, 2002 Loïc Dayot - Mairie de Pierrefitte (93)
  
!     EPNadmin - Version 0.6 - 04/01/2003
  
      This program is free software; you can redistribute it and/or modify
***************
*** 22,25 ****
--- 22,43 ----
  */
  
+ /* LD 4/1/2002 - essai de prise en compte des différentes fonctionnalités
+                                                                et des 
autorisations des entités (usagers, structures).
+ */
+ 
+ require_once("header.inc.php");
+ require_once("constantes.inc.php");             // définition des constantes
+ require_once("fonctions.inc.php");              // concernant des fonctions 
transversales inclassables
+ require_once("mysql.inc.php");                  // concernant mysql
+ //require_once("sessions.inc.php");             // concernant les sessions et 
initiations
+ //require_once("usagers.inc.php");              // concernant la gestion des 
usagers
+ //require_once("reservations.inc.php");         // concernant les 
réservations des postes en accès individuel par des usagers
+ //require_once("tableaux.inc.php");             // Concernant l'affichage 
transposé d'un tableau
+ //require_once("siteweb.inc.php");              // concernant les pages perso 
des usagers et les sites web des structures
+ //require_once("dateheure.inc.php");            // concernant la manipulation 
des heures et des dates, formulaire, conversion...
+ //require_once("structures.inc.php");           // concernant les structures
+ //require_once("initiations.inc.php");          // concernant les initiations 
et les thèmes
+ //require_once("parcours.inc.php");             // concernant les parcours 
des usagers et leur positionnement
+ 
  echo "<body bgcolor=\"#FFFFFF\">";
  
***************
*** 35,39 ****
  <table cellpadding=\"2\" cellspacing=\"0\" align=\"left\">
    <tr>
!     <td colspan=3 align=center><a href=\"index.php\"><img 
src=\"images/logoepnadmin2.png\" width=113 height=113 border=0></a></td>
      <td width=\"5\"></td>
    </tr>
--- 53,57 ----
  <table cellpadding=\"2\" cellspacing=\"0\" align=\"left\">
    <tr>
!     <td colspan=3 align=center><a href=\"index.php\"><img src=\"$logo\" 
width=113 height=113 border=0></a></td>
      <td width=\"5\"></td>
    </tr>
***************
*** 139,143 ****
  <table cellpadding=\"2\" cellspacing=\"0\" align=\"left\">
    <tr>
!     <td colspan=3 align=center><a href=\"index.php\"><img 
src=\"images/logoepnadmin2.png\" width=113 height=113 border=0></a></td>
      <td width=\"5\"></td>
    </tr>
--- 157,161 ----
  <table cellpadding=\"2\" cellspacing=\"0\" align=\"left\">
    <tr>
!     <td colspan=3 align=center><a href=\"index.php\"><img src=\"$logo\" 
width=113 height=113 border=0></a></td>
      <td width=\"5\"></td>
    </tr>
***************
*** 304,310 ****
  
  // Ceci termine l'entête
! echo "<table align=center>
    <tr>
!      <td bgcolor=\"$cfond\" align=center>
         <font color=\"$ctitre\" size=\"+2\"><b>$titr</b></font></td>
    </tr>
--- 322,328 ----
  
  // Ceci termine l'entête
! echo "<table align='center'>
    <tr>
!      <td bgcolor=\"$cfond\" align='center'>
         <font color=\"$ctitre\" size=\"+2\"><b>$titr</b></font></td>
    </tr>

Index: fonctions.inc.php
===================================================================
RCS file: /cvsroot/epnadmin/epnadmin/fonctions.inc.php,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -r1.13 -r1.14
*** fonctions.inc.php   14 Oct 2002 20:45:51 -0000      1.13
--- fonctions.inc.php   5 Jan 2003 20:34:01 -0000       1.14
***************
*** 25,47 ****
  // Version du 30/01/2002
  
  // Script d'initialisation des variables et constantes de départ
! require("constantes.inc.php");
  
  // Affichage des messages d'erreurs
  function debug($texte)
  { echo "<h3>$texte</h3>\n"; }
- 
- // Bibliothèque de fonctions
- 
- require("mysql.inc.php");                // concernant mysql
- require("sessions.inc.php");             // concernant les sessions et 
initiations
- require("usagers.inc.php");              // concernant la gestion des usagers
- require("reservations.inc.php");         // concernant les réservations des 
postes en accès individuel par des usagers
- require("tableaux.inc.php");             // Concernant l'affichage transposé 
d'un tableau
- require("siteweb.inc.php");              // concernant les pages perso des 
usagers et les sites web des structures
- require("dateheure.inc.php");            // concernant la manipulation des 
heures et des dates, formulaire, conversion...
- require("structures.inc.php");           // concernant les structures
- require("initiations.inc.php");          // concernant les initiations et les 
thèmes
- require("parcours.inc.php");             // concernant les parcours des 
usagers et leur positionnement
  
  // Execution de commandes sur le serveur local sous Linux.
--- 25,48 ----
  // Version du 30/01/2002
  
+ 
  // Script d'initialisation des variables et constantes de départ
! require_once("constantes.inc.php");
! 
! // Bibliothèque de fonctions
! //require("mysql.inc.php");                // concernant mysql
! //require("sessions.inc.php");             // concernant les sessions et 
initiations
! //require("usagers.inc.php");              // concernant la gestion des 
usagers
! //require("reservations.inc.php");         // concernant les réservations des 
postes en accès individuel par des usagers
! //require("tableaux.inc.php");             // Concernant l'affichage 
transposé d'un tableau
! //require("siteweb.inc.php");              // concernant les pages perso des 
usagers et les sites web des structures
! //require("dateheure.inc.php");            // concernant la manipulation des 
heures et des dates, formulaire, conversion...
! //require("structures.inc.php");           // concernant les structures
! //require("initiations.inc.php");          // concernant les initiations et 
les thèmes
! //require("parcours.inc.php");             // concernant les parcours des 
usagers et leur positionnement
! 
  
  // Affichage des messages d'erreurs
  function debug($texte)
  { echo "<h3>$texte</h3>\n"; }
  
  // Execution de commandes sur le serveur local sous Linux.

Index: footer.inc.php
===================================================================
RCS file: /cvsroot/epnadmin/epnadmin/footer.inc.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** footer.inc.php      20 Jul 2002 21:23:52 -0000      1.2
--- footer.inc.php      5 Jan 2003 20:34:01 -0000       1.3
***************
*** 1,25 ****
! <?
! /*
!     Copyright (C) 2001, 2002 Bertand Pallie, Loïc Dayot
! 
!     EPNadmin - Version 0.1
! 
!     This program is free software; you can redistribute it and/or modify
!     it under the terms of the GNU General Public License as published by
!     the Free Software Foundation; either version 2 of the License, or
!     (at your option) any later version.
! 
!     This program is distributed in the hope that it will be useful,
!     but WITHOUT ANY WARRANTY; without even the implied warranty of
!     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
!     GNU General Public License for more details.
! 
!     You should have received a copy of the GNU General Public License
!     along with this program; if not, write to the Free Software
!     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
! 
!     http://epnadmin.pierrefitte93.fr/
! */
! 
! mysql_close();
  ?>
--- 1,38 ----
! <?
! /*
!     Copyright (C) 2001, 2002 Bertand Pallie, Loïc Dayot
! 
!     EPNadmin - Version 0.1
! 
!     This program is free software; you can redistribute it and/or modify
!     it under the terms of the GNU General Public License as published by
!     the Free Software Foundation; either version 2 of the License, or
!     (at your option) any later version.
! 
!     This program is distributed in the hope that it will be useful,
!     but WITHOUT ANY WARRANTY; without even the implied warranty of
!     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
!     GNU General Public License for more details.
! 
!     You should have received a copy of the GNU General Public License
!     along with this program; if not, write to the Free Software
!     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
! 
!     http://epnadmin.pierrefitte93.fr/
! */
! //require_once("header.inc.php");
! //require_once("constantes.inc.php");             // définition des constantes
! //require_once("fonctions.inc.php");              // concernant des fonctions 
transversales inclassables
! //require_once("mysql.inc.php");                  // concernant mysql
! //require_once("sessions.inc.php");             // concernant les sessions et 
initiations
! //require_once("usagers.inc.php");              // concernant la gestion des 
usagers
! //require_once("reservations.inc.php");         // concernant les 
réservations des postes en accès individuel par des usagers
! //require_once("tableaux.inc.php");             // Concernant l'affichage 
transposé d'un tableau
! //require_once("siteweb.inc.php");              // concernant les pages perso 
des usagers et les sites web des structures
! //require_once("dateheure.inc.php");            // concernant la manipulation 
des heures et des dates, formulaire, conversion...
! //require_once("structures.inc.php");           // concernant les structures
! //require_once("initiations.inc.php");          // concernant les initiations 
et les thèmes
! //require_once("parcours.inc.php");             // concernant les parcours 
des usagers et leur positionnement
! 
! mysql_close();
  ?>

Index: header.inc.php
===================================================================
RCS file: /cvsroot/epnadmin/epnadmin/header.inc.php,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -r1.12 -r1.13
*** header.inc.php      4 Jan 2003 13:24:59 -0000       1.12
--- header.inc.php      5 Jan 2003 20:34:01 -0000       1.13
***************
*** 22,26 ****
  */
  
! include("fonctions.inc.php");
  
  mysql_connecte();
--- 22,37 ----
  */
  
! require_once("constantes.inc.php");             // définition des constantes
! //require_once("fonctions.inc.php");              // concernant des fonctions 
transversales inclassables
! require_once("mysql.inc.php");                  // concernant mysql
! //require_once("sessions.inc.php");             // concernant les sessions et 
initiations
! //require_once("usagers.inc.php");              // concernant la gestion des 
usagers
! //require_once("reservations.inc.php");         // concernant les 
réservations des postes en accès individuel par des usagers
! //require_once("tableaux.inc.php");             // Concernant l'affichage 
transposé d'un tableau
! //require_once("siteweb.inc.php");              // concernant les pages perso 
des usagers et les sites web des structures
! //require_once("dateheure.inc.php");            // concernant la manipulation 
des heures et des dates, formulaire, conversion...
! //require_once("structures.inc.php");           // concernant les structures
! //require_once("initiations.inc.php");          // concernant les initiations 
et les thèmes
! //require_once("parcours.inc.php");             // concernant les parcours 
des usagers et leur positionnement
  
  mysql_connecte();
***************
*** 38,41 ****
--- 49,53 ----
    <tr>\n"; //"
  if (! $structure)
+ {
    echo "<td>
      <form name=\"ident_usager\" method=\"post\" action=\"$PHP_SELF\">
***************
*** 49,53 ****
--- 61,73 ----
      </form>
    </td>\n";
+   echo "</tr>
+     <tr><td align=center>
+     <i><font size=\"-1\">Si vous n'&ecirc;tes pas un usager, mais que vous 
voulez quand m&ecirc;me
+     <br> essayer les services r&eacute;serv&eacute;s aux usagers,
+     <br>vous pouvez vous identifier avec &quot;<b>test</b>&quot; et comme mot 
de passe &quot;test&quot;.</font></i>
+     </td></tr></table>\n"; //"
+ }
  else
+ {
    echo "<td>
      <form name=\"ident_structure\" method=\"post\" action=\"$PHP_SELF\">
***************
*** 60,70 ****
        </table>
      </form>
!   </td>\n";
! echo "</tr>
!   <tr><td align=center>
!   <i><font size=\"-1\">Si vous n'&ecirc;tes pas un usager, mais que vous 
voulez quand m&ecirc;me
!   <br> essayer les services r&eacute;serv&eacute;s aux usagers,
!   <br>vous pouvez vous identifier avec &quot;<b>test</b>&quot; et comme mot 
de passe &quot;test&quot;.</font></i>
!   </td></tr></table>\n"; //"
  if (! $structure)
    echo "<a href=\"$PHP_SELF?ti=1\">S'identifier en tant que structure.</a>\n";
--- 80,91 ----
        </table>
      </form>
!   </td>\n"; // '
!   echo "</tr>
!     <tr><td align=center>
!     <i><font size=\"-1\">Si vous n'&ecirc;tes pas une structure, mais que 
vous voulez quand m&ecirc;me
!     <br> essayer les services r&eacute;serv&eacute;s aux structures,
!     <br>vous pouvez vous identifier avec &quot;<b>admin</b>&quot; et comme 
mot de passe &quot;admin&quot;.</font></i>
!     </td></tr></table>\n"; //"
! }
  if (! $structure)
    echo "<a href=\"$PHP_SELF?ti=1\">S'identifier en tant que structure.</a>\n";
***************
*** 176,180 ****
                                        fonctions et droits.
  
!                                       Quatre cas :
  
                                        id_structure==0
--- 197,201 ----
                                        fonctions et droits.
  
!                                       Cinq cas :
  
                                        id_structure==0
***************
*** 191,194 ****
--- 212,218 ----
                                                - Il s'agit des droits des 
structures.
  
+                                       id_structure==-3
+                                               - C'est celui des droits des 
strctures qui n'en ont pas encore (bref, les droits par défaut des structures).
+ 
                                        Dans la mesure où cet enregistrement ne 
se fait que lors de l'identification,
                                        aux changements de droits dans la base, 
il faudra penser à se ré-identifier.
***************
*** 213,217 ****
--- 237,248 ----
                                $nstructure=-1;
                        elseif ($id_structure)
+                       {
                                $nstructure=$id_structure;
+                               // On regarde si la structure a des droits de 
configurés
+                               $req="SELECT * FROM droits WHERE 
id_structure='$nstructure'";
+                               $res=executeRequete($req);
+                               if (! mysql_fetch_object($res))
+                                 $nstructure=-3; // si non, on prend la 
configuration apr défaut des structures.
+                       }
                        else
                                exit;
***************
*** 236,238 ****
                            les informations sur les usagers, on aura : 
USAGERS=="VOIR". */
  
! ?>
\ No newline at end of file
--- 267,269 ----
                            les informations sur les usagers, on aura : 
USAGERS=="VOIR". */
  
! ?>

Index: horaires.php
===================================================================
RCS file: /cvsroot/epnadmin/epnadmin/horaires.php,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** horaires.php        8 Nov 2002 18:59:07 -0000       1.8
--- horaires.php        5 Jan 2003 20:34:01 -0000       1.9
***************
*** 3,7 ****
      Copyright (C) 2001, 2002 Loïc Dayot Mairie de Pierrefitte(93)
  
!     EPNadmin - Version 0.5.3
  
      This program is free software; you can redistribute it and/or modify
--- 3,7 ----
      Copyright (C) 2001, 2002 Loïc Dayot Mairie de Pierrefitte(93)
  
!     EPNadmin - Version 0.6
  
      This program is free software; you can redistribute it and/or modify
***************
*** 22,26 ****
  */
  
! require("header.inc.php");
  ?>
  <html>
--- 22,39 ----
  */
  
! require_once("header.inc.php"); // C'est dans header.inc.php que sont 
retrouvés les droits issus de la table droits
! require_once("constantes.inc.php");             // définition des constantes
! //require_once("fonctions.inc.php");              // concernant des fonctions 
transversales inclassables
! require_once("mysql.inc.php");                  // concernant mysql
! //require_once("sessions.inc.php");             // concernant les sessions et 
initiations
! //require_once("usagers.inc.php");              // concernant la gestion des 
usagers
! //require_once("reservations.inc.php");         // concernant les 
réservations des postes en accès individuel par des usagers
! //require_once("tableaux.inc.php");             // Concernant l'affichage 
transposé d'un tableau
! require_once("siteweb.inc.php");              // concernant les pages perso 
des usagers et les sites web des structures
! require_once("dateheure.inc.php");            // concernant la manipulation 
des heures et des dates, formulaire, conversion...
! //require_once("structures.inc.php");           // concernant les structures
! //require_once("initiations.inc.php");          // concernant les initiations 
et les thèmes
! //require_once("parcours.inc.php");             // concernant les parcours 
des usagers et leur positionnement
! 
  ?>
  <html>
***************
*** 30,34 ****
  <?
  $titr = "Gestion du calendrier et des horaires d'ouverture";
! $datemaj="7 novembre 2002";
  require("entete.inc.php");
  
--- 43,47 ----
  <?
  $titr = "Gestion du calendrier et des horaires d'ouverture";
! $datemaj="5 janvier 2003";
  require("entete.inc.php");
  
***************
*** 582,584 ****
  echo "</body></html>\n";
  require("footer.inc.php");
! ?>
--- 595,597 ----
  echo "</body></html>\n";
  require("footer.inc.php");
! ?>
\ No newline at end of file

Index: image.inc.php
===================================================================
RCS file: /cvsroot/epnadmin/epnadmin/image.inc.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** image.inc.php       2 Jan 2003 19:01:49 -0000       1.1
--- image.inc.php       5 Jan 2003 20:34:01 -0000       1.2
***************
*** 3,7 ****
      Copyright (C) 2003 Loïc Dayot - Mairie de Pierrefitte (93)
  
!     EPNadmin - Version 0.6
  
      This program is free software; you can redistribute it and/or modify
--- 3,7 ----
      Copyright (C) 2003 Loïc Dayot - Mairie de Pierrefitte (93)
  
!     EPNadmin - Version 0.6 - 04/01/2003
  
      This program is free software; you can redistribute it and/or modify

Index: index.php
===================================================================
RCS file: /cvsroot/epnadmin/epnadmin/index.php,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** index.php   12 Dec 2002 19:01:01 -0000      1.6
--- index.php   5 Jan 2003 20:34:01 -0000       1.7
***************
*** 3,9 ****
      Copyright (C) 2001, 2002 Bertand Pallie, Loïc Dayot - Mairie de 
Pierrefitte (93)
  
!     EPNadmin - Version 0.5.3
  
!    This program is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published by
      the Free Software Foundation; either version 2 of the License, or
--- 3,9 ----
      Copyright (C) 2001, 2002 Bertand Pallie, Loïc Dayot - Mairie de 
Pierrefitte (93)
  
!     EPNadmin - Version 0.6
  
!     This program is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published by
      the Free Software Foundation; either version 2 of the License, or
***************
*** 22,26 ****
  */
  
! require("header.inc.php");
  ?>
  <html>
--- 22,38 ----
  */
  
! require_once("header.inc.php");
! require_once("constantes.inc.php");             // définition des constantes
! //require_once("fonctions.inc.php");              // concernant des fonctions 
transversales inclassables
! //require_once("mysql.inc.php");                  // concernant mysql
! //require_once("sessions.inc.php");             // concernant les sessions et 
initiations
! //require_once("usagers.inc.php");              // concernant la gestion des 
usagers
! require_once("reservations.inc.php");         // concernant les réservations 
des postes en accès individuel par des usagers
! //require_once("tableaux.inc.php");             // Concernant l'affichage 
transposé d'un tableau
! //require_once("siteweb.inc.php");              // concernant les pages perso 
des usagers et les sites web des structures
! //require_once("dateheure.inc.php");            // concernant la manipulation 
des heures et des dates, formulaire, conversion...
! //require_once("structures.inc.php");           // concernant les structures
! //require_once("initiations.inc.php");          // concernant les initiations 
et les thèmes
! require_once("parcours.inc.php");             // concernant les parcours des 
usagers et leur positionnement
  ?>
  <html>
***************
*** 33,37 ****
  else
    $titr = "Mon compte personnel";
! $datemaj="14 octobre 2002";
  require("entete.inc.php");
  echo "\n";
--- 45,49 ----
  else
    $titr = "Mon compte personnel";
! $datemaj="05 janvier 2003";
  require("entete.inc.php");
  echo "\n";
***************
*** 39,47 ****
  if ($id_usager)
  {
! echo "<table align=center bgcolor=\"yellow\" width=\"40%\">
!       <tr><td align=center><b>Prochainement, aura lieu la première réunion du
!       comité d'usagers de l'Arobase espace public multimédia. <a 
href=\"comite.php\">Inscrivez-vous</a>, l'Arobase a besoin
!       de vous.</td></tr>
!       </table><br>\n";
  
  // Affichage des prochaines inscriptions à des sessions
--- 51,55 ----
  if ($id_usager)
  {
! echo $message_demarrage;
  
  // Affichage des prochaines inscriptions à des sessions

Index: initiations.inc.php
===================================================================
RCS file: /cvsroot/epnadmin/epnadmin/initiations.inc.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** initiations.inc.php 4 Dec 2002 20:47:43 -0000       1.3
--- initiations.inc.php 5 Jan 2003 20:34:01 -0000       1.4
***************
*** 3,7 ****
      Copyright (C) 2001, 2002 Bertand Pallie, Loïc Dayot - Mairie Pierrefitte 
(93)
  
!     EPNadmin - Version 0.5
  
      This program is free software; you can redistribute it and/or modify
--- 3,7 ----
      Copyright (C) 2001, 2002 Bertand Pallie, Loïc Dayot - Mairie Pierrefitte 
(93)
  
!     EPNadmin - Version 0.6
  
      This program is free software; you can redistribute it and/or modify
***************
*** 21,24 ****
--- 21,37 ----
      http://epnadmin.pierrefitte93.fr/
  */
+ //require_once("header.inc.php");
+ require_once("constantes.inc.php");             // définition des constantes
+ require_once("fonctions.inc.php");              // concernant des fonctions 
transversales inclassables
+ require_once("mysql.inc.php");                  // concernant mysql
+ //require_once("sessions.inc.php");             // concernant les sessions et 
initiations
+ //require_once("usagers.inc.php");              // concernant la gestion des 
usagers
+ //require_once("reservations.inc.php");         // concernant les 
réservations des postes en accès individuel par des usagers
+ //require_once("tableaux.inc.php");             // Concernant l'affichage 
transposé d'un tableau
+ //require_once("siteweb.inc.php");              // concernant les pages perso 
des usagers et les sites web des structures
+ require_once("dateheure.inc.php");            // concernant la manipulation 
des heures et des dates, formulaire, conversion...
+ //require_once("structures.inc.php");           // concernant les structures
+ //require_once("initiations.inc.php");          // concernant les initiations 
et les thèmes
+ //require_once("parcours.inc.php");             // concernant les parcours 
des usagers et leur positionnement
  
  //                                                                            
 -
***************
*** 133,135 ****
  }
  
! ?>
--- 146,148 ----
  }
  
! ?>
\ No newline at end of file

Index: initiations.php
===================================================================
RCS file: /cvsroot/epnadmin/epnadmin/initiations.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** initiations.php     9 Oct 2002 21:15:16 -0000       1.3
--- initiations.php     5 Jan 2003 20:34:01 -0000       1.4
***************
*** 3,7 ****
      Copyright (C) 2002 Loïc Dayot
  
!     EPNadmin - Version 0.5.3
  
      This program is free software; you can redistribute it and/or modify
--- 3,7 ----
      Copyright (C) 2002 Loïc Dayot
  
!     EPNadmin - Version 0.6
  
      This program is free software; you can redistribute it and/or modify
***************
*** 22,26 ****
  */
  
! require("header.inc.php");
  ?>
  <html>
--- 22,39 ----
  */
  
! require_once("header.inc.php");
! //require_once("constantes.inc.php");             // définition des constantes
! //require_once("fonctions.inc.php");              // concernant des fonctions 
transversales inclassables
! require_once("mysql.inc.php");                  // concernant mysql
! //require_once("sessions.inc.php");             // concernant les sessions et 
initiations
! //require_once("usagers.inc.php");              // concernant la gestion des 
usagers
! //require_once("reservations.inc.php");         // concernant les 
réservations des postes en accès individuel par des usagers
! //require_once("tableaux.inc.php");             // Concernant l'affichage 
transposé d'un tableau
! //require_once("siteweb.inc.php");              // concernant les pages perso 
des usagers et les sites web des structures
! //require_once("dateheure.inc.php");            // concernant la manipulation 
des heures et des dates, formulaire, conversion...
! //require_once("structures.inc.php");           // concernant les structures
! require_once("initiations.inc.php");          // concernant les initiations 
et les thèmes
! //require_once("parcours.inc.php");             // concernant les parcours 
des usagers et leur positionnement
! 
  ?>
  <html>
***************
*** 30,37 ****
  <?
  $titr = "Base des initiations";
! $datemaj="8 octobre 2002";
  require("entete.inc.php");
  
- 
  switch ($operation)
  {
--- 43,49 ----
  <?
  $titr = "Base des initiations";
! $datemaj="5 janvier 2002";
  require("entete.inc.php");
  
  switch ($operation)
  {
***************
*** 81,88 ****
                    \"$dans_parcours\", \"$public\", \"$auteurs_versions\" )";
           $res = executeRequete($req);
!          $req = "SELECT max(id) AS is FROM initiations";
           $res= executeRequete($req);
           $initiation=mysql_fetch_object($res);
!          $id_initiation=$initiation->id;
        }
        else
--- 93,100 ----
                    \"$dans_parcours\", \"$public\", \"$auteurs_versions\" )";
           $res = executeRequete($req);
!          $req = "SELECT max(id) AS idm FROM initiations";
           $res= executeRequete($req);
           $initiation=mysql_fetch_object($res);
!          $id_initiation=$initiation->idm;
        }
        else
***************
*** 302,307 ****
     $req = "DELETE FROM initiations WHERE id=$id_initiation";
     $res = executeRequete($req);
!    echo "<p><a 
href=\"?operation=2&id_initiation=$initiation->id&$idu\">Modifier</a></p>\n";
!    echo "<p><a 
href=\"?operation=3&id_initiation=$initiation->id&$idu\">Supprimer</a></p>\n";
     break;
  
--- 314,319 ----
     $req = "DELETE FROM initiations WHERE id=$id_initiation";
     $res = executeRequete($req);
!    //echo "<p><a 
href=\"?operation=2&id_initiation=$initiation->id&$idu\">Modifier</a></p>\n";
!    //echo "<p><a 
href=\"?operation=3&id_initiation=$initiation->id&$idu\">Supprimer</a></p>\n";
     break;
  

Index: inscription_session.php
===================================================================
RCS file: /cvsroot/epnadmin/epnadmin/inscription_session.php,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -r1.13 -r1.14
*** inscription_session.php     2 Jan 2003 19:01:49 -0000       1.13
--- inscription_session.php     5 Jan 2003 20:34:01 -0000       1.14
***************
*** 22,26 ****
  */
  
! require("header.inc.php");
  ?>
  <html>
--- 22,39 ----
  */
  
! require_once("header.inc.php");
! //require_once("constantes.inc.php");             // définition des constantes
! require_once("fonctions.inc.php");              // concernant des fonctions 
transversales inclassables
! require_once("mysql.inc.php");                  // concernant mysql
! require_once("sessions.inc.php");             // concernant les sessions et 
initiations
! require_once("usagers.inc.php");              // concernant la gestion des 
usagers
! //require_once("reservations.inc.php");         // concernant les 
réservations des postes en accès individuel par des usagers
! //require_once("tableaux.inc.php");             // Concernant l'affichage 
transposé d'un tableau
! //require_once("siteweb.inc.php");              // concernant les pages perso 
des usagers et les sites web des structures
! require_once("dateheure.inc.php");            // concernant la manipulation 
des heures et des dates, formulaire, conversion...
! //require_once("structures.inc.php");           // concernant les structures
! //require_once("initiations.inc.php");          // concernant les initiations 
et les thèmes
! require_once("parcours.inc.php");             // concernant les parcours des 
usagers et leur positionnement
! 
  ?>
  <html>
***************
*** 30,34 ****
  <?
  $titr = "Gestion des inscriptions aux initiations";
! $datemaj="1er décembre 2003";
  require("entete.inc.php");
  
--- 43,47 ----
  <?
  $titr = "Gestion des inscriptions aux initiations";
! $datemaj="5 janvier 2003";
  require("entete.inc.php");
  
***************
*** 92,96 ****
              <br><textarea name=\"commentaires\" rows=\"8\" 
cols=\"50\">$session->commentaires</textarea>
          </td></tr>\n";
!    echo "<tr><td colspan=3><center><input type=\"submit\" name=\"Envoyer\" 
value=\"Envoyer\"></center></td></tr>
           </form>
           </table>\n";
--- 105,109 ----
              <br><textarea name=\"commentaires\" rows=\"8\" 
cols=\"50\">$session->commentaires</textarea>
          </td></tr>\n";
!    echo "<tr><td colspan=3><center><input type=\"submit\" name=\"Envoyer\" 
value=\"Confirmer\"></center></td></tr>
           </form>
           </table>\n";
***************
*** 140,144 ****
              <tr><td><b>Veux-je ajouter l'initiation à mon parcours 
pédagogique ?</b></td></tr>
              <tr><td align=center><input type=\"submit\" name=\"Ajouter\" 
value=\"Oui, je veux l'y ajouter\"></td></tr>
!             </table></form>\n";
        break;
     }
--- 153,157 ----
              <tr><td><b>Veux-je ajouter l'initiation à mon parcours 
pédagogique ?</b></td></tr>
              <tr><td align=center><input type=\"submit\" name=\"Ajouter\" 
value=\"Oui, je veux l'y ajouter\"></td></tr>
!             </table></form>\n";       //'
        break;
     }
***************
*** 276,280 ****
               <input type=\"hidden\" name=\"operation\" value=\"81\">
           </td></tr></table>
!          </form>";
      }
      break;
--- 289,293 ----
               <input type=\"hidden\" name=\"operation\" value=\"81\">
           </td></tr></table>
!          </form>";  //'
      }
      break;
***************
*** 458,460 ****
  echo "</body></html>\n";
  require("footer.inc.php");
! ?>
--- 471,473 ----
  echo "</body></html>\n";
  require("footer.inc.php");
! ?>
\ No newline at end of file

Index: localisations.php
===================================================================
RCS file: /cvsroot/epnadmin/epnadmin/localisations.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** localisations.php   5 Nov 2002 19:12:12 -0000       1.3
--- localisations.php   5 Jan 2003 20:34:01 -0000       1.4
***************
*** 3,7 ****
      Copyright (C) 2002 Loïc Dayot - Mairie de Pierrefitte (93)
  
!     EPNadmin - Version 0.5
  
      This program is free software; you can redistribute it and/or modify
--- 3,7 ----
      Copyright (C) 2002 Loïc Dayot - Mairie de Pierrefitte (93)
  
!     EPNadmin - Version 0.6
  
      This program is free software; you can redistribute it and/or modify
***************
*** 22,26 ****
  */
  
! require("header.inc.php");
  ?>
  <html>
--- 22,38 ----
  */
  
! require_once("header.inc.php");
! require_once("constantes.inc.php");             // définition des constantes
! //require_once("fonctions.inc.php");              // concernant des fonctions 
transversales inclassables
! require_once("mysql.inc.php");                  // concernant mysql
! //require_once("sessions.inc.php");             // concernant les sessions et 
initiations
! //require_once("usagers.inc.php");              // concernant la gestion des 
usagers
! //require_once("reservations.inc.php");         // concernant les 
réservations des postes en accès individuel par des usagers
! //require_once("tableaux.inc.php");             // Concernant l'affichage 
transposé d'un tableau
! //require_once("siteweb.inc.php");              // concernant les pages perso 
des usagers et les sites web des structures
! //require_once("dateheure.inc.php");            // concernant la manipulation 
des heures et des dates, formulaire, conversion...
! require_once("structures.inc.php");           // concernant les structures
! //require_once("initiations.inc.php");          // concernant les initiations 
et les thèmes
! //require_once("parcours.inc.php");             // concernant les parcours 
des usagers et leur positionnement
  ?>
  <html>
***************
*** 30,34 ****
  <?
  $titr = "Gestion des localisations";
! $datemaj="7 ao&ucirc;t 2002";
  require("entete.inc.php");
  
--- 42,46 ----
  <?
  $titr = "Gestion des localisations";
! $datemaj="5 janvier 2003";
  require("entete.inc.php");
  
***************
*** 193,195 ****
  echo "</body></html>\n";
  require("footer.inc.php");
! ?>
--- 205,207 ----
  echo "</body></html>\n";
  require("footer.inc.php");
! ?>
\ No newline at end of file

Index: logiciels.php
===================================================================
RCS file: /cvsroot/epnadmin/epnadmin/logiciels.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** logiciels.php       2 Jan 2003 19:01:49 -0000       1.3
--- logiciels.php       5 Jan 2003 20:34:01 -0000       1.4
***************
*** 22,26 ****
  */
  
! require("header.inc.php");
  ?>
  <html>
--- 22,39 ----
  */
  
! require_once("header.inc.php");
! //require_once("constantes.inc.php");             // définition des constantes
! //require_once("fonctions.inc.php");              // concernant des fonctions 
transversales inclassables
! require_once("mysql.inc.php");                  // concernant mysql
! //require_once("sessions.inc.php");             // concernant les sessions et 
initiations
! //require_once("usagers.inc.php");              // concernant la gestion des 
usagers
! //require_once("reservations.inc.php");         // concernant les 
réservations des postes en accès individuel par des usagers
! //require_once("tableaux.inc.php");             // Concernant l'affichage 
transposé d'un tableau
! //require_once("siteweb.inc.php");              // concernant les pages perso 
des usagers et les sites web des structures
! //require_once("dateheure.inc.php");            // concernant la manipulation 
des heures et des dates, formulaire, conversion...
! require_once("structures.inc.php");           // concernant les structures
! //require_once("initiations.inc.php");          // concernant les initiations 
et les thèmes
! //require_once("parcours.inc.php");             // concernant les parcours 
des usagers et leur positionnement
! 
  ?>
  <html>
***************
*** 30,34 ****
  <?
  $titr = "Gestion du parc de logiciels";
! $datemaj="1er décembre 2003";
  require("entete.inc.php");
  
--- 43,47 ----
  <?
  $titr = "Gestion du parc de logiciels";
! $datemaj="5 janvier 2003";
  require("entete.inc.php");
  
***************
*** 36,40 ****
  {
  case 11 : // confirmation d'ajout ou mise à jour
!    if (!isadmin)
     {
        echo "<p>Petit curieux, vous n'avez rien à faire là...</p>\n";
--- 49,53 ----
  {
  case 11 : // confirmation d'ajout ou mise à jour
!    if (!$isadmin)
     {
        echo "<p>Petit curieux, vous n'avez rien à faire là...</p>\n";
***************
*** 205,209 ****
  
  case 3 : // formulaire de suppression
!    if (!isadmin)
     {
        echo "<p>C'est une erreur, ou c'est volontaire...</p>\n";
--- 218,222 ----
  
  case 3 : // formulaire de suppression
!    if (!$isadmin)
     {
        echo "<p>C'est une erreur, ou c'est volontaire...</p>\n";
***************
*** 211,215 ****
     }
     echo "<p>Attention, tu vas supprimer le logiciel et tous les liens avec 
les materiels.</p>\n";
!    echo "<p><a 
href=\"logiciels.php?operation=31&id_logiciel=$id_logiciel&$idu\">Confirmer la 
suppression</a></p>\n";
     break;
  
--- 224,228 ----
     }
     echo "<p>Attention, tu vas supprimer le logiciel et tous les liens avec 
les materiels.</p>\n";
!    echo "<p><a 
href=\"logiciels.php?operation=31&id_logiciel=$id_logiciel\">Confirmer la 
suppression</a></p>\n";
     break;
  
***************
*** 251,257 ****
           if ($log->commentaire!="") echo "<br><i>$log->commentaire</i>";
           echo "</td>
!                <td nowrap><a 
href=\"$PHP_SELF?id_logiciel=$log->id&$idu\">$info</a>
!                    <a 
href=\"$PHP_SELF?operation=2&id_logiciel=$log->id&$idu\">$modifier</a>
!                    <a 
href=\"$PHP_SELF?operation=3&id_logiciel=$log->id&$idu\">$supprimer</a></td></tr>\n";
        }
        echo "<tr><td colspan='4'></td><td><a 
href=\"$PHP_SELF?operation=1\">$ajouter</a></td></tr>\n";
--- 264,270 ----
           if ($log->commentaire!="") echo "<br><i>$log->commentaire</i>";
           echo "</td>
!                <td nowrap><a href=\"$PHP_SELF?id_logiciel=$log->id\">$info</a>
!                    <a 
href=\"$PHP_SELF?operation=2&id_logiciel=$log->id\">$modifier</a>
!                    <a 
href=\"$PHP_SELF?operation=3&id_logiciel=$log->id\">$supprimer</a></td></tr>\n";
        }
        echo "<tr><td colspan='4'></td><td><a 
href=\"$PHP_SELF?operation=1\">$ajouter</a></td></tr>\n";
***************
*** 317,319 ****
  echo "</body></html>\n";
  require("footer.inc.php");
! ?>
--- 330,332 ----
  echo "</body></html>\n";
  require("footer.inc.php");
! ?>
\ No newline at end of file

Index: materiels.php
===================================================================
RCS file: /cvsroot/epnadmin/epnadmin/materiels.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** materiels.php       2 Jan 2003 19:01:49 -0000       1.5
--- materiels.php       5 Jan 2003 20:34:01 -0000       1.6
***************
*** 22,26 ****
  */
  
! require("header.inc.php");
  ?>
  <html>
--- 22,38 ----
  */
  
! require_once("header.inc.php");
! require_once("constantes.inc.php");             // définition des constantes
! //require_once("fonctions.inc.php");              // concernant des fonctions 
transversales inclassables
! require_once("mysql.inc.php");                  // concernant mysql
! //require_once("sessions.inc.php");             // concernant les sessions et 
initiations
! //require_once("usagers.inc.php");              // concernant la gestion des 
usagers
! //require_once("reservations.inc.php");         // concernant les 
réservations des postes en accès individuel par des usagers
! //require_once("tableaux.inc.php");             // Concernant l'affichage 
transposé d'un tableau
! //require_once("siteweb.inc.php");              // concernant les pages perso 
des usagers et les sites web des structures
! //require_once("dateheure.inc.php");            // concernant la manipulation 
des heures et des dates, formulaire, conversion...
! require_once("structures.inc.php");           // concernant les structures
! //require_once("initiations.inc.php");          // concernant les initiations 
et les thèmes
! //require_once("parcours.inc.php");             // concernant les parcours 
des usagers et leur positionnement
  ?>
  <html>
***************
*** 30,34 ****
  <?
  $titr = "Gestion du parc de matériel";
! $datemaj="1er janvier 2003";
  require("entete.inc.php");
  
--- 42,46 ----
  <?
  $titr = "Gestion du parc de matériel";
! $datemaj="5 janvier 2003";
  require("entete.inc.php");
  
***************
*** 404,406 ****
  echo "</body></html>\n";
  require("footer.inc.php");
! ?>
--- 416,418 ----
  echo "</body></html>\n";
  require("footer.inc.php");
! ?>
\ No newline at end of file

Index: mysql.inc.php
===================================================================
RCS file: /cvsroot/epnadmin/epnadmin/mysql.inc.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** mysql.inc.php       7 Aug 2002 17:31:05 -0000       1.1
--- mysql.inc.php       5 Jan 2003 20:34:01 -0000       1.2
***************
*** 3,7 ****
      Copyright (C) 2001, 2002 Bertand Pallie, Loïc Dayot - Mairie Pierrefitte 
(93)
  
!     EPNadmin - Version 0.5
  
      This program is free software; you can redistribute it and/or modify
--- 3,7 ----
      Copyright (C) 2001, 2002 Bertand Pallie, Loïc Dayot - Mairie Pierrefitte 
(93)
  
!     EPNadmin - Version 0.6 - 05/01/2003
  
      This program is free software; you can redistribute it and/or modify
***************
*** 22,25 ****
--- 22,39 ----
  */
  
+ //require_once("header.inc.php");
+ require_once("constantes.inc.php");             // définition des constantes
+ require_once("fonctions.inc.php");              // concernant des fonctions 
transversales inclassables
+ //require_once("mysql.inc.php");                  // concernant mysql
+ //require_once("sessions.inc.php");             // concernant les sessions et 
initiations
+ //require_once("usagers.inc.php");              // concernant la gestion des 
usagers
+ //require_once("reservations.inc.php");         // concernant les 
réservations des postes en accès individuel par des usagers
+ //require_once("tableaux.inc.php");             // Concernant l'affichage 
transposé d'un tableau
+ //require_once("siteweb.inc.php");              // concernant les pages perso 
des usagers et les sites web des structures
+ //require_once("dateheure.inc.php");            // concernant la manipulation 
des heures et des dates, formulaire, conversion...
+ //require_once("structures.inc.php");           // concernant les structures
+ //require_once("initiations.inc.php");          // concernant les initiations 
et les thèmes
+ //require_once("parcours.inc.php");             // concernant les parcours 
des usagers et leur positionnement
+ 
  // concernant mysql
  
***************
*** 47,54 ****
     $res = mysql_query ($req); // or exit("Problème d'exécution de requête de 
sélection $req.");
     if (!$res)
!        debug("Problème dans la requête <font size=\"-1\">($req)</font> : ".
!        mysql_errno().
!        " : <font color=\"red\">".mysql_error())."</font>";
     return $res;
  }
  
--- 61,68 ----
     $res = mysql_query ($req); // or exit("Problème d'exécution de requête de 
sélection $req.");
     if (!$res)
!        debug("Problème dans la requête <font size=\"-1\">($req)</font> : 
".mysql_errno().
!        " : <font color=\"red\">".mysql_error())."</font>\n";
     return $res;
  }
  
+ ?>
\ No newline at end of file

Index: parcours.inc.php
===================================================================
RCS file: /cvsroot/epnadmin/epnadmin/parcours.inc.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** parcours.inc.php    14 Oct 2002 20:45:51 -0000      1.3
--- parcours.inc.php    5 Jan 2003 20:34:01 -0000       1.4
***************
*** 3,7 ****
      Copyright (C) 2001, 2002 Bertand Pallie, Loïc Dayot - Mairie Pierrefitte 
(93)
  
!     EPNadmin - Version 0.5.1 - 01/10/2002
  
      This program is free software; you can redistribute it and/or modify
--- 3,7 ----
      Copyright (C) 2001, 2002 Bertand Pallie, Loïc Dayot - Mairie Pierrefitte 
(93)
  
!     EPNadmin - Version 0.6 - 05/01/2003
  
      This program is free software; you can redistribute it and/or modify
***************
*** 22,25 ****
--- 22,40 ----
  */
  
+ //require_once("header.inc.php");
+ require_once("constantes.inc.php");             // définition des constantes
+ //require_once("fonctions.inc.php");              // concernant des fonctions 
transversales inclassables
+ require_once("mysql.inc.php");                  // concernant mysql
+ //require_once("sessions.inc.php");             // concernant les sessions et 
initiations
+ require_once("usagers.inc.php");              // concernant la gestion des 
usagers
+ //require_once("reservations.inc.php");         // concernant les 
réservations des postes en accès individuel par des usagers
+ //require_once("tableaux.inc.php");             // Concernant l'affichage 
transposé d'un tableau
+ //require_once("siteweb.inc.php");              // concernant les pages perso 
des usagers et les sites web des structures
+ //require_once("dateheure.inc.php");            // concernant la manipulation 
des heures et des dates, formulaire, conversion...
+ //require_once("structures.inc.php");           // concernant les structures
+ require_once("initiations.inc.php");          // concernant les initiations 
et les thèmes
+ //require_once("parcours.inc.php");             // concernant les parcours 
des usagers et leur positionnement
+ 
+ 
  function recherchePositionnement($id_usager, $id_initiation="")
  {
***************
*** 33,37 ****
  //  Parcours                                                                  
 -
  //                                                                            
 -
- 
  function rechercheParcours($id_usager)
  {
--- 48,51 ----
***************
*** 94,98 ****
  {
      // On regarde si l'initiation n'est pas déjà dans le parcours 
pédagogique...
!     $req = "SELECT id_usager FROM parcours WHERE id_usager=$id_usager AND 
id_initiation=$id_initiation";
      $res2 = executeRequete($req);
      $parcours = mysql_fetch_object($res2);
--- 108,113 ----
  {
      // On regarde si l'initiation n'est pas déjà dans le parcours 
pédagogique...
!     $req = "SELECT id_usager FROM parcours 
!             WHERE id_usager=$id_usager AND id_initiation=$id_initiation";
      $res2 = executeRequete($req);
      $parcours = mysql_fetch_object($res2);
***************
*** 133,137 ****
  function formulaireAjoutInitiation($id_usager)
  {
! global $idu, $ajouter, $info, $PHP_SELF;
          // Affiche toutes les initiations triées par thème avec un lien pour 
l'inscrire.
          echo "<table align=center>\n";
--- 148,152 ----
  function formulaireAjoutInitiation($id_usager)
  {
! global $ajouter, $info, $PHP_SELF;
          // Affiche toutes les initiations triées par thème avec un lien pour 
l'inscrire.
          echo "<table align=center>\n";
***************
*** 157,162 ****
                          echo "<td>$initiation->niveau</td>\n";
                          echo "<td><b>$initiation->initiation</b></td>\n";
!                         echo "<td width=21><a 
href=\"$PHP_SELF?operation=1&id_initiation=$initiation->id&$idu\">$info</a></td>\n";
!                         echo "<td width=21><a 
href=\"$PHP_SELF?operation=3&id_initiation=$initiation->id&$idu\">$ajouter</a></td>\n";
                          $aucun=false;
                          echo "</tr>\n";
--- 172,177 ----
                          echo "<td>$initiation->niveau</td>\n";
                          echo "<td><b>$initiation->initiation</b></td>\n";
!                         echo "<td width=21><a 
href=\"$PHP_SELF?operation=1&id_initiation=$initiation->id&id_usager=$id_usager\">$info</a></td>\n";
!                         echo "<td width=21><a 
href=\"$PHP_SELF?operation=3&id_initiation=$initiation->id&id_usager=$id_usager\">$ajouter</a></td>\n";
                          $aucun=false;
                          echo "</tr>\n";
***************
*** 173,177 ****
  function afficheParcours($id_usager, $mode="tout")
  {
! global $idu, $info, $programmer, $deprogrammer, $rien, $retirer;
     switch ($mode)
     {
--- 188,192 ----
  function afficheParcours($id_usager, $mode="tout")
  {
! global $info, $programmer, $deprogrammer, $rien, $retirer;
     switch ($mode)
     {
***************
*** 208,212 ****
        echo "<td><img src=\"$theme->url_image\" alt=\"$theme->theme\" border=0 
height=20></td>\n";
        echo "<td>$parcours->initiation</td>\n";
!       echo "<td><a 
href=\"parcours.php?operation=1&id_initiation=$parcours->id_initiation&$idu\">
                  $info</a></td>\n";
        echo "<td>";
--- 223,227 ----
        echo "<td><img src=\"$theme->url_image\" alt=\"$theme->theme\" border=0 
height=20></td>\n";
        echo "<td>$parcours->initiation</td>\n";
!       echo "<td><a 
href=\"parcours.php?operation=1&id_initiation=$parcours->id_initiation&id_usager=$id_usager\">
                  $info</a></td>\n";
        echo "<td>";
***************
*** 253,257 ****
        echo "</td>\n";
        if (!indispensable($id_usager, $parcours->id_initiation))
!          echo "<td><a 
href=\"parcours.php?operation=2&id_initiation=$parcours->id_initiation&$idu\">$retirer</td>\n";
        else
           echo "<td>$rien</td>\n";
--- 268,272 ----
        echo "</td>\n";
        if (!indispensable($id_usager, $parcours->id_initiation))
!          echo "<td><a 
href=\"parcours.php?operation=2&id_initiation=$parcours->id_initiation&id_usager=$id_usager\">$retirer</td>\n";
        else
           echo "<td>$rien</td>\n";

Index: parcours.php
===================================================================
RCS file: /cvsroot/epnadmin/epnadmin/parcours.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** parcours.php        14 Oct 2002 20:45:52 -0000      1.4
--- parcours.php        5 Jan 2003 20:34:01 -0000       1.5
***************
*** 3,7 ****
      Copyright (C) 2001 Loïc Dayot - Mairie de Pierrefitte (93)
  
!     EPNadmin - Version 0.5.3
  
      This program is free software; you can redistribute it and/or modify
--- 3,7 ----
      Copyright (C) 2001 Loïc Dayot - Mairie de Pierrefitte (93)
  
!     EPNadmin - Version 0.6
  
      This program is free software; you can redistribute it and/or modify
***************
*** 22,26 ****
  */
  
! require("header.inc.php");
  ?>
  <html>
--- 22,39 ----
  */
  
! require_once("header.inc.php");
! require_once("constantes.inc.php");             // définition des constantes
! //require_once("fonctions.inc.php");              // concernant des fonctions 
transversales inclassables
! require_once("mysql.inc.php");                  // concernant mysql
! require_once("sessions.inc.php");             // concernant les sessions et 
initiations
! //require_once("usagers.inc.php");              // concernant la gestion des 
usagers
! //require_once("reservations.inc.php");         // concernant les 
réservations des postes en accès individuel par des usagers
! //require_once("tableaux.inc.php");             // Concernant l'affichage 
transposé d'un tableau
! //require_once("siteweb.inc.php");              // concernant les pages perso 
des usagers et les sites web des structures
! //require_once("dateheure.inc.php");            // concernant la manipulation 
des heures et des dates, formulaire, conversion...
! //require_once("structures.inc.php");           // concernant les structures
! //require_once("initiations.inc.php");          // concernant les initiations 
et les thèmes
! require_once("parcours.inc.php");             // concernant les parcours des 
usagers et leur positionnement
! 
  ?>
  <html>
***************
*** 30,34 ****
  <?
  $titr = "Parcours pédagogique";
! $datemaj="13 octobre 2002";
  require("entete.inc.php");
  
--- 43,47 ----
  <?
  $titr = "Parcours pédagogique";
! $datemaj="5 janvier 2003";
  require("entete.inc.php");
  
***************
*** 41,46 ****
     afficheInitiation($id_initiation, "COMPLET");
     if (accessible($id_usager, $id_initiation))
!            echo "<p><a 
href=\"?operation=3&id_initiation=$id_initiation&$idu\">Ajouter cette 
initiation à mon parcours pédagogique personnel.</a></p>\n";
!    echo "<p><a href=\"?operation=4&$idu\">Ajouter une autre initiation à mon 
parcours.</a></p>\n";
     break;
  
--- 54,59 ----
     afficheInitiation($id_initiation, "COMPLET");
     if (accessible($id_usager, $id_initiation))
!            echo "<p><a 
href=\"?operation=3&id_initiation=$id_initiation&id_usager=$id_usager\">Ajouter 
cette initiation à mon parcours pédagogique personnel.</a></p>\n";
!    echo "<p><a href=\"?operation=4&id_usager=$id_usager\">Ajouter une autre 
initiation à mon parcours.</a></p>\n";
     break;
  
***************
*** 56,65 ****
      else
        echo "<p>L'initiation paraît être indispensable dans votre 
parcours.</p>\n";
!     echo "<p><a href=\"?operation=4&$idu\">Ajouter une initiation à mon 
parcours.</a></p>\n";
      break;
  
  case 3 : // Ajout d'une initiation au parcours
     ajouteInitiation($id_usager, $id_initiation);
!     echo "<p><a href=\"?operation=4&$idu\">Ajouter une autre initiation à mon 
parcours.</a></p>\n";
     break;
  
--- 69,78 ----
      else
        echo "<p>L'initiation paraît être indispensable dans votre 
parcours.</p>\n";
!     echo "<p><a href=\"?operation=4&id_usager=$id_usager\">Ajouter une 
initiation à mon parcours.</a></p>\n";
      break;
  
  case 3 : // Ajout d'une initiation au parcours
     ajouteInitiation($id_usager, $id_initiation);
!     echo "<p><a href=\"?operation=4&id_usager=$id_usager\">Ajouter une autre 
initiation à mon parcours.</a></p>\n";
     break;
  
***************
*** 86,90 ****
          }
      }
!     echo "<p><a href=\"?operation=4\">Ajouter une initiation à mon 
parcours.</a></p>\n";
      break;
  
--- 99,103 ----
          }
      }
!     echo "<p><a href=\"?operation=4&id_usager=$id_usager\">Ajouter une 
initiation à mon parcours.</a></p>\n";
      break;
  
***************
*** 101,112 ****
  echo "</td></tr></table>\n";
  
! echo "<hr><p><a href=\"?operation=4\">Ajouter une initiation à mon parcours 
pédagogique personnel.</a></p>\n";
! echo "<p><a href=\"?operation=5\">Mettre à jour mon parcours compte tenu de 
mes compétences.</a></p>\n";
  
! //                                                                            
 -
  require("basdepage.inc.php");
- 
  echo "</body></html>\n";
- 
  require("footer.inc.php");
! ?>
--- 114,123 ----
  echo "</td></tr></table>\n";
  
! echo "<hr><p><a href=\"?operation=4&id_usager=$id_usager\">Ajouter une 
initiation à mon parcours pédagogique personnel.</a></p>\n";
! echo "<p><a href=\"?operation=5&id_usager=$id_usager\">Mettre à jour mon 
parcours compte tenu de mes compétences.</a></p>\n";
  
! // fin de page                                                                
            -
  require("basdepage.inc.php");
  echo "</body></html>\n";
  require("footer.inc.php");
! ?>
\ No newline at end of file

Index: positionnement.php
===================================================================
RCS file: /cvsroot/epnadmin/epnadmin/positionnement.php,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** positionnement.php  1 Oct 2002 19:56:09 -0000       1.6
--- positionnement.php  5 Jan 2003 20:34:01 -0000       1.7
***************
*** 1,329 ****
! <?
! /*
!     Copyright (C) 2001 Loïc Dayot
! 
!     EPNadmin - Version 0.5.1
! 
!     This program is free software; you can redistribute it and/or modify
!     it under the terms of the GNU General Public License as published by
!     the Free Software Foundation; either version 2 of the License, or
!     (at your option) any later version.
! 
!     This program is distributed in the hope that it will be useful,
!     but WITHOUT ANY WARRANTY; without even the implied warranty of
!     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
!     GNU General Public License for more details.
! 
!     You should have received a copy of the GNU General Public License
!     along with this program; if not, write to the Free Software
!     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
! 
!     http://epnadmin.pierrefitte93.fr/
! */
! 
! require("header.inc.php");
! ?>
! <html>
! <head>
! <title>positionnement - epnadmin</title>
! <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
! <?
! $titr = "Outil d'autoévaluation des compétences";
! $datemaj="1er octobre 2002";
! require("entete.inc.php");
! 
! // début des fonctions                                                        
 -
! function rechercheQuestion($id, $champ="id_initiation")
! {
!   $req = "SELECT *, RAND() AS hasard FROM questions WHERE $champ=$id";
!   $req .= " ORDER BY hasard LIMIT 0, 4";
!   $res = executeRequete($req);
!   return $res;
! }
! 
! function formulaireTheme($mode, $id_usager, $id_theme, $niveaucourant, 
$id_initiation)
! {
!    echo "<script src=\"autoeval.js\">\n";
!    echo "</script>\n";
!    echo "<form name=\"formulaire\" action=\"positionnement.php\" 
method=\"POST\" enctype=\"multipart/form-data\">\n";
!    echo "<input type=\"hidden\" name=\"operation\" value=\"2\">\n";
!    echo "<input type=\"hidden\" name=\"mode\" value=\"$mode\">\n";
!    echo "<input type=\"hidden\" name=\"id_usager\" value=\"$id_usager\">\n";
!    echo "<input type=\"hidden\" name=\"id_theme\" value=\"$id_theme\">\n";
!    echo "<input type=\"hidden\" name=\"id_initiation\" 
value=\"$id_initiation\">\n";
!    echo "<input type=\"hidden\" name=\"niveaucourant\" 
value=\"$niveaucourant\">\n";
! 
!    echo "<table border=1 width=\"90%\" align=center>";
! 
!    $req = "SELECT * FROM initiations WHERE id=$id_initiation";
!    $res = executeRequete($req);
!    if ($initiation=mysql_fetch_object($res))
!    {
!      $res2=recherchePositionnement($id_usager, $initiation->id);
!      if ($res2)
!        $positionnement = mysql_fetch_object($res2);
!      else
!        $positionnement = "";
!      echo "<tr><td>\n<table width=\"100%\">";
!      echo "<tr><td width=\"55%\"><b>$initiation->initiation</b></td>\n";
!      echo "<td width=\"15%\"><input type=\"radio\" name=\"niveau\" 
value=\"débutant(e)\"";
!      if ($positionnement->niveau=="débutant(e)")
!        echo " checked";
!      echo "><b>débutant(e)</b></td>\n";
!      echo "<td width=\"15%\"><input type=\"radio\" name=\"niveau\" 
value=\"initié(e)\"";
!      if ($positionnement->niveau=="initié(e)")
!        echo " checked";
!      echo "><b>initié(e)</b></td>\n";
!      echo "<td width=\"15%\"><input type=\"radio\" name=\"niveau\" 
value=\"avancé(e)\"";
!      if ($positionnement->niveau=="avancé(e)")
!        echo " checked";
!      echo "><b>avancé(e)</b></td>\n";
!      echo "<td></td></tr></td></tr>\n<tr><td>";
! 
!      $res3 = rechercheQuestion ($initiation->id, "id_initiation");
!      $ques=false;
!      while ($question = mysql_fetch_object($res3))
!      {
!        echo "<tr><td>$question->question</td>\n";
!        echo "<td><input type=\"radio\" 
name=\"réponse_".$id_initiation."_".$question->id."\" value=\"non\" 
onClick=\"autoeval($initiation->id)\">Non</td>\n";
!        echo "<td><input type=\"radio\" 
name=\"réponse_".$id_initiation."_".$question->id."\" value=\"doute\" 
onClick=\"autoeval($initiation->id)\")>J'ai un doute</td>\n";
!        echo "<td><input type=\"radio\" 
name=\"réponse_".$id_initiation."_".$question->id."\" value=\"oui\" 
onClick=\"autoeval($initiation->id)\">Oui</td>\n";
!        if ($question->url_aide!="")
!          echo "<td><a href=\"".$question->url_aide."\" target=\"aide\">J'ai 
besoin d'aide.</a></td>";
!        echo "</tr>\n";
!        $ques=true;
!      }
!      if($ques)
!        echo "<tr><td></td><td colspan=3><a 
href=\"javascript:autoeval($initiation->id)\">Mettre à jour le 
niveau</a></td></tr>\n";
!      echo "</td></tr></table>\n</td</tr>\n";
!    }
! 
!    echo "</table>\n";
! 
!    echo "<p align=\"center\"><input type=\"submit\" name=\"Envoyer les 
réponses\" value=\"Envoyer les réponses\"><p>\n";
!    echo "</form>\n";
! }
! 
! function afficheEvaluation($id_usager)
! {
! global $info;
! 
!   echo "<table align=\"center\" cellspacing=\"0\">\n";
!   for ($id_theme=1; $id_theme<9; $id_theme++)
!   {
!     $res = rechercheTheme($id_theme);
!     $theme = mysql_fetch_object($res);
!     $req = "SELECT positionnement.*, initiation, initiations.niveau as 
iniveau FROM positionnement";
!     $req.= " LEFT JOIN initiations ON 
positionnement.id_initiation=initiations.id";
!     $req.= " WHERE (id_usager=$id_usager) AND (id_theme=$id_theme) ORDER BY 
iniveau, id_initiation";
!     $res2 = executeRequete($req);
!     echo "<tr><td rowspan=\"2\" bgColor=\"".COULEUR_POSITIONNEMENT."\" 
align=\"center\" valign=\"top\">";
!     if ($theme->url_image!="")
!        echo "<img src=\"./$theme->url_image\" alt=\"$theme->theme : 
$theme->commentaire\" border=0 height=80>";
!     echo "</td>\n";
!     echo "<td bgColor=\"".COULEUR_POSITIONNEMENT."\" align=center><font 
size=\"+2\"><b>$theme->theme</b>";
!     if ($niveau!="") echo " - $niveau";
!     echo "</font>";
!     if ($theme->commentaire!="") echo "<br>$theme->commentaire";
!     echo "</td></tr>\n";
!     echo "<tr><td><table bgcolor=\"FFFFFF\" width=\"100%\">";
!     $aucun=true;
!     while ($positionnement=mysql_fetch_object($res2))
!     {
!       $aucun=false;
!       switch ($positionnement->niveau)
!       {
!         case "débutant(e)" :  $c="#FF0000"; break;
!         case "initié(e)" :    $c="#00FF00"; break;
!         case "avancé(e)" :    $c="#880088"; break;
!       }
!       echo "<tr><td>$positionnement->initiation</td>
!                 <td><font color=\"$c\">$positionnement->niveau</font></td>
!                 <td><a 
href=\"?operation=4&mode=session&id_usager=$id_usager&id_initiation=$positionnement->id_initiation&id_theme=$id_theme&niveau=$positionnement->iniveau\">Me
 ré-évaluer</a></td>
!             </tr>\n";
!     }
! 
!     if ($aucun)
!     {
!       echo "<tr><td><a 
href=\"?operation=3&mode=session&id_usager=$id_usager&id_theme=$id_theme\">Il 
n'y a eu encore aucun positionnement dans ce thème.</a></td></tr>";
!     }
!     echo "</table></td></tr>
!           <tr><td colspan=2 bgcolor=\"#FFFFFF\">&nbsp;</td></tr>\n";
!   }
!   echo "</table>\n";
! }
! 
! // fin des fonctions                                                          
 -
! 
! 
! switch ($operation)
! {
! case 1 :    // Affichage du compte-rendu du positionnement
!    afficheEvaluation($id_usager);
!    break;
! 
! case 2 :    //  Il s'agit d'un retour de formulaire. On doit exploiter les 
données.
!    $req = "SELECT * FROM initiations WHERE id=$id_initiation";
!    $res = executeRequete($req);
!    if ($initiation = mysql_fetch_object($res))
!    {
!      // supprimer un ancien positionnement s'il existait
!      $req = "DELETE FROM positionnement WHERE id_usager=$id_usager AND 
id_initiation=$initiation->id";
!      executeRequete($req);
!      if ($niveau != "")
!      {  // ajout du nouveau positionnement
!        $req = "INSERT INTO positionnement (id_usager, id_initiation, niveau)";
!        $req .= " VALUES (\"$id_usager\", \"$initiation->id\", \"$niveau\")";
!        executeRequete($req);
!      }
!    }
!    // pour savoir si on présente le niveau supérieur
!    $req = "SELECT positionnement.niveau AS niv, COUNT(*) AS nb FROM 
positionnement
!                                    LEFT JOIN initiations ON 
positionnement.id_initiation=initiations.id
!                   WHERE id_usager='$id_usager' AND 
initiations.niveau='$niveaucourant' AND id_theme=$id_theme
!                   GROUP BY positionnement.niveau";
!    $res = executeRequete($req);
!    while ($res2 = mysql_fetch_object($res))
!    {
!       // si l'usager n'est pas débutant, on proposera le niveau suivant
!       // S'il est débutant, il ne compredra pas les questions suivantes, 
c'est pas la peine
!       if ($res2->niv!="débutant(e)")
!          $continue="oui";
!    }
!    if (!$continue) $niveaucourant="rien";
! 
! case 3 : // Calcul de l'initiation, du niveau ou du thème suivant
!    $ancien_niveau=$niveaucourant;
!    $ancien_initiation=$id_initiation;
!    $ancien_theme=$id_theme;
! 
!    if (!$id_theme)
!       $id_theme=1;
!    if (!$niveaucourant)
!       $niveaucourant="débutant(e)";
!    if (!$id_initiation)
!       $id_initiation=-1;
! 
!    $req = "SELECT * FROM initiations
!            WHERE id>$id_initiation AND id_theme=$id_theme AND 
niveau='$niveaucourant'
!            ORDER BY id";
!    $res = executeRequete($req);
!    if ($initiation = mysql_fetch_object($res))
!       $id_initiation= $initiation->id;  // on passe à l'initiation suivante
! 
!    if (!$initiation)
!    {
!       do
!       {
!          switch ($niveaucourant)
!          {
!          case "débutant(e)" :
!             $niveaucourant="initié(e)";
!             $id_initiation=-1;
!             break;
!          case "initié(e)" :
!             $niveaucourant="avancé(e)";
!             $id_initiation=-1;
!             break;
!          default :
!             $niveaucourant="débutant(e)";
!             $id_initiation=-1;
!             if (!isset($id_theme))
!                $id_theme = 1;
!             else
!                $id_theme++;
!             break;
!          }
!          $req = "SELECT * FROM initiations
!                  WHERE id>$id_initiation AND id_theme='$id_theme' AND 
niveau='$niveaucourant'
!                  ORDER BY id";
!          $res = executeRequete($req);
!       }
!       while (($id_theme<NBMAXTHEMES) && 
!$initiation=mysql_fetch_object($res));
! 
!       $id_initiation = $initiation->id;
!    }
! 
! 
!    if ($id_theme!=$ancien_theme && $mode=="session")
!    {
!       echo "<h3>Vous avez terminé votre auto-évaluation des connaissances sur 
ce thème.</h3>\n";
!       echo "<hr><h2>En voici le récapitulatif.</h2>\n";
!       afficheEvaluation($id_usager);
!       break;
!    }
!   // pas de break;
! 
! case 4 : // Présentation du formulaire
!    if ($id_theme==NBMAXTHEMES) // Il n'y a plus de thème, la positionnement 
est temriné.
!    {
!      echo "<h3>Vous avez terminé votre auto-évaluation des connaissances en 
informatique, internet et multimédia.</h3>\n";
!      echo "<hr><h2>En voici le récapitulatif.</h2>\n";
!      afficheEvaluation($id_usager);
!    }
!    else  // Le positionnement n'est pas terminé, on peut continuer.
!    {
!      if (!$niveaucourant) $niveaucourant="débutant(e)";
!      $res = rechercheTheme($id_theme);
!      $theme = mysql_fetch_object($res);
!      afficheTheme($theme,$niveaucourant);
! 
!      formulaireTheme($mode, $id_usager, $id_theme, $niveaucourant, 
$id_initiation);
!    }
!    break;
! 
! case 5 : // Repositionnement dans le thème qui concerne la denière initiation 
vécue ou en cours
!    echo "<p>Pas encore prêt !</p>\n";
! 
!    // Trouver la dernière session effectuée ou en cours (ie = dont le début 
est le plus récent
!    $req = "SELECT parcours.id_initiation AS id_initiation, id_theme, date, 
debut,
!                   initiation, animateur
!                     FROM parcours
!                     LEFT JOIN sessions ON parcours.id_session=sessions.id
!                     LEFT JOIN initiations ON 
parcours.id_initiation=initiations.id
!                     WHERE id_usager=$id_usager
!                       AND sessions.date<=NOW()
!                       AND (parcours.etat='effectué' OR 
parcours.etat='conseillé' OR parcours.etat='indispensable')
!                     ORDER BY sessions.date, sessions.debut DESC";
!    if (!$res = executeRequete($req))
!    {
!      echo "<p>Désolé, aucune session n'a été retrouvée à laquelle vous auriez 
participé.</p>";
!      break;
!    }
!    $nbsess=5;
!    echo "<table align=center border=1>";
!    while ($nbsess>0 && $parcours = mysql_fetch_object($res))
!    {
!      $nbsess--;
!      echo "<tr>\n";
!      $res = recherche("themes", "id", $parcours->id_theme);
!      $theme = mysql_fetch_object($res);
!      echo "<td><img src=\"$theme->url_image\" alt=\"$theme->theme\" border=0 
height=20></td>\n";
!      echo "<td>$parcours->initiation</td>\n";
!      echo "<td>le ".datetodate($parcours->date)." à 
".datetoheure($parcours->debut)." avec $parcours->animateur";
!      echo "<td><a 
href=\"$PHP_SELF?operation=4&mode=session&id_theme=$parcours->id_theme&id_initiation=$parcours->id_initiation\">me
 repositionner</a></td>";
!      echo "</tr>\n";
!    }
!    echo "</table>\n";
!    break;
! 
! default :    // Affichage du compte-rendu du positionnement
!    afficheEvaluation($id_usager);
!    break;
! 
! }  // switch
! 
! 
! echo "<hr>\n";
! echo "<p><a href=\"?operation=3&id_usager=$id_usager\">
!                   Recommencer tout le questionnaire d'autoévaluation</a>
!        - <a href=\"?id_usager=$id_usager\">
!                   Afficher l'ensemble des résultats enregistrées jusque 
là</a></p>\n";
! // ---------------------------------------------------------
! 
! require("basdepage.inc.php");
! 
! echo "</body></html>\n";
! 
! require("footer.inc.php");
! ?>
--- 1,340 ----
! <?
! /*
!     Copyright (C) 2001 Loïc Dayot
! 
!     EPNadmin - Version 0.6
! 
!     This program is free software; you can redistribute it and/or modify
!     it under the terms of the GNU General Public License as published by
!     the Free Software Foundation; either version 2 of the License, or
!     (at your option) any later version.
! 
!     This program is distributed in the hope that it will be useful,
!     but WITHOUT ANY WARRANTY; without even the implied warranty of
!     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
!     GNU General Public License for more details.
! 
!     You should have received a copy of the GNU General Public License
!     along with this program; if not, write to the Free Software
!     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
! 
!     http://epnadmin.pierrefitte93.fr/
! */
! 
! require_once("header.inc.php");
! require_once("constantes.inc.php");             // définition des constantes
! //require_once("fonctions.inc.php");              // concernant des fonctions 
transversales inclassables
! require_once("mysql.inc.php");                  // concernant mysql
! //require_once("sessions.inc.php");             // concernant les sessions et 
initiations
! //require_once("usagers.inc.php");              // concernant la gestion des 
usagers
! //require_once("reservations.inc.php");         // concernant les 
réservations des postes en accès individuel par des usagers
! //require_once("tableaux.inc.php");             // Concernant l'affichage 
transposé d'un tableau
! //require_once("siteweb.inc.php");              // concernant les pages perso 
des usagers et les sites web des structures
! //require_once("dateheure.inc.php");            // concernant la manipulation 
des heures et des dates, formulaire, conversion...
! //require_once("structures.inc.php");           // concernant les structures
! //require_once("initiations.inc.php");          // concernant les initiations 
et les thèmes
! require_once("parcours.inc.php");             // concernant les parcours des 
usagers et leur positionnement
! 
! ?>
! <html>
! <head>
! <title>positionnement - epnadmin</title>
! <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
! <?
! $titr = "Outil d'autoévaluation des compétences";
! $datemaj="5 janvier 2003";
! require("entete.inc.php");
! 
! // début des fonctions                                                        
 -
! function rechercheQuestion($id, $champ="id_initiation")
! {
!   $req = "SELECT *, RAND() AS hasard FROM questions WHERE $champ=$id";
!   $req .= " ORDER BY hasard LIMIT 0, 4";
!   $res = executeRequete($req);
!   return $res;
! }
! 
! function formulaireTheme($mode, $id_usager, $id_theme, $niveaucourant, 
$id_initiation)
! {
!    echo "<script src=\"autoeval.js\">\n";
!    echo "</script>\n";
!    echo "<form name=\"formulaire\" action=\"positionnement.php\" 
method=\"POST\" enctype=\"multipart/form-data\">\n";
!    echo "<input type=\"hidden\" name=\"operation\" value=\"2\">\n";
!    echo "<input type=\"hidden\" name=\"mode\" value=\"$mode\">\n";
!    echo "<input type=\"hidden\" name=\"id_usager\" value=\"$id_usager\">\n";
!    echo "<input type=\"hidden\" name=\"id_theme\" value=\"$id_theme\">\n";
!    echo "<input type=\"hidden\" name=\"id_initiation\" 
value=\"$id_initiation\">\n";
!    echo "<input type=\"hidden\" name=\"niveaucourant\" 
value=\"$niveaucourant\">\n";
! 
!    echo "<table border=1 align=center>";
! 
!    $req = "SELECT * FROM initiations WHERE id=$id_initiation";
!    $res = executeRequete($req);
!    if ($initiation=mysql_fetch_object($res))
!    {
!      $res2=recherchePositionnement($id_usager, $initiation->id);
!      if ($res2)
!        $positionnement = mysql_fetch_object($res2);
!      else
!        $positionnement = "";
!      echo "<tr><td>\n<table width=\"100%\">";
!      echo "<tr><td width=\"55%\"><b>$initiation->initiation</b></td>\n";
!      echo "<td nowrap><input type=\"radio\" name=\"niveau\" 
value=\"débutant(e)\"";
!      if ($positionnement->niveau=="débutant(e)")
!        echo " checked";
!      echo "><b>débutant(e)</b></td>\n";
!      echo "<td nowrap><input type=\"radio\" name=\"niveau\" 
value=\"initié(e)\"";
!      if ($positionnement->niveau=="initié(e)")
!        echo " checked";
!      echo "><b>initié(e)</b></td>\n";
!      echo "<td nowrap><input type=\"radio\" name=\"niveau\" 
value=\"avancé(e)\"";
!      if ($positionnement->niveau=="avancé(e)")
!        echo " checked";
!      echo "><b>avancé(e)</b></td>\n";
!      echo "<td></td></tr></td></tr>\n<tr><td>";
! 
!      $res3 = rechercheQuestion ($initiation->id, "id_initiation");
!      $ques=false;
!      while ($question = mysql_fetch_object($res3))
!      {
!        echo "<tr><td>$question->question</td>\n";
!        echo "<td><input type=\"radio\" 
name=\"réponse_".$id_initiation."_".$question->id."\" value=\"non\" 
onClick=\"autoeval($initiation->id)\">Non</td>\n";
!        echo "<td><input type=\"radio\" 
name=\"réponse_".$id_initiation."_".$question->id."\" value=\"doute\" 
onClick=\"autoeval($initiation->id)\")>J'ai un doute</td>\n";
!        echo "<td><input type=\"radio\" 
name=\"réponse_".$id_initiation."_".$question->id."\" value=\"oui\" 
onClick=\"autoeval($initiation->id)\">Oui</td>\n";
!        if ($question->url_aide!="")
!          echo "<td><a href=\"".$question->url_aide."\" target=\"aide\">J'ai 
besoin d'aide.</a></td>";
!        echo "</tr>\n";
!        $ques=true;
!      }
!      if($ques)
!        echo "<tr><td></td><td colspan=3><a 
href=\"javascript:autoeval($initiation->id)\">Mettre à jour le 
niveau</a></td></tr>\n";
!      echo "</td></tr></table>\n</td</tr>\n";
!    }
! 
!    echo "</table>\n";
! 
!    echo "<p align=\"center\"><input type=\"submit\" name=\"Envoyer les 
réponses\" value=\"Envoyer les réponses\"><p>\n";
!    echo "</form>\n";
! }
! 
! function afficheEvaluation($id_usager)
! {
! global $info;
! 
!   echo "<table align=\"center\" cellspacing=\"0\">\n";
!   for ($id_theme=1; $id_theme<9; $id_theme++)
!   {
!     $res = rechercheTheme($id_theme);
!     $theme = mysql_fetch_object($res);
!     $req = "SELECT positionnement.*, initiation, initiations.niveau as 
iniveau FROM positionnement";
!     $req.= " LEFT JOIN initiations ON 
positionnement.id_initiation=initiations.id";
!     $req.= " WHERE (id_usager=$id_usager) AND (id_theme=$id_theme) ORDER BY 
iniveau, id_initiation";
!     $res2 = executeRequete($req);
!     echo "<tr><td rowspan=\"2\" bgColor=\"".COULEUR_POSITIONNEMENT."\" 
align=\"center\" valign=\"top\">";
!     if ($theme->url_image!="")
!        echo "<img src=\"./$theme->url_image\" alt=\"$theme->theme : 
$theme->commentaire\" border=0 height=80>";
!     echo "</td>\n";
!     echo "<td bgColor=\"".COULEUR_POSITIONNEMENT."\" align=center><font 
size=\"+2\"><b>$theme->theme</b>";
!     if ($niveau!="") echo " - $niveau";
!     echo "</font>";
!     if ($theme->commentaire!="") echo "<br>$theme->commentaire";
!     echo "</td></tr>\n";
!     echo "<tr><td><table bgcolor=\"FFFFFF\" width=\"100%\">";
!     $aucun=true;
!     while ($positionnement=mysql_fetch_object($res2))
!     {
!       $aucun=false;
!       switch ($positionnement->niveau)
!       {
!         case "débutant(e)" :  $c="#FF0000"; break;
!         case "initié(e)" :    $c="#00FF00"; break;
!         case "avancé(e)" :    $c="#880088"; break;
!       }
!       echo "<tr><td>$positionnement->initiation</td>
!                 <td><font color=\"$c\">$positionnement->niveau</font></td>
!                 <td><a 
href=\"?operation=4&mode=session&id_usager=$id_usager&id_initiation=$positionnement->id_initiation&id_theme=$id_theme&niveau=$positionnement->iniveau\">Me
 ré-évaluer</a></td>
!             </tr>\n";
!     }
! 
!     if ($aucun)
!     {
!       echo "<tr><td><a 
href=\"?operation=3&mode=session&id_usager=$id_usager&id_theme=$id_theme\">Il 
n'y a eu encore aucun positionnement dans ce thème.</a></td></tr>";
!     }
!     echo "</table></td></tr>
!           <tr><td colspan=2 bgcolor=\"#FFFFFF\">&nbsp;</td></tr>\n";
!   }
!   echo "</table>\n";
! }
! 
! // fin des fonctions                                                          
 -
! 
! 
! switch ($operation)
! {
! case 1 :    // Affichage du compte-rendu du positionnement
!    afficheEvaluation($id_usager);
!    break;
! 
! case 2 :    //  Il s'agit d'un retour de formulaire. On doit exploiter les 
données.
!    $req = "SELECT * FROM initiations WHERE id=$id_initiation";
!    $res = executeRequete($req);
!    if ($initiation = mysql_fetch_object($res))
!    {
!      // supprimer un ancien positionnement s'il existait
!      $req = "DELETE FROM positionnement WHERE id_usager=$id_usager AND 
id_initiation=$initiation->id";
!      executeRequete($req);
!      if ($niveau != "")
!      {  // ajout du nouveau positionnement
!        $req = "INSERT INTO positionnement (id_usager, id_initiation, niveau)";
!        $req .= " VALUES (\"$id_usager\", \"$initiation->id\", \"$niveau\")";
!        executeRequete($req);
!      }
!    }
!    // pour savoir si on présente le niveau supérieur
!    $req = "SELECT positionnement.niveau AS niv, COUNT(*) AS nb FROM 
positionnement
!                                    LEFT JOIN initiations ON 
positionnement.id_initiation=initiations.id
!                   WHERE id_usager='$id_usager' AND 
initiations.niveau='$niveaucourant' AND id_theme=$id_theme
!                   GROUP BY positionnement.niveau";
!    $res = executeRequete($req);
!    while ($res2 = mysql_fetch_object($res))
!    {
!       // si l'usager n'est pas débutant, on proposera le niveau suivant
!       // S'il est débutant, il ne compredra pas les questions suivantes, 
c'est pas la peine
!       if ($res2->niv!="débutant(e)")
!          $continue="oui";
!    }
!    if (!$continue) $niveaucourant="rien";
! 
! case 3 : // Calcul de l'initiation, du niveau ou du thème suivant
!    $ancien_niveau=$niveaucourant;
!    $ancien_initiation=$id_initiation;
!    $ancien_theme=$id_theme;
! 
!    if (!$id_theme)
!       $id_theme=1;
!    if (!$niveaucourant)
!       $niveaucourant="débutant(e)";
!    if (!$id_initiation)
!       $id_initiation=-1;
! 
!    $req = "SELECT * FROM initiations
!            WHERE id>$id_initiation AND id_theme=$id_theme AND 
niveau='$niveaucourant'
!            ORDER BY id";
!    $res = executeRequete($req);
!    if ($initiation = mysql_fetch_object($res))
!       $id_initiation= $initiation->id;  // on passe à l'initiation suivante
! 
!    if (!$initiation)
!    {
!       do
!       {
!          switch ($niveaucourant)
!          {
!          case "débutant(e)" :
!             $niveaucourant="initié(e)";
!             $id_initiation=-1;
!             break;
!          case "initié(e)" :
!             $niveaucourant="avancé(e)";
!             $id_initiation=-1;
!             break;
!          default :
!             $niveaucourant="débutant(e)";
!             $id_initiation=-1;
!             if (!isset($id_theme))
!                $id_theme = 1;
!             else
!                $id_theme++;
!             break;
!          }
!          $req = "SELECT * FROM initiations
!                  WHERE id>$id_initiation AND id_theme='$id_theme' AND 
niveau='$niveaucourant'
!                  ORDER BY id";
!          $res = executeRequete($req);
!       }
!       while (($id_theme<NBMAXTHEMES) && 
!$initiation=mysql_fetch_object($res));
! 
!       $id_initiation = $initiation->id;
!    }
! 
! 
!    if ($id_theme!=$ancien_theme && $mode=="session")
!    {
!       echo "<h3>Vous avez terminé votre auto-évaluation des connaissances sur 
ce thème.</h3>\n";
!       echo "<hr><h2>En voici le récapitulatif.</h2>\n";
!       afficheEvaluation($id_usager);
!       break;
!    }
!   // pas de break;
! 
! case 4 : // Présentation du formulaire
!    if ($id_theme==NBMAXTHEMES) // Il n'y a plus de thème, la positionnement 
est temriné.
!    {
!      echo "<h3>Vous avez terminé votre auto-évaluation des connaissances en 
informatique, internet et multimédia.</h3>\n";
!      echo "<hr><h2>En voici le récapitulatif.</h2>\n";
!      afficheEvaluation($id_usager);
!    }
!    else  // Le positionnement n'est pas terminé, on peut continuer.
!    {
!      if (!$niveaucourant) $niveaucourant="débutant(e)";
!      $res = rechercheTheme($id_theme);
!      $theme = mysql_fetch_object($res);
!      afficheTheme($theme,$niveaucourant);
! 
!      formulaireTheme($mode, $id_usager, $id_theme, $niveaucourant, 
$id_initiation);
!    }
!    break;
! 
! case 5 : // Repositionnement dans le thème qui concerne la denière initiation 
vécue ou en cours
!    echo "<p>Pas encore prêt !</p>\n";
! 
!    // Trouver la dernière session effectuée ou en cours (ie = dont le début 
est le plus récent
!    $req = "SELECT parcours.id_initiation AS id_initiation, id_theme, date, 
debut,
!                   initiation, animateur
!                     FROM parcours
!                     LEFT JOIN sessions ON parcours.id_session=sessions.id
!                     LEFT JOIN initiations ON 
parcours.id_initiation=initiations.id
!                     WHERE id_usager=$id_usager
!                       AND sessions.date<=NOW()
!                       AND (parcours.etat='effectué' OR 
parcours.etat='conseillé' OR parcours.etat='indispensable')
!                     ORDER BY sessions.date, sessions.debut DESC";
!    if (!$res = executeRequete($req))
!    {
!      echo "<p>Désolé, aucune session n'a été retrouvée à laquelle vous auriez 
participé.</p>";
!      break;
!    }
!    $nbsess=5;
!    echo "<table align=center border=1>";
!    while ($nbsess>0 && $parcours = mysql_fetch_object($res))
!    {
!      $nbsess--;
!      echo "<tr>\n";
!      $res = recherche("themes", "id", $parcours->id_theme);
!      $theme = mysql_fetch_object($res);
!      echo "<td><img src=\"$theme->url_image\" alt=\"$theme->theme\" border=0 
height=20></td>\n";
!      echo "<td>$parcours->initiation</td>\n";
!      echo "<td>le ".datetodate($parcours->date)." à 
".datetoheure($parcours->debut)." avec $parcours->animateur";
!      echo "<td><a 
href=\"$PHP_SELF?operation=4&mode=session&id_theme=$parcours->id_theme&id_initiation=$parcours->id_initiation\">me
 repositionner</a></td>";
!      echo "</tr>\n";
!    }
!    echo "</table>\n";
!    break;
! 
! default :    // Affichage du compte-rendu du positionnement
!    afficheEvaluation($id_usager);
!    break;
! 
! }  // switch
! 
! 
! echo "<hr>\n";
! echo "<p><a href=\"?operation=3&id_usager=$id_usager\">
!                   Recommencer tout le questionnaire d'autoévaluation</a>
!        - <a href=\"?id_usager=$id_usager\">
!                   Afficher l'ensemble des résultats enregistrées jusque 
là</a></p>\n";
! // ---------------------------------------------------------
! 
! require("basdepage.inc.php");
! echo "</body></html>\n";
! require("footer.inc.php");
! ?>
\ No newline at end of file

Index: prets.php
===================================================================
RCS file: /cvsroot/epnadmin/epnadmin/prets.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** prets.php   9 Oct 2002 21:15:17 -0000       1.3
--- prets.php   5 Jan 2003 20:34:01 -0000       1.4
***************
*** 1,409 ****
! <?
! /*
!     Copyright (C) 2002 Loïc Dayot - Mairie de Pierrefitte (93)
! 
!     EPNadmin - Version 0.5.3
! 
!     This program is free software; you can redistribute it and/or modify
!     it under the terms of the GNU General Public License as published by
!     the Free Software Foundation; either version 2 of the License, or
!     (at your option) any later version.
! 
!     This program is distributed in the hope that it will be useful,
!     but WITHOUT ANY WARRANTY; without even the implied warranty of
!     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
!     GNU General Public License for more details.
! 
!     You should have received a copy of the GNU General Public License
!     along with this program; if not, write to the Free Software
!     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
! 
!     http://epnadmin.pierrefitte93.fr/
! */
! 
! require("header.inc.php");
! ?>
! <html>
! <head>
! <title>prêt de matériel - epnadmin</title>
! <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
! <body>
! <?
! $titr = "Gestion des prêts de matériels";
! 
! $datemaj="5 octobre 2002";
! require("entete.inc.php");
! 
! function afficheEmprunt($id_pret)
! {
!   $req="SELECT *, pret_materiel.id_structure AS id_structure, 
pret_materiel.id AS id
!                  FROM pret_materiel
!                  LEFT JOIN materiels ON materiels.id=pret_materiel.id_materiel
!          WHERE pret_materiel.id=$id_pret";
!   $res = executeRequete($req);
!   echo "<table align=center bgcolor=\"white\" border=1>";
!   $pret=mysql_fetch_object($res);
!   echo "<tr><td>Emprunteur 
:</td><td>".structure($pret->id_structure)."</td></tr>\n";
!   echo "<tr><td>Etat :</td><td>$pret->etat</td></tr>\n";
!   echo "<tr><td>Matériel :</td><td>$pret->type";
!   if ($pret->materiel>"")
!     echo "<br>".$pret->materiel;
!   echo "<br>".$pret->description;
!   echo "</td></tr>\n";
!   echo "<tr><td>Date de la 
demande</td><td>".datetodate($pret->date_demande)."</td></tr>\n";
!   echo "<tr><td>Date 
d'emprunt</td><td>".datetodate($pret->date_emprunt)."</td></tr>\n";
!   echo "<tr><td>Date de retour prévu</td><td";
!   if ($pret->date_retour_effectif<="1")
!     if (date("Y-m-d", strtotime($pret->date_retour_prevu))<=date("Y-m-d", 
strtotime("now")))
!       echo " bgcolor=\"red\"";
!     else
!       echo " bgcolor=\"orange\"";
!   echo ">";
!   if ($pret->date_retour_prevu>"1")
!     echo datetodate($pret->date_retour_prevu);
!   echo "</td></tr>\n";
!   echo "<tr><td>Date de retour effectif</td><td>";
!   if ($pret->date_retour_effectif>"1")
!     echo datetodate($pret->date_retour_effectif);
!   else
!     echo "pas encore retourné.";
!   echo "</td></tr>\n";
!   echo "<tr><td>Commentaires</td><td>$pret->commentaires</td></tr>\n";
!   echo "</table>\n";
! }
! 
! 
! // Début de la page
! if (!$id_structure)
!   echo "<p>Cette page est réservée aux structures et partenaires.</p>\n";
! else
! switch ($operation)
! {
! case 1 : // matériel emprunté (ou en demande) de ma structure
!   echo "<table bgcolor=\"COULEUR_PARC\" align=center>
!         <tr><td align=center><h3>Matériel prêté à d'autres 
structures</h3></td></tr>
!         <tr><td align=center>";
!   $req="SELECT *, pret_materiel.id_structure AS id_structure, 
pret_materiel.id AS id
!                  FROM pret_materiel
!                  LEFT JOIN materiels ON materiels.id=pret_materiel.id_materiel
!                  LEFT JOIN localisations ON 
localisations.id=materiels.id_localisation
!          WHERE localisations.id_structure=$id_structure
!          ORDER BY date_emprunt DESC, date_demande DESC";
! /*
! */
!   $res = executeRequete($req);
!   echo "<table align=center bgcolor=\"white\" border=1>
!         <tr><th rowspan=2>Emprunteur</th><th rowspan=2>Etat</th><th 
rowspan=2>Matériel</th><th colspan=4>Dates</th></tr>
!         <tr><th>demande</th><th>emprunt</th><th>retour 
prévu</th><th>retour</th></tr>\n";
!   while ($pret=mysql_fetch_object($res))
!   {
!     echo "<tr>\n";
!     echo "<td>".structure($pret->id_structure)."</td>\n";
!     echo "<td>$pret->etat";
!     if ($pret->etat=="demandé")
!       echo " <a href=\"$PHP_SELF?operation=6&id_pret=$pret->id\">accepter</a>
!              <a href=\"$PHP_SELF?operation=7&id_pret=$pret->id\">refuser</a>";
!     echo "</td>\n";
!     echo "<td>$pret->type : ";
!     if ($pret->materiel>"")
!       echo $pret->materiel;
!     else
!       echo $pret->description;
!     echo "</td>\n";
!     echo "<td>".datetodatecourt($pret->date_demande)."</td>\n";
!     echo "<td>".datetodatecourt($pret->date_emprunt)."</td>\n";
!     echo "<td";
!     if ($pret->date_retour_effectif<="1")
!       if (date("Y-m-d", strtotime($pret->date_retour_prevu))<=date("Y-m-d", 
strtotime("now")))
!         echo " bgcolor=\"red\"";
!       else
!         echo " bgcolor=\"orange\"";
!     echo ">";
!     if ($pret->date_retour_prevu>"1")
!       echo datetodatecourt($pret->date_retour_prevu);
!     echo "</td>\n";
!     echo "<td>";
!     if ($pret->date_retour_effectif>"1")
!       echo datetodatecourt($pret->date_retour_effectif);
!     else
!       echo " <a 
href=\"$PHP_SELF?operation=5&id_pret=$pret->id\">retourner</a>";
!     echo "</td>\n";
!     echo "</tr>\n";
!   }
!   echo "</table>\n";
!   echo "</td></tr></table>";
!   break;
! 
! case 2 : // matériel emprunté par ma structure
!   echo "<table bgcolor=\"COULEUR_PARC\" align=center>
!         <tr><td align=center><h3>Matériel emprunté par ma 
structures</h3></td></tr>
!         <tr><td align=center>";
!   $req="SELECT *, pret_materiel.id_structure AS id_structure, 
pret_materiel.id AS id
!                  FROM pret_materiel
!                  LEFT JOIN materiels ON materiels.id=pret_materiel.id_materiel
!                  LEFT JOIN localisations ON 
localisations.id=materiels.id_localisation
!          WHERE pret_materiel.id_structure=$id_structure
!          ORDER BY date_emprunt DESC, date_demande DESC";
! /*
! */
!   $res = executeRequete($req);
!   echo "<table align=center bgcolor=\"white\" border=1>
!         <tr><th rowspan=2>Emprunteur</th><th rowspan=2>Etat</th><th 
rowspan=2>Matériel</th><th colspan=4>Dates</th></tr>
!         <tr><th>demande</th><th>emprunt</th><th>retour 
prévu</th><th>retour</th></tr>\n";
!   while ($pret=mysql_fetch_object($res))
!   {
!     echo "<tr>\n";
!     echo "<td>".structure($pret->id_structure)."</td>\n";
!     echo "<td>$pret->etat";
!     if ($pret->etat=="demandé")
!       echo " <a href=\"$PHP_SELF?operation=8&id_pret=$pret->id\">modifier</a>
!              <a href=\"$PHP_SELF?operation=9&id_pret=$pret->id\">annuler</a>";
!     echo "</td>\n";
!     echo "<td>$pret->type : ";
!     if ($pret->materiel>"")
!       echo $pret->materiel;
!     else
!       echo $pret->description;
!     echo "</td>\n";
!     echo "<td>".datetodatecourt($pret->date_demande)."</td>\n";
!     echo "<td>".datetodatecourt($pret->date_emprunt)."</td>\n";
!     echo "<td";
!     if ($pret->date_retour_effectif<="1")
!       if (date("Y-m-d", strtotime($pret->date_retour_prevu))<=date("Y-m-d", 
strtotime("now")))
!         echo " bgcolor=\"red\"";
!       else
!         echo " bgcolor=\"orange\"";
!     echo ">";
!     if ($pret->date_retour_prevu>"1")
!       echo datetodatecourt($pret->date_retour_prevu);
!     echo "</td>\n";
!     echo "<td>";
!     if ($pret->date_retour_effectif>"1")
!       echo datetodatecourt($pret->date_retour_effectif);
!     echo "</td>\n";
!     echo "</tr>\n";
!   }
!   echo "</table>\n";
!   echo "</td></tr></table>";
!   break;
! 
! case 3 : // tout le matériel emprunté
!   echo "<table bgcolor=\"COULEUR_PARC\" align=center>
!         <tr><td align=center><h3>Tout le matériel prêté</h3></td></tr>
!         <tr><td align=center>";
!   $req="SELECT *, pret_materiel.id_structure AS id_structure, 
pret_materiel.id AS id
!                  FROM pret_materiel
!                  LEFT JOIN materiels ON materiels.id=pret_materiel.id_materiel
!                  LEFT JOIN localisations ON 
localisations.id=materiels.id_localisation
!          ORDER BY date_emprunt DESC, date_demande DESC";
!   $res = executeRequete($req);
!   echo "<table align=center bgcolor=\"white\" border=1>
!         <tr><th rowspan=2>Emprunteur</th><th rowspan=2>Etat</th><th 
rowspan=2>Matériel</th><th colspan=4>Dates</th></tr>
!         <tr><th>demande</th><th>emprunt</th><th>retour 
prévu</th><th>retour</th></tr>\n";
!   while ($pret=mysql_fetch_object($res))
!   {
!     echo "<tr>\n";
!     echo "<td>".structure($pret->id_structure)."</td>\n";
!     echo "<td>$pret->etat";
!     if ($pret->etat=="demandé")
!       echo " <a href=\"$PHP_SELF?operation=6&id_pret=$pret->id\">accepter</a>
!              <a href=\"$PHP_SELF?operation=7&id_pret=$pret->id\">refuser</a>";
!     echo " <a href=\"$PHP_SELF?operation=8&id_pret=$pret->id\">modifier</a>
!            <a href=\"$PHP_SELF?operation=9&id_pret=$pret->id\">annuler</a>";
!     echo "</td>\n";
!     echo "<td>$pret->type : ";
!     if ($pret->materiel>"")
!       echo $pret->materiel;
!     else
!       echo $pret->description;
!     echo "</td>\n";
!     echo "<td>".datetodatecourt($pret->date_demande)."</td>\n";
!     echo "<td>".datetodatecourt($pret->date_emprunt)."</td>\n";
!     echo "<td";
!     if ($pret->date_retour_effectif<="1")
!       if (date("Y-m-d", strtotime($pret->date_retour_prevu))<=date("Y-m-d", 
strtotime("now")))
!         echo " bgcolor=\"red\"";
!       else
!         echo " bgcolor=\"orange\"";
!     echo ">";
!     if ($pret->date_retour_prevu>"1")
!       echo datetodatecourt($pret->date_retour_prevu);
!     echo "</td>\n";
!     echo "<td>";
!     if ($pret->date_retour_effectif>"1")
!       echo datetodatecourt($pret->date_retour_effectif);
!     else
!       echo " <a 
href=\"$PHP_SELF?operation=5&id_pret=$pret->id\">retourner</a>";
!     echo "</td>\n";
!     echo "</tr>\n";
!   }
!   echo "</table>\n";
!   echo "</td></tr></table>";
!   break;
! 
! case 4 : // Faire une demande d'emprunt
!   break;
! 
! case 5 : // Retour de matériel
!   echo "<form action=\"$PHP_SELF\" method=\"POST\" 
enctype=\"multipart/form-data\">
!         <input type=\"hidden\" name=\"id_pret\" value=\"$id_pret\">
!         <input type=\"hidden\" name=\"operation\" value=\"51\">
!         <table bgcolor=\"COULEUR_PARC\" align=center>
!         <tr><td align=center><h3>Retour de matériel</h3></td></tr>
!         <tr><td align=center>";
!   afficheEmprunt($id_pret);
!   $req="SELECT * FROM pret_materiel WHERE id=$id_pret";
!   $res = executeRequete($req);
!   $pret=mysql_fetch_object($res);
!   echo "</td></tr>
! 
!         <tr><td align=center>Date de retour :";
!   $ret = date("Y-m-d", strtotime("now"));
!   choixdate($ret, "date_retour_effectif");
!   echo "</td></tr>
!         <tr><td align=center><textarea name=\"commentaires\" cols=\"40\" 
rows=\"4\">$pret->commentaires</textarea>
!         <tr><td align=center><input type=\"submit\" value=\"Enregistrer le 
retour\"></td></tr>\n";
!   echo "</form>\n";
!   echo "</table>";
!   break;
! 
! case 51 : // Enregistrement d'un retour effectif
!   $date_retour_effectif=$date_retour_effectifannee."-".
!                         $date_retour_effectifmois."-".
!                         $date_retour_effectifjour;
!   $req="UPDATE pret_materiel
!            SET date_retour_effectif=\"$date_retour_effectif\",
!                etat=\"prêté\", commentaires=\"$commentaires\"
!          WHERE id=$id_pret";
!   $res=executeRequete($req);
!   echo "<p>La date de retour a bien été enregistrée</p>\n";
!   break;
! 
! case 6 : // Confirmation de prêt
!   echo "<form action=\"$PHP_SELF\" method=\"POST\" 
enctype=\"multipart/form-data\">
!         <input type=\"hidden\" name=\"id_pret\" value=\"$id_pret\">
!         <input type=\"hidden\" name=\"operation\" value=\"61\">
!         <table bgcolor=\"COULEUR_PARC\" align=center>
!         <tr><td align=center><h3>Accord d'une demande d'emprunt</h3></td></tr>
!         <tr><td align=center>";
!   afficheEmprunt($id_pret);
!   echo "</td></tr>\n";
! 
!   echo "<tr><td align=center><input type=\"submit\" value=\"Accorder la 
demande de prêt\"></td></tr>\n";
!   echo "</form>\n";
!   echo "</table>";
!   break;
! 
! case 61 : // Enregistrement d'un retour effectif
!   $req="UPDATE pret_materiel
!            SET etat=\"prêté\"
!          WHERE id=$id_pret";
!   $res=executeRequete($req);
!   echo "<p>La demande de prêt est accordée.</p>\n";
! 
!   $req="SELECT *, pret_materiel.id_structure AS id_structure, 
pret_materiel.id AS id,
!                localisations.id_structure AS id_stru_proprio
!                  FROM pret_materiel
!                  LEFT JOIN materiels ON materiels.id=pret_materiel.id_materiel
!                  LEFT JOIN localisations ON 
localisations.id=materiels.id_localisation
!          WHERE pret_materiel.id=$id_pret";
!   $res = executeRequete($req);
!   $corps = "";
!   $pret=mysql_fetch_object($res);
!   $corps .=  "Emprunteur : ".structure($pret->id_structure)."\n";
!   $corps .= "Etat : $pret->etat\n";
!   $corps .= "Matériel : $pret->type\n";
!   if ($pret->materiel>"")
!     $corps .= $pret->materiel."\n";
!   $corps .= $pret->description."\n";
!   $corps .= "\n";
!   $corps .= "Date de la demande : ".datetodate($pret->date_demande)."\n";
!   $corps .= "Date d'emprunt : ".datetodate($pret->date_emprunt)."\n";
!   $corps .= "Date de retour prévu : 
".datetodate($pret->date_retour_prevu)."\n";
!   $corps .= "\n";
!   $corps .= "Commentaires : $pret->commentaires\n";
! 
!   $res=recherche("structures", "id", $pret->id_structure);
!   $demandeur = mysql_fetch_object($res);
!   $res=recherche("structures", "id", $pret->id_stru_proprio);
!   $proprietaire = mysql_fetch_object($res);
!   /*$ok = mail("$demandeur->courriel, $proprietaire->courriel",
!          "Prêts : accord pour un prêt de matériel",
!          $corps,
!          "From: address@hidden"); */
!   break;
! 
! case 7 : // Refus de prêt
!   echo "<form action=\"$PHP_SELF\" method=\"POST\" 
enctype=\"multipart/form-data\">
!         <input type=\"hidden\" name=\"id_pret\" value=\"$id_pret\">
!         <input type=\"hidden\" name=\"operation\" value=\"71\">
!         <table bgcolor=\"COULEUR_PARC\" align=center>
!         <tr><td align=center><h3>Refus de prêt</h3></td></tr>
!         <tr><td align=center>";
!   afficheEmprunt($id_pret);
!   echo "</td></tr>\n";
!   $res=recherche("pret_materiel", "id", $id_pret);
!   $pret=mysql_fetch_object($res);
!   echo "<tr><td align=center>Commentaires/raison du refus<br>
!         <textarea name=\"commentaires\" cols=\"40\" rows=\"4\" 
tabindex=\"1\">$pret->commentaires</textarea>\n";
!   echo "<tr><td align=center><input type=\"submit\" value=\"Refuser la 
demande de prêt\"></td></tr>\n";
!   echo "</form>\n";
!   echo "</table>";
!   break;
! 
! case 71 : // Enregistrement d'un refus de pret
!   $req="UPDATE pret_materiel
!            SET etat=\"refusé\",
!                commentaires=\"$commentaires\"
!          WHERE id=$id_pret";
!   $res=executeRequete($req);
!   echo "<p>La demande de prêt a été refusée.</p>\n";
! 
!   $req="SELECT *, pret_materiel.id_structure AS id_structure, 
pret_materiel.id AS id,
!                materiels.id_structure AS id_stru_proprio
!                  FROM pret_materiel
!                  LEFT JOIN materiels ON materiels.id=pret_materiel.id_materiel
!          WHERE pret_materiel.id=$id_pret";
!   $res = executeRequete($req);
!   $corps = "";
!   $pret=mysql_fetch_object($res);
!   $corps .=  "Emprunteur : ".structure($pret->id_structure)."\n";
!   $corps .= "Etat : $pret->etat\n";
!   $corps .= "Matériel : $pret->type\n";
!   if ($pret->materiel>"")
!     $corps .= $pret->materiel."\n";
!   $corps .= $pret->description."\n";
!   $corps .= "\n";
!   $corps .= "Date de la demande : ".datetodate($pret->date_demande)."\n";
!   $corps .= "Date d'emprunt : ".datetodate($pret->date_emprunt)."\n";
!   $corps .= "Date de retour prévu : 
".datetodate($pret->date_retour_prevu)."\n";
!   $corps .= "\n";
!   $corps .= "Commentaires : $pret->commentaires\n";
! 
!   $res=recherche("structures", "id", $pret->id_structure);
!   $demandeur = mysql_fetch_object($res);
!   $res=recherche("structures", "id", $pret->id_stru_proprio);
!   $proprietaire = mysql_fetch_object($res);
!   /*$ok = mail("$demandeur->courriel, $proprietaire->courriel",
!          "Prêts : refus à demande d'emprunt de matériel",
!          $corps,
!          "From: address@hidden"); */
!   break;
! 
! case 8 : // Annuler ma demande
!   break;
! 
! case 9 : // Modifier une demande
!   break;
! 
! default : //?
!   break;
! 
! } // switch
! 
! // Fin de la page
! 
! require("basdepage.inc.php");
! echo "</body></html>";
! require("footer.inc.php");
  ?>
--- 1,422 ----
! <?
! /*
!     Copyright (C) 2002 Loïc Dayot - Mairie de Pierrefitte (93)
! 
!     EPNadmin - Version 0.6
! 
!     This program is free software; you can redistribute it and/or modify
!     it under the terms of the GNU General Public License as published by
!     the Free Software Foundation; either version 2 of the License, or
!     (at your option) any later version.
! 
!     This program is distributed in the hope that it will be useful,
!     but WITHOUT ANY WARRANTY; without even the implied warranty of
!     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
!     GNU General Public License for more details.
! 
!     You should have received a copy of the GNU General Public License
!     along with this program; if not, write to the Free Software
!     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
! 
!     http://epnadmin.pierrefitte93.fr/
! */
! 
! require_once("header.inc.php");
! require_once("constantes.inc.php");             // définition des constantes
! //require_once("fonctions.inc.php");              // concernant des fonctions 
transversales inclassables
! require_once("mysql.inc.php");                  // concernant mysql
! //require_once("sessions.inc.php");             // concernant les sessions et 
initiations
! //require_once("usagers.inc.php");              // concernant la gestion des 
usagers
! //require_once("reservations.inc.php");         // concernant les 
réservations des postes en accès individuel par des usagers
! //require_once("tableaux.inc.php");             // Concernant l'affichage 
transposé d'un tableau
! //require_once("siteweb.inc.php");              // concernant les pages perso 
des usagers et les sites web des structures
! require_once("dateheure.inc.php");            // concernant la manipulation 
des heures et des dates, formulaire, conversion...
! require_once("structures.inc.php");           // concernant les structures
! //require_once("initiations.inc.php");          // concernant les initiations 
et les thèmes
! //require_once("parcours.inc.php");             // concernant les parcours 
des usagers et leur positionnement
! 
! ?>
! <html>
! <head>
! <title>prêt de matériel - epnadmin</title>
! <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
! <body>
! <?
! $titr = "Gestion des prêts de matériels";
! 
! $datemaj="5 octobre 2002";
! require("entete.inc.php");
! 
! function afficheEmprunt($id_pret)
! {
!   $req="SELECT *, pret_materiel.id_structure AS id_structure, 
pret_materiel.id AS id
!                  FROM pret_materiel
!                  LEFT JOIN materiels ON materiels.id=pret_materiel.id_materiel
!          WHERE pret_materiel.id=$id_pret";
!   $res = executeRequete($req);
!   echo "<table align=center bgcolor=\"white\" border=1>";
!   $pret=mysql_fetch_object($res);
!   echo "<tr><td>Emprunteur 
:</td><td>".structure($pret->id_structure)."</td></tr>\n";
!   echo "<tr><td>Etat :</td><td>$pret->etat</td></tr>\n";
!   echo "<tr><td>Matériel :</td><td>$pret->type";
!   if ($pret->materiel>"")
!     echo "<br>".$pret->materiel;
!   echo "<br>".$pret->description;
!   echo "</td></tr>\n";
!   echo "<tr><td>Date de la 
demande</td><td>".datetodate($pret->date_demande)."</td></tr>\n";
!   echo "<tr><td>Date 
d'emprunt</td><td>".datetodate($pret->date_emprunt)."</td></tr>\n";
!   echo "<tr><td>Date de retour prévu</td><td";
!   if ($pret->date_retour_effectif<="1")
!     if (date("Y-m-d", strtotime($pret->date_retour_prevu))<=date("Y-m-d", 
strtotime("now")))
!       echo " bgcolor=\"red\"";
!     else
!       echo " bgcolor=\"orange\"";
!   echo ">";
!   if ($pret->date_retour_prevu>"1")
!     echo datetodate($pret->date_retour_prevu);
!   echo "</td></tr>\n";
!   echo "<tr><td>Date de retour effectif</td><td>";
!   if ($pret->date_retour_effectif>"1")
!     echo datetodate($pret->date_retour_effectif);
!   else
!     echo "pas encore retourné.";
!   echo "</td></tr>\n";
!   echo "<tr><td>Commentaires</td><td>$pret->commentaires</td></tr>\n";
!   echo "</table>\n";
! }
! 
! 
! // Début de la page
! if (!$id_structure)
!   echo "<p>Cette page est réservée aux structures et partenaires.</p>\n";
! else
! switch ($operation)
! {
! case 1 : // matériel emprunté (ou en demande) de ma structure
!   echo "<table bgcolor=\"COULEUR_PARC\" align=center>
!         <tr><td align=center><h3>Matériel prêté à d'autres 
structures</h3></td></tr>
!         <tr><td align=center>";
!   $req="SELECT *, pret_materiel.id_structure AS id_structure, 
pret_materiel.id AS id
!                  FROM pret_materiel
!                  LEFT JOIN materiels ON materiels.id=pret_materiel.id_materiel
!                  LEFT JOIN localisations ON 
localisations.id=materiels.id_localisation
!          WHERE localisations.id_structure=$id_structure
!          ORDER BY date_emprunt DESC, date_demande DESC";
! /*
! */
!   $res = executeRequete($req);
!   echo "<table align=center bgcolor=\"white\" border=1>
!         <tr><th rowspan=2>Emprunteur</th><th rowspan=2>Etat</th><th 
rowspan=2>Matériel</th><th colspan=4>Dates</th></tr>
!         <tr><th>demande</th><th>emprunt</th><th>retour 
prévu</th><th>retour</th></tr>\n";
!   while ($pret=mysql_fetch_object($res))
!   {
!     echo "<tr>\n";
!     echo "<td>".structure($pret->id_structure)."</td>\n";
!     echo "<td>$pret->etat";
!     if ($pret->etat=="demandé")
!       echo " <a href=\"$PHP_SELF?operation=6&id_pret=$pret->id\">accepter</a>
!              <a href=\"$PHP_SELF?operation=7&id_pret=$pret->id\">refuser</a>";
!     echo "</td>\n";
!     echo "<td>$pret->type : ";
!     if ($pret->materiel>"")
!       echo $pret->materiel;
!     else
!       echo $pret->description;
!     echo "</td>\n";
!     echo "<td>".datetodatecourt($pret->date_demande)."</td>\n";
!     echo "<td>".datetodatecourt($pret->date_emprunt)."</td>\n";
!     echo "<td";
!     if ($pret->date_retour_effectif<="1")
!       if (date("Y-m-d", strtotime($pret->date_retour_prevu))<=date("Y-m-d", 
strtotime("now")))
!         echo " bgcolor=\"red\"";
!       else
!         echo " bgcolor=\"orange\"";
!     echo ">";
!     if ($pret->date_retour_prevu>"1")
!       echo datetodatecourt($pret->date_retour_prevu);
!     echo "</td>\n";
!     echo "<td>";
!     if ($pret->date_retour_effectif>"1")
!       echo datetodatecourt($pret->date_retour_effectif);
!     else
!       echo " <a 
href=\"$PHP_SELF?operation=5&id_pret=$pret->id\">retourner</a>";
!     echo "</td>\n";
!     echo "</tr>\n";
!   }
!   echo "</table>\n";
!   echo "</td></tr></table>";
!   break;
! 
! case 2 : // matériel emprunté par ma structure
!   echo "<table bgcolor=\"COULEUR_PARC\" align=center>
!         <tr><td align=center><h3>Matériel emprunté par ma 
structures</h3></td></tr>
!         <tr><td align=center>";
!   $req="SELECT *, pret_materiel.id_structure AS id_structure, 
pret_materiel.id AS id
!                  FROM pret_materiel
!                  LEFT JOIN materiels ON materiels.id=pret_materiel.id_materiel
!                  LEFT JOIN localisations ON 
localisations.id=materiels.id_localisation
!          WHERE pret_materiel.id_structure=$id_structure
!          ORDER BY date_emprunt DESC, date_demande DESC";
! /*
! */
!   $res = executeRequete($req);
!   echo "<table align=center bgcolor=\"white\" border=1>
!         <tr><th rowspan=2>Emprunteur</th><th rowspan=2>Etat</th><th 
rowspan=2>Matériel</th><th colspan=4>Dates</th></tr>
!         <tr><th>demande</th><th>emprunt</th><th>retour 
prévu</th><th>retour</th></tr>\n";
!   while ($pret=mysql_fetch_object($res))
!   {
!     echo "<tr>\n";
!     echo "<td>".structure($pret->id_structure)."</td>\n";
!     echo "<td>$pret->etat";
!     if ($pret->etat=="demandé")
!       echo " <a href=\"$PHP_SELF?operation=8&id_pret=$pret->id\">modifier</a>
!              <a href=\"$PHP_SELF?operation=9&id_pret=$pret->id\">annuler</a>";
!     echo "</td>\n";
!     echo "<td>$pret->type : ";
!     if ($pret->materiel>"")
!       echo $pret->materiel;
!     else
!       echo $pret->description;
!     echo "</td>\n";
!     echo "<td>".datetodatecourt($pret->date_demande)."</td>\n";
!     echo "<td>".datetodatecourt($pret->date_emprunt)."</td>\n";
!     echo "<td";
!     if ($pret->date_retour_effectif<="1")
!       if (date("Y-m-d", strtotime($pret->date_retour_prevu))<=date("Y-m-d", 
strtotime("now")))
!         echo " bgcolor=\"red\"";
!       else
!         echo " bgcolor=\"orange\"";
!     echo ">";
!     if ($pret->date_retour_prevu>"1")
!       echo datetodatecourt($pret->date_retour_prevu);
!     echo "</td>\n";
!     echo "<td>";
!     if ($pret->date_retour_effectif>"1")
!       echo datetodatecourt($pret->date_retour_effectif);
!     echo "</td>\n";
!     echo "</tr>\n";
!   }
!   echo "</table>\n";
!   echo "</td></tr></table>";
!   break;
! 
! case 3 : // tout le matériel emprunté
!   echo "<table bgcolor=\"COULEUR_PARC\" align=center>
!         <tr><td align=center><h3>Tout le matériel prêté</h3></td></tr>
!         <tr><td align=center>";
!   $req="SELECT *, pret_materiel.id_structure AS id_structure, 
pret_materiel.id AS id
!                  FROM pret_materiel
!                  LEFT JOIN materiels ON materiels.id=pret_materiel.id_materiel
!                  LEFT JOIN localisations ON 
localisations.id=materiels.id_localisation
!          ORDER BY date_emprunt DESC, date_demande DESC";
!   $res = executeRequete($req);
!   echo "<table align=center bgcolor=\"white\" border=1>
!         <tr><th rowspan=2>Emprunteur</th><th rowspan=2>Etat</th><th 
rowspan=2>Matériel</th><th colspan=4>Dates</th></tr>
!         <tr><th>demande</th><th>emprunt</th><th>retour 
prévu</th><th>retour</th></tr>\n";
!   while ($pret=mysql_fetch_object($res))
!   {
!     echo "<tr>\n";
!     echo "<td>".structure($pret->id_structure)."</td>\n";
!     echo "<td>$pret->etat";
!     if ($pret->etat=="demandé")
!       echo " <a href=\"$PHP_SELF?operation=6&id_pret=$pret->id\">accepter</a>
!              <a href=\"$PHP_SELF?operation=7&id_pret=$pret->id\">refuser</a>";
!     echo " <a href=\"$PHP_SELF?operation=8&id_pret=$pret->id\">modifier</a>
!            <a href=\"$PHP_SELF?operation=9&id_pret=$pret->id\">annuler</a>";
!     echo "</td>\n";
!     echo "<td>$pret->type : ";
!     if ($pret->materiel>"")
!       echo $pret->materiel;
!     else
!       echo $pret->description;
!     echo "</td>\n";
!     echo "<td>".datetodatecourt($pret->date_demande)."</td>\n";
!     echo "<td>".datetodatecourt($pret->date_emprunt)."</td>\n";
!     echo "<td";
!     if ($pret->date_retour_effectif<="1")
!       if (date("Y-m-d", strtotime($pret->date_retour_prevu))<=date("Y-m-d", 
strtotime("now")))
!         echo " bgcolor=\"red\"";
!       else
!         echo " bgcolor=\"orange\"";
!     echo ">";
!     if ($pret->date_retour_prevu>"1")
!       echo datetodatecourt($pret->date_retour_prevu);
!     echo "</td>\n";
!     echo "<td>";
!     if ($pret->date_retour_effectif>"1")
!       echo datetodatecourt($pret->date_retour_effectif);
!     else
!       echo " <a 
href=\"$PHP_SELF?operation=5&id_pret=$pret->id\">retourner</a>";
!     echo "</td>\n";
!     echo "</tr>\n";
!   }
!   echo "</table>\n";
!   echo "</td></tr></table>";
!   break;
! 
! case 4 : // Faire une demande d'emprunt
!   break;
! 
! case 5 : // Retour de matériel
!   echo "<form action=\"$PHP_SELF\" method=\"POST\" 
enctype=\"multipart/form-data\">
!         <input type=\"hidden\" name=\"id_pret\" value=\"$id_pret\">
!         <input type=\"hidden\" name=\"operation\" value=\"51\">
!         <table bgcolor=\"COULEUR_PARC\" align=center>
!         <tr><td align=center><h3>Retour de matériel</h3></td></tr>
!         <tr><td align=center>";
!   afficheEmprunt($id_pret);
!   $req="SELECT * FROM pret_materiel WHERE id=$id_pret";
!   $res = executeRequete($req);
!   $pret=mysql_fetch_object($res);
!   echo "</td></tr>
! 
!         <tr><td align=center>Date de retour :";
!   $ret = date("Y-m-d", strtotime("now"));
!   choixdate($ret, "date_retour_effectif");
!   echo "</td></tr>
!         <tr><td align=center><textarea name=\"commentaires\" cols=\"40\" 
rows=\"4\">$pret->commentaires</textarea>
!         <tr><td align=center><input type=\"submit\" value=\"Enregistrer le 
retour\"></td></tr>\n";
!   echo "</form>\n";
!   echo "</table>";
!   break;
! 
! case 51 : // Enregistrement d'un retour effectif
!   $date_retour_effectif=$date_retour_effectifannee."-".
!                         $date_retour_effectifmois."-".
!                         $date_retour_effectifjour;
!   $req="UPDATE pret_materiel
!            SET date_retour_effectif=\"$date_retour_effectif\",
!                etat=\"prêté\", commentaires=\"$commentaires\"
!          WHERE id=$id_pret";
!   $res=executeRequete($req);
!   echo "<p>La date de retour a bien été enregistrée</p>\n";
!   break;
! 
! case 6 : // Confirmation de prêt
!   echo "<form action=\"$PHP_SELF\" method=\"POST\" 
enctype=\"multipart/form-data\">
!         <input type=\"hidden\" name=\"id_pret\" value=\"$id_pret\">
!         <input type=\"hidden\" name=\"operation\" value=\"61\">
!         <table bgcolor=\"COULEUR_PARC\" align=center>
!         <tr><td align=center><h3>Accord d'une demande d'emprunt</h3></td></tr>
!         <tr><td align=center>";
!   afficheEmprunt($id_pret);
!   echo "</td></tr>\n";
! 
!   echo "<tr><td align=center><input type=\"submit\" value=\"Accorder la 
demande de prêt\"></td></tr>\n";
!   echo "</form>\n";
!   echo "</table>";
!   break;
! 
! case 61 : // Enregistrement d'un retour effectif
!   $req="UPDATE pret_materiel
!            SET etat=\"prêté\"
!          WHERE id=$id_pret";
!   $res=executeRequete($req);
!   echo "<p>La demande de prêt est accordée.</p>\n";
! 
!   $req="SELECT *, pret_materiel.id_structure AS id_structure, 
pret_materiel.id AS id,
!                localisations.id_structure AS id_stru_proprio
!                  FROM pret_materiel
!                  LEFT JOIN materiels ON materiels.id=pret_materiel.id_materiel
!                  LEFT JOIN localisations ON 
localisations.id=materiels.id_localisation
!          WHERE pret_materiel.id=$id_pret";
!   $res = executeRequete($req);
!   $corps = "";
!   $pret=mysql_fetch_object($res);
!   $corps .=  "Emprunteur : ".structure($pret->id_structure)."\n";
!   $corps .= "Etat : $pret->etat\n";
!   $corps .= "Matériel : $pret->type\n";
!   if ($pret->materiel>"")
!     $corps .= $pret->materiel."\n";
!   $corps .= $pret->description."\n";
!   $corps .= "\n";
!   $corps .= "Date de la demande : ".datetodate($pret->date_demande)."\n";
!   $corps .= "Date d'emprunt : ".datetodate($pret->date_emprunt)."\n";
!   $corps .= "Date de retour prévu : 
".datetodate($pret->date_retour_prevu)."\n";
!   $corps .= "\n";
!   $corps .= "Commentaires : $pret->commentaires\n";
! 
!   $res=recherche("structures", "id", $pret->id_structure);
!   $demandeur = mysql_fetch_object($res);
!   $res=recherche("structures", "id", $pret->id_stru_proprio);
!   $proprietaire = mysql_fetch_object($res);
!   /*$ok = mail("$demandeur->courriel, $proprietaire->courriel",
!          "Prêts : accord pour un prêt de matériel",
!          $corps,
!          "From: address@hidden"); */
!   break;
! 
! case 7 : // Refus de prêt
!   echo "<form action=\"$PHP_SELF\" method=\"POST\" 
enctype=\"multipart/form-data\">
!         <input type=\"hidden\" name=\"id_pret\" value=\"$id_pret\">
!         <input type=\"hidden\" name=\"operation\" value=\"71\">
!         <table bgcolor=\"COULEUR_PARC\" align=center>
!         <tr><td align=center><h3>Refus de prêt</h3></td></tr>
!         <tr><td align=center>";
!   afficheEmprunt($id_pret);
!   echo "</td></tr>\n";
!   $res=recherche("pret_materiel", "id", $id_pret);
!   $pret=mysql_fetch_object($res);
!   echo "<tr><td align=center>Commentaires/raison du refus<br>
!         <textarea name=\"commentaires\" cols=\"40\" rows=\"4\" 
tabindex=\"1\">$pret->commentaires</textarea>\n";
!   echo "<tr><td align=center><input type=\"submit\" value=\"Refuser la 
demande de prêt\"></td></tr>\n";
!   echo "</form>\n";
!   echo "</table>";
!   break;
! 
! case 71 : // Enregistrement d'un refus de pret
!   $req="UPDATE pret_materiel
!            SET etat=\"refusé\",
!                commentaires=\"$commentaires\"
!          WHERE id=$id_pret";
!   $res=executeRequete($req);
!   echo "<p>La demande de prêt a été refusée.</p>\n";
! 
!   $req="SELECT *, pret_materiel.id_structure AS id_structure, 
pret_materiel.id AS id,
!                materiels.id_structure AS id_stru_proprio
!                  FROM pret_materiel
!                  LEFT JOIN materiels ON materiels.id=pret_materiel.id_materiel
!          WHERE pret_materiel.id=$id_pret";
!   $res = executeRequete($req);
!   $corps = "";
!   $pret=mysql_fetch_object($res);
!   $corps .=  "Emprunteur : ".structure($pret->id_structure)."\n";
!   $corps .= "Etat : $pret->etat\n";
!   $corps .= "Matériel : $pret->type\n";
!   if ($pret->materiel>"")
!     $corps .= $pret->materiel."\n";
!   $corps .= $pret->description."\n";
!   $corps .= "\n";
!   $corps .= "Date de la demande : ".datetodate($pret->date_demande)."\n";
!   $corps .= "Date d'emprunt : ".datetodate($pret->date_emprunt)."\n";
!   $corps .= "Date de retour prévu : 
".datetodate($pret->date_retour_prevu)."\n";
!   $corps .= "\n";
!   $corps .= "Commentaires : $pret->commentaires\n";
! 
!   $res=recherche("structures", "id", $pret->id_structure);
!   $demandeur = mysql_fetch_object($res);
!   $res=recherche("structures", "id", $pret->id_stru_proprio);
!   $proprietaire = mysql_fetch_object($res);
!   /*$ok = mail("$demandeur->courriel, $proprietaire->courriel",
!          "Prêts : refus à demande d'emprunt de matériel",
!          $corps,
!          "From: address@hidden"); */
!   break;
! 
! case 8 : // Annuler ma demande
!   break;
! 
! case 9 : // Modifier une demande
!   break;
! 
! default : //?
!   break;
! 
! } // switch
! 
! // Fin de la page
! 
! require("basdepage.inc.php");
! echo "</body></html>";
! require("footer.inc.php");
  ?>

Index: print.php
===================================================================
RCS file: /cvsroot/epnadmin/epnadmin/print.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** print.php   8 Nov 2002 18:59:07 -0000       1.4
--- print.php   5 Jan 2003 20:34:01 -0000       1.5
***************
*** 22,29 ****
  */
  
! require("header.inc.php");
  
! require("barcode.php");
! require("i25object.php");
  
  function uneCarte($ii, $nom, $prenom, $mail, $login, $motdepasse, $code, 
$tarif)
--- 22,41 ----
  */
  
! require_once("header.inc.php");
! //require_once("constantes.inc.php");             // définition des constantes
! //require_once("fonctions.inc.php");              // concernant des fonctions 
transversales inclassables
! require_once("mysql.inc.php");                  // concernant mysql
! //require_once("sessions.inc.php");             // concernant les sessions et 
initiations
! //require_once("usagers.inc.php");              // concernant la gestion des 
usagers
! //require_once("reservations.inc.php");         // concernant les 
réservations des postes en accès individuel par des usagers
! //require_once("tableaux.inc.php");             // Concernant l'affichage 
transposé d'un tableau
! //require_once("siteweb.inc.php");              // concernant les pages perso 
des usagers et les sites web des structures
! //require_once("dateheure.inc.php");            // concernant la manipulation 
des heures et des dates, formulaire, conversion...
! //require_once("structures.inc.php");           // concernant les structures
! //require_once("initiations.inc.php");          // concernant les initiations 
et les thèmes
! require_once("parcours.inc.php");             // concernant les parcours des 
usagers et leur positionnement
  
! require("barcode.inc.php");
! require("i25object.inc.php");
  
  function uneCarte($ii, $nom, $prenom, $mail, $login, $motdepasse, $code, 
$tarif)
***************
*** 71,81 ****
                  ImageLine($im,0,340,480,340,$noir);
  
!                 imagettftext 
($im,12,0,20,380,$noir,$dir_fontes_ttf."ARIAL.TTF","Votre courriel : ");
                  imagettftext 
($im,12,0,125,380,$rouge,$dir_fontes_ttf."ARIAL.TTF",$mail);
  
!                 imagettftext 
($im,12,0,20,410,$noir,$dir_fontes_ttf."ARIAL.TTF","Votre identifiant : ");
                  imagettftext 
($im,12,0,140,410,$rouge,$dir_fontes_ttf."ARIAL.TTF",$login);
  
!                 imagettftext 
($im,12,0,20,440,$noir,$dir_fontes_ttf."ARIAL.TTF","Votre mot de passe : ");
                  if (strlen($motdepasse)!=32)
                     imagettftext 
($im,12,0,170,440,$rouge,$dir_fontes_ttf."ARIAL.TTF",$motdepasse);
--- 83,93 ----
                  ImageLine($im,0,340,480,340,$noir);
  
!                 imagettftext 
($im,12,0,20,380,$noir,$dir_fontes_ttf."ARIAL.TTF","Mon courriel : ");
                  imagettftext 
($im,12,0,125,380,$rouge,$dir_fontes_ttf."ARIAL.TTF",$mail);
  
!                 imagettftext 
($im,12,0,20,410,$noir,$dir_fontes_ttf."ARIAL.TTF","Mon identifiant : ");
                  imagettftext 
($im,12,0,140,410,$rouge,$dir_fontes_ttf."ARIAL.TTF",$login);
  
!                 imagettftext 
($im,12,0,20,440,$noir,$dir_fontes_ttf."ARIAL.TTF","Mon mot de passe : ");
                  if (strlen($motdepasse)!=32)
                     imagettftext 
($im,12,0,170,440,$rouge,$dir_fontes_ttf."ARIAL.TTF",$motdepasse);
***************
*** 100,104 ****
  <?
  $titr = "Impression des cartes d'usagers";
! $datemaj="7 novembre 2002";
  require("entete.inc.php");
  
--- 112,116 ----
  <?
  $titr = "Impression des cartes d'usagers";
! $datemaj="5 janvier 2003";
  require("entete.inc.php");
  
***************
*** 125,129 ****
              uneCarte($i, $usager->nom, $usager->prenom, $usager->courriel, 
$usager->login, $usager->motdepasse, $code, $usager->tarif);
           }
!          echo("<center><IMG SRC='6cartes.php' WIDTH=480 
HEIGHT=690></center>\n");
        }
  //     break;
--- 137,141 ----
              uneCarte($i, $usager->nom, $usager->prenom, $usager->courriel, 
$usager->login, $usager->motdepasse, $code, $usager->tarif);
           }
!          echo("<center><IMG SRC='6cartes.inc.php' WIDTH=480 
HEIGHT=690></center>\n");
        }
  //     break;
***************
*** 195,204 ****
        if (!$nbcarteprete)
           echo "<p align=center>Il n'y a pas de cartes prêtes à être 
imprimées.</p>
!                <p align=center><a href=\"usagers.php?$idu\">Liste des 
usagers</a>.</p>\n";
        elseif ($nbcarteprete<6)
           echo "<p align=center>Il n'y a que $nbcarteprete cartes prêtes à 
être imprimées</p>
!                <p align=center><a href=\"?operation=1&$idu\">Préparer 
l'impression quand même</a>.</p>\n";
        else
!          echo "<p align=center><a href=\"?operation=1&$idu\">Imprimer les 
cartes</a>.</p>\n";
        break;
     }
--- 207,216 ----
        if (!$nbcarteprete)
           echo "<p align=center>Il n'y a pas de cartes prêtes à être 
imprimées.</p>
!                <p align=center><a href=\"usagers.php?operation=5\">Liste des 
usagers</a>.</p>\n";
        elseif ($nbcarteprete<6)
           echo "<p align=center>Il n'y a que $nbcarteprete cartes prêtes à 
être imprimées</p>
!                <p align=center><a href=\"?operation=1\">Préparer l'impression 
quand même</a>.</p>\n";
        else
!          echo "<p align=center><a href=\"?operation=1\">Imprimer les 
cartes</a>.</p>\n";
        break;
     }
***************
*** 210,212 ****
  echo "</body></html>\n";
  require("footer.inc.php");
! ?>
--- 222,224 ----
  echo "</body></html>\n";
  require("footer.inc.php");
! ?>
\ No newline at end of file

Index: questions.php
===================================================================
RCS file: /cvsroot/epnadmin/epnadmin/questions.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** questions.php       7 Aug 2002 17:31:05 -0000       1.2
--- questions.php       5 Jan 2003 20:34:01 -0000       1.3
***************
*** 3,7 ****
      Copyright (C) 2001, 2002 Bertand Pallie, Loïc Dayot
  
!     EPNadmin - Version 0.5
  
      This program is free software; you can redistribute it and/or modify
--- 3,7 ----
      Copyright (C) 2001, 2002 Bertand Pallie, Loïc Dayot
  
!     EPNadmin - Version 0.6
  
      This program is free software; you can redistribute it and/or modify
***************
*** 22,26 ****
  */
  
! require("header.inc.php");
  ?>
  <html>
--- 22,39 ----
  */
  
! require_once("header.inc.php");
! //require_once("constantes.inc.php");             // définition des constantes
! //require_once("fonctions.inc.php");              // concernant des fonctions 
transversales inclassables
! require_once("mysql.inc.php");                  // concernant mysql
! //require_once("sessions.inc.php");             // concernant les sessions et 
initiations
! //require_once("usagers.inc.php");              // concernant la gestion des 
usagers
! //require_once("reservations.inc.php");         // concernant les 
réservations des postes en accès individuel par des usagers
! //require_once("tableaux.inc.php");             // Concernant l'affichage 
transposé d'un tableau
! //require_once("siteweb.inc.php");              // concernant les pages perso 
des usagers et les sites web des structures
! //require_once("dateheure.inc.php");            // concernant la manipulation 
des heures et des dates, formulaire, conversion...
! //require_once("structures.inc.php");           // concernant les structures
! require_once("initiations.inc.php");          // concernant les initiations 
et les thèmes
! //require_once("parcours.inc.php");             // concernant les parcours 
des usagers et leur positionnement
! 
  ?>
  <html>
***************
*** 30,34 ****
  <?
  $titr = "Base des questions d'autoévaluation";
! $datemaj="7 aout 2002";
  require("entete.inc.php");
  
--- 43,47 ----
  <?
  $titr = "Base des questions d'autoévaluation";
! $datemaj="5 janvier 2003";
  require("entete.inc.php");
  
***************
*** 103,107 ****
                    </td>
                  </tr>
!                 <tr> 
                    <td colspan=\"2\">
                      <div align=\"center\">
--- 116,120 ----
                    </td>
                  </tr>
!                 <tr>
                    <td colspan=\"2\">
                      <div align=\"center\">
***************
*** 130,134 ****
        {
           afficheInitiation($id_initiation, "REDUIT");
!          echo "<table border=1 align=center width=\"80%\">
                 <tr><th>Question</th><th>Lien vers de l'aide</th><th 
colspan=2>actions</th></tr>\n";
           $req="SELECT * FROM questions WHERE id_initiation=$id_initiation 
ORDER BY id";
--- 143,147 ----
        {
           afficheInitiation($id_initiation, "REDUIT");
!          echo "<table border=1 align=center>
                 <tr><th>Question</th><th>Lien vers de l'aide</th><th 
colspan=2>actions</th></tr>\n";
           $req="SELECT * FROM questions WHERE id_initiation=$id_initiation 
ORDER BY id";

Index: reservations.inc.php
===================================================================
RCS file: /cvsroot/epnadmin/epnadmin/reservations.inc.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** reservations.inc.php        6 Nov 2002 18:25:07 -0000       1.3
--- reservations.inc.php        5 Jan 2003 20:34:01 -0000       1.4
***************
*** 3,7 ****
      Copyright (C) 2001, 2002 Bertand Pallie, Loïc Dayot - Mairie Pierrefitte 
(93)
  
!     EPNadmin - Version 0.5
  
      This program is free software; you can redistribute it and/or modify
--- 3,7 ----
      Copyright (C) 2001, 2002 Bertand Pallie, Loïc Dayot - Mairie Pierrefitte 
(93)
  
!     EPNadmin - Version 0.6 - 05/01/2003
  
      This program is free software; you can redistribute it and/or modify
***************
*** 22,25 ****
--- 22,39 ----
  */
  
+ //require_once("header.inc.php");
+ require_once("constantes.inc.php");             // définition des constantes
+ //require_once("fonctions.inc.php");              // concernant des fonctions 
transversales inclassables
+ require_once("mysql.inc.php");                  // concernant mysql
+ //require_once("sessions.inc.php");             // concernant les sessions et 
initiations
+ //require_once("usagers.inc.php");              // concernant la gestion des 
usagers
+ //require_once("reservations.inc.php");         // concernant les 
réservations des postes en accès individuel par des usagers
+ //require_once("tableaux.inc.php");             // Concernant l'affichage 
transposé d'un tableau
+ //require_once("siteweb.inc.php");              // concernant les pages perso 
des usagers et les sites web des structures
+ //require_once("dateheure.inc.php");            // concernant la manipulation 
des heures et des dates, formulaire, conversion...
+ //require_once("structures.inc.php");           // concernant les structures
+ //require_once("initiations.inc.php");          // concernant les initiations 
et les thèmes
+ //require_once("parcours.inc.php");             // concernant les parcours 
des usagers et leur positionnement
+ 
  //                                                                            
 -
  //  Réservation de postes individuels                                         
 -
***************
*** 87,89 ****
        echo "<h3>Aucune utilisation dans le $temps</h3>\n";
  }
! ?>
--- 101,104 ----
        echo "<h3>Aucune utilisation dans le $temps</h3>\n";
  }
! 
! ?>
\ No newline at end of file

Index: reservations.php
===================================================================
RCS file: /cvsroot/epnadmin/epnadmin/reservations.php,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -r1.9 -r1.10
*** reservations.php    4 Jan 2003 13:24:59 -0000       1.9
--- reservations.php    5 Jan 2003 20:34:01 -0000       1.10
***************
*** 3,7 ****
      Copyright (C) 2001, 2002 Bertand Pallie, Loïc Dayot - Mairie Pierrefitte 
(93)
  
!     EPNadmin - Version 0.5
  
      This program is free software; you can redistribute it and/or modify
--- 3,7 ----
      Copyright (C) 2001, 2002 Bertand Pallie, Loïc Dayot - Mairie Pierrefitte 
(93)
  
!     EPNadmin - Version 0.6
  
      This program is free software; you can redistribute it and/or modify
***************
*** 22,26 ****
  */
  
! require("header.inc.php");
  ?>
  <html>
--- 22,38 ----
  */
  
! require_once("header.inc.php");
! require_once("constantes.inc.php");             // définition des constantes
! //require_once("fonctions.inc.php");              // concernant des fonctions 
transversales inclassables
! require_once("mysql.inc.php");                  // concernant mysql
! //require_once("sessions.inc.php");             // concernant les sessions et 
initiations
! require_once("usagers.inc.php");              // concernant la gestion des 
usagers
! require_once("reservations.inc.php");         // concernant les réservations 
des postes en accès individuel par des usagers
! //require_once("tableaux.inc.php");             // Concernant l'affichage 
transposé d'un tableau
! //require_once("siteweb.inc.php");              // concernant les pages perso 
des usagers et les sites web des structures
! //require_once("dateheure.inc.php");            // concernant la manipulation 
des heures et des dates, formulaire, conversion...
! //require_once("structures.inc.php");           // concernant les structures
! //require_once("initiations.inc.php");          // concernant les initiations 
et les thèmes
! //require_once("parcours.inc.php");             // concernant les parcours 
des usagers et leur positionnement
  ?>
  <html>
***************
*** 30,34 ****
  <?
  $titr = "Réservation de poste en accès individuel";
! $datemaj="19 juillet 2002";
  require("entete.inc.php");
  
--- 42,46 ----
  <?
  $titr = "Réservation de poste en accès individuel";
! $datemaj="5 janvier 2003";
  require("entete.inc.php");
  
***************
*** 94,98 ****
              <input type=\"hidden\" name=\"id_usager\" value=\"$id_usager\">
              <input type=\"hidden\" name=\"id_utilisation\" 
value=\"$id_utilisation\">
!             </form></td></tr></table>\n";
     }
     break;
--- 106,110 ----
              <input type=\"hidden\" name=\"id_usager\" value=\"$id_usager\">
              <input type=\"hidden\" name=\"id_utilisation\" 
value=\"$id_utilisation\">
!             </form></td></tr></table>\n";  //'
     }
     break;
***************
*** 540,544 ****
                <input type=\"submit\" name=\"Lapin\" value=\"La personne n'est 
pas venue...\">
              </form></td></tr>
!             </table>\n";
      }
      else // if $utilisation
--- 552,556 ----
                <input type=\"submit\" name=\"Lapin\" value=\"La personne n'est 
pas venue...\">
              </form></td></tr>
!             </table>\n"; //'
      }
      else // if $utilisation
***************
*** 564,566 ****
  echo "</body></html>\n";
  require("footer.inc.php");
! ?>
--- 576,578 ----
  echo "</body></html>\n";
  require("footer.inc.php");
! ?>
\ No newline at end of file

Index: session.php
===================================================================
RCS file: /cvsroot/epnadmin/epnadmin/session.php,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** session.php 30 Sep 2002 15:56:23 -0000      1.7
--- session.php 5 Jan 2003 20:34:01 -0000       1.8
***************
*** 3,7 ****
      Copyright (C) 2001, 2002 Bertand Pallie, Loïc Dayot - Mairie de 
Pierrefitte (93)
  
!     EPNadmin - Version 0.5.1
  
      This program is free software; you can redistribute it and/or modify
--- 3,7 ----
      Copyright (C) 2001, 2002 Bertand Pallie, Loïc Dayot - Mairie de 
Pierrefitte (93)
  
!     EPNadmin - Version 0.6
  
      This program is free software; you can redistribute it and/or modify
***************
*** 22,26 ****
  */
  
! require("header.inc.php");
  ?>
  <html>
--- 22,39 ----
  */
  
! require_once("header.inc.php");
! //require_once("constantes.inc.php");             // définition des constantes
! //require_once("fonctions.inc.php");              // concernant des fonctions 
transversales inclassables
! require_once("mysql.inc.php");                  // concernant mysql
! require_once("sessions.inc.php");             // concernant les sessions et 
initiations
! //require_once("usagers.inc.php");              // concernant la gestion des 
usagers
! //require_once("reservations.inc.php");         // concernant les 
réservations des postes en accès individuel par des usagers
! //require_once("tableaux.inc.php");             // Concernant l'affichage 
transposé d'un tableau
! //require_once("siteweb.inc.php");              // concernant les pages perso 
des usagers et les sites web des structures
! require_once("dateheure.inc.php");            // concernant la manipulation 
des heures et des dates, formulaire, conversion...
! require_once("structures.inc.php");           // concernant les structures
! //require_once("initiations.inc.php");          // concernant les initiations 
et les thèmes
! //require_once("parcours.inc.php");             // concernant les parcours 
des usagers et leur positionnement
! 
  ?>
  <html>
***************
*** 30,43 ****
  <?
  $titr = "Gestion des sessions";
! $datemaj="30 septembre 2002";
  require("entete.inc.php");
  
- if (!$isadmin | !$id_usager)   // Si ce n'est pas l'administrateur, on ne 
prend que le parcours de la personne identifiée
-    $id_usager=$id_login;
- if ($isadmin)
-    $idu="id_usager=$id_usager";
- else
-    $idu="";
- 
  // Formulaire de saisie des informations d'une session (création ou modif)
  function formSession($id_session, $operation)
--- 43,49 ----
  <?
  $titr = "Gestion des sessions";
! $datemaj="5 janvier 2003";
  require("entete.inc.php");
  
  // Formulaire de saisie des informations d'une session (création ou modif)
  function formSession($id_session, $operation)
***************
*** 209,213 ****
            echo " ?</b></td></tr>
                  <tr><td align=center><input type=\"submit\" name=\"Annuler\" 
value=\"Oui, j'annule la session.\">
!                </form></td></tr></table>\n";
          }
          break;
--- 215,219 ----
            echo " ?</b></td></tr>
                  <tr><td align=center><input type=\"submit\" name=\"Annuler\" 
value=\"Oui, j'annule la session.\">
!                </form></td></tr></table>\n";   //'
          }
          break;
***************
*** 445,447 ****
  echo "</body></html>\n";
  require("footer.inc.php");
! ?>
--- 451,453 ----
  echo "</body></html>\n";
  require("footer.inc.php");
! ?>
\ No newline at end of file

Index: sessions.inc.php
===================================================================
RCS file: /cvsroot/epnadmin/epnadmin/sessions.inc.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** sessions.inc.php    4 Dec 2002 20:47:43 -0000       1.3
--- sessions.inc.php    5 Jan 2003 20:34:01 -0000       1.4
***************
*** 3,7 ****
      Copyright (C) 2001, 2002 Bertand Pallie, Loïc Dayot - Mairie Pierrefitte 
(93)
  
!     EPNadmin - Version 0.5.1 - 30/09/2002
  
      This program is free software; you can redistribute it and/or modify
--- 3,7 ----
      Copyright (C) 2001, 2002 Bertand Pallie, Loïc Dayot - Mairie Pierrefitte 
(93)
  
!     EPNadmin - Version 0.6 - 05/01/2003
  
      This program is free software; you can redistribute it and/or modify
***************
*** 22,25 ****
--- 22,39 ----
  */
  
+ //require_once("header.inc.php");
+ require_once("constantes.inc.php");             // définition des constantes
+ //require_once("fonctions.inc.php");              // concernant des fonctions 
transversales inclassables
+ require_once("mysql.inc.php");                  // concernant mysql
+ //require_once("sessions.inc.php");             // concernant les sessions et 
initiations
+ //require_once("usagers.inc.php");              // concernant la gestion des 
usagers
+ //require_once("reservations.inc.php");         // concernant les 
réservations des postes en accès individuel par des usagers
+ //require_once("tableaux.inc.php");             // Concernant l'affichage 
transposé d'un tableau
+ //require_once("siteweb.inc.php");              // concernant les pages perso 
des usagers et les sites web des structures
+ require_once("dateheure.inc.php");            // concernant la manipulation 
des heures et des dates, formulaire, conversion...
+ require_once("structures.inc.php");           // concernant les structures
+ //require_once("initiations.inc.php");          // concernant les initiations 
et les thèmes
+ //require_once("parcours.inc.php");             // concernant les parcours 
des usagers et leur positionnement
+ 
  //                                                                            
 -
  //  Sessions et initiations                                                   
 -
***************
*** 106,108 ****
  }
  
! ?>
--- 120,122 ----
  }
  
! ?>
\ No newline at end of file

Index: siteweb.inc.php
===================================================================
RCS file: /cvsroot/epnadmin/epnadmin/siteweb.inc.php,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** siteweb.inc.php     14 Dec 2002 12:11:27 -0000      1.6
--- siteweb.inc.php     5 Jan 2003 20:34:01 -0000       1.7
***************
*** 124,126 ****
  }
  
! ?>
--- 124,126 ----
  }
  
! ?>
\ No newline at end of file

Index: siteweb.php
===================================================================
RCS file: /cvsroot/epnadmin/epnadmin/siteweb.php,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -r1.17 -r1.18
*** siteweb.php 26 Dec 2002 20:06:24 -0000      1.17
--- siteweb.php 5 Jan 2003 20:34:01 -0000       1.18
***************
*** 3,7 ****
      Copyright (C) 2002 Loïc Dayot - Mairie de Pierrefitte (93)
  
!     EPNadmin - Version 0.5.4
  
      This program is free software; you can redistribute it and/or modify
--- 3,7 ----
      Copyright (C) 2002 Loïc Dayot - Mairie de Pierrefitte (93)
  
!     EPNadmin - Version 0.6
  
      This program is free software; you can redistribute it and/or modify
***************
*** 22,26 ****
  */
  
! require("header.inc.php");
  ?>
  <html>
--- 22,39 ----
  */
  
! require_once("header.inc.php");
! require_once("constantes.inc.php");             // définition des constantes
! require_once("fonctions.inc.php");              // concernant des fonctions 
transversales inclassables
! require_once("mysql.inc.php");                  // concernant mysql
! //require_once("sessions.inc.php");             // concernant les sessions et 
initiations
! //require_once("usagers.inc.php");              // concernant la gestion des 
usagers
! //require_once("reservations.inc.php");         // concernant les 
réservations des postes en accès individuel par des usagers
! //require_once("tableaux.inc.php");             // Concernant l'affichage 
transposé d'un tableau
! require_once("siteweb.inc.php");              // concernant les pages perso 
des usagers et les sites web des structures
! //require_once("dateheure.inc.php");            // concernant la manipulation 
des heures et des dates, formulaire, conversion...
! require_once("structures.inc.php");           // concernant les structures
! //require_once("initiations.inc.php");          // concernant les initiations 
et les thèmes
! //require_once("parcours.inc.php");             // concernant les parcours 
des usagers et leur positionnement
! 
  ?>
  <html>
***************
*** 32,36 ****
  $titr = "Gestion des sites internet";
  
! $datemaj="16 décembre 2002";
  require("entete.inc.php");
  
--- 45,49 ----
  $titr = "Gestion des sites internet";
  
! $datemaj="5 janvier 2003";
  require("entete.inc.php");
  

Index: stats.php
===================================================================
RCS file: /cvsroot/epnadmin/epnadmin/stats.php,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -r1.9 -r1.10
*** stats.php   4 Jan 2003 13:24:59 -0000       1.9
--- stats.php   5 Jan 2003 20:34:01 -0000       1.10
***************
*** 24,28 ****
  // Les deux lignes suivantes suffisent s'il n'y a pas besoin 
d'authentification
  // pour consulter les statistiques.
! include("fonctions.inc.php");
  mysql_connecte();
  
--- 24,41 ----
  // Les deux lignes suivantes suffisent s'il n'y a pas besoin 
d'authentification
  // pour consulter les statistiques.
! require_once("header.inc.php");
! require_once("constantes.inc.php");             // définition des constantes
! //require_once("fonctions.inc.php");              // concernant des fonctions 
transversales inclassables
! require_once("mysql.inc.php");                  // concernant mysql
! //require_once("sessions.inc.php");             // concernant les sessions et 
initiations
! //require_once("usagers.inc.php");              // concernant la gestion des 
usagers
! //require_once("reservations.inc.php");         // concernant les 
réservations des postes en accès individuel par des usagers
! require_once("tableaux.inc.php");             // Concernant l'affichage 
transposé d'un tableau
! //require_once("siteweb.inc.php");              // concernant les pages perso 
des usagers et les sites web des structures
! require_once("dateheure.inc.php");            // concernant la manipulation 
des heures et des dates, formulaire, conversion...
! //require_once("structures.inc.php");           // concernant les structures
! //require_once("initiations.inc.php");          // concernant les initiations 
et les thèmes
! require_once("parcours.inc.php");             // concernant les parcours des 
usagers et leur positionnement
! 
  mysql_connecte();
  
***************
*** 42,46 ****
  <?
  $titr = "Statistiques";
! $datemaj="3 décembre 2003";
  
  // On retire l'affichage du menu et du titre.
--- 55,59 ----
  <?
  $titr = "Statistiques";
! $datemaj="5 décembre 2003";
  
  // On retire l'affichage du menu et du titre.
***************
*** 523,527 ****
         $i++;
      }
!     echo "<th>âge<br>inconnu</th><th>- de 20 ans</th><th>20 à 60 
ans</th><th>+ de 60 ans</th><th bgcolor=\"#FFFF80\">Totaux 
ou<br>moyennes</th></tr>\n";
  
      // Ligne nombre
--- 536,540 ----
         $i++;
      }
!     echo "<th>âge<br>inconnu</th><th>- de 20 ans</th><th>20 à 40 
ans</th><th>40 à 60 ans</th><th>+ de 60 ans</th><th bgcolor=\"#FFFF80\">Totaux 
ou<br>moyennes</th></tr>\n";
  
      // Ligne nombre
***************
*** 546,550 ****
      }
      $req = "SELECT COUNT(*) AS nb,
!                    INTERVAL(YEAR(CURDATE())-YEAR(naissance), 20, 60) as age
                FROM usagers $where
                GROUP BY age ORDER BY age"; //
--- 559,563 ----
      }
      $req = "SELECT COUNT(*) AS nb,
!                    INTERVAL(YEAR(CURDATE())-YEAR(naissance), 20, 40, 60) as 
age
                FROM usagers $where
                GROUP BY age ORDER BY age"; //
***************
*** 553,557 ****
      while ($stat = mysql_fetch_object($res))
      {
!        while ($i>$stat->age)
         {
            echo "<td></td>";
--- 566,570 ----
      while ($stat = mysql_fetch_object($res))
      {
!        while ($i<$stat->age)
         {
            echo "<td></td>";
***************
*** 595,599 ****
      }
      $req = "SELECT COUNT(*) AS nb,
!                    INTERVAL(YEAR(CURDATE())-YEAR(naissance), 20, 60) as age
              FROM usagers
              LEFT JOIN credits ON credits.id_usager=usagers.id
--- 608,612 ----
      }
      $req = "SELECT COUNT(*) AS nb,
!                    INTERVAL(YEAR(CURDATE())-YEAR(naissance), 20, 40, 60) as 
age
              FROM usagers
              LEFT JOIN credits ON credits.id_usager=usagers.id
***************
*** 604,608 ****
      while ($stat = mysql_fetch_object($res))
      {
!        while ($i>$stat->age)
         {
            echo "<td></td>";
--- 617,621 ----
      while ($stat = mysql_fetch_object($res))
      {
!        while ($i<$stat->age)
         {
            echo "<td></td>";
***************
*** 644,661 ****
      }
      $req = "SELECT COUNT(*) AS nb,
!                     INTERVAL(YEAR(CURDATE())-YEAR(naissance), 20, 60) as age
!             FROM usagers $where GROUP BY age ORDER BY age DESC"; //
      $res = executeRequete($req);
!     $i=2;
      while ($stat = mysql_fetch_object($res))
      {
!        while ($i>$stat->age)
         {
            echo "<td></td>";
!           $i--;
         }
         echo "<td>$stat->nb</td>";
         $i=$stat->age;
!        $i--;
      }
  
--- 657,674 ----
      }
      $req = "SELECT COUNT(*) AS nb,
!                     INTERVAL(YEAR(CURDATE())-YEAR(naissance), 20, 40, 60) as 
age
!             FROM usagers $where GROUP BY age ORDER BY age"; //
      $res = executeRequete($req);
!     $i=-1;
      while ($stat = mysql_fetch_object($res))
      {
!        while ($i<$stat->age)
         {
            echo "<td></td>";
!           $i++;
         }
         echo "<td>$stat->nb</td>";
         $i=$stat->age;
!        $i++;
      }
  

Index: structure.sql
===================================================================
RCS file: /cvsroot/epnadmin/epnadmin/structure.sql,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** structure.sql       7 Oct 2002 16:35:36 -0000       1.3
--- structure.sql       5 Jan 2003 20:34:01 -0000       1.4
***************
*** 5,12 ****
  #
  # Serveur: localhost
! # Généré le : Lundi 07 Octobre 2002 à 13:30
! # Version du serveur: 3.23.51
! # Version de PHP: 4.1.2
! # Base de données: `epnadmin2`
  # --------------------------------------------------------
  
--- 5,12 ----
  #
  # Serveur: localhost
! # Généré le : Dimanche 05 Janvier 2003 à 21:28
! # Version du serveur: 3.23.52
! # Version de PHP: 4.2.3
! # Base de données: `epnadmin`
  # --------------------------------------------------------
  
***************
*** 15,19 ****
  #
  
- DROP TABLE IF EXISTS calendrier;
  CREATE TABLE calendrier (
    id_localisation int(11) NOT NULL default '0',
--- 15,18 ----
***************
*** 34,38 ****
  #
  
- DROP TABLE IF EXISTS credits;
  CREATE TABLE credits (
    id_usager int(10) unsigned NOT NULL default '0',
--- 33,36 ----
***************
*** 57,61 ****
  #
  
- DROP TABLE IF EXISTS domaines;
  CREATE TABLE domaines (
    id int(10) unsigned NOT NULL auto_increment,
--- 55,58 ----
***************
*** 69,76 ****
  
  #
  # Structure de la table `hebergements`
  #
  
- DROP TABLE IF EXISTS hebergements;
  CREATE TABLE hebergements (
    id int(10) unsigned NOT NULL auto_increment,
--- 66,99 ----
  
  #
+ # Structure de la table `droits`
+ #
+ 
+ CREATE TABLE droits (
+   id_structure int(11) NOT NULL default '0',
+   id_fonction int(11) NOT NULL default '0',
+   droit 
enum('actif','inactif','aucun','voir','ajouter','modifier','administrer') NOT 
NULL default 'aucun',
+   PRIMARY KEY  (id_structure,id_fonction),
+   KEY id_structure (id_structure),
+   KEY id_fonction (id_fonction)
+ ) TYPE=MyISAM COMMENT='Permissions des structures à accéder aux 
fonctionnalités';
+ # --------------------------------------------------------
+ 
+ #
+ # Structure de la table `fonctions`
+ #
+ 
+ CREATE TABLE fonctions (
+   id int(11) NOT NULL auto_increment,
+   fonction varchar(63) NOT NULL default '',
+   commentaire text,
+   PRIMARY KEY  (id),
+   KEY fonction (fonction)
+ ) TYPE=MyISAM COMMENT='Fonctionnalités de l''application';
+ # --------------------------------------------------------
+ 
+ #
  # Structure de la table `hebergements`
  #
  
  CREATE TABLE hebergements (
    id int(10) unsigned NOT NULL auto_increment,
***************
*** 94,98 ****
  #
  
- DROP TABLE IF EXISTS initiations;
  CREATE TABLE initiations (
    id int(11) NOT NULL auto_increment,
--- 117,120 ----
***************
*** 124,128 ****
  #
  
- DROP TABLE IF EXISTS localisations;
  CREATE TABLE localisations (
    id int(11) NOT NULL auto_increment,
--- 146,149 ----
***************
*** 140,144 ****
  #
  
- DROP TABLE IF EXISTS logi_mate;
  CREATE TABLE logi_mate (
    id_logiciel int(11) NOT NULL default '0',
--- 161,164 ----
***************
*** 153,157 ****
  #
  
- DROP TABLE IF EXISTS logiciels;
  CREATE TABLE logiciels (
    id int(10) unsigned NOT NULL auto_increment,
--- 173,176 ----
***************
*** 174,178 ****
  #
  
- DROP TABLE IF EXISTS materiels;
  CREATE TABLE materiels (
    id int(11) NOT NULL auto_increment,
--- 193,196 ----
***************
*** 200,204 ****
  #
  
- DROP TABLE IF EXISTS modeles_horaires;
  CREATE TABLE modeles_horaires (
    id_localisation int(11) NOT NULL default '0',
--- 218,221 ----
***************
*** 219,223 ****
  #
  
- DROP TABLE IF EXISTS parcours;
  CREATE TABLE parcours (
    id_usager int(11) NOT NULL default '0',
--- 236,239 ----
***************
*** 236,240 ****
  #
  
- DROP TABLE IF EXISTS positionnement;
  CREATE TABLE positionnement (
    id_usager int(11) NOT NULL default '0',
--- 252,255 ----
***************
*** 252,256 ****
  #
  
- DROP TABLE IF EXISTS pret_materiel;
  CREATE TABLE pret_materiel (
    id int(10) unsigned NOT NULL auto_increment,
--- 267,270 ----
***************
*** 276,280 ****
  #
  
- DROP TABLE IF EXISTS public_initiations;
  CREATE TABLE public_initiations (
    id int(11) NOT NULL auto_increment,
--- 290,293 ----
***************
*** 308,312 ****
  #
  
- DROP TABLE IF EXISTS public_serveurs;
  CREATE TABLE public_serveurs (
    serveur varchar(64) NOT NULL default '',
--- 321,324 ----
***************
*** 325,329 ****
  #
  
- DROP TABLE IF EXISTS questions;
  CREATE TABLE questions (
    id int(11) NOT NULL auto_increment,
--- 337,340 ----
***************
*** 340,344 ****
  #
  
- DROP TABLE IF EXISTS sessions;
  CREATE TABLE sessions (
    id int(11) NOT NULL auto_increment,
--- 351,354 ----
***************
*** 368,372 ****
  #
  
- DROP TABLE IF EXISTS structures;
  CREATE TABLE structures (
    id int(11) NOT NULL auto_increment,
--- 378,381 ----
***************
*** 393,397 ****
  #
  
- DROP TABLE IF EXISTS themes;
  CREATE TABLE themes (
    id int(11) NOT NULL auto_increment,
--- 402,405 ----
***************
*** 408,412 ****
  #
  
- DROP TABLE IF EXISTS usagers;
  CREATE TABLE usagers (
    id int(10) unsigned NOT NULL auto_increment,
--- 416,419 ----
***************
*** 437,441 ****
  #
  
- DROP TABLE IF EXISTS usages;
  CREATE TABLE usages (
    id int(11) NOT NULL auto_increment,
--- 444,447 ----
***************
*** 450,454 ****
  #
  
- DROP TABLE IF EXISTS utilisation_postes;
  CREATE TABLE utilisation_postes (
    id int(11) NOT NULL auto_increment,
--- 456,459 ----

Index: structures.inc.php
===================================================================
RCS file: /cvsroot/epnadmin/epnadmin/structures.inc.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** structures.inc.php  8 Aug 2002 21:36:07 -0000       1.2
--- structures.inc.php  5 Jan 2003 20:34:01 -0000       1.3
***************
*** 3,7 ****
      Copyright (C) 2001, 2002 Bertand Pallie, Loïc Dayot - Mairie Pierrefitte 
(93)
  
!     EPNadmin - Version 0.5
  
      This program is free software; you can redistribute it and/or modify
--- 3,7 ----
      Copyright (C) 2001, 2002 Bertand Pallie, Loïc Dayot - Mairie Pierrefitte 
(93)
  
!     EPNadmin - Version 0.6
  
      This program is free software; you can redistribute it and/or modify
***************
*** 22,25 ****
--- 22,39 ----
  */
  
+ //require_once("header.inc.php");
+ //require_once("constantes.inc.php");             // définition des constantes
+ //require_once("fonctions.inc.php");              // concernant des fonctions 
transversales inclassables
+ require_once("mysql.inc.php");                  // concernant mysql
+ //require_once("sessions.inc.php");             // concernant les sessions et 
initiations
+ //require_once("usagers.inc.php");              // concernant la gestion des 
usagers
+ //require_once("reservations.inc.php");         // concernant les 
réservations des postes en accès individuel par des usagers
+ //require_once("tableaux.inc.php");             // Concernant l'affichage 
transposé d'un tableau
+ //require_once("siteweb.inc.php");              // concernant les pages perso 
des usagers et les sites web des structures
+ //require_once("dateheure.inc.php");            // concernant la manipulation 
des heures et des dates, formulaire, conversion...
+ //require_once("structures.inc.php");           // concernant les structures
+ //require_once("initiations.inc.php");          // concernant les initiations 
et les thèmes
+ //require_once("parcours.inc.php");             // concernant les parcours 
des usagers et leur positionnement
+ 
  //                                                                            
 -
  //  Structures, lieux, salles                                                 
 -
***************
*** 114,117 ****
  }
  
! 
! ?>
--- 128,130 ----
  }
  
! ?>
\ No newline at end of file

Index: structures.php
===================================================================
RCS file: /cvsroot/epnadmin/epnadmin/structures.php,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** structures.php      14 Oct 2002 20:45:52 -0000      1.6
--- structures.php      5 Jan 2003 20:34:01 -0000       1.7
***************
*** 3,7 ****
      Copyright (C) 2002 Loïc Dayot - Mairie de Pierrefitte (93)
  
!     EPNadmin - Version 0.5.3
  
      This program is free software; you can redistribute it and/or modify
--- 3,7 ----
      Copyright (C) 2002 Loïc Dayot - Mairie de Pierrefitte (93)
  
!     EPNadmin - Version 0.6
  
      This program is free software; you can redistribute it and/or modify
***************
*** 22,26 ****
  */
  
! require("header.inc.php");
  ?>
  <html>
--- 22,39 ----
  */
  
! require_once("header.inc.php");
! require_once("constantes.inc.php");             // définition des constantes
! //require_once("fonctions.inc.php");              // concernant des fonctions 
transversales inclassables
! require_once("mysql.inc.php");                  // concernant mysql
! //require_once("sessions.inc.php");             // concernant les sessions et 
initiations
! //require_once("usagers.inc.php");              // concernant la gestion des 
usagers
! //require_once("reservations.inc.php");         // concernant les 
réservations des postes en accès individuel par des usagers
! //require_once("tableaux.inc.php");             // Concernant l'affichage 
transposé d'un tableau
! //require_once("siteweb.inc.php");              // concernant les pages perso 
des usagers et les sites web des structures
! //require_once("dateheure.inc.php");            // concernant la manipulation 
des heures et des dates, formulaire, conversion...
! require_once("structures.inc.php");           // concernant les structures
! //require_once("initiations.inc.php");          // concernant les initiations 
et les thèmes
! //require_once("parcours.inc.php");             // concernant les parcours 
des usagers et leur positionnement
! 
  ?>
  <html>
***************
*** 30,34 ****
  <?
  $titr = "Gestion des structures partenaires";
! $datemaj="14 octobre 2002";
  require("entete.inc.php");
  
--- 43,47 ----
  <?
  $titr = "Gestion des structures partenaires";
! $datemaj="5 janvier 2003";
  require("entete.inc.php");
  
***************
*** 307,309 ****
  echo "</body></html>\n";
  require("footer.inc.php");
! ?>
--- 320,322 ----
  echo "</body></html>\n";
  require("footer.inc.php");
! ?>
\ No newline at end of file

Index: table_horaire.php
===================================================================
RCS file: /cvsroot/epnadmin/epnadmin/table_horaire.php,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -r1.9 -r1.10
*** table_horaire.php   4 Jan 2003 13:24:59 -0000       1.9
--- table_horaire.php   5 Jan 2003 20:34:01 -0000       1.10
***************
*** 3,7 ****
      Copyright (C) 2001, 2002 Bertand Pallie, Loïc Dayot Mairie de Pierrefitte 
(93)
  
!     EPNadmin - Version 0.5
  
      This program is free software; you can redistribute it and/or modify
--- 3,7 ----
      Copyright (C) 2001, 2002 Bertand Pallie, Loïc Dayot Mairie de Pierrefitte 
(93)
  
!     EPNadmin - Version 0.6
  
      This program is free software; you can redistribute it and/or modify
***************
*** 22,26 ****
  */
  
! require("header.inc.php");
  ?>
  <html>
--- 22,39 ----
  */
  
! require_once("header.inc.php");
! require_once("constantes.inc.php");             // définition des constantes
! //require_once("fonctions.inc.php");              // concernant des fonctions 
transversales inclassables
! require_once("mysql.inc.php");                  // concernant mysql
! //require_once("sessions.inc.php");             // concernant les sessions et 
initiations
! require_once("usagers.inc.php");              // concernant la gestion des 
usagers
! require_once("reservations.inc.php");         // concernant les réservations 
des postes en accès individuel par des usagers
! require_once("tableaux.inc.php");             // Concernant l'affichage 
transposé d'un tableau
! //require_once("siteweb.inc.php");              // concernant les pages perso 
des usagers et les sites web des structures
! require_once("dateheure.inc.php");            // concernant la manipulation 
des heures et des dates, formulaire, conversion...
! require_once("structures.inc.php");           // concernant les structures
! //require_once("initiations.inc.php");          // concernant les initiations 
et les thèmes
! //require_once("parcours.inc.php");             // concernant les parcours 
des usagers et leur positionnement
! 
  ?>
  <html>
***************
*** 30,34 ****
  <?
  $titr = "Gestion du planning de l'utilisation des postes";
! $datemaj="19 juillet 2002";
  require("entete.inc.php");
  
--- 43,47 ----
  <?
  $titr = "Gestion du planning de l'utilisation des postes";
! $datemaj="5 janvier 2003";
  require("entete.inc.php");
  
***************
*** 313,317 ****
           <input type=\"hidden\" name=\"operation\" value=\"$operation\">
           <table border=1 align=center>";
!    echo "<tr><td>Lieu</td>";  choixLieu($lieuv);
  
     echo "<td rowspan=\"4\">Disposition<table><tr>";  choixSensTableau($sens);
--- 326,330 ----
           <input type=\"hidden\" name=\"operation\" value=\"$operation\">
           <table border=1 align=center>";
!    echo "<tr><td>Lieu</td>";  Choixlieu($lieuv);
  
     echo "<td rowspan=\"4\">Disposition<table><tr>";  choixSensTableau($sens);

Index: table_horaire_session.php
===================================================================
RCS file: /cvsroot/epnadmin/epnadmin/table_horaire_session.php,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -r1.13 -r1.14
*** table_horaire_session.php   14 Dec 2002 12:11:27 -0000      1.13
--- table_horaire_session.php   5 Jan 2003 20:34:01 -0000       1.14
***************
*** 3,7 ****
      Copyright (C) 2001, 2002 Bertand Pallie, Loïc Dayot - Mairie 
Pierrefitte-sur-Seine
  
!     EPNadmin - Version 0.5.4
  
      This program is free software; you can redistribute it and/or modify
--- 3,7 ----
      Copyright (C) 2001, 2002 Bertand Pallie, Loïc Dayot - Mairie 
Pierrefitte-sur-Seine
  
!     EPNadmin - Version 0.6
  
      This program is free software; you can redistribute it and/or modify
***************
*** 22,26 ****
  */
  
! require("header.inc.php");
  ?>
  <html>
--- 22,39 ----
  */
  
! require_once("header.inc.php");
! require_once("constantes.inc.php");             // définition des constantes
! //require_once("fonctions.inc.php");              // concernant des fonctions 
transversales inclassables
! require_once("mysql.inc.php");                  // concernant mysql
! require_once("sessions.inc.php");             // concernant les sessions et 
initiations
! //require_once("usagers.inc.php");              // concernant la gestion des 
usagers
! //require_once("reservations.inc.php");         // concernant les 
réservations des postes en accès individuel par des usagers
! require_once("tableaux.inc.php");             // Concernant l'affichage 
transposé d'un tableau
! //require_once("siteweb.inc.php");              // concernant les pages perso 
des usagers et les sites web des structures
! require_once("dateheure.inc.php");            // concernant la manipulation 
des heures et des dates, formulaire, conversion...
! require_once("structures.inc.php");           // concernant les structures
! //require_once("initiations.inc.php");          // concernant les initiations 
et les thèmes
! //require_once("parcours.inc.php");             // concernant les parcours 
des usagers et leur positionnement
! 
  ?>
  <html>
***************
*** 30,34 ****
  <?
  $titr = "Planning d'utilisation des salles";
! $datemaj="14 décembre 2002";
  require("entete.inc.php");
  
--- 43,47 ----
  <?
  $titr = "Planning d'utilisation des salles";
! $datemaj="5 janvier 2003";
  require("entete.inc.php");
  

Index: tableaux.inc.php
===================================================================
RCS file: /cvsroot/epnadmin/epnadmin/tableaux.inc.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** tableaux.inc.php    1 Oct 2002 19:56:09 -0000       1.2
--- tableaux.inc.php    5 Jan 2003 20:34:01 -0000       1.3
***************
*** 3,7 ****
      Copyright (C) 2002 Loïc Dayot - Mairie Pierrefitte (93)
  
!     EPNadmin - Version 0.5.1 - 01/10/2002
  
      This program is free software; you can redistribute it and/or modify
--- 3,7 ----
      Copyright (C) 2002 Loïc Dayot - Mairie Pierrefitte (93)
  
!     EPNadmin - Version 0.6 - 01/01/2003
  
      This program is free software; you can redistribute it and/or modify
***************
*** 22,25 ****
--- 22,39 ----
  */
  
+ //require_once("header.inc.php");
+ //require_once("constantes.inc.php");             // définition des constantes
+ //require_once("fonctions.inc.php");              // concernant des fonctions 
transversales inclassables
+ //require_once("mysql.inc.php");                  // concernant mysql
+ //require_once("sessions.inc.php");             // concernant les sessions et 
initiations
+ //require_once("usagers.inc.php");              // concernant la gestion des 
usagers
+ //require_once("reservations.inc.php");         // concernant les 
réservations des postes en accès individuel par des usagers
+ //require_once("tableaux.inc.php");             // Concernant l'affichage 
transposé d'un tableau
+ //require_once("siteweb.inc.php");              // concernant les pages perso 
des usagers et les sites web des structures
+ //require_once("dateheure.inc.php");            // concernant la manipulation 
des heures et des dates, formulaire, conversion...
+ //require_once("structures.inc.php");           // concernant les structures
+ //require_once("initiations.inc.php");          // concernant les initiations 
et les thèmes
+ //require_once("parcours.inc.php");             // concernant les parcours 
des usagers et leur positionnement
+ 
  //                                                                            
 -
  //  Manipulation de tableaux transposés                                       
 -
***************
*** 135,137 ****
  
  
! ?>
--- 149,151 ----
  
  
! ?>
\ No newline at end of file

Index: themes.php
===================================================================
RCS file: /cvsroot/epnadmin/epnadmin/themes.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** themes.php  7 Aug 2002 17:31:05 -0000       1.2
--- themes.php  5 Jan 2003 20:34:01 -0000       1.3
***************
*** 3,7 ****
      Copyright (C) 2001, 2002 Bertand Pallie, Loïc Dayot
  
!     EPNadmin - Version 0.5
  
      This program is free software; you can redistribute it and/or modify
--- 3,7 ----
      Copyright (C) 2001, 2002 Bertand Pallie, Loïc Dayot
  
!     EPNadmin - Version 0.6
  
      This program is free software; you can redistribute it and/or modify
***************
*** 22,26 ****
  */
  
! require("header.inc.php");
  ?>
  <html>
--- 22,38 ----
  */
  
! require_once("header.inc.php");
! //require_once("constantes.inc.php");             // définition des constantes
! //require_once("fonctions.inc.php");              // concernant des fonctions 
transversales inclassables
! require_once("mysql.inc.php");                  // concernant mysql
! //require_once("sessions.inc.php");             // concernant les sessions et 
initiations
! //require_once("usagers.inc.php");              // concernant la gestion des 
usagers
! //require_once("reservations.inc.php");         // concernant les 
réservations des postes en accès individuel par des usagers
! //require_once("tableaux.inc.php");             // Concernant l'affichage 
transposé d'un tableau
! //require_once("siteweb.inc.php");              // concernant les pages perso 
des usagers et les sites web des structures
! //require_once("dateheure.inc.php");            // concernant la manipulation 
des heures et des dates, formulaire, conversion...
! //require_once("structures.inc.php");           // concernant les structures
! //require_once("initiations.inc.php");          // concernant les initiations 
et les thèmes
! //require_once("parcours.inc.php");             // concernant les parcours 
des usagers et leur positionnement
  ?>
  <html>
***************
*** 30,34 ****
  <?
  $titr = "Gestion des thèmes";
! $datemaj="7 aout 2002";
  require("entete.inc.php");
  
--- 42,46 ----
  <?
  $titr = "Gestion des thèmes";
! $datemaj="5 janvier 2003";
  require("entete.inc.php");
  
***************
*** 40,44 ****
      case 3 : // Confirmation d'effacement
          $res = recherche("initiations", "id_theme", $id_theme);
!         if (ligneSuivante($res))
          {
              echo "<p>Désolé, mais le thème est utilisé dans des initiations, 
il n'est pas possible de le supprimer.</p>\n";
--- 52,56 ----
      case 3 : // Confirmation d'effacement
          $res = recherche("initiations", "id_theme", $id_theme);
!         if (mysql_fetch_object($res))
          {
              echo "<p>Désolé, mais le thème est utilisé dans des initiations, 
il n'est pas possible de le supprimer.</p>\n";
***************
*** 77,81 ****
         if (!$operations) $operations=11;
         echo "<table align=center border=1>
!              <form name=\"modi\" method=\"post\" action=\"\">\n";
         if ($id_usage)
            echo "<input type=\"hidden\" name=\"id_theme\" 
value=\"$id_theme\">\n";
--- 89,93 ----
         if (!$operations) $operations=11;
         echo "<table align=center border=1>
!              <form name=\"modi\" method=\"post\" action=\"$PHP_SELF\">\n";
         if ($id_usage)
            echo "<input type=\"hidden\" name=\"id_theme\" 
value=\"$id_theme\">\n";
***************
*** 124,126 ****
  echo "</body></html>\n";
  require("footer.inc.php");
! ?>
--- 136,138 ----
  echo "</body></html>\n";
  require("footer.inc.php");
! ?>
\ No newline at end of file

Index: usagers.inc.php
===================================================================
RCS file: /cvsroot/epnadmin/epnadmin/usagers.inc.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** usagers.inc.php     29 Nov 2002 21:34:20 -0000      1.5
--- usagers.inc.php     5 Jan 2003 20:34:01 -0000       1.6
***************
*** 3,7 ****
      Copyright (C) 2001, 2002 Bertand Pallie, Loïc Dayot - Mairie Pierrefitte 
(93)
  
!     EPNadmin - Version 0.5.1 - 30/09/2002
  
      This program is free software; you can redistribute it and/or modify
--- 3,7 ----
      Copyright (C) 2001, 2002 Bertand Pallie, Loïc Dayot - Mairie Pierrefitte 
(93)
  
!     EPNadmin - Version 0.6 - 05/01/2003
  
      This program is free software; you can redistribute it and/or modify
***************
*** 22,25 ****
--- 22,39 ----
  */
  
+ //require_once("header.inc.php");
+ require_once("constantes.inc.php");             // définition des constantes
+ //require_once("fonctions.inc.php");              // concernant des fonctions 
transversales inclassables
+ require_once("mysql.inc.php");                  // concernant mysql
+ //require_once("sessions.inc.php");             // concernant les sessions et 
initiations
+ //require_once("usagers.inc.php");              // concernant la gestion des 
usagers
+ //require_once("reservations.inc.php");         // concernant les 
réservations des postes en accès individuel par des usagers
+ //require_once("tableaux.inc.php");             // Concernant l'affichage 
transposé d'un tableau
+ //require_once("siteweb.inc.php");              // concernant les pages perso 
des usagers et les sites web des structures
+ require_once("dateheure.inc.php");            // concernant la manipulation 
des heures et des dates, formulaire, conversion...
+ //require_once("structures.inc.php");           // concernant les structures
+ //require_once("initiations.inc.php");          // concernant les initiations 
et les thèmes
+ //require_once("parcours.inc.php");             // concernant les parcours 
des usagers et leur positionnement
+ 
  //                                                                            
 -
  //  Gestion des usagers et des crédits                                        
 -
***************
*** 43,47 ****
  function formRechercheUsager($operation_retour=0, $format="AUTONOME", 
$mode="")
  {
! global $usagev, $datev, $debutv, $finv, $id_horaire, $id_materiel, 
$id_session, $id_usager, $id_usager2,$PHP_SELF;
     echo "<form name=\"rechercheusager\" method=\"post\" action=\"$PHP_SELF\">
           <input type=\"hidden\" name=\"operation\" 
value=\"$operation_retour\">";
--- 57,62 ----
  function formRechercheUsager($operation_retour=0, $format="AUTONOME", 
$mode="")
  {
! global $usagev, $datev, $debutv, $finv, $id_horaire, $id_materiel, 
$id_session, 
!        $id_usager, $id_usager2, $PHP_SELF;
     echo "<form name=\"rechercheusager\" method=\"post\" action=\"$PHP_SELF\">
           <input type=\"hidden\" name=\"operation\" 
value=\"$operation_retour\">";
***************
*** 125,129 ****
  function affiche_usager($usager, $FORMAT="LISTE", $couleur="#FFFFFF", 
$mode="USAGER")
  {
! global $tarifs, $isadmin, $id_session, $datev, $id_materiel, $id_horaire, 
$usagev, $info, $modifier, $programmer, $supprimer;
     switch ($FORMAT)
     {
--- 140,145 ----
  function affiche_usager($usager, $FORMAT="LISTE", $couleur="#FFFFFF", 
$mode="USAGER")
  {
! global $tarifs, $isadmin, $id_session, $datev, $id_materiel, $id_horaire, 
!        $usagev, $info, $modifier, $programmer, $supprimer;
     switch ($FORMAT)
     {
***************
*** 290,292 ****
     return $nouveaucredit;
  }
! ?>
--- 306,308 ----
     return $nouveaucredit;
  }
! ?>
\ No newline at end of file

Index: usagers.php
===================================================================
RCS file: /cvsroot/epnadmin/epnadmin/usagers.php,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -r1.15 -r1.16
*** usagers.php 31 Dec 2002 21:12:44 -0000      1.15
--- usagers.php 5 Jan 2003 20:34:01 -0000       1.16
***************
*** 3,7 ****
      Copyright (C) 2001, 2002 Bertand Pallie, Loïc Dayot - Mairie de 
Pierrefitte (93)
  
!     EPNadmin - Version 0.5.4
  
      This program is free software; you can redistribute it and/or modify
--- 3,7 ----
      Copyright (C) 2001, 2002 Bertand Pallie, Loïc Dayot - Mairie de 
Pierrefitte (93)
  
!     EPNadmin - Version 0.6
  
      This program is free software; you can redistribute it and/or modify
***************
*** 22,26 ****
  */
  
! require("header.inc.php");
  ?>
  <html>
--- 22,39 ----
  */
  
! require_once("header.inc.php");
! require_once("constantes.inc.php");             // définition des constantes
! require_once("fonctions.inc.php");              // concernant des fonctions 
transversales inclassables
! require_once("mysql.inc.php");                  // concernant mysql
! require_once("sessions.inc.php");             // concernant les sessions et 
initiations
! require_once("usagers.inc.php");              // concernant la gestion des 
usagers
! require_once("reservations.inc.php");         // concernant les réservations 
des postes en accès individuel par des usagers
! //require_once("tableaux.inc.php");             // Concernant l'affichage 
transposé d'un tableau
! //require_once("siteweb.inc.php");              // concernant les pages perso 
des usagers et les sites web des structures
! require_once("dateheure.inc.php");            // concernant la manipulation 
des heures et des dates, formulaire, conversion...
! //require_once("structures.inc.php");           // concernant les structures
! //require_once("initiations.inc.php");          // concernant les initiations 
et les thèmes
! require_once("parcours.inc.php");             // concernant les parcours des 
usagers et leur positionnement
! 
  ?>
  <html>

Index: usages.php
===================================================================
RCS file: /cvsroot/epnadmin/epnadmin/usages.php,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** usages.php  20 Feb 2002 14:20:37 -0000      1.1.1.1
--- usages.php  5 Jan 2003 20:34:01 -0000       1.2
***************
*** 1,134 ****
! <?
! /*
!     Copyright (C) 2001, 2002 Bertand Pallie, Loïc Dayot
! 
!     EPNadmin - Version 0.1
! 
!     This program is free software; you can redistribute it and/or modify
!     it under the terms of the GNU General Public License as published by
!     the Free Software Foundation; either version 2 of the License, or
!     (at your option) any later version.
! 
!     This program is distributed in the hope that it will be useful,
!     but WITHOUT ANY WARRANTY; without even the implied warranty of
!     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
!     GNU General Public License for more details.
! 
!     You should have received a copy of the GNU General Public License
!     along with this program; if not, write to the Free Software
!     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
! 
!     http://epnadmin.pierrefitte93.fr/
! */
! 
! require("header.inc.php");
! ?>
! <html>
! <head>
! <title>Bienvenue sur le site de l'Arobase Espace Public Multim&eacute;dia de 
Pierrefitte sur seine </title>
! <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
! <?
! $titr = "Gestion des usages";
! $datemaj="1er février 2002";
! require("entete.inc.php");
! 
! if (!$isadmin | !$id_usager)   // Si ce n'est pas l'administrateur, on ne 
prend que le parcours de la personne identifiée
!    $id_usager=$id_login;
! if ($isadmin)
!    $idu="id_usager=$id_usager";
! else
!    $idu="";
! 
! // Début du contenu de la page
! 
! if($isadmin)
! {
!   switch($operation)
!   {
!     case 3 : // Confirmation d'effacement
!         $res = recherche("utilisation_postes", "id_usage", $id_usage);
!         if (ligneSuivante($res))
!         {
!             echo "<p>Désolé, mais l'usage est utilisé dans des utilisations 
de poste, il n'est pas possible de la supprimer.</p>\n";
!         }
!         else
!         {
!           echo "<form name=\"form\" method=\"post\" action=\"\">
!                    <input type=\"hidden\" name=\"id_usage\" 
value=\"$id_usage\">
!                    <input type=\"hidden\" name=\"id_usager\" 
value=\"$id_usager\">
!                    <input type=\"hidden\" name=\"operation\" value=\"31\">
!                 <p><b><font color=\"#FF0000\">Suis-je sûr(e) de vouloir 
annuler l'usage ";
!           $usage=trouveUsage($id_usage);
!           echo "$usage->nom ?</font></b></p>
!                 <p><input type=\"submit\" name=\"Annuler\" value=\"Oui, je 
supprime l'usage.\"></p>
!                </form>";
!         }
!         break;
!     case 31:  // Efface final
!         $query = "DELETE FROM usages WHERE id='$id_usage'";
!         $result = executeRequete($query);
!         echo "Usage effacé.";
!         break;
! 
!     case 2:   // Formulaire modification
!         $query = "SELECT * FROM usages WHERE id='$id_usage'";
!         $result = executeRequete($query);
!         if (!$u=mysql_fetch_object($result))
!         {
!            echo "<p>L'usage n'apparaît pas dans la base</p>\n";
!            break;
!         }
!         $operations=21;
!         $usage=$u->nom;
! 
!     case 1:  // Ajoute d'une nouvelle session
!        if (!$operations) $operations=11;
!        echo "<table align=center border=1>
!              <tr><td align=center>Usage :</td></tr><tr><td align=center>
!              <form name=\"modi\" method=\"post\" action=\"\">\n";
!        if ($id_usage)
!           echo "<input type=\"hidden\" name=\"id_usage\" 
value=\"$id_usage\">\n";
!        echo "<input type=\"hidden\" name=\"id_usager\" value=\"$id_usager\">
!              <input type=\"hidden\" name=\"operation\" value=\"$operations\">
!              <input type=\"text\" name=\"usage\" value=\"$usage\" size=\"32\" 
maxlength=\"30\">
!              </td></tr><tr><td align=center>
!              <input type=\"submit\" name=\"Envoyer\" value=\"Mettre à jour\">
!              </td></tr></table></form>\n";
!        break;
! 
!     case 11:  // Ajout final
!         $query = "INSERT INTO usages (nom) VALUES (\"$usage\")";
!         if ($result = executeRequete($query))
!            echo "<p>Usage ajouté.</p>";
!         break;
! 
!     case 21:  // Modif final
!         $query = "UPDATE usages SET nom=\"$usage\" WHERE id='$id_usage'";
!         if ($result = executeRequete($query))
!           echo "<p>Usage modifié.</p>";
!         break;
! 
!     default : // liste des usages
!         $req = "SELECT * FROM usages ORDER BY nom";
!         $res = executeRequete($req);
!         echo "<table align=center border=1>
!               <tr><td colspan=3><h3 align=center>Liste des 
usages</h3></td></tr>\n";
!         while ($u= mysql_fetch_object($res))
!         {
!            echo "<tr><td>$u->nom</td>
!                  <td><a 
href=\"?operation=2&id_usage=$u->id&$idu\">$modifier</a></td>
!                  <td><a 
href=\"?operation=3&id_usage=$u->id&$idu\">$supprimer</a></td></tr>\n";
!         }
!         echo "<tr><td colspan=3 align=right><a 
href=\"?operation=1&$idu\">$ajouter</a></td></tr>\n";
!         echo "</table>\n";
!         break;
!     }  // switch
!     echo "<p>Voir la <a href=\"usages.php?$idu\">liste des usages</a></p>\n";
! } // if
! else
!   echo "<p>Mais, vous ne devriez pas être là. Qu'y faites-vous ?</p>\n";
! 
! include("basdepage.inc.php");
! echo "</body></html>\n";
! require("footer.inc.php");
! ?>
--- 1,147 ----
! <?
! /*
!     Copyright (C) 2001, 2002 Bertand Pallie, Loïc Dayot
! 
!     EPNadmin - Version 0.5
! 
!     This program is free software; you can redistribute it and/or modify
!     it under the terms of the GNU General Public License as published by
!     the Free Software Foundation; either version 2 of the License, or
!     (at your option) any later version.
! 
!     This program is distributed in the hope that it will be useful,
!     but WITHOUT ANY WARRANTY; without even the implied warranty of
!     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
!     GNU General Public License for more details.
! 
!     You should have received a copy of the GNU General Public License
!     along with this program; if not, write to the Free Software
!     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
! 
!     http://epnadmin.pierrefitte93.fr/
! */
! 
! require_once("header.inc.php");
! //require_once("constantes.inc.php");             // définition des constantes
! //require_once("fonctions.inc.php");              // concernant des fonctions 
transversales inclassables
! require_once("mysql.inc.php");                  // concernant mysql
! //require_once("sessions.inc.php");             // concernant les sessions et 
initiations
! //require_once("usagers.inc.php");              // concernant la gestion des 
usagers
! require_once("reservations.inc.php");         // concernant les réservations 
des postes en accès individuel par des usagers
! //require_once("tableaux.inc.php");             // Concernant l'affichage 
transposé d'un tableau
! //require_once("siteweb.inc.php");              // concernant les pages perso 
des usagers et les sites web des structures
! //require_once("dateheure.inc.php");            // concernant la manipulation 
des heures et des dates, formulaire, conversion...
! //require_once("structures.inc.php");           // concernant les structures
! //require_once("initiations.inc.php");          // concernant les initiations 
et les thèmes
! //require_once("parcours.inc.php");             // concernant les parcours 
des usagers et leur positionnement
! 
! ?>
! <html>
! <head>
! <title>Bienvenue sur le site de l'Arobase Espace Public Multim&eacute;dia de 
Pierrefitte sur seine </title>
! <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
! <?
! $titr = "Gestion des usages";
! $datemaj="5 janvier 2003";
! require("entete.inc.php");
! 
! if (!$isadmin | !$id_usager)   // Si ce n'est pas l'administrateur, on ne 
prend que le parcours de la personne identifiée
!    $id_usager=$id_login;
! if ($isadmin)
!    $idu="id_usager=$id_usager";
! else
!    $idu="";
! 
! // Début du contenu de la page
! 
! if($isadmin)
! {
!   switch($operation)
!   {
!     case 3 : // Confirmation d'effacement
!         $res = recherche("utilisation_postes", "id_usage", $id_usage);
!         if (mysql_fetch_object($res))
!         {
!             echo "<p>Désolé, mais l'usage est utilisé dans des utilisations 
de poste, il n'est pas possible de la supprimer.</p>\n";
!         }
!         else
!         {
!           echo "<form name=\"form\" method=\"post\" action=\"\">
!                    <input type=\"hidden\" name=\"id_usage\" 
value=\"$id_usage\">
!                    <input type=\"hidden\" name=\"id_usager\" 
value=\"$id_usager\">
!                    <input type=\"hidden\" name=\"operation\" value=\"31\">
!                 <p><b><font color=\"#FF0000\">Suis-je sûr(e) de vouloir 
annuler l'usage ";
!           $usage=trouveUsage($id_usage);
!           echo "$usage->nom ?</font></b></p>
!                 <p><input type=\"submit\" name=\"Annuler\" value=\"Oui, je 
supprime l'usage.\"></p>
!                </form>";  //'
!         }
!         break;
!     case 31:  // Efface final
!         $query = "DELETE FROM usages WHERE id='$id_usage'";
!         $result = executeRequete($query);
!         echo "Usage effacé.";
!         break;
! 
!     case 2:   // Formulaire modification
!         $query = "SELECT * FROM usages WHERE id='$id_usage'";
!         $result = executeRequete($query);
!         if (!$u=mysql_fetch_object($result))
!         {
!            echo "<p>L'usage n'apparaît pas dans la base</p>\n";
!            break;
!         }
!         $operations=21;
!         $usage=$u->nom;
! 
!     case 1:  // Ajoute d'une nouvelle session
!        if (!$operations) $operations=11;
!        echo "<table align=center border=1>
!              <tr><td align=center>Usage :</td></tr><tr><td align=center>
!              <form name=\"modi\" method=\"post\" action=\"\">\n";
!        if ($id_usage)
!           echo "<input type=\"hidden\" name=\"id_usage\" 
value=\"$id_usage\">\n";
!        echo "<input type=\"hidden\" name=\"id_usager\" value=\"$id_usager\">
!              <input type=\"hidden\" name=\"operation\" value=\"$operations\">
!              <input type=\"text\" name=\"usage\" value=\"$usage\" size=\"32\" 
maxlength=\"30\">
!              </td></tr><tr><td align=center>
!              <input type=\"submit\" name=\"Envoyer\" value=\"Mettre à jour\">
!              </td></tr></table></form>\n";
!        break;
! 
!     case 11:  // Ajout final
!         $query = "INSERT INTO usages (nom) VALUES (\"$usage\")";
!         if ($result = executeRequete($query))
!            echo "<p>Usage ajouté.</p>";
!         break;
! 
!     case 21:  // Modif final
!         $query = "UPDATE usages SET nom=\"$usage\" WHERE id='$id_usage'";
!         if ($result = executeRequete($query))
!           echo "<p>Usage modifié.</p>";
!         break;
! 
!     default : // liste des usages
!         $req = "SELECT * FROM usages ORDER BY nom";
!         $res = executeRequete($req);
!         echo "<table align=center border=1>
!               <tr><td colspan=3><h3 align=center>Liste des 
usages</h3></td></tr>\n";
!         while ($u= mysql_fetch_object($res))
!         {
!            echo "<tr><td>$u->nom</td>
!                  <td><a 
href=\"?operation=2&id_usage=$u->id&$idu\">$modifier</a></td>
!                  <td><a 
href=\"?operation=3&id_usage=$u->id&$idu\">$supprimer</a></td></tr>\n";
!         }
!         echo "<tr><td colspan=3 align=right><a 
href=\"?operation=1&$idu\">$ajouter</a></td></tr>\n";
!         echo "</table>\n";
!         break;
!     }  // switch
!     echo "<p>Voir la <a href=\"usages.php?$idu\">liste des usages</a></p>\n";
! } // if
! else
!   echo "<p>Mais, vous ne devriez pas être là. Qu'y faites-vous ?</p>\n";
! 
! include("basdepage.inc.php");
! echo "</body></html>\n";
! require("footer.inc.php");
! ?>
\ No newline at end of file

--- 6cartes.php DELETED ---

--- barcode.php DELETED ---

--- cartes.php DELETED ---

--- commandes.php DELETED ---

--- debug.php DELETED ---

--- i25object.php DELETED ---

--- inventaire_materiel.php DELETED ---

--- test.php DELETED ---





reply via email to

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