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">
|
|
|
|
<title></title>
|
|
|
|
</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-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-02-01 22:52:01 +01:00
|
|
|
print "<div id='wrap'><table class='tabela'>";
|
|
|
|
for($i=10;$i<18;$i++)
|
|
|
|
{
|
|
|
|
if($wiersz = mysqli_fetch_assoc($wynik))
|
|
|
|
{
|
|
|
|
$data = explode(":", $wiersz["godzina"]);
|
|
|
|
if ($data[0]==$i)
|
|
|
|
{
|
|
|
|
echo "<tr><td>".$wiersz["dzien"]." ".$wiersz["godzina"]."</td></tr><br>";
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
for ($x=$i++;$x<$data[0];$x++)
|
|
|
|
echo "<tr><td><input type=\"button\" value=\"zarejestruj\"></td></tr><br>";
|
|
|
|
echo "<tr><td>".$wiersz["dzien"]." ".$wiersz["godzina"]."</td></tr><br>";
|
|
|
|
|
|
|
|
if ($data[0]<17)
|
|
|
|
{
|
|
|
|
for ($x=$i++;$x<$data[0];$x++)
|
|
|
|
echo "<tr><td><input type=\"button\" value=\"zarejestruj\"></td></tr><br>";
|
|
|
|
}}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
print "</table>";
|
|
|
|
$zapytanie="SELECT `dzien`,`godzina` FROM `wizyty` WHERE `dzien`='2020-12-14' ORDER BY `godzina`";
|
|
|
|
$wynik=mysqli_query($polaczenie,$zapytanie);
|
|
|
|
print "<table class='tabela'>";
|
2021-01-07 14:12:11 +01:00
|
|
|
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)
|
|
|
|
{
|
2021-02-01 22:52:01 +01:00
|
|
|
echo "<tr><td>".$wiersz["dzien"]." ".$wiersz["godzina"]."</td></tr><br>";
|
2021-01-07 14:12:11 +01:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
for ($x=$i++;$x<$data[0];$x++)
|
2021-02-01 22:52:01 +01:00
|
|
|
echo "<tr><td><input type=\"button\" value=\"zarejestruj\"></td></tr><br>";
|
|
|
|
echo "<tr><td>".$wiersz["dzien"]." ".$wiersz["godzina"]."</td></tr><br>";
|
2021-01-07 14:12:11 +01:00
|
|
|
|
|
|
|
if ($data[0]<17)
|
|
|
|
{
|
|
|
|
for ($x=$i++;$x<$data[0];$x++)
|
2021-02-01 22:52:01 +01:00
|
|
|
echo "<tr><td><input type=\"button\" value=\"zarejestruj\"></td></tr><br>";
|
2021-01-07 14:12:11 +01:00
|
|
|
}}
|
2020-12-06 20:15:35 +01:00
|
|
|
}
|
|
|
|
}
|
2021-02-01 22:52:01 +01:00
|
|
|
print "</table>";
|
|
|
|
$zapytanie="SELECT `dzien`,`godzina` FROM `wizyty` WHERE `dzien`='2020-12-15' ORDER BY `godzina`";
|
|
|
|
$wynik=mysqli_query($polaczenie,$zapytanie);
|
|
|
|
print "<table class='tabela'>";
|
|
|
|
for($i=10;$i<18;$i++)
|
|
|
|
{
|
|
|
|
if($wiersz = mysqli_fetch_assoc($wynik))
|
|
|
|
{
|
|
|
|
$data = explode(":", $wiersz["godzina"]);
|
|
|
|
if ($data[0]==$i)
|
|
|
|
{
|
|
|
|
echo "<tr><td>".$wiersz["dzien"]." ".$wiersz["godzina"]."</td></tr><br>";
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
for ($x=$i++;$x<$data[0];$x++)
|
|
|
|
echo "<tr><td><input type=\"button\" value=\"zarejestruj\"></td></tr><br>";
|
|
|
|
echo "<tr><td>".$wiersz["dzien"]." ".$wiersz["godzina"]."</td></tr><br>";
|
|
|
|
|
|
|
|
if ($data[0]<17)
|
|
|
|
{
|
|
|
|
for ($x=$i++;$x<$data[0];$x++)
|
|
|
|
echo "<tr><td><input type=\"button\" value=\"zarejestruj\"></td></tr><br>";
|
|
|
|
}}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
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>
|