Initial commit
Création de tous les dossiers et fichiers avec mise à part des constantes
This commit is contained in:
commit
4c71fb59b4
42 changed files with 2544 additions and 0 deletions
141
asides/aAccueil.php
Normal file
141
asides/aAccueil.php
Normal file
|
@ -0,0 +1,141 @@
|
|||
<aside>
|
||||
<form method="POST">
|
||||
|
||||
<input type="submit" class="button" value="Appliquer les filtres !"/>
|
||||
<input
|
||||
type="checkbox"
|
||||
class="dropdown"
|
||||
id="dropdownFiltres"
|
||||
name="dropdownFiltres"
|
||||
/>
|
||||
<label for="dropdownFiltres" class="dropdown">Trier les recettes</label>
|
||||
<div class="principaleAside">
|
||||
<div>
|
||||
Critère :
|
||||
<select name="typeTri">
|
||||
<option value="nom" <?= (isset($_SESSION['tri']['typeTri']) and $_SESSION['tri']['typeTri'] == "nom") ? 'selected' : '' ?>>
|
||||
nom
|
||||
</option>
|
||||
<option value="duree" <?= (isset($_SESSION['tri']['typeTri']) and $_SESSION['tri']['typeTri'] == "duree") ? 'selected' : '' ?>>
|
||||
temps de réalisation
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
<div>
|
||||
Ordre :
|
||||
<select name="sensTri">
|
||||
<option value="ASC" <?= (isset($_SESSION['tri']['sensTri']) and $_SESSION['tri']['sensTri'] == "ASC") ? 'selected' : '' ?>>
|
||||
croissant
|
||||
</option>
|
||||
<option value="DESC" <?= (isset($_SESSION['tri']['sensTri']) and $_SESSION['tri']['sensTri'] == "DESC") ? 'selected' : '' ?>>
|
||||
décroissant
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<input
|
||||
type="checkbox"
|
||||
class="dropdown"
|
||||
id="dropdownGenres"
|
||||
name="dropdownGenres"
|
||||
/>
|
||||
<label for="dropdownGenres" class="dropdown">Genres</label>
|
||||
<div class="principaleAside">
|
||||
<?php foreach($listeGenre as $id => $elem): ?>
|
||||
<div class="elemAside">
|
||||
<label for="genre[<?= $id ?>]">
|
||||
<?= $elem ?> :
|
||||
</label>
|
||||
<input
|
||||
type="checkbox"
|
||||
class="choixTri genre"
|
||||
name="genre[<?= $id ?>]"
|
||||
id="genre[<?= $id ?>]"
|
||||
<?= (!isset($_SESSION['tri']['genre']) or isset($_SESSION['tri']['genre'][$id])) ? 'checked' : '' ?>
|
||||
value="1"
|
||||
/>
|
||||
</div>
|
||||
<?php endforeach ?>
|
||||
</div>
|
||||
|
||||
<input
|
||||
type="checkbox"
|
||||
class="dropdown"
|
||||
id="dropdownIngredients"
|
||||
name="dropdownIngredients"
|
||||
/>
|
||||
<label for="dropdownIngredients" class="dropdown">Ingrédients</label>
|
||||
<div class="principaleAside">
|
||||
<div>
|
||||
<label for="rechercheIngredients">
|
||||
Rechercher un ingrédient :
|
||||
</label>
|
||||
<input
|
||||
type="text"
|
||||
id="rechercheIngredients"
|
||||
/>
|
||||
</div>
|
||||
<?php foreach($listeIngredient as $id => $elem): ?>
|
||||
<div class="elemAside divIngredient" nom="div-<?= $elem['nom'] ?>">
|
||||
<label>
|
||||
<?= $elem['nom'] ?> :
|
||||
</label>
|
||||
<span>
|
||||
<input
|
||||
type="radio"
|
||||
name="ingredient[<?= $elem['id'] ?>]"
|
||||
class="choixTri requis"
|
||||
value="1"
|
||||
title="Obligatoire"
|
||||
<?= (isset($_SESSION['tri']['ingredient'][$id]) and $_SESSION['tri']['ingredient'][$id] == 1)? 'checked' : ''?>
|
||||
/><input
|
||||
type="radio"
|
||||
name="ingredient[<?= $elem['id'] ?>]"
|
||||
class="choixTri autorise"
|
||||
value="0"
|
||||
title="Indifférent"
|
||||
<?= (empty($_SESSION['tri']['ingredient'][$id]) or $_SESSION['tri']['ingredient'][$id] == 0)? 'checked' : ''?>
|
||||
/><input
|
||||
type="radio"
|
||||
name="ingredient[<?= $elem['id'] ?>]"
|
||||
class="choixTri interdit"
|
||||
value="-1"
|
||||
title="Interdit"
|
||||
<?= (isset($_SESSION['tri']['ingredient'][$id]) and $_SESSION['tri']['ingredient'][$id] == -1)? 'checked' : ''?>
|
||||
/>
|
||||
</span>
|
||||
</div>
|
||||
<?php endforeach ?>
|
||||
</div>
|
||||
|
||||
<input
|
||||
type="checkbox"
|
||||
class="dropdown"
|
||||
id="dropdownUstensiles"
|
||||
name="dropdownUstensiles"
|
||||
/>
|
||||
<label for="dropdownUstensiles" class="dropdown">Ustensiles</label>
|
||||
<div class="principaleAside">
|
||||
<?php foreach($listeUstensile as $id => $elem): ?>
|
||||
<div class="elemAside">
|
||||
<label for="ustensile[<?= $elem['id'] ?>]" title="Je ne dispose pas de l'ustensile">
|
||||
<?= $elem['nom'] ?> :
|
||||
</label>
|
||||
<span>
|
||||
<input
|
||||
type="checkbox"
|
||||
name="ustensile[<?= $elem['id'] ?>]"
|
||||
id="ustensile[<?= $elem['id'] ?>]"
|
||||
class="choixTri ustensile"
|
||||
value="1"
|
||||
<?= (isset($_SESSION['tri']['ustensile']) and $_SESSION['tri']['ustensile'][$id] == 1)? 'checked' : ''?>
|
||||
/>
|
||||
</span>
|
||||
</div>
|
||||
<?php endforeach ?>
|
||||
</div>
|
||||
<input type="hidden" name="tri" value="true" />
|
||||
<input type="submit" class="button" value="Appliquer les filtres !"/>
|
||||
</form>
|
||||
</aside>
|
134
asides/aRecette.php
Normal file
134
asides/aRecette.php
Normal file
|
@ -0,0 +1,134 @@
|
|||
<?php switch($pageExiste): ?>
|
||||
<?php case 2 ?> <!-- Cas de modification d'une recette -->
|
||||
<?php case -1 ?> <!-- Cas de création d'une recette -->
|
||||
<?php if($_SESSION['auth']): ?>
|
||||
<aside>
|
||||
<input
|
||||
type="checkbox"
|
||||
class="dropdown"
|
||||
id="dropdownIngredients"
|
||||
name="dropdownIngredients"
|
||||
/>
|
||||
<label for="dropdownIngredients" class="dropdown">Ingrédients</label>
|
||||
<div class="principaleAside">
|
||||
<div>
|
||||
<label for="rechercheIngredients">
|
||||
Rechercher un ingrédient :
|
||||
</label>
|
||||
<input
|
||||
type="text"
|
||||
id="rechercheIngredients"
|
||||
/>
|
||||
</div>
|
||||
<?php foreach($listeIngredients as $id => $elem): ?>
|
||||
<div class="<?= isset($listeIngredientsRecette[$id]) ? 'important' : '' ?> divIngredient" nom="div-<?= $elem['nom'] ?>">
|
||||
<input
|
||||
class="autorise cb ingredient"
|
||||
title="Ajouter"
|
||||
type="checkbox"
|
||||
nom="<?= $elem['nom'] ?>"
|
||||
idIngredient="<?= $id ?>"
|
||||
name="ingredient<?= $id ?>"
|
||||
id="cb.ingredient<?= $id ?>"
|
||||
<?= isset($listeIngredientsRecette[$id]) ? 'checked' : '' ?>
|
||||
/>
|
||||
<label for="cb.ingredient<?= $elem['id'] ?>" class="petitLabel">
|
||||
<?= $elem['nom'] ?>
|
||||
</label>
|
||||
</div>
|
||||
<?php endforeach ?>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
</div>
|
||||
|
||||
<input
|
||||
type="checkbox"
|
||||
class="dropdown"
|
||||
id="dropdownUstensiles"
|
||||
name="dropdownUstensiles"
|
||||
/>
|
||||
<label for="dropdownUstensiles" class="dropdown">Ustensiles</label>
|
||||
<div class="principaleAside">
|
||||
<?php foreach($listeUstensiles as $id => $elem): ?>
|
||||
<div <?= isset($listeUstensilesRecette[$id]) ? 'class="important"' : '' ?>>
|
||||
<input
|
||||
class="autorise cb ustensile"
|
||||
title="Ajouter"
|
||||
type="checkbox"
|
||||
nom="<?= $elem['nom'] ?>"
|
||||
idUstensile="<?= $id ?>"
|
||||
name="ustensile<?= $id ?>"
|
||||
id="cb.ustensile<?= $id ?>"
|
||||
<?= isset($listeUstensilesRecette[$id]) ? 'checked' : '' ?>
|
||||
/>
|
||||
<label for="cb.ustensile<?= $id ?>" class="petitLabel">
|
||||
<?= $elem['nom'] ?>
|
||||
</label>
|
||||
</div>
|
||||
<?php endforeach ?>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
</div>
|
||||
|
||||
<input
|
||||
type="checkbox"
|
||||
class="dropdown"
|
||||
id="dropdownPreparations"
|
||||
name="dropdownPreparations"
|
||||
/>
|
||||
<label for="dropdownPreparations" class="dropdown">Modes de préparations</label>
|
||||
<div class="principaleAside">
|
||||
<?php foreach($listePreparations as $id => $elem): ?>
|
||||
<div class="<?= isset($listePreparationsRecette[$id]) ? 'important' : '' ?>">
|
||||
<input
|
||||
class="autorise cb preparation"
|
||||
title="Ajouter"
|
||||
type="checkbox"
|
||||
nom="<?= $elem['nom'] ?>"
|
||||
idPreparation="<?= $id ?>"
|
||||
name="preparation<?= $id ?>"
|
||||
id="cb.preparation<?= $id ?>"
|
||||
<?= isset($listePreparationsRecette[$id]) ? 'checked' : '' ?>
|
||||
/>
|
||||
<label for="cb.preparation<?= $id ?>" class="petitLabel">
|
||||
<?= $elem['nom'] ?>
|
||||
</label>
|
||||
</div>
|
||||
<?php endforeach ?>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
</div>
|
||||
|
||||
<input
|
||||
type="checkbox"
|
||||
class="dropdown"
|
||||
id="dropdownRecettes"
|
||||
name="dropdownRecettes"
|
||||
/>
|
||||
<label for="dropdownRecettes" class="dropdown">Recettes</label>
|
||||
<div class="principaleAside">
|
||||
<?php foreach($listeRecettes as $id => $elem): ?>
|
||||
<div <?= isset($listeReutiliseRecette[$id]) ? 'class="important"' : '' ?>>
|
||||
<input
|
||||
class="autorise cb reutilise"
|
||||
title="Ajouter"
|
||||
type="checkbox"
|
||||
nom="<?= $elem['nom'] ?>"
|
||||
idRecette="<?= $id ?>"
|
||||
name="reutilise[<?= $id ?>]"
|
||||
id="cb.reutilise<?= $id ?>"
|
||||
<?= isset($listeReutiliseRecette[$id]) ? 'checked' : '' ?>
|
||||
/>
|
||||
<label for="cb.reutilise<?= $id ?>" class="petitLabel">
|
||||
<?= $elem['nom'] ?>
|
||||
</label>
|
||||
</div>
|
||||
<?php endforeach ?>
|
||||
</div>
|
||||
</aside>
|
||||
<?php endif ?>
|
||||
<?php break; ?>
|
||||
<?php endswitch ?>
|
1
asides/void.php
Normal file
1
asides/void.php
Normal file
|
@ -0,0 +1 @@
|
|||
<aside class="void"></aside>
|
Loading…
Add table
Add a link
Reference in a new issue