function displayCalendarWeek($_fDay = null) { if (null == $_fDay) { $_fDay = strtotime("last Monday"); } $dates = array(); $events = array(); for ($i = 0; $i < 7; $i++) { $dates[$i] = $_fDay + $i * 3600 * 24; } calendarHead($dates); echo '<tbody class = "calendar-body">'; echo '<tr>'; foreach ($dates as $_d) { echo '<td>'; $events = getHorairesDispo(date('d', $_d), date('m', $_d), date('Y', $_d)); foreach ($events as $e) { echo '<a class = "sHoraire" href="includes/recherche.php">' . tohm($e['h_time']) . '</a><br>'; } echo '</td>'; } echo '</tr>'; echo '</tbody>'; echo '</table>'; echo '</div>'; }
function displayMedecin($day, $id) { $medecin = getMedecin($id); if (null == $day) { $day = strtotime("last Monday"); } $dates = array(); for ($i = 0; $i < 7; $i++) { $dates[$i] = $day + $i * 3600 * 24; } echo '<div class="blocMedecin">'; echo '<img src="img/128.png" class ="icnMedecin">'; echo '<div class="infosMedecin">'; echo '<p class = "nameMedecin"> Dr ' . $medecin[m_prenom] . ' ' . $medecin[m_nom] . '</p>'; echo '<p> Spécialité : ' . $medecin[m_spe] . '<br>'; echo $medecin[m_adresse] . ' ' . $medecin[m_ville] . '</p>'; echo '<p>' . $medecin[m_telephone] . '</p>'; echo '</div>'; calendarHead($dates); echo ' <tbody class = "calendar-body">'; echo ' <tr>'; for ($cnt = 0; $cnt < 6; $cnt++) { echo ' <td>'; $events = getHorairesDispo(date('d', $dates[$cnt]), date('m', $dates[$cnt]), date('Y', $dates[$cnt]), $id, $cnt); foreach ($events as $e) { echo ' <a class = "s-horraire" href="rdv.php">' . tohm($e['h_time']) . '</a><br>'; } echo ' </td>'; } echo ' </tr>'; echo ' </tbody>'; echo ' </table>'; echo ' </div>'; echo ' </div>'; }