<?php
#=
/****************************************************************************
Copyright 2002, Daniel Deycard, Jacques Messines, Stéphanie Roussel, Jean-Marie Treins
(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/eleves_liste.inc.php");
$statut=$_REQUEST['statut'];
opensession($statut,false);
$PHP_SELF=basename($_SERVER['PHP_SELF']);
//print_r($_REQUEST);
//print_r($_POST);
//print_r($_SESSION);

print "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n";
?>
<HTML>

<HEAD>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
<TITLE>nom1</TITLE>
<BASE TARGET="form">
<link rel="stylesheet" href="<?php echo "../themes/".$etab_theme."/b2i.css" ?>">
</HEAD>

<?php
switch ($statut) {
       case "Prof":
           echo "<BODY class='arialprof'>";

                  $sql_Prof="SELECT eleves.*, divcod
                  FROM eleves, classes, lien_profs_classes, lien_eleves_classes
                  where eleves.eleve_id=lien_eleves_classes.eleve_id
                  and lien_eleves_classes.classe_id=classes.classe_id
                  AND lien_profs_classes.classe_id=classes.classe_id
                  AND lien_profs_classes.prof_id=$sess_mec_id
                  AND classes.etab_id=$etab_id
                  and eleves.annee='$sess_ascol' ";
           break;
       case "Admin":
                echo "<BODY class='arialadmin'>";
           break;
       case "Gest":
               echo "<BODY class='arialgest'>";
               $sql_Gest="select eleves.*,divcod
               from eleves,classes, lien_eleves_classes
               where eleves.eleve_id=lien_eleves_classes.eleve_id
               and lien_eleves_classes.classe_id=classes.classe_id
               and classes.etab_id=$etab_id
               and eleves.annee='$sess_ascol' ";   //pas de order by ni de ; : c'est fait dans liste_eleves_tries

           break;
   }
print "<p class=\"titre_petit\" align=\"center\">Résultats des élèves</p>\n";


$ch="sql_".$statut;
$sql=$$ch;

$cible="gest_eleve_items.php?statut=$statut&id=";
if (!isset($tripar)) $tripar="classe";

$w=liste_eleves_triee($tripar,$sql,$cible, ""); // pourquoi ce $br <br />&nbsp;&nbsp;&nbsp;&nbsp;");
print $w;

?>
</p>
</BODY>
</HTML>