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

This file is part of Gibii.

Gibii 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 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; 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/utiljs.php");
include("../include/get.inc.php");
opensession("Gest");

?>
<!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>Bandeau Gestion</title>
<link rel="stylesheet" href="<?php echo "../themes/".$etab_theme."/b2i.css" ?>">
<script language='javascript'>
function ouvrirfenetre(adr) { //nouvelle fenêtre
wliste=open(adr,'','dependent,top=100,left=300,height=250,width=450,resizable,scrollbars=no, menubar=no,toolbar=no, statusbar=no');
}
</script>
</head>
<body class="gest_header">
<?php


//définition des variables pour le tableau
//Dénomination EXCEL A1 A2 A3 B1 B2 B3 C1 C2 C3
$A1=date("d/m/Y")."&nbsp;<br><b>".$etab_nom."</b>";
$A2="Gestionnaire";
$A3="<a href=\"http://wikigibii.ac-bordeaux.fr/index.php/Documentation_Gestionnaire\" target=\"_blank\"><img src=\"../themes/".$etab_theme."/aide.gif\" Title=\"aide\" alt=\"aide\" border =\"0\"></a>";
$sep = '&nbsp;';
// chgt de theme non autorisé aux adjoints
if ($etab_chgt_theme==1){
        if ((isset($sess_statut_prof) && ($sess_statut_prof & 2)) or (isset($sess_statut_prof) && ($sess_statut_prof & 4))){
        $A3.="";
        }
        else $A3.=$sep."<a href=\"javascript:ouvrirfenetre('../outils/choisir_theme.php?statut=Gest')\"><img src=\"../themes/".$etab_theme."/chgt_theme.gif\" Title=\"Changer le thème\" Alt=\"Changer le thème\"></a>";

}
/*************** Partie modifiée par Béa *****************************/

if (isset($sess_statut_prof) && ($sess_statut_prof & 4) ) { // gestionnaire-adjoint
    $c = base64_encode(serialize(array('d' => '0', 's' => 2)));
/*    $A3='<a href="../prof/muer.php?c='.$c.'" target="_top"  class="muer">'.$A3.'</a>';*/
    $A3.="$sep<a href=\"../prof/muer.php?c=$c\" target=\"_top\"  class=\"muer\"><img src=\"../themes/".$etab_theme."/vers_prof.gif\" Title=\"Mode Prof (".$sess_login.")\" alt=\"Mode Prof\" border =\"0\"></a>";
}

if (isset($sess_statut_prof) && ($sess_statut_prof & 2) ) { // admin-adjoint
    $c = base64_encode(serialize(array('d' => '1', 's' => 2)));
    $A3.=$sep."<a href=\"../prof/muer.php?c=$c\"  target=\"_top\" class=\"muer\"><img src=\"../themes/".$etab_theme."/vers_admin.gif\" Title=\"Mode Admin-adjoint\" alt=\"Mode Admin-adjoint\" border =\"0\"></a>";
    $A2.="-adjoint";
    }

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


$B1="../themes/".$etab_theme."/b2i_gest.gif";
$C1=oldsession();
$C2="";
$C3="";

?>

<table border="0" width="100%" align="center">
<!--   ligne 1  -->
   <tr class="titre_prof" VALIGN="top"  height="70">
        <td width='25%'>
            <span class="titre_prof_header"><?php echo $A1."</span><br><br>";
            switch ($MODULE) {
              case 'Melia':
                    echo "C.L.V.&nbsp;";
                    break;
              case 'GiBii':
                    echo "B2i&nbsp;";
                    break;
              case 'GiCii':
                    echo "C2i&nbsp;";
                    break;
              }
              echo getlibellenivo($etab_niveau);
              ?>
        </td>
        <td rowspan="3" valign="top">
            <p style="text-align:center;"><a href="gest_ut.php" target="_top" title="Retour accueil gestionnaire" accesskey="M"><img src="<?php echo $B1; ?>" border="0" alt=" Retour Menu gestion"></a></p>
        </td>
        <td >
            <?php print $C1; ?>
        </td>
    </tr>
<!--   ligne 2  -->
    <tr class="titre_prof" valign="top" height="35">
        <td >
           <strong><?php echo $A2; ?></strong>
        </td>
        <td style="text-align:right;" valign="middle">
          <?php
           if (($etab_typauth_id==3)and ($entree_SSO==1)) boutonlogin("$CAS_RETOUR");
              else boutonlogin("../login/login.php");
          ?>
        </td>
    </tr>
<!--   ligne 3  -->
    <tr class="titre_prof" valign="top" height="45">
        <td >
            <p><?php echo $A3; ?></p>
        </td>
        <td >
            <p>&nbsp;</p>
        </td>
    </tr>

</table>

</body>


</html>