-
Notifications
You must be signed in to change notification settings - Fork 1
/
generaliste.php
86 lines (78 loc) · 2.64 KB
/
generaliste.php
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
<?php
try {
$mysqlConnection = new PDO(
'mysql:host=fournierfamily.ovh;port=15621;dbname=OmnesSante;charset=utf8',
'jps',
'poojava'
);
} catch (Exception $e) {
die('Erreur :' . $e->getMessage());
}
$memberStatement = $mysqlConnection->prepare("SELECT * FROM Medecin WHERE spe = 0;");
$memberStatement->execute();
$result = $memberStatement->fetchAll();
echo ('<div id="contenant">');
echo ('<div id="deroulant">');
foreach ($result as $elem) {
$id = $elem["ID"];
$memberStatement = $mysqlConnection->prepare("SELECT dispo FROM Plage_horraire WHERE ID_Medecin = $id ");
$memberStatement->execute();
$plages = $memberStatement->fetch();
echo ('<div id="card">
<div id="options">
<div id="profil">
<div id="titre" >');
echo ($elem["Prenom"] . " " . $elem["Nom"]);
echo ('</div>');
echo ('<div id="photo">');
echo ('<img src="' . $elem["pp"] . '" id="image">');
echo ('</div> ');
echo('</div><div id="details">
<button id="button" onclick="showContact(');
echo ($plages[0] . $id);
echo (')">Prendre un rendez vous </button>
<button id="button" onclick="showChat()">Communiquez avec le médecin</button>
<button id="button"' . 'onclick="location.href=' . "'CV.php?ID=" . $id . "'" . '"' . '>Voir son CV</button>
</div> </div><div id="general">
<div id="information-contact">');
echo ('Localisation :');
echo ($elem["Localisation"]);
echo ('<br>');
echo ('Téléphone :');
echo ($elem["Telephone"]);
echo ('<br>');
echo ('Mail :');
echo ($elem["Mail"]);
echo ('<br>');
echo ('</div><table id="tableDispo"><thead><tr><th colspan="7">Disponibilitées</th></tr></thead>
<tbody>
<tr>
<td colspan=""></td>
<td colspan="">L</td>
<td colspan="">M</td>
<td colspan="">M</td>
<td colspan="">J</td>
<td colspan="">V</td>
<td colspan="">S</td>
</tr>
<tr><td>Matin</td>');
for ($i = 0; $i < 6; $i++) {
if (substr($plages[0], $i * 2, 1) == '1') {
echo ('<td id="dispo">O</td> ');
} else {
echo ('<td id="nonDispo">N</td> ');
}
}
echo (' </tr><tr><td>Après-Midi</td>');
for ($i = 0; $i < 6; $i++) {
if (substr($plages[0], $i * 2 + 1, 1) == '1') {
echo ('<td id="dispo">O</td> ');
} else {
echo ('<td id="nonDispo">N</td> ');
}
}
echo ('</tr></tbody></table></div></div>
');
}
echo ('</div>');
echo ('</div>');