<?php
#=
/****************************************************************************
Copyright 2002, Daniel Deycard, Jacques Messines, Alain Pomirol
(CATICE Académie de Bordeaux)

This file is part of Gibii/Melia.

Gibii/Melia 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.

Gibii/Melia 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 Gibii/Melia; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

****************************************************************************/

include("../include/vars_adm.php");
include("../include/util.inc.php");
include("../include/get.inc.php");
include("../include/eleve.inc.php");
include("../include/utiljs.php");
include("phpmygibii.inc.php");

connecte($host,$user,$mdp,$db);
//opensession("Admin",false);
recuprequest();
$php_self=basename($_SERVER['PHP_SELF']);

//paramètres d'entrée : eid, etab, clid et op.
//Depuis la popup : si etab a changé, clid n'est plus valable

//Programme principal ----------------------------------------------------------
//==============================================================================


entetehtml("Fiche détaillée");
switch ($op) {
    case 'entree' :     //vient de reponse.php : $eid
        //globalise les variables de eleves,comptes,classes,etablissements
        $tcoord=recupbase_user($eid); //... et retourne aussi le tableau associatif
        $tetab=recupbase_etab($etab);
        $tclasses=recupbase_classes($etab);
        $tacquis=obtenu($eid);   //tableau
        $tdemandes=demande($eid);//lire "demandé" ; tableau
        break;
    case 'retourpop' :  //vient de detail_pop.php : $eid, $etab
        $tcoord=recupbase_user($eid);  //... pas etab ni classes
        $tetab=recupbase_etab($etab);
        $tclasses=recupbase_classes($etab);
        $tacquis=obtenu($eid);   //tableau
        $tdemandes=demande($eid);//lire "demandé" ; tableau
        break;
    case 'apressubmit' :
        $tcoord=recupbase($eid);  //globalise les variables unom, prenom, ... et retourne aussi le tableau associatif
        modifier();
    default : exit();
    }

print "<form name=\"form2\" method=\"post\" action=\"details.php?$eid=$eid&etab=$etab\" />";
print "<table width=\"100%\" border=\"0\">\n";
formulaire_details($eid,$tcoord,$tetab,$tclasses);
lignevide();
lignevide('Items obtenus');
checkboxes($tacquis,'resultatschk',$eid);
lignevide();
lignevide('Items demandés');
checkboxes($tdemandes,'demandeschk',$eid);
lignevide();

boutons("Enregistrer les modifications"," Fermer la fenêtre ",true);
print "</table>\n";
print "</form>\n";
?>


</body></html>