-
Notifications
You must be signed in to change notification settings - Fork 0
/
print.php
56 lines (39 loc) · 1.41 KB
/
print.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
<?php
require ('content/fonctions.php');
include ('config.php');
include ('include/langue.php');
include ('class/class.php');
?>
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<title>Export d'un article au format pdf</title>
<meta name="description" content=" ">
<!-- Bootstrap 4.4.1 -->
<link href="style/bootstrap/css/bootstrap.perso.css" rel="stylesheet">
<script src="style/bootstrap/js/bootstrap.min.js"></script>
<!-- Fontawesome via npm -->
<link href="node_modules/@fortawesome/fontawesome-free/css/all.min.css" rel="stylesheet">
<!-- style perso -->
<link href="style/style.css" rel="stylesheet">
<link rel="icon" type="image/gif" href="img/icon.jpg" />
<!-- Jquery via npm -->
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<!-- OpenStreetMap et Leaflet via npm -->
<link href="https://unpkg.com/leaflet@1.7.1/dist/leaflet.css" rel="stylesheet">
<script src="https://unpkg.com/leaflet@1.7.1/dist/leaflet.js"></script>
</head>
<body onload="window.print()">
<?php
/* récupération de l'article */
$sqlArticle = "SELECT * FROM articles where publication = '1' AND ref='{$_GET['id']}'";
$reqArticle = $pdo->prepare($sqlArticle);
$reqArticle->execute();
while ($data = $reqArticle->fetch(PDO::FETCH_ASSOC)) {
echo "<h1>".$data['titre']."</h1>".$data['article'];
}
?>
</body>
</html>