-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlist_actu.php
155 lines (130 loc) · 7.06 KB
/
list_actu.php
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
<?php
session_start();
if(!empty($_SESSION["mode"]))
{}
else
{
$_SESSION["mode"] = "clair";
}
if(isset($_GET['tri']) AND isset($_GET['tri_user']))
{
$tri = htmlspecialchars($_GET['tri']);
$tri_user = htmlspecialchars($_GET['tri_user']);
}
else
{
header('Location: list_actu.php?tri=id&tri_user=id');
}
include 'header.php';
?>
<!DOCTYPE HTML>
<!--
Editorial by HTML5 UP
html5up.net | @ajlkn
Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
-->
<html>
<head>
<title>DVKBuntu - Actualités</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
<?php
if($_SESSION['mode'] == "sombre")
{?>
<link rel="stylesheet" href="assets/css/main.css" />
<?php }
else
{ ?>
<link rel="stylesheet" href="assets/css/main_clair.css" />
<?php } ?>
<link rel="icon" type="image/png" href="images/LogoGenerale.png" />
</head>
<body class="is-preload">
<!-- Wrapper -->
<div id="wrapper">
<!-- Main -->
<div id="main">
<div class="inner">
<!-- Header -->
<header id="header">
<a href="index.php" class="logo"><strong>DVKBuntu</strong></a>
<ul class="icons">
<li><a href="mode.php?id=13" style="color: yellow; background-color: black;">Mode malvoyant : </a> <a href="mode.php?id=13" style="color:#000000" alt="Changer les contrastes"><i class="fas fa-low-vision fa-lg" id="icone_oeil"></i></a></li>
<li><a href="https://twitter.com/handyopensource" class="icons-header" alt="Twitter"><i class="fab fa-twitter-square fa-lg"></i></a></li>
<li><a href="https://www.facebook.com/Handyopensource" class="icons-header" alt="Facebbok"><i class="fab fa-facebook fa-lg"></i></a></li>
<li><a href="https://discord.gg/zG7g8cU" class="icons-header" alt="discord"><i class="fab fa-discord fa-lg"></i></a></li>
<li><a href="https://www.forum.dvkbuntu.org/" class="icons-header" alt="Le forum"><i class="far fa-comments fa-lg"></i></a></li>
<li><a href="#contact" class="icons-header" alt="Email"><i class="far fa-envelope fa-lg"></i></a></li>
<li> <a href="donnation.php" class="icons-header" alt="Email" class="icons"><i class="fas fa-hand-holding-usd fa-lg"></i></a></li>
</ul>
</header>
<!-- Content -->
<section>
<header class="main">
<h1>Actualités handicap</h1>
</header>
<table>
<?php
if($tri == "auteur")
{
$reponse = $bdd->query('SELECT * FROM actualites ORDER BY auteur');
}
elseif($tri == "titre")
{
$reponse = $bdd->query('SELECT * FROM actualites ORDER BY titre');
}
else
{
$reponse = $bdd->query('SELECT * FROM actualites ORDER BY id');
}
$actuExist = $reponse->rowCount();
if($actuExist == 0)
{
echo "Aucune actualité pour le moment. Revenez plus tard!";
}
else
{?>
<tr>
<th><a href="list_actu.php?tri=auteur&tri_user=<?php echo $tri_user; ?>">Auteur</a></th>
<th><a href="list_actu.php?tri=titre&tri_user=<?php echo $tri_user; ?>">Titre</a></th>
<th>Voir plus</th>
</tr>
<?php
// On affiche chaque entrée une à une
while ($donnees = $reponse->fetch())
{ ?>
<tr>
<td><?php echo $donnees['auteur']; ?></td>
<td><?php echo $donnees['titre']; ?></td>
<td><a href="doc.php?id=<?php echo $donnees['id']; ?>">Voir plus</a></td>
</tr>
<?php
}
}
$reponse->closeCursor(); // Termine le traitement de la requête
?>
</table>
</section>
</div>
</div>
<?php include 'sidebar.html'; ?>
</div>
<!--Bottom menu -->
<div class="navbar-bottom">
<a href="mode.php?id=13" alt="Changer les contrastes"><i class="fas fa-low-vision fa-lg"></i></a>
 
<a href="https://twitter.com/handyopensource" class="icons" alt="Twitter"><i class="fab fa-twitter-square fa-lg"></i></a>
<a href="https://www.facebook.com/Handyopensource" class="icons" alt="Facebbok"><i class="fab fa-facebook fa-lg"></i></a>
<a href="https://discord.gg/zG7g8cU" class="icons" alt="discord"><i class="fab fa-discord fa-lg"></i></a>
<a href="https://www.forum.dvkbuntu.org/" class="icons" alt="Le forum"><i class="far fa-comments fa-lg"></i></a>
<a href="contact.php" class="icons" alt="Email"><i class="far fa-envelope fa-lg"></i></a>
<a href="donnation.php" class="icons" alt="Email" class="icons"><i class="fas fa-hand-holding-usd fa-lg"></i></a>
</div>
<!-- Scripts -->
<script src="assets/js/jquery.min.js"></script>
<script src="assets/js/browser.min.js"></script>
<script src="assets/js/breakpoints.min.js"></script>
<script src="assets/js/util.js"></script>
<script src="assets/js/main.js"></script>
</body>
</html>