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
| <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>AFFICHAGE DES COMMANDES EN COURS</title>
<style type="text/css">
#data { border: 1px solid black; }
#data tbody { display:none; }
#data tbody:first-of-type { display:table-row-group; }
</style>
<script type="text/javascript">
(function(){
document.addEventListener('DOMContentLoaded', function() {
var tbodys = document.getElementsByTagName('tbody');
var current = 0;
setInterval(function() {
tbodys[current++].style.display = 'none';
current %= tbodys.length;
tbodys[current].style.display = 'table-row-group';
}, 10000);
});
}());
</script>
</head>
<body>
<table id="data">
<caption>COMMANDES EN COURS</caption>
<thead>
<tr><th>NOM</th><th>COMMANDE</th><th>AFFAIRE</th><th>DESIGNATION</th><th>DATE DEMANDEE</th></tr>
</thead>
<?php
require_once('executeSQL.php');
require_once('infoConnexion.php');
require_once('connexion.php');
$conn = connexion(USERNAME, PASSWORD, HOST);
$query = 'SELECT *******';
$stid = oci_parse($conn, $query);
oci_execute($stid) ;
if ( $donnees = oci_fetch_array($stid, OCI_BOTH) ) {
echo "<tbody>";
echo "<tr>";
echo "<td> $donnees[CF_NOM] </td>";
echo "<td> $donnees[CF_COM] </td>";
echo "<td> $donnees[LCF_AFF] </td>";
echo "<td> $donnees[LCF_DES] </td>";
echo "<td> $donnees[CF_DEM] </td>";
echo "</tr>";
$i = 0;
while ( $donnees = oci_fetch_array($stid, OCI_BOTH) ) {
if ( ! $i++ % 10 )
echo "</tbody><tbody>";
echo "<tr>";
echo "<td> $donnees[CF_NOM] </td>";
echo "<td> $donnees[CF_COM] </td>";
echo "<td> $donnees[LCF_AFF] </td>";
echo "<td> $donnees[LCF_DES] </td>";
echo "<td> $donnees[CF_DEM] </td>";
echo "</tr>";
}
echo "</tbody>";
}
?>
</table>
</body>
</html> |
Partager