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
|
<!DOCTYPE html>
<?php
include('bdd.php');
?>
<html>
<head>
<title>Page infirmière RDV</title>
<link rel="stylesheet" type="text/css" href="style.css"/>
</head>
<body>
<h4>Liste des I.D.E</h4>
<div id="separator">
</div>
<div id="infirmiere">
<h4>Liste des Patients</h4>
<?php
$sql = 'SELECT nom,prenom,adresse,ville,cp,tel,cause,date,id_rdv FROM clients,rdv WHERE id_clients = clients.id AND date = CURRENT_DATE() ORDER BY ville';
$req = mysql_query($sql) or die('Erreur SQL !<br />'.$sql.'<br />'.mysql_error());
$ur = 'Urine';
$sg = 'Sang';
$ly = 'lymph';
echo'<div id="contenuscrollbar2">';
echo'<table width="850" bgcolor="#000">'."\n";
echo '<tr>';
echo '<td bgcolor="#fff"><b><u>choix</u></b></td>';
echo '<td bgcolor="#fff"><b><u>ville</u></b></td>';
echo '<td bgcolor="#fff"><b><u>cp</u></b></td>';
echo '<td bgcolor="#fff"><b><u>nom</u></b></td>';
echo '<td bgcolor="#fff"><b><u>prenom</u></b></td>';
echo '<td bgcolor="#fff"><b><u>adresse</u></b></td>';
echo '<td bgcolor="#fff"><b><u>tel</u></b></td>';
echo '<td bgcolor="#fff"><b><u>cause</u></b></td>';
echo '<td bgcolor="#fff"><b><u>date</u></b></td>';
echo '<td bgcolor="#fff"><b><u>id_rdv</u></b></td>';
echo '<td bgcolor="#fff"><b><u>infirmier</u></b></td>';
echo '</tr>'."\n";
// on va scanner tous les tuples un par un
echo '<form action =infirmiere.php method = post />';
while ($data = mysql_fetch_array($req)) {
// on affiche les résultats
echo '<tr>';
echo '<td class="registered" bgcolor="#fff" align=center><input type="checkbox" name="coord[]" value="'.$data['nom'].'"></td>';
echo '<td class="registered" bgcolor="#fff" width="100">'.$data['ville'].'</td>';
echo '<td class="registered" bgcolor="#fff" width="50">'.$data['cp'].'</td>';
echo '<td class="registered" bgcolor="#fff" width="50">'.$data['nom'].'</td>';
echo '<td class="registered" bgcolor="#fff" width="50">'.$data['prenom'].'</td>';
echo '<td class="registered" bgcolor="#fff">'.$data['adresse'].'</td>';
echo '<td class="registered" bgcolor="#fff">'.$data['tel'].'</td>';
if($data['cause'] == 1){
echo '<td class="registered" bgcolor="#fff">'.$sg.'</td>';
$date = new DateTime($data['date']);
echo '<td class="registered" bgcolor="#fff">'.$date->format('d/m/Y').'</td>';
}
if($data['cause'] == 2){
echo '<td class="registered" bgcolor="#fff">'.$ur.'</td>';
$date = new DateTime($data['date']);
echo '<td class="registered" bgcolor="#fff">'.$date->format('d/m/Y').'</td>';
}
else{
echo '<td class="registered" bgcolor="#fff">'.$ly.'</td>';
$date = new DateTime($data['date']);
echo '<td class="registered" bgcolor="#fff">'.$date->format('d/m/Y').'</td>';
}
echo '<td class="registered" bgcolor="#fff">'.$data['id_rdv'].'</td>';
echo '</tr>'."\n";
}
echo '</form>';
echo '</table>'."\n";
echo'</div>';
mysql_free_result ($req);
mysql_close ();
?>
<form method="POST" action="infirmiere.php">
<strong>Voir les choix</strong><br/>
<input type="submit" value="choix" name="generer">
</form>
<?php
include('bdd.php');
if(isset($_POST['generer']))
{
if (isset($_POST['coord']))
{
foreach($_POST['coord'] as $personnesID)
{
// tu affiches les donnees pr chaque Personne sélectionner
$requete = "SELECT * FROM clients WHERE nom ='".int($personneID)."' ";
}
}
}
?>
</div>
</body>
</html> |
Partager