2023-04-11 19:11:26 +02:00
|
|
|
<section id="principal">
|
|
|
|
<h2>Liste des ingrédients existants :</h2>
|
|
|
|
<ul>
|
2025-02-23 23:56:23 +01:00
|
|
|
<?php foreach($listeIngredient as $id => $ingredient): ?>
|
|
|
|
<a href="index.php?page=element&type=ingredient&id=<?=$ingredient['id']?>"><li><?=$ingredient['nom']?> (nbrecettes)</li></a>
|
2023-04-11 19:11:26 +02:00
|
|
|
<?php endforeach ?>
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
<?php if($_SESSION['auth']): ?>
|
|
|
|
<p>Ajouter un ingrédient :</p>
|
|
|
|
<form method="POST" action="index.php?page=ajouterElement">
|
|
|
|
<label for="nomIngredient">Nom :</label>
|
2025-02-23 23:56:23 +01:00
|
|
|
<input type="text" name="nomIngredient" title="<?=DESC_CHAMPS_NOM?>" required />
|
2023-04-11 19:11:26 +02:00
|
|
|
<br/>
|
|
|
|
<p>Disponibilité :</p>
|
|
|
|
<?php foreach (lANNEE as $mois):?>
|
|
|
|
·
|
|
|
|
<input type="checkbox" name="<?=$mois?>" id="<?=$mois?>" checked="true"/>
|
|
|
|
<label for="<?=$mois?>"><?=$mois?></label>
|
|
|
|
<?php endforeach ?>
|
|
|
|
·
|
|
|
|
<br/>
|
|
|
|
<input type="submit" value="Ajouter l'ingrédient"/>
|
|
|
|
</form>
|
|
|
|
<?php endif ?>
|
|
|
|
|
|
|
|
<h2>Liste des ustensiles existants :</h2>
|
|
|
|
<ul>
|
|
|
|
<?php foreach($listeUstensile as $ustensile): ?>
|
2025-02-23 23:56:23 +01:00
|
|
|
<a href="index.php?page=element&type=ustensile&id=<?=$ustensile['id']?>"><li><?=$ustensile['nom']?></li></a>
|
2023-04-11 19:11:26 +02:00
|
|
|
<?php endforeach ?>
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
<?php if($_SESSION['auth']): ?>
|
|
|
|
<p>Ajouter un ustensile :</p>
|
|
|
|
<form method="POST" action="index.php?page=ajouterElement">
|
|
|
|
<label for="nomUstensile">Nom :</label>
|
2025-02-23 23:56:23 +01:00
|
|
|
<input type="text" name="nomUstensile" title="<?=DESC_CHAMPS_NOM?>" required />
|
2023-04-11 19:11:26 +02:00
|
|
|
<br/>
|
|
|
|
<input type="submit" value="Ajouter l'ustensile"/>
|
|
|
|
</form>
|
|
|
|
<?php endif ?>
|
|
|
|
|
|
|
|
<h2>Liste des unités existantes :</h2>
|
|
|
|
<ul>
|
|
|
|
<?php foreach($listeUnite as $unite): ?>
|
2025-02-23 23:56:23 +01:00
|
|
|
<a href="index.php?page=element&type=unite&id=<?=$unite['id']?>"><li><?=$unite['nom']?></li></a>
|
2023-04-11 19:11:26 +02:00
|
|
|
<?php endforeach ?>
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
<?php if($_SESSION['auth']): ?>
|
|
|
|
<p>Ajouter une unité :</p>
|
|
|
|
<form method="POST" action="index.php?page=ajouterElement">
|
|
|
|
<label for="nomUnite">Symbole :</label>
|
|
|
|
<input type="text" name="nomUnite" required />
|
|
|
|
<br/>
|
|
|
|
<input type="submit" value="Ajouter l'unité"/>
|
|
|
|
</form>
|
|
|
|
<?php endif ?>
|
|
|
|
</section>
|