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
|
<table width='100%' border=1 frame=void><tr><td></td>";
// bordercolor='#000066'
affichage_formateur();
// on definit le temps a 8 heures
$heure = mktime(7,45);
$apres = date("H:i",$heure);
// 44 correspond au nombre de lignes pour arriver a 19h00
while($apres<='18:45') {
// on ajoute 15 minutes
$heure+=900;
$apres = date("H:i",$heure);
// Affichage des heures sur la gauche du tableau ( de 8h à 19h )
echo "<tr><td bgcolor='#99CCFF'><center><br><small>$apres</small><br></center></td>";
$sql = "select num_formateur, nom_formateur, prenom_formateur, statut_formateur from formateur order by num_formateur";
$result = mysql_query($sql);
while($row = mysql_fetch_array($result)) {
// Récupération de la table reservation
$sql1 = "select * from reservation where num_formateur = " . $row['num_formateur'] . " and heure_debut = '" . $apres . "' and date = '" . $date_resa . "'";
$result1 = mysql_query($sql1);
$row1 = mysql_fetch_array($result1);
$sql4 = "select couleur_statut from statut where num_statut = '" . $row1['num_statut'] . "'";
$result4 = mysql_query($sql4);
$row4 = mysql_fetch_array($result4);
?>
<td bgcolor='<? echo $row4['couleur_statut'] . "'";
require('rqt.php');
while (($dur!=$dur4) && ($dur<3600)) {
$i = $i+1;
$dur = $dur+15;
}
if ($dur4==$dur) {
echo "rowspan='" . $i . "'>";
echo "<font size='-3'><small><center>";
}
if ($dur4!=$dur) {
echo "<font size='-3'><small><center>";
}
// Affichage des informations dans les cases correspondantes
if ($row1=$row1) {
$sql2 = "select nom_type from reservation r, type_reservation t where r.num_type = t.num_type and r.num_type= " . $row1['num_type'] . "";
$result2 = mysql_query($sql2);
$row2 = mysql_fetch_array($result2);
$sql3 = "select valeur_coeff from reservation r, coefficient c where r.num_coeff = c.num_coeff and r.num_coeff= " . $row1['num_coeff'] . "";
$result3 = mysql_query($sql3);
$row3 = mysql_fetch_array($result3);
$sql4 = "select nom_statut, description_statut from reservation r, statut s where r.num_statut = s.num_statut and r.num_statut= " . $row1['num_statut'] . "";
$result4 = mysql_query($sql4);
$row4 = mysql_fetch_array($result4);
?>
<a
class="lien3"
href="#"
title="En savoir plus ..."
onclick="window.open ('popup.php?formateur=<?php echo( $row['nom_formateur'] ); ?>&statut=<?php echo( $row4['description_statut'] ); ?>&coeff=<?php echo( $row3['valeur_coeff'] ); ?>&type=<?php echo( $row2['nom_type'] ); ?>&code=<?php echo( $row1['code_resa'] ); ?>&heure_debut=<?php echo( $row1['heure_debut'] ); ?>&date=<?php echo( $row1['date'] ); ?>&duree=<?php echo( $row1['duree'] ); ?>&heure_fin=<?php echo( $row1['heure_fin'] ); ?>&hc=<?php echo( $row1['heure_compta'] ); ?>&cree_par=<?php echo( $row1['cree_par'] ); ?>&description=<?php echo( $row1['description_resa'] );?>&observation=<?php echo( $row1['observation_resa'] ); ?>'
, 'popup'
, 'width=550,height=305,top=300,left=400'
); return false;"
>
<?
echo "Code : <font color=red>" . $row1['code_resa'] . "</font> - Type : <font color=red>" . $row2['nom_type'] . "</font> <br>
Durée <font color=red>: " . $row1['duree'] . "</font> - Coeff <font color=red>: " . $row3['valeur_coeff']." </font><br>Heures Comptabilisées : <font color=red>" . $row1['heure_compta'] . "</font>
</a>";
}
else {
if(isset($_SESSION['nom']))
{
if ($_SESSION['acces'] == 10) {
echo "<a class='lien3' href='reservation.php?formateur=" . $row['nom_formateur'] . "&heure_debut=" . $apres . "&date=" . $date_resa . "'>Insérer</a></center></small></font></td>";
}
}
}
}
// Affichage des heures sur la gauche du tableau ( de 8h à 19h )
echo "<td bgcolor='#99CCFF'><center><br><small>$apres</small><br></center></td>";
echo '</tr>';
}
echo "</table><table width='40%' align='center'><tr><td width='10%'><b><font color='#FFFF00' size='-1'> Prévu : Jaune </font></td><td width='10%'><b><font color='#66CCFF' size='-1'>Confirmé : Bleu </font></td><td width='10%'><b><font color='#00FF00 ' size='-1'>Réalisé : Vert </font></b></td></tr><tabble></body></html>";
?> |
Partager