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 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217
| <?php session_start(); ?>
<?php
// Au démarrage, aucune sélection : on extrait toutes les données individuellement pour chaque liste
mysql_connect('localhost', 'root', '');
mysql_select_db('xls_db');
// raison sociale
$sql = 'SELECT DISTINCT client FROM histo ORDER BY client';
$qry = mysql_query($sql);
while($row = mysql_fetch_assoc($qry)) {
$dataClient[] = $row['client'];
}
// ROS
$sql = 'SELECT DISTINCT ros FROM histo ORDER BY ros';
$qry = mysql_query($sql);
while($row = mysql_fetch_assoc($qry)) {
$dataRos[] = $row['ros'];
}
// code postal
$sql = 'SELECT DISTINCT codepostal FROM histo ORDER BY codepostal';
$qry = mysql_query($sql);
while($row = mysql_fetch_assoc($qry)) {
$dataCp[] = $row['codepostal'];
}
// produit
$sql = 'SELECT DISTINCT id_produit FROM histo ORDER BY id_produit';
$qry = mysql_query($sql);
while($row = mysql_fetch_assoc($qry)) {
$dataProduit[] = $row['id_produit'];
}
// historique non filtré
// produit
$sql = 'SELECT * FROM histo';
$qry = mysql_query($sql);
while($row = mysql_fetch_assoc($qry)) {
$dataHisto[] = $row;
}
$hsc = function($p) { return htmlspecialchars($p, ENT_QUOTES); }
?>
<?php include('../doctype.html'); ?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<!-- Titre
************************************************************-->
<?php include('../titre.html'); ?>
<!-- Feuille de style
************************************************************-->
<style type="text/css" media="screen">
@import url(../styles/style.css);
</style>
<script type="text/javascript" src="functions.js"></script>
</head>
<body id="principal">
<?php
// Connexion à la base de données
$server = 'localhost';
$user = 'root';
$pwd = '';
$dbName = 'xls_db';
$cnx = mysql_connect($server, $user, $pwd);
$db = mysql_select_db($dbName);
// REQUETE DONNEES DE LA TABLE
$sql = <<<SQL
SELECT histo.id_produit, histo.type_produit, histo.ros, histo.client, histo.adresse, histo.adresseb, histo.ville, histo.codepostal
FROM histo
ORDER BY
histo.id_produit ASC,
histo.codepostal ASC,
histo.type_produit ASC,
histo.ros ASC,
histo.client ASC,
histo.adresse ASC,
histo.adresseb ASC,
histo.ville ASC
SQL;
$qry = mysql_query($sql);
while($row = mysql_fetch_assoc($qry)) {
$data[] = $row;
}
?>
<!-- Conteneur
************************************************************-->
<div id="conteneur">
<!-- En-tete
************************************************************-->
<h1 id="header">
<?php include("../titrepage.html"); ?>
</h1>
<!-- Barre verticale
************************************************************-->
<div id="navigation">
<div id="styles">
<?php include('../menu.html'); ?>
</div>
<div id="informations">
<h2>Informations</h2>
<?php include('../maj.html'); ?>
</div>
</div>
<!-- Contenu
************************************************************-->
<div id="contenu">
<div id="main">
<div id="projet">
<p>
<?php
$date = date("d/m/Y");
$heure = date("H:i");
Print("<em>Bonjour, Nous sommes le $date et il est $heure</em>");
?>
</p>
<h2><span>Historique Productions</span></h2>
<p></p>
</div>
<div id="base">
<h3><span>Base de Données Complètes des Productions Afféctées</span></h3>
<p>
<!-- Données de la table
************************************************************-->
<table>
<thead>
<tr>
<th>Produit</th>
<th>Type</th>
<th>Client</th>
<th>Adresse A</th>
<th>Adresse B</th>
<th>CP</th>
<th>Ville</th>
<th>ROS</th>
</tr>
</thead>
<tbody id="table">
<?php foreach($dataHisto as $row): ?>
<tr>
<td><?php echo $hsc($row['id_produit']); ?></td>
<td><?php echo $hsc($row['type_produit']); ?></td>
<td><?php echo $hsc($row['client']); ?></td>
<td><?php echo $hsc($row['adresse']); ?></td>
<td><?php echo $hsc($row['adresseb']); ?></td>
<td><?php echo $hsc($row['codepostal']); ?></td>
<td><?php echo $hsc($row['ville']); ?></td>
<td><?php echo $hsc($row['ros']); ?></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</p>
</div>
<!-- Bloc pour mettre des informations en bas de page
************************************************************-->
<div id="infostyle"><span></span></div>
<!-- /Fin Contenu
************************************************************-->
</div>
</div>
<!-- Pied de page
************************************************************-->
<p id="footer">
<?php include('../foot.html'); ?>
</p>
<!-- /Fin Conteneur
************************************************************-->
</div>
<!-- Blocs supplémentaires pour ajouter des images
************************************************************-->
<div id="imgbloc1"><span></span></div>
<div id="imgbloc2"><span></span></div>
<div id="imgbloc3"><span></span></div>
<div id="imgbloc4"><span></span></div>
<div id="imgbloc5"><span></span></div>
<!-- Balises de fermeture
************************************************************-->
</body>
</html> |
Partager