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
|
<div style="height: 800px;width: 900px;margin-bottom: 10px;margin-left: 50px;float: right;background: green; overflow:auto;">
<?php
// echo date_format($newDate, 'Y-m-d');
// $date_entre="";
//date_modify($newDate, '+1 day');
//$date_entre.=" and date_heures='".$newDate->format('Y-m-d')."'";
$essie=" ";
$date_entre=$_POST['date_debut_input'];
$select= "SELECT SQL_CALC_FOUND_ROWS t1.*, t3.* FROM agents t1
LEFT join heures t3 on(t1.GAIA = t3.GAIA) where ".$compreq." and date_heures between '".$_POST['date_debut_input']."' and '".$_POST['date_fin_input']."' order by date_heures DESC"; //where $compreq $date_entre order by heure_fin
$reponse = mysql_query($select)or die (mysql_error());
// $date_entre=""; ?>
<?php
$date_entre = new DateTime($_POST['date_debut_input']);
$date_entre->modify('-1 day');
echo("<table><tr>");
for ($i = 1; $i <= 7; $i++) {
echo("<td><table>");
// echo("<tr>");
// $date_entre2=$date_entre->modify('+1 day');
// $date_heure2[]=$date_entre2->format('Y-m-j');
// $date_entre;
// $deta_heure_unique = array_unique($date_heure2);
//foreach ($date_entre2 as $key ) {
$key=$date_entre->modify('+1 day')->format('Y-m-j');
echo "<tr><td>".$key."</td></tr>";
// echo $key."</br>";
$select1= "SELECT SQL_CALC_FOUND_ROWS t1.*, t3.* FROM agents t1
LEFT join heures t3 on(t1.GAIA = t3.GAIA) where ".$compreq." and date_heures='".$key."' order by date_heures DESC"; //where $compreq $date_entre order by heure_fin
$reponse1 = mysql_query($select1)or die (mysql_error());
while($donne1=mysql_fetch_array($reponse1)){
echo ("<tr><td>"."HD:".($donne1['heure_debut']->format('H:i'))." HF:".($donne1['heure_fin']->format('H:i'))."</tr></td>");
}
echo "</table>";
//}
}; ?>
</div>
<?php
//}
?> |