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
|
<?php
$req_select = $bdd->query('SELECT * FROM config_Requetes WHERE Utilisateur = "'.$_SESSION['login'].'" ORDER BY date_heure DESC') or die(print_r($bdd->errorInfo())); //sélectionne les requetes en fonction de l'utilisateur
$rowCount = $req_select->rowCount();
if ($rowCount == 0)
{
echo "<p>Vous n'avez aucune requête enregistrée en base.<br> Effectuez une analyse puis sauvegardez la, elle apparaitra ensuite sur cette page.</p>";
}
else
{?>
<h3>Requêtes enregistrées</h3>
<!-- <p><i>Vous pouvez modifier les dates de début et de fin avant d'exécuter la requête (au format : AAAA-MM-JJ HH:MM:SS).-->
<table style="text-align:center;" class='bordered striped'>
<tr><th>Actions</th><th>Date</th><th>Nom Requete</th><th>Commentaire</th><th>Date début</th><th>Date fin</th></tr>
<?php
$i = 0;
$id_ligne = 0;
$sauvegarde = "";
while($res = $req_select->fetch())
{
$nomReq = urlencode($res['NomRequete']);
$comm = addslashes($res['Commentaire']);
$dateDeb = addslashes($res['date_debut']);
$dateFin = addslashes($res['date_fin']);
$id = addslashes($res['idRequete']);
list($jour,$heure)=explode(" ",$res['date_heure']);
echo "<tr><td style='width:40px;'><input style='width:28px;height:28px;' id='moddatereq' type='image' src='images/config_accueil.png' onclick=\"showChampsReq('$nomReq','$comm','$dateDeb','$dateFin')\"><br><input style='width:24px;height:24px' id='delreq' type='image' src='images/delete.png' onclick=\"deleteRequete('$nomReq','$comm','$dateDeb','$dateFin','$id')\"></td>";
echo "<td>".$jour."<br/>".$heure."</td>";
echo "<td style='width:200px;' id = 'nomrequete".$id_ligne."' onblur=\"updateValue('".$res['NomRequete']."','NomRequete',document.getElementById('nomrequete".$id_ligne."').textContent);\">".$res['NomRequete']."</td>";
echo "<td style='width:200px;' id = 'commentaire".$id_ligne."' onblur=\"updateValue('".$res['NomRequete']."','Commentaire',document.getElementById('commentaire".$id_ligne."').textContent);\">".$res['Commentaire']."</td>";
echo "<td style='width:100px;' id = 'date_debut".$id_ligne."' onblur=\"updateValue('".$res['NomRequete']."','date_debut',document.getElementById('date_debut".$id_ligne."').textContent;\">".$res['date_debut']."</td>";
echo "<td style='width:100px;' id = 'date_fin".$id_ligne."'onblur=\"updateValue('".$res['NomRequete']."','date_fin',document.getElementById('date_fin".$id_ligne."').textContent;\">".$res['date_fin']."</td>";
}
} |
Partager