<?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/get.inc.php");
opensession("Sadmin",true);


?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
<TITLE>Stats Site</TITLE>
<BASE TARGET="_self">
<link rel="stylesheet" href="../include/general.css"  />
</HEAD>
<body class="arial_sadmin" link="white" vlink="white" alink="white">

<?php
//Recup départements
$sqldep="SELECT LEFT(rne,3) as dep, count(etab_id) as nb FROM etablissements
		GROUP BY dep";
$resdep=query($sqldep);
$tabdep=array();
while (list($depart, $nb)=mysql_fetch_array($resdep)) {
	$tabdep[$depart]=$nb;
}

?>

<p class="titre" align="center">Résultats statistiques graphiques</p><hr>
<p>&nbsp;</p>
<p class="centre attention">Patientez, certains calculs risquent d'être longs ...</p><br/><br/>
<center>
<table width='80%' border='1' class='encadre_pres' cellpadding='5' cellspacing='0'>
<tr><td class="sadmin_gauche">Histogramme des effectifs par item par département :</td>
<td class="sadmin_centre">
<form action='histo_departements.php' name="2" target=_blank>
<br />Choisissez le niveau :
<?php
      print "<select name='niv' value='' size='1'>\n";
      print "  <option value='1'>".getlibellenivo('niv1')."</option>\n";
      print "  <option value='2' selected>".getlibellenivo('niv2')."</option>\n";
      print "  <option value='3'>".getlibellenivo('niv3')."</option>\n";
      print "</select>&nbsp;&nbsp;\n";
      print "<input type='hidden' name='btn_niv' value='ok'>";
?>
&nbsp;</td>
<td  class="sadmin_droite"><br/><input type=submit class='coul' value='Lancement du calcul'></form></td></tr>
<tr><td  COLSPAN=3>&nbsp;</td></tr>
<tr><td  class="sadmin_gauche">Répartition des validations par discipline :</td>
<td class="sadmin_centre"><form action='stats_acad_disciplines.php' name="3" target=_blank>
<br />Choisissez  les types d'établissements et le secteur :<br /><br /> 
<select name="typetab">
  <option value="tous">Tous</options>
  <option value="E">Ecoles</options>
  <option value="C" selected>Collèges</options>
  <option value="L">Lycées</options>
</select>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<select name="departement">
<option value='aca'>Académie</option> 
<?php
foreach($tabdep as $dep=>$eff) {
	print "<option value=\"$dep\">".getDepartement($dep)."</OPTION>\n";
}
?>
</select>
&nbsp;
</td>
<td class="sadmin_droite"><br/>
<input type=submit class='coul' value='Lancement du calcul'>
</form></td></tr>
</table></center>

<?php
//<-!td><form action='stocke_attest.php'><BUTTON type=submit>&nbsp;Lancement du calcul&nbsp;</BUTTON></form>-->
?>

</BODY>
</HTML>