Location: PHPKode > projects > EmploiNet : a timetable web manager > EmploiNet/v0.8.0/BarreDeMenu.php3
<?
include("Definition.php");

function buildEndOfPage()
{
    global $version;
    print("</TD></TR></TABLE>\n");
    print("<TABLE ALIGN=CENTER WIDTH=100% BORDER=1><TR><TD WIDTH=80%><i><font size=2><a href=\"http://emploinet.sourceforge.net\" target=_blank>EmploiNet</a> Version $version</font></i></TD>");
    setlocale(LC_TIME,"fr");
    print("<TD BGCOLOR=YELLOW nowrap><DIV ALIGN=RIGHT><I><FONT SIZE=2>".strftime("%A %d %B %Y")." - Semaine ".(strftime("%W")+1)."</FONT></I></DIV>\n");
    print("</TD></TR></TABLE>\n");
    print("</BODY>\n");
    print("</HTML>\n");
}

function buildHeader($title,$display=true)
{
    global $lienlogo;
    global $racinedusite;
    global $logo;

    print("<HTML>\n");
    print("<HEAD>\n");
    print("<TITLE>Gestion des emplois du temps</TITLE>\n");
    print ("<link href=\"$racinedusite/style.css\" rel=\"stylesheet\" type=\"text/css\">\n");
    print ("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">");
    print("</HEAD>\n");
    print("<BODY>\n");

    if ($display==1)
	{
	    print("<TABLE ALIGN=CENTER WIDTH=\"100%\" HEIGHT=\"95%\" BORDER=\"1\">\n");
	    print("<TR><TD VALIGN=\"TOP\">\n");
	    print("<TABLE WIDTH=\"100%\" HEIGHT=\"100\" cellspacing=0 cellpading=0>\n");
	    print("<TR>\n");
	    print("<TD WIDTH=\"20%\" ALIGN=\"CENTER\">\n");
	    print("<A tabindex=-1 HREF=\"$lienlogo\" target=\"_blank\" ><img src=\"$logo\" border=0></A>\n");
	    print("</TD>\n");
	    print("<TD ALIGN=CENTER VALIGN=MIDDLE>\n");
	    print("<TABLE WIDTH=100% >\n");
	    print("<TR><TD class=\"entete\" WIDTH=100% >\n");
	    print("$title\n");
	    print("</TD></TR>\n");
	    print("</TABLE>\n");	
	    print("</TD>\n");
	    print("<TD WIDTH=20% ALIGN=CENTER>\n");
	    print("<A tabindex=-1 HREF=\"$lienlogo\" target=\"_blank\" ><img src=\"$logo\" border=0></A>\n");
	    print("</TD>\n");
	    print("</TR>\n");
	    print("</TABLE>\n");
	}
}

function displayMode($mode)
{
    print("<TABLE BGCOLOR=black BORDER=0 CELLSPACING=1><TR><TD BGCOLOR=white>\n");
    print("<TABLE BGCOLOR=yellow BORDER=0><TR><TD>\n");
    print("<FONT COLOR=black SIZE=-2 FACE=arial>Mode <i>$mode</i></font><BR>\n");
    print("</TD></TR></TABLE></TD></TR></TABLE>");
}

function makeMenuStart()
{
    print("<BLOCKQUOTE>");
    print("<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0>\n");
}

function makeMenuEnd()
{
    print("</TABLE>\n");
    print("</BLOCKQUOTE>\n");
}

function makeMenuTitle($title)
{
    print("<TR><TD>\n");
    print("<TABLE ALIGN=left BGCOLOR=black BORDER=0 CELLSPACING=1>");
    print("<TR>");
    print("<TD BGCOLOR=green WIDTH=120>\n");
    print("<FONT COLOR=white SIZE=-2 FACE=arial><i>$title<i/></font>\n");
    print("</TD><TD BGCOLOR=white></TD>\n");
}

function makeButton($url,$text,$id_session)
{
    print("<TD BGCOLOR=\"#ffffcc\" VALIGN=center ALIGN=center NOWRAP WIDTH=80><FONT COLOR=black SIZE=-2 FACE=arial><i>");
    // lien
    if ($id_session!="") print("<a tabindex=-1 href=\"$url?id_session=$id_session\">$text</a>");
    else print("<a tabindex=-1 href=\"$url\">$text</a>");
    print("</i></FONT></TD>\n");
}

function makeLastButton($url,$text,$id_session)
{
    makeButton($url,$text,$id_session);
    print("</TR></TABLE></TD></TR>");
    print("<TR><TD></TD></TR>");
}

function buildMenuBar($id_session,$user_type,$fileName,$display)
{
    global $racinedusite;
    if ($display)
	{

	    switch ($user_type)
		{

		    /**********************************************************************
		     ************ ADMINISTRATEUR
		     **********************************************************************/

		case 0: // Administrateur

		    displayMode("Administrateur");
		    makeMenuStart();

		    // Menu general	
		    makeMenuTitle("G&eacute;n&eacute;ral");
		    makeButton("Administration/gestionnaire.php3","Gestionnaire",$id_session);
		    makeButton("Administration/departement.php3","Département",$id_session);
		    makeButton("Administration/professeur.php3","Enseignant",$id_session);
		    makeButton("Administration/vacances.php3","Vacances",$id_session);
		    makeButton("Administration/mot_de_passe.php3","Mot&nbsp;de&nbsp;passe",$id_session);
		    makeButton("Administration/ResetBase.php3","Effacement de la base",$id_session);
		    makeLastButton("index.php?login=''","Deconnexion","");

		    // Menu Promotion
		    makeMenuTitle("Promotion");
		    makeButton("Administration/promotion.php3","Promotion",$id_session);
		    makeButton("Administration/periode.php3","Periode",$id_session);
		    makeButton("Administration/etudiant.php3","Etudiant",$id_session);
		    makeButton("Administration/groupe.php3","Groupe",$id_session);
		    makeButton("Administration/appartient.php3","Constitution<BR>des&nbsp;groupes",$id_session);
		    makeButton("Administration/changement_promo.php","Changement<BR>de&nbsp;promotion",$id_session);
		    makeLastButton("Administration/SupprimerEtudiant_promo.php","Suppression&nbsp;des&nbsp;étudiants<BR>d'une&nbsp;promotion",$id_session);

		    // Menu Salle	
		    makeMenuTitle("Salle");
		    makeButton("Salle/salle.php3","Salle",$id_session);
		    makeButton("Salle/reparti_salle.php","Répartition<BR>des&nbsp;salles",$id_session);
		    makeLastButton("Salle/FormulaireSalle.php3","Emploi&nbsp;du&nbsp;temps<BR>d'une&nbsp;salle",$id_session);

		    // Menu Matiere	
		    makeMenuTitle("Matière");
		    makeButton("Administration/matiere.php3","Matière",$id_session);
		    makeButton("Administration/diviser.php3","Volume&nbsp;horaire<BR>des&nbsp;enseignements",$id_session);
		    makeLastButton("Administration/assurer.php3","Répartition&nbsp;des<BR>enseignements",$id_session);

		    // Menu Emploi du temps	
		    makeMenuTitle("Emploi&nbsp;du&nbsp;temps");
		    makeButton("edt/Planification/reparti.php3","Planification<BR>grossi&egrave;re&nbsp;par&nbsp;semaine",$id_session);
		    makeButton("edt/Planification/planifie.php3","Planification<BR>d&eacute;taill&eacute;e<BR>par&nbsp;semaine",$id_session);
		    makeLastButton("edt/Planification/planifie_jour.php","Planification<BR>d&eacute;taill&eacute;e<BR>par&nbsp;jour",$id_session);

		    // Menu Fiches
		    makeMenuTitle("Fiches&nbsp;administratives");
		    makeButton("FichesAdmin/formulaire_serv_prev_annu.php3","Fiches&nbsp;pr&eacute;visionnelles<BR>enseignant",$id_session);
		    makeButton("FichesAdmin/formulaire_serv_annu.php3","Fiches&nbsp;de&nbsp;suivi",$id_session);
		    makeButton("FichesAdmin/formulaire_charge_formation_prof.php3","Fiches de charge<BR>d'une promotion avec prof",$id_session);
		    makeLastButton("FichesAdmin/formulaire_choix_suivi_departement.php3","Fiches&nbsp;de&nbsp;bilan<BR>d&eacute;partement",$id_session);

		    // Menu Trombinoscope	
		    makeMenuTitle("Trombinoscope");
		    makeButton("Formulaire/FormulaireGroupebis.php3","Groupe",$id_session);
		    makeLastButton("Formulaire/FormulairePromotionb.php3","Promotion",$id_session);

		    // Menu Gestion des projets
		    makeMenuTitle("Gestion&nbsp;des&nbsp;projets");
		    makeButton("projet/ajoutProjet.php","Ajout&nbsp;un<BR>projet",$id_session);
		    makeButton("projet/modifProjet.php","Modification<BR>d'un&nbsp;projet",$id_session);
		    makeButton("projet/validerProjet.php","Validation&nbsp;d'un<BR>projet",$id_session);
		    makeLastButton("projet/listeProjetValides.php","Liste&nbsp;définitive<BR>des&nbsp;projets",$id_session);
		    makeMenuEnd();
		    break;

		    /**********************************************************************
		     ************ PROFESSEUR
		     **********************************************************************/

		case 1: // Professeur

		    displayMode("Professeur");
		    makeMenuStart();

		    // Menu general	
		    makeMenuTitle("G&eacute;n&eacute;ral");
		    makeButton("Administration/mot_de_passe.php3","Mot&nbsp;de&nbsp;passe",$id_session);
		    makeLastButton("index.php?login=''","Deconnexion","");

		    // Menu Emploi du temps	
		    makeMenuTitle("Emploi&nbsp;du&nbsp;temps");
		    makeButton("Formulaire/FormulaireGroupe.php3","Emploi&nbsp;du&nbsp;temps<BR>d'un&nbsp;groupe",$id_session);
		    makeButton("Formulaire/FormulairePromotion.php3","Emploi&nbsp;du&nbsp;temps<BR>d'une&nbsp;promotion",$id_session);
		    makeLastButton("Formulaire/FormulaireProfesseur.php3","Emploi&nbsp;du&nbsp;temps<BR>d'un&nbsp;enseignant",$id_session);

		    // Menu Fiches
		    makeMenuTitle("Fiches&nbsp;administratives");
		    makeButton("FichesAdmin/fiche_prev_service_annuel.php3","Fiches&nbsp;pr&eacute;visionnelles<BR>enseignant",$id_session);
		    makeLastButton("FichesAdmin/suivi_hres.php3","Fiches&nbsp;de&nbsp;suivi",$id_session);


		    // Menu Trombinoscope	
		    makeMenuTitle("Trombinoscope");
		    makeButton("Formulaire/FormulaireGroupebis.php3","Groupe",$id_session);
		    makeLastButton("Formulaire/FormulairePromotionb.php3","Promotion",$id_session);

		    // Menu Gestion des projets
		    makeMenuTitle("Gestion&nbsp;des&nbsp;projets");
		    makeButton("projet/ajoutProjet.php","Ajout&nbsp;un<BR>projet",$id_session);
		    makeButton("projet/modifProjet.php","Modification<BR>d'un&nbsp;projet",$id_session);
		    makeLastButton("projet/listeProjetValides.php","Liste&nbsp;des&nbsp;projets",$id_session);

		    makeMenuEnd();
		    break;

		    /**********************************************************************
		     ************ ETUDIANT
		     **********************************************************************/

		case 2: // Etudiant
		    displayMode("Etudiant");
		    makeMenuStart();

		    // Menu general	
		    makeMenuTitle("G&eacute;n&eacute;ral");
		    makeButton("Administration/mot_de_passe.php3","Mot&nbsp;de&nbsp;passe",$id_session);
		    makeLastButton("index.php?login=''","Deconnexion","");

		    // Menu Emploi du temps	
		    makeMenuTitle("Emploi&nbsp;du&nbsp;temps");
		    makeButton("Formulaire/FormulaireEtudiant.php3","Mon&nbsp;emploi&nbsp;du&nbsp;temps",$id_session);
		    makeButton("Formulaire/FormulaireGroupe.php3","Emploi&nbsp;du&nbsp;temps<BR>d'un&nbsp;groupe",$id_session);
		    makeLastButton("Formulaire/FormulairePromotion.php3","Emploi&nbsp;du&nbsp;temps<BR>d'une&nbsp;promotion",$id_session);

		    // Menu Matiere	
		    makeMenuTitle("Matière");
		    makeLastButton("matieresSuivies/matiereEtudiant.php","Matières&nbsp;suivies",$id_session);

		    // Menu Gestion des projets
		    makeMenuTitle("Gestion&nbsp;des&nbsp;projets");
		    makeButton("projet/choixProjet.php","Choix&nbsp;du&nbsp;projet",$id_session);
		    makeButton("projet/versionImpression.php","Version&nbsp;imprimable<BR>de&nbsp;vos&nbsp;choix",$id_session);
		    makeLastButton("projet/listeProjetValides.php","Liste&nbsp;définitive<BR>des&nbsp;projets",$id_session);
				
		    makeMenuEnd();
		    break;

		    /**********************************************************************
		     ************ GESTIONNAIRE
		     **********************************************************************/

		case 3: // Gestionnaire

		    displayMode("Gestionnaire");
		    makeMenuStart();

		    // Menu general	
		    makeMenuTitle("G&eacute;n&eacute;ral");
		    makeButton("Administration/vacances.php3","Vacances",$id_session);
		    makeButton("Administration/mot_de_passe.php3","Mot&nbsp;de&nbsp;passe",$id_session);
		    makeLastButton("index.php?login=''","Deconnexion","");

		    // Menu Promotion
		    makeMenuTitle("Promotion");
		    makeButton("Administration/etudiant.php3","Etudiant",$id_session);
		    makeButton("Administration/groupe.php3","Groupe",$id_session);
		    makeButton("Administration/appartient.php3","Constitution<BR>des&nbsp;groupes",$id_session);
		    makeButton("Administration/changement_promo.php","Changement<BR>de&nbsp;promotion",$id_session);
		    makeLastButton("Administration/SupprimerEtudiant_promo.php","Suppression&nbsp;des&nbsp;étudiants<BR>d'une&nbsp;promotion",$id_session);

		    // Menu Emploi du temps	
		    makeMenuTitle("Emploi&nbsp;du&nbsp;temps");
		    makeButton("Salle/FormulaireSalle.php3","Emploi&nbsp;du&nbsp;temps<BR>d'une&nbsp;salle",$id_session);
		    makeButton("Formulaire/FormulairePromotion.php3","Emploi&nbsp;du&nbsp;temps<BR>d'une&nbsp;promotion",$id_session);
		    makeButton("edt/Planification/reparti.php3","Planification<BR>grossi&egrave;re&nbsp;par&nbsp;semaine",$id_session);
		    makeButton("edt/Planification/planifie.php3","Planification<BR>d&eacute;taill&eacute;e<BR>par&nbsp;semaine",$id_session);
		    makeLastButton("edt/Planification/planifie_jour.php","Planification<BR>d&eacute;taill&eacute;e<BR>par&nbsp;jour",$id_session);


		    // Menu Fiches
		    makeMenuTitle("Fiches&nbsp;administratives");
		    makeButton("FichesAdmin/formulaire_serv_annu.php3","Fiches&nbsp;de&nbsp;suivi",$id_session);
		    makeLastButton("FichesAdmin/formulaire_charge_formation_prof.php3","Fiches de charge<BR>d'une promotion avec prof",$id_session);

		    // Menu Trombinoscope	
		    makeMenuTitle("Trombinoscope");
		    makeButton("Formulaire/FormulaireGroupebis.php3","Groupe",$id_session);
		    makeLastButton("Formulaire/FormulairePromotionb.php3","Promotion",$id_session);

		    // Menu Gestion des projets
		    makeMenuTitle("Gestion&nbsp;des&nbsp;projets");
		    makeButton("projet/ajoutProjet.php","Ajout&nbsp;un<BR>projet",$id_session);
		    makeButton("projet/modifProjet.php","Modification<BR>d'un&nbsp;projet",$id_session);
		    makeButton("projet/validerProjet.php","Validation&nbsp;d'un<BR>projet",$id_session);
		    makeLastButton("projet/listeProjetValides.php","Liste&nbsp;définitive<BR>des&nbsp;projets",$id_session);
		    makeMenuEnd();
		    break;
		}
	}
    else
	{
	    print("<FONT SIZE=\"2\"><I>\n");
	    print("<A HREF=\"$racinedusite/index.php?id_session=$id_session\">Menu</A><BR>\n");
	    print("</I></FONT>\n");
	}
}
?>
Return current item: EmploiNet : a timetable web manager