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
| <?php
//header ("Content-type: image/png");
echo 'Date de début = '.$dateD.' <br />';
echo 'Date de fin = '.$dateF.' <br />';
echo 'Numero client : '.$numClient .'. Et le client : '.getNomOrPren_aero($_REQUEST['num_client'],0). ' '.getNomOrPren_aero($_REQUEST['num_client'],1).' <br />';
?>
<br />
<?php
//initialisation tableau journée complete
$tab_journee = array();
$tab_journee[0] = array();
$tab_journee[1] = array();
unset($tab_journee); //on éfface tout
////initialisation tableau rdv du client
$tab_rdv = array();
$tab_rdv[0] = array();
$tab_rdv[1] = array();
unset($tab_rdv); //on éfface tout
//création du tableau de la journée
$date= $dateD;
$heure_debut = 9;
$heure_fin = 20;
$date_tmpD = $date.' '.$heure_debut.':00:00';
$date_tmpF = $date.' '.$heure_fin.':00:00';
$timeD = strtotime($date_tmpD);
$timeF = strtotime($date_tmpF);
$tab_rdv = rdvDayClient($numClient,$dateD,$dateF);
$tab_journee = getHoraireJournee($date, $heure_debut,$heure_fin);
//affichage titre horraire
$i=0;
$image = imagecreate(80,40);
$bleuclair = imagecolorallocate($image, 156, 227, 254);
$noir = imagecolorallocate($image, 0, 0, 0);
imagestring($image, 4, 20, 10, 'Horraire', $noir);
imagepng($image, 'images_tmp/titrehor'.$i.'.png');
?>
<img src=<?php echo 'images_tmp/titrehor'.$i.'.png';?>>
<?php
$afficheH=true;
//affichage horraire
for ($i= 0; $i <= count($tab_journee);$i++ ) {
if ($i%2 == 1) {
$image = imagecreate(20,40);
$noir = imagecolorallocate($image, 0, 0, 0);
$blanc = imagecolorallocate($image, 255, 255, 255);
$minute = date('H',$timeD);
// echo '$HM ='.$minute;
if ($afficheH) {
imagestring($image, 4, 1, 5,$minute , $blanc);
$afficheH=false;
}else $afficheH=true;
imagepng($image, 'images_tmp/hor'.$i.'.png');
}
else {
$image = imagecreate(20,40);
$blanc = imagecolorallocate($image, 255, 255, 255);
$noir = imagecolorallocate($image, 0, 0, 0);
$noir = imagecolorallocate($image, 0, 0, 0);
imagepng($image, 'images_tmp/hor'.$i.'.png');
}
$timeD =$timeD +900;
?>
<img src=<?php echo 'images_tmp/hor'.$i.'.png';?>>
<?php
}
$j=0;
$i=0;
$image = imagecreate(120,40);
$bleuclair = imagecolorallocate($image, 156, 227, 254);
$noir = imagecolorallocate($image, 0, 0, 0);
imagestring($image, 4, 20, 10, $dateD, $noir);
imagepng($image, 'images_tmp/date'.$i.'.png');
?>
<img src=<?php echo 'images_tmp/date'.$i.'.png';?>>
<?php
for ($i= 0; $i <= count($tab_journee);$i++ ) {
if (presence($tab_journee[$i][0],$tab_journee[$i][1],$tab_rdv)) {//heure réservé par client
$image = imagecreate(20,40);
$noir = imagecolorallocate($image, 0, 0, 0);
$blanc = imagecolorallocate($image, 255, 255, 255);
imagepng($image, 'images_tmp/plage'.$i.'.png');
}
else {//heure non réservé
$image = imagecreate(20,40);
$bleu = imagecolorallocate($image, 0, 0, 255);
$blanc = imagecolorallocate($image, 255, 255, 255);
imagepng($image, 'images_tmp/plage'.$i.'.png');
}
?>
<img src=<?php echo 'images_tmp/plage'.$i.'.png';?>>
<?php
}
$j++;
?> |
Partager