72 lines
1.4 KiB
PHP
72 lines
1.4 KiB
PHP
<?php
|
|
|
|
/*
|
|
* Initialisation des chemins d'acces aux librairies
|
|
* de fonctions
|
|
*/
|
|
include("includes.inc.php");
|
|
$page=new Page(__FILE__);
|
|
$_SESSION["referer"]=basename(__FILE__);
|
|
|
|
$page->logCheck();
|
|
|
|
$page->startHeader();
|
|
?>
|
|
|
|
<link rel="stylesheet" href="/styles/contenuDA.css" />
|
|
|
|
<?php
|
|
$page->endHeader();
|
|
|
|
$listeDA_cree=new ListeDA("CREE",$_SESSION["userInfo"]->getID());
|
|
$listeDA_cree->loadListe();
|
|
|
|
switch($_POST["action"]) {
|
|
case "Supprimer": {
|
|
// TODO: supprimer demande d'achat de la table
|
|
// ainsi que les lda correspondant etc.
|
|
$listeDA_cree->supprimeDA($_POST["demande_achat"]);
|
|
};
|
|
break;
|
|
default: break;
|
|
}
|
|
|
|
$page->startContent();
|
|
?>
|
|
|
|
<div id="contenuDA">
|
|
|
|
<h1>Demandes d'achats en cours</h1>
|
|
|
|
<h2>Demandes d'achats non traitées</h2>
|
|
<?php
|
|
|
|
print "<form name=\"form\" "
|
|
."method=\"post\" "
|
|
."action=\"DAliste.php\" "
|
|
."enctype=\"application/x-www-form-urlencoded\" "
|
|
.">";
|
|
|
|
print $listeDA_cree->toHTML();
|
|
if (count($listeDA_cree->_liste)>0){
|
|
print "<input type=\"submit\" name=\"action\" value=\"Supprimer\" />";
|
|
}
|
|
print "</form>";
|
|
|
|
?>
|
|
|
|
<h2>Demandes d'achat en cours de traitement</h2>
|
|
|
|
<?php
|
|
$listeDA_envoye=new ListeDA("COMM",$_SESSION["userInfo"]->getID());
|
|
$listeDA_envoye->loadListe();
|
|
print $listeDA_envoye->toHTML(0);
|
|
?>
|
|
|
|
</div>
|
|
<?php
|
|
// on affiche les lignes de demande d'achat
|
|
$page->endContent();
|
|
print $page->toHTML();
|
|
|
|
?>
|