2020-12-06 20:15:35 +01:00
|
|
|
<html>
|
|
|
|
<body>
|
|
|
|
<h1>Pacjent</h1>
|
|
|
|
<script type="text/javascript">
|
|
|
|
function przekierowanie()
|
|
|
|
{
|
|
|
|
window.location.replace("../rejestracja/index.php");
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
<input type="button" value="home" onClick="przekierowanie()">
|
|
|
|
<?php
|
2021-01-30 17:10:07 +01:00
|
|
|
$polaczenie=mysqli_connect('localhost','pacjent','pacjent','rejestracja');
|
2021-01-07 14:12:11 +01:00
|
|
|
$zapytanie="SELECT `dzien`,`godzina` FROM `wizyty` WHERE `dzien`='2020-12-13' ORDER BY `godzina`";
|
2020-12-06 20:15:35 +01:00
|
|
|
$wynik=mysqli_query($polaczenie,$zapytanie);
|
2021-01-07 14:12:11 +01:00
|
|
|
print "<div class=\"dni\"><table>";
|
|
|
|
print "<br>";
|
|
|
|
for($i=10;$i<18;$i++)
|
|
|
|
{
|
|
|
|
if($wiersz = mysqli_fetch_assoc($wynik))
|
2020-12-06 20:15:35 +01:00
|
|
|
{
|
2021-01-07 14:12:11 +01:00
|
|
|
$data = explode(":", $wiersz["godzina"]);
|
|
|
|
if ($data[0]==$i)
|
|
|
|
{
|
|
|
|
echo $wiersz["dzien"]." ".$wiersz["godzina"]."<br>";
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
for ($x=$i++;$x<$data[0];$x++)
|
|
|
|
echo "<input type=\"button\" value=\"zarejestruj\"><br>";
|
|
|
|
echo $wiersz["dzien"]." ".$wiersz["godzina"]."<br>";
|
|
|
|
|
|
|
|
if ($data[0]<17)
|
|
|
|
{
|
|
|
|
for ($x=$i++;$x<$data[0];$x++)
|
|
|
|
echo "<input type=\"button\" value=\"zarejestruj\"><br>";
|
|
|
|
}}
|
2020-12-06 20:15:35 +01:00
|
|
|
}
|
|
|
|
}
|
2021-01-07 14:12:11 +01:00
|
|
|
print "</table></div>";
|
2020-12-06 20:15:35 +01:00
|
|
|
mysqli_close($polaczenie);
|
|
|
|
?>
|
|
|
|
</body>
|
|
|
|
</html>
|