-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvue_admin.php
More file actions
96 lines (87 loc) · 4.19 KB
/
vue_admin.php
File metadata and controls
96 lines (87 loc) · 4.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
<!DOCTYPE html>
<html lang="fr" dir="ltr">
<head>
<meta charset="utf-8">
<title>TP HTML CSS</title>
<link rel="stylesheet" href="style.css">
<!-- Balises META (Référencement) -->
<meta name="Content-Type" content="UTF-8">
<meta name="Content-Language" content="fr">
<meta name="Description" content="TP PHP SQL noté du 25/05/2018 encadré par M. FELLER">
<meta name="Keywords" content="tp php sql js isep ">
<meta name="Author" content="Nicolas Le Borgne">
<meta name="Identifier-Url" content="index.php">
<meta name="Revisit-After" content="15 days">
<meta name="Robots" content="all">
<meta name="Rating" content="general">
<meta name="Distribution" content="global">
<meta name="Category" content="software">
</head>
<body>
<header>
<img class="img_logo" src="ISEP.png" alt="">
<ul class="liste_header">
<li><a href="index.php">Accueil</a></li>
<li><a href="">Acutalités</a></li>
<li><a href="">Ajouter un sujet</a></li>
<li><a href="">Contact</a></li>
<?php echo $deconnexion; ?>
</ul>
</header>
<div class="nom">
<?php echo $nom; ?>
</div>
<h1>Actualités | ISEP</h1>
<div> <!-- Séparateur -->
<!-- Liste des actualités -->
<div class="liste_sujets">
<?php
$i = 0;
while ($data = $news->fetch()) {
echo '<form action="modifierSujet.php" method="post" id="formModifierSujet">';
$i+=1;
$id = $data['ID'];
//echo '<textarea name="name'.$id.'" cols="50" rows="10" form="formModifierSujet" >'.htmlspecialchars($data['contenu_news']).'</textarea> <br>';
echo '<input style="width:300px" name="name'.$id.'" value="'.htmlspecialchars($data["contenu_news"]).'"><br>';
echo "<input type='text' style='display:none;' name='ID' value ='" . $id . "'>";
echo '<span class="italic">Posté par </span><strong>' . htmlspecialchars($data['nom']) . '</strong> le <span class="italic"><input type="date" name="date'.$id.'" value="' . htmlspecialchars($data['date_message']) . '"></span></p>';
echo '<span class="italic">Catégorie : </span><strong>' . htmlspecialchars($data['nom_categorie']) .'</span></strong></p>';
echo '<input class="bouton_submit" type="submit" name="modifSujet'.$id.'" value="Modif">';
echo '</form>';
// La ligne suivante n'est pas censée se trouver dans la vue, or je n'ai pas trouvé le moyen de la placer dans le controleur.
$commentaire = getCommentaires($data['ID_news']);
echo '<form action="" method="post" id="formAjoutCommentaire">';
while ($dataCommentaire = $commentaire->fetch()) {
echo '<p> >> ' . htmlspecialchars($dataCommentaire['contenu']) . '</p>';
echo '<span class="italic">Posté par </span><strong>' . htmlspecialchars($dataCommentaire['nom']) . '</strong> le <span class="italic">' . htmlspecialchars($dataCommentaire['date']) . '</span></p>';
}
echo "</form>";
}
?>
</div>
<div class="poster_sujet">
<h2>Filtrer :</h2>
<form method="POST" action="controller_actualites.php" id="newsForm">
<p>Par auteur du sujet :</p>
<select name="auteurs" id="">
<option value="0">Tous (<?php echo $nbreAuteurs['count(distinct(ID_utilisateur))']?>)</option>
<?php while ($dataAuteurs = $auteurs->fetch()) {
echo "<option value='" . $dataAuteurs['ID'] . "'>" . $dataAuteurs['nom'] . "</option>";
} ?>
</select>
<p>Par catégorie :</p>
<select name="categorie" id="">
<option value="0">Toutes</option>
<?php while ($dataCategorie = $categories->fetch()) {
echo "<option value='" . $dataCategorie['ID'] . "'>".$dataCategorie['nom_categorie'] . "</option>";
} ?>
</select>
<p>Articles postérieurs à la date</p>
<input type="date" name="date">
<input type="submit" class="bouton_submit" name="validerTrier" value="Filtrer">
</form>
</div>
</div>
</body>
</html>
<!-- Nicolas LE BORGNE, G9C -->