l3.cas-d-astre/data/menugauche.inc.php
2009-05-01 08:39:36 +00:00

64 lines
1.8 KiB
PHP

<!-- Menu qui dépend des acces autorisés à l'utilisateur !-->
<div id="menuGauche">
<h1>Informations</h1>
<p>
<img src="/icones/users.png" alt="Icone" />
<?php
$userline= "Utilisateur: ";
if ($_SESSION["member"]){
$userline.= "<b>" . $_SESSION["member"] ."</b>"."<br />".
"<a href=\"logout.php\">D&eacute;connexion</a>";
} else {
$userline.="inconnu.";
}
print $userline;
?>
</p>
<?php
$actionMenu=new SecureMenu("Actions",0);
$actionMenu->addItem("index","Sommaire","index.php");
$actionMenu->setItemLevel("index",3);
$daMenu=new SecureMenu("Demandes d'Achats",0);
$daMenu->addItem("DAajoute","Cr&eacute;ation","DAajoute.php");
$daMenu->setItemLevel("DAajoute",1);
$daMenu->addItem("DAliste","Gestion Demandes d'achat","DAliste.php");
$daMenu->setItemLevel("DAliste",1);
$daMenu->addItem("DAstock","Gestion des stocks","DAstock.php");
$daMenu->setItemLevel("DAstock",1);
$fournMenu=new SecureMenu("Fournisseurs",0);
$fournMenu->addItem("Faddsup","Gestion fournisseurs","fournisseurs.php");
$fournMenu->setItemLevel("Faddsup",2);
$fournMenu->addItem("Paddsup","Gestion produits","produits.php");
$fournMenu->setItemLevel("Paddsup",2);
$commMenu=new SecureMenu("Commandes",0);
$commMenu->addItem("Ccreate","Cr&eacute;ation commande","commandes.php");
$commMenu->setItemLevel("Ccreate",2);
//$commMenu->addItem("Csuiv","Suivi commande","Csuivi.php");
//$commMenu->setItemLevel("Csuiv",2);
if ($_SESSION["member"] and $_SESSION["userInfo"]){
$actionMenu->setCurrentLevel($_SESSION["userInfo"]->getAccessLevel());
$daMenu->setCurrentLevel($_SESSION["userInfo"]->getAccessLevel());
$fournMenu->setCurrentLevel($_SESSION["userInfo"]->getAccessLevel());
$commMenu->setCurrentLevel($_SESSION["userInfo"]->getAccessLevel());
print $actionMenu->toHTML();
print $daMenu->toHTML();
print $fournMenu->toHTML();
print $commMenu->toHTML();
}
?>
</div>