Feedback Formulaire

This commit is contained in:
Divlo
2019-12-21 19:32:05 +01:00
parent b43367cdcd
commit ae2c0ad184
9 changed files with 187 additions and 5 deletions

View File

@ -0,0 +1,34 @@
<!-- Config -->
<?php include("../php/config.php");?>
<!-- Header -->
<?php include("../incl/header.php");?>
<!-- Page Content -->
<div class="container">
<h1><span class="important"><?php echo $title?></span> :</h1>
<p class="pt-3 text-center"><?php echo $description?> <br>
Note : Tous les feedbacks publiés sont publics. <br>
<a href="/views/feedback-list.php">La liste des feedbacks publiés</a>
</p>
<form id="feedbackForm" method="POST">
<div class="form-group">
<label for="pseudo">Entrez votre pseudo :</label>
<input name="pseudo" type="text" id="pseudo" placeholder="Divlo" class="form-control">
<br>
<label for="feedback">Votre message :</label>
<textarea name="feedback" type="text" id="feedback" placeholder="Soyez le plus précis possible dans votre ressenti afin que je puisse améliorer au mieux le projet. ⚙️" class="form-control"></textarea>
<br>
<div class="form-row text-center">
<div class="col-12">
<button type="submit" id="submitFeedback" class="btn btn-dark text-center">Envoyer</button>
</div>
</div>
<br> <br>
<p class="results text-center"></p>
</div>
</form>
</div>
<!-- Footer -->
<?php include("../incl/footer.php");?>

42
views/feedback-list.php Normal file
View File

@ -0,0 +1,42 @@
<!-- Config -->
<?php include("../php/config.php");?>
<!-- Header -->
<?php include("../incl/header.php");?>
<!-- Page Content -->
<div class="container">
<h1><span class="important"><?php echo $title?></span> :</h1>
<p class="pt-3 text-center">
<?php echo $description?> <br>
<a href="/views/feedback-form_view.php">Revenir au formulaire</a>
</p>
<table class="table table-bordered mt-5">
<thead>
<tr>
<th class="text-center" scope="col">Pseudo</th>
<th class="text-center" scope="col">Feedback</th>
<th class="text-center" scope="col">Statut</th>
</tr>
</thead>
<tbody class="text-center">
<?php
$path = $_SERVER['DOCUMENT_ROOT'];
// Connexion à la base de donnée
require_once($path.'/php/config_database/connectDB.php');
$req = $bdd->query("SELECT * FROM functiondivlofr_feedback");
while($row = $req->fetch()) { ?>
<tr>
<td class="important"><?= $row['pseudo'] ?></td>
<td><?= $row['feedback'] ?></td>
<td><?= $row['statut'] ?></td>
</tr>
<?php } ?>
</tbody>
</table>
<!-- Footer -->
<?php include("../incl/footer.php");?>