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
|
<?php
include_once("../db_connection.php");
if(isset($_POST["send"]))
{
mysql_query("DELETE from comparaison");
$datedebut=$result["datedebut"];
list($annee, $jour, $mois)=explode ('-',$datedebut);
$datedebutf=date("d-m-Y", mktime(0,0,0,$jour,$mois,$annee));
$datefin=$result["datefin"];
list($annee, $jour, $mois)=explode ('-',$datefin);
$datefinf=date("d-m-Y", mktime(0,0,0,$jour,$mois,$annee));
mysql_query("INSERT INTO comparaison(datedebut, datefin) VALUES('$datedebut','$datefin' )");
}
else {}
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<link rel="stylesheet" href="../Parc_Transformateur.css" />
<style type="text/css"> #hidden { display: none; } </style>
<style type="text/css"> #hidden1 { display: none; } </style>
<title>Saisie</title>
</head>
<body>
<?php include_once("menu_admin.php");?>
<div align="center">
<div align="center">
<!-- formulaire -->
<form name="formulaire" method="post" enctype="multipart/form-data" action="modification.php">
<table width="628" border="0" align="center" cellpadding="5" cellspacing="0">
<tr>
<td width="500"><font size=3><b> Saisir les dates :</b></font></td>
<td width="137" align="center">
<label> <strong> Début (*) : </strong> </strong> </label>
<input name="datedebut" type="text" size="30"/> </br>
<label> <strong> Fin (*) : </strong> </label>
<input name="datefin" type="text" size="30"/></br></br>
<input type="submit" value="Envoyer" name="envoyer">
</td>
</tr>
</table>
</form>
</div>
<?php
include_once("db_connection.php");
// requete SQL :
$sql = "SELECT *
FROM installation,comparaison where dateinstallation.installation between datdebut.comparaison and datefin.comparaison" ;
$requete = mysql_query($sql);
echo $requete;
?>
<!-- tableau -->
<body id="dt_example">
<!-- tableau -->
<div align="center" >
<table cellpadding="0" cellspacing="0" border="0" class="display" id="example">
<thead>
<tr >
<th> Identifiant</th>
<th> Marque</th>
<th> Type</th>
<th> Puissance (kVA)</th>
<th> Huile (l)</th>
<th> PCB(ppm)</th>
<th> Commune</th>
<th> Code GDO</th>
<th> Date Réalisation </th>
<th> Responsable </th>
<th> Entreprise </th>
<th> Statut </th>
</tr>
</thead>
<tbody>
<?php //affichage des données:
while( $result = mysql_fetch_array( $requete ) )
{
?>
<?php $dateinstallation=$result["dateinstallation"];
list($annee, $jour, $mois)=explode ('-',$dateinstallation);
$dateinstallationf=date("d-m-Y", mktime(0,0,0,$jour,$mois,$annee));?>
<tr style="background-color: #e5eeff" style="text-align: center;">
<td><?php echo $result['identifiant']; ?></td>
<td><?php echo $result['marque']; ?></td>
<td><?php echo $result['type']; ?></td>
<td><?php echo $result['puissance']; ?></td>
<td><?php echo $result['qtite_huile']; ?></td>
<td><?php echo $result['valeur']; ?></td>
<td><?php echo $result['nom']; ?></td>
<td><?php echo $result['gdo']; ?></td>
<td ><?php echo $dateinstallationf; ?></td>
<td><?php echo $result['responsable']; ?></td>
<td ><?php echo $result['entreprise']; ?></td>
<td> <?php echo $result['choix']; ?></td>
</tr>
<?php
}
?>
<tbody>
</table>
</div>
<script type="text/javascript">
/*
* Example init
*/
$(document).ready(function(){
$('#example').dataTable();
});
</script>
</body>
</html> |
Partager