Skip to content

Commit

Permalink
tyt
Browse files Browse the repository at this point in the history
  • Loading branch information
adriendelagneau committed Aug 6, 2021
1 parent 2f3a632 commit ba93281
Show file tree
Hide file tree
Showing 15 changed files with 85 additions and 42 deletions.
9 changes: 8 additions & 1 deletion app/Controllers/front/FrontController.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,15 @@ function connexionUser($pseudoUser, $pwdUser){

require "app/Views/back/tableauDeBordUser.php";
}else {
require "app/Views/front/accueil.php";

echo '<script>alert("Vos identifiants sont incorrects");</script>';
$slides = new \Project\Models\ImagesManager();
$allSlides = $slides->getSlides();
$aLaUne = new \Project\Models\ImagesManager();
$allALaUne = $aLaUne->getALaUne();
$reducs = new \Project\Models\ReducManager();
$allReducs = $reducs->allReducs();
require "app/Views/front/accueil.php";
}
}else {
echo '<script>alert("Vous n avez pas rempli les champs !");</script>';
Expand Down
2 changes: 2 additions & 0 deletions app/Models/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@ protected function dbConnect()
}
}
}

//$bdd = new \PDO("mysql:host=185.98.131.149;dbname=b166e1518483;charset=utf8","b166e1518483","Tintin56@@@");
4 changes: 2 additions & 2 deletions app/Views/back/aLaUne.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
<div class="card_articles">
<p><?= $aLaUne["title"] ?></p>
<p><img src="<?= $aLaUne["imgAdress"] ?>" alt="<?= $aLaUne['title'] ?>"> </p>
<button>

<a href="indexAdmin.php?action=deleteALaUne&id=<?= $aLaUne['id'] ?>"> supprimer cette
image</a>
</button>

</div>
<?php } ?>

Expand Down
9 changes: 5 additions & 4 deletions app/Views/back/listBoissons.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,13 @@
<div class="article_content">Description : <?= $boissons["productDescription"] ?></div>
<div class="article_content">Prix : <?= $boissons["prix"] ?>€</div>
<div>
<button>

<a href="indexAdmin.php?action=selectBoisson&id=<?= $boissons['id'] ?>">
update boisson</a>
</button>
<button>

<a href="indexAdmin.php?action=deleteBoisson&id=<?= $boissons['id'] ?>">
supprimer cette boisson</a>
</button>

</div>
</div>
<?php } ?>
Expand All @@ -30,13 +29,15 @@
<textarea name="productDescription" id="productDescription" cols="30" rows="10"></textarea>
<label for="prix">Prix :</label>
<input type="number" id="prix" name="prix">

<div>
<label for="isAlcool">Alcool :</label>
<input type="checkbox" id="isAlcool" name="isAlcool">
</div>
<div>
<button type="submit" data-dismiss="modal">Créer</button>
</div>

</form>
</div>
<?php $content = ob_get_clean()?>
Expand Down
7 changes: 3 additions & 4 deletions app/Views/back/listBurgers.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,14 @@
<div class="article_title">Nom : <?= $burgers["productName"] ?></div>
<div class="article_content">Ingrédients : <?= $burgers["productDescription"] ?></div>
<div class="article_content">Prix : <?= $burgers["prix"] ?>€</div>
<div> <button>
<div>
<a href="indexAdmin.php?action=selectBurger&id=<?= $burgers['id'] ?>"> update
burger</a>
</button>
<button>

<a href="indexAdmin.php?action=deleteBurger&id=<?= $burgers['id'] ?>">
supprimer
ce burger</a>
</button><br>
<br>
</div>
</div>
<?php } ?>
Expand Down
4 changes: 2 additions & 2 deletions app/Views/back/listEmails.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
<div class="article_content">Email : <?= $email["mail"] ?></div>
<div class="article_content">Sujet : <?= $email["sujet"] ?></div>
<div class="article_content">Contenu :<?= $email["content"] ?></div>
<button>

<a href="indexAdmin.php?action=deleteEmail&id=<?= $email['id'] ?>"> supprimer
ce mail</a>
</button>

</div>
<?php } ?>

Expand Down
12 changes: 7 additions & 5 deletions app/Views/back/listPizzas.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,13 @@
<div class="article_content">Ingrédients : <?= $pizza["productDescription"] ?></div>
<div class="article_content">Prix M : <?= $pizza["prixMoyenne"] ?>€</div>
<div class="article_content">Prix L : <?= $pizza["prixLarge"] ?>€</div>
<div> <button>
<div>
<a href="indexAdmin.php?action=selectPizza&id=<?= $pizza['id'] ?>"> update
pizza</a>
</button>
<button>

<a href="indexAdmin.php?action=deletePizzas&id=<?= $pizza['id'] ?>"> supprimer
cette pizza</a>
</button>

</div>
</div>
<?php } ?>
Expand All @@ -32,14 +31,17 @@
<input type="number" id="prixMoyenne" name="prixMoyenne">
<label for="prixLarge">Prix large :</label>
<input type="number" id="prixLarge" name="prixLarge">

<div>
<label for="isVeg">VEG</label>
<input type="checkbox" id="isVeg" name="isVeg">
</div>

<div>
<lablel for="isPigless">SANS PORC</lablel>
<label for="isPigless">SANS PORC</label>
<input type="checkbox" id="isPigless" name="isPigless">
</div>

<div>
<button type="submit" data-dismiss="modal">Créer</button>
</div>
Expand Down
7 changes: 3 additions & 4 deletions app/Views/back/listReducs.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,14 @@
<div class="article_content">Condition 1 : <?= $reducs["condition1"] ?></div>
<div class="article_content">Condition 2 : <?= $reducs["condition2"] ?></div>
<div class="article_content">Validité : <?= $reducs["validite"] ?></div>
<button>

<a href="indexAdmin.php?action=selectReduc&id=<?= $reducs['id'] ?>"> update
réduc</a>
</button>
<button>

<a href="indexAdmin.php?action=deleteReduc&id=<?= $reducs['id'] ?>">
supprimer
cette réduc</a>
</button>

</div>
<?php } ?>

Expand Down
3 changes: 0 additions & 3 deletions app/Views/back/listSlides.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@
<div class="card_articles">
<p><?= $slides["title"] ?></p>
<p><img src="<?= $slides["imgAdress"] ?>" alt="<?= $slides['title'] ?>"></p>
<button>
<a href="indexAdmin.php?action=deleteSlide&id=<?= $slides['id'] ?>"> supprimer cette
slide</a>
</button>
</div>
<?php } ?>

Expand All @@ -32,4 +30,3 @@
</div>
<?php $content = ob_get_clean(); ?>
<?php require 'templates/template.php'; ?>
</section>
2 changes: 1 addition & 1 deletion app/Views/back/templates/template.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html>
<html lang="fr">

<head>
<meta charset="utf-8">
Expand Down
2 changes: 1 addition & 1 deletion app/Views/back/templates/templateUser.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html>
<html lang='fr'>

<head>
<meta charset="utf-8">
Expand Down
1 change: 0 additions & 1 deletion app/Views/front/accueil.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,3 @@
</aside>
<?php $content = ob_get_clean(); ?>
<?php require "templates/template.php"; ?>
<script src="app/Public/front/js/slider.js"></script>
40 changes: 29 additions & 11 deletions app/Views/front/connexionAdmin.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,29 @@
<div id='is-show'>
<p id="close"><i class="fas fa-times"></i></p>
<h3>connexion</h3>
<form action="index.php?action=connexionAdmin" method="post">
<label for="pseudo">Prenom : </label>
<input type="text" placeholder="pseudo" name="pseudo" id="pseudo">
<label for="pwd">Password: </label>
<input type="password" placeholder="P W D" name="pwd" id="pwd">
<input type="submit" value="OK">
</form>
</div>
<!DOCTYPE html>

<html lang="fr">

<head>
<meta charset="utf-8">
<meta name="description" content="vente de pizzas & autres en livraison sur vannes">
<meta name="viewport" content="width=device-width, initial scale=1.0">
<title> Pizzas Express</title>
<script src="https://kit.fontawesome.com/f964f4d052.js" crossorigin="anonymous"></script>
<link rel="preconnect" href="https://fonts.gstatic.com">
<link rel="shortcut icon" type="image/png" href="app/Public/front/img/favicon.png">
<link rel="stylesheet" href="app/Public/front/css/style.css">
</head>
<body>
<div id='is-show'>
<p id="close"><i class="fas fa-times"></i></p>
<h3>connexion</h3>
<form action="index.php?action=connexionAdmin" method="post">
<label for="pseudo">Prenom : </label>
<input type="text" placeholder="pseudo" name="pseudo" id="pseudo">
<label for="pwd">Password: </label>
<input type="password" placeholder="P W D" name="pwd" id="pwd">
<input type="submit" value="OK">
</form>
</div>
</body>
</html>
22 changes: 20 additions & 2 deletions app/Views/front/connexionUser.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,20 @@
<div id='is-show'>
<!DOCTYPE html>

<html lang="fr">

<head>
<meta charset="utf-8">
<meta name="description" content="vente de pizzas & autres en livraison sur vannes">
<meta name="viewport" content="width=device-width, initial scale=1.0">
<title> Pizzas Express</title>
<script src="https://kit.fontawesome.com/f964f4d052.js" crossorigin="anonymous"></script>
<link rel="preconnect" href="https://fonts.gstatic.com">
<link rel="shortcut icon" type="image/png" href="app/Public/front/img/favicon.png">
<link rel="stylesheet" href="app/Public/front/css/style.css">
</head>
<body>
<div id='is-show'>
<p id="close"><i class="fas fa-times"></i></p>
<h3>connexion user</h3>
<form action="index.php?action=connexionUser" method="post">
Expand All @@ -9,4 +25,6 @@
<input type="submit" value="OK">
<!-- <p action ="index.php?action=deconnexionUser">deconnexion user</p> -->
</form>
</div>
</div>
</body>
</html>
3 changes: 2 additions & 1 deletion app/Views/front/templates/template.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<li><a href="index.php?action=toto"> Inscription</a></li>
</ul>
<div id="icons">
<div id="userIcon"><i class="fas fa-user"></i></div>
<div id="userIcon"><i class="fas fa-user"></i></div>
<div id="burger"><i class="fa fa-bars"></i></div>
</div>
</nav>
Expand Down Expand Up @@ -59,6 +59,7 @@
<script src="app/Public/front/js/app.js"></script>
<script src="app/Public/front/js/api.js"></script>
<script src="app/Public/front/js/ajax.js"></script>
<script src="app/Public/front/js/slider.js"></script>
</body>

</html>

0 comments on commit ba93281

Please sign in to comment.