forked from ebecamel/gesadraPHP
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathimpression_liste_membres_reseau.php
executable file
·60 lines (55 loc) · 1.68 KB
/
impression_liste_membres_reseau.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
<?php
include_once('./parametres.php');
try
{
$bdd = new PDO( DB_PDO_DSN, DB_USERNAME, DB_PASSWORD);
}
catch(Exception $e)
{
die('Erreur : '.$e->getMessage());
} ?>
<html>
<head>
<title>Impression de la liste des membres réseau</title>
<meta charset="UTF-8" />
<style type="text/css">
.variable{
font-family: Courier;
font-type: monospace;
}
</style>
<script type="text/javascript">
function edition()
{
options = "Width=700,Height=700" ;
window.open( "impression_liste_membres_reseau.php", "impression_liste_membres_reseau", options ) ;
}
</script>
</head>
<body>
<?php
$sql = "SELECT id, indicatif, alias_tactique, operateur, etat, commentaire FROM membres_reseau";
if ($res = $bdd->query($sql)) {
/* Récupère le nombre de lignes qui correspond à la requête SELECT */
if ($res->fetchColumn() > 0) {
/* Effectue la vraie requête SELECT et travaille sur le résultat */
$sql = "SELECT id, indicatif, alias_tactique, operateur, etat, commentaire FROM membres_reseau";
foreach ($bdd->query($sql) as $row) {
?>
<b>Indicatif : </b><span class="variable"><?php echo( strtoupper($row['indicatif'])); ?></span><br />
<b>Alias Tactique : </b><span class="variable"><?php echo( $row['alias_tactique']); ?></span><br />
<b>Operateur : </b><span class="variable"><?php echo( $row['operateur']); ?></span><br />
<b>Etat : </b><span class="variable"><?php echo( $row['etat']); ?></span><br />
<b>Commentaire : </b><span class="variable"><?php echo( $row['commentaire']); ?></span><br />
<br />
******************************<br />
<br />
<?php
}
}
} ?>
<script type="text/javascript">
window.print() ;
</script>
</body>
</html>