2021-02-01 22:52:01 +01:00
|
|
|
<!DOCTYPE html>
|
2020-12-06 20:15:35 +01:00
|
|
|
<html>
|
2021-02-01 22:52:01 +01:00
|
|
|
<head>
|
|
|
|
<link rel="stylesheet" href="style.css">
|
|
|
|
<meta charset="utf-8">
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
2021-02-27 13:20:49 +01:00
|
|
|
<title>pacjent</title>
|
2021-02-01 22:52:01 +01:00
|
|
|
</head>
|
2020-12-06 20:15:35 +01:00
|
|
|
<body>
|
|
|
|
<h1>Pacjent</h1>
|
|
|
|
<script type="text/javascript">
|
|
|
|
function przekierowanie()
|
|
|
|
{
|
|
|
|
window.location.replace("../rejestracja/index.php");
|
|
|
|
}
|
|
|
|
</script>
|
2021-02-01 22:52:01 +01:00
|
|
|
|
2020-12-06 20:15:35 +01:00
|
|
|
<?php
|
2021-01-30 17:10:07 +01:00
|
|
|
$polaczenie=mysqli_connect('localhost','pacjent','pacjent','rejestracja');
|
2021-02-08 21:30:39 +01:00
|
|
|
$zapytanie="SELECT `dzien`,`godzina` FROM `wizyty` WHERE `dzien`='2020-12-13' AND `stan`='1' ORDER BY `godzina`";
|
2020-12-06 20:15:35 +01:00
|
|
|
$wynik=mysqli_query($polaczenie,$zapytanie);
|
2021-02-08 21:30:39 +01:00
|
|
|
print "<div id= 'tabele'>";
|
|
|
|
print "<table class='tabela'>";
|
|
|
|
$tab=[];
|
|
|
|
for($i=10;$i<18;$i++)
|
2021-02-01 22:52:01 +01:00
|
|
|
{
|
|
|
|
if($wiersz = mysqli_fetch_assoc($wynik))
|
|
|
|
{
|
|
|
|
$data = explode(":", $wiersz["godzina"]);
|
2021-02-08 21:30:39 +01:00
|
|
|
$tab[$data[0]]=$wiersz["dzien"];
|
|
|
|
$tab[$data[0]+10]=$wiersz["godzina"];
|
2021-02-01 22:52:01 +01:00
|
|
|
}
|
|
|
|
}
|
2021-02-13 21:48:18 +01:00
|
|
|
print "<tr><td>godzina</td><td colspan='2'>terminy</td></tr><br>";
|
2021-02-08 21:30:39 +01:00
|
|
|
for($i=10;$i<18;$i++)
|
|
|
|
{
|
|
|
|
if (isset($tab[$i]))
|
|
|
|
print "<tr><td>".$i."</td><td>".$tab[$i]."</td><td> ".$tab[$i+10]."</td></tr><br>";
|
|
|
|
else
|
2021-02-13 21:48:18 +01:00
|
|
|
echo "<tr><td>".$i."</td><td colspan='2'><input type='button' value='zarejestruj' onClick=\"document.location.href='rezerwacja.php'\" ></td></tr><br>";
|
2021-02-08 21:30:39 +01:00
|
|
|
}
|
2021-02-01 22:52:01 +01:00
|
|
|
print "</table>";
|
2021-02-08 21:30:39 +01:00
|
|
|
$zapytanie="SELECT `dzien`,`godzina` FROM `wizyty` WHERE `dzien`='2020-12-14' AND `stan`='1' ORDER BY `godzina`";
|
2021-02-01 22:52:01 +01:00
|
|
|
$wynik=mysqli_query($polaczenie,$zapytanie);
|
|
|
|
print "<table class='tabela'>";
|
2021-02-08 21:30:39 +01:00
|
|
|
$tab=[];
|
|
|
|
for($i=10;$i<18;$i++)
|
2021-01-07 14:12:11 +01:00
|
|
|
{
|
|
|
|
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"]);
|
2021-02-08 21:30:39 +01:00
|
|
|
$tab[$data[0]]=$wiersz["dzien"];
|
|
|
|
$tab[$data[0]+10]=$wiersz["godzina"];
|
2020-12-06 20:15:35 +01:00
|
|
|
}
|
|
|
|
}
|
2021-02-13 21:48:18 +01:00
|
|
|
print "<tr><td>godzina</td><td colspan='2'>terminy</td></tr><br>";
|
2021-02-08 21:30:39 +01:00
|
|
|
for($i=10;$i<18;$i++)
|
|
|
|
{
|
|
|
|
if (isset($tab[$i]))
|
2021-02-13 21:48:18 +01:00
|
|
|
print "<tr><td>".$i."</td><td>".$tab[$i]."</td><td> ".$tab[$i+10]."</td></tr><br>";
|
2021-02-08 21:30:39 +01:00
|
|
|
else
|
2021-02-13 21:48:18 +01:00
|
|
|
echo "<tr><td>".$i."</td><td colspan='2'><input type='button' value='zarejestruj' onClick=\"document.location.href='rezerwacja.php'\" ></td></tr><br>";
|
2021-02-08 21:30:39 +01:00
|
|
|
}
|
2021-02-01 22:52:01 +01:00
|
|
|
print "</table>";
|
2021-02-08 21:30:39 +01:00
|
|
|
$zapytanie="SELECT `dzien`,`godzina` FROM `wizyty` WHERE `dzien`='2020-12-15' AND `stan`='1' ORDER BY `godzina`";
|
2021-02-01 22:52:01 +01:00
|
|
|
$wynik=mysqli_query($polaczenie,$zapytanie);
|
|
|
|
print "<table class='tabela'>";
|
2021-02-08 21:30:39 +01:00
|
|
|
$tab=[];
|
|
|
|
for($i=10;$i<18;$i++)
|
2021-02-01 22:52:01 +01:00
|
|
|
{
|
|
|
|
if($wiersz = mysqli_fetch_assoc($wynik))
|
|
|
|
{
|
|
|
|
$data = explode(":", $wiersz["godzina"]);
|
2021-02-08 21:30:39 +01:00
|
|
|
$tab[$data[0]]=$wiersz["dzien"];
|
|
|
|
$tab[$data[0]+10]=$wiersz["godzina"];
|
2021-02-01 22:52:01 +01:00
|
|
|
}
|
|
|
|
}
|
2021-02-13 21:48:18 +01:00
|
|
|
print "<tr><td>godzina</td><td colspan='2'>terminy</td></tr><br>";
|
2021-02-08 21:30:39 +01:00
|
|
|
for($i=10;$i<18;$i++)
|
|
|
|
{
|
|
|
|
if (isset($tab[$i]))
|
2021-02-13 21:48:18 +01:00
|
|
|
print "<tr><td>".$i."</td><td>".$tab[$i]."</td><td> ".$tab[$i+10]."</td></tr><br>";
|
2021-02-08 21:30:39 +01:00
|
|
|
else
|
2021-02-13 21:48:18 +01:00
|
|
|
echo "<tr><td>".$i."</td><td colspan='2'><input type='button' value='zarejestruj' onClick=\"document.location.href='rezerwacja.php'\" ></td></tr><br>";
|
2021-02-08 21:30:39 +01:00
|
|
|
}
|
2021-02-13 21:48:18 +01:00
|
|
|
print "</table></div><div id='czysc'></div>";
|
2020-12-06 20:15:35 +01:00
|
|
|
mysqli_close($polaczenie);
|
|
|
|
?>
|
2021-02-01 22:52:01 +01:00
|
|
|
<input type="button" value="home" onClick="przekierowanie()">
|
2020-12-06 20:15:35 +01:00
|
|
|
</body>
|
|
|
|
</html>
|