2021-02-01 22:51:05 +01:00
|
|
|
<!DOCTYPE html>
|
2020-12-06 20:15:35 +01:00
|
|
|
<html>
|
2021-02-01 22:51:05 +01:00
|
|
|
<head>
|
2021-02-08 21:30:39 +01:00
|
|
|
<!--<link rel="stylesheet" href="style.css">-->
|
2021-02-01 22:51:05 +01:00
|
|
|
<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>Recepcjonista</h1>
|
|
|
|
<script type="text/javascript">
|
|
|
|
function przekierowanie()
|
|
|
|
{
|
|
|
|
window.location.replace("../rejestracja/index.php");
|
|
|
|
}
|
|
|
|
</script>
|
2021-01-30 17:10:07 +01:00
|
|
|
<?php
|
2021-02-08 21:30:39 +01:00
|
|
|
$zmiana10=$zmiana11=$zmiana12=$zmiana13=$zmiana14=$zmiana15=$zmiana16=$zmiana17="";
|
2021-01-30 17:10:07 +01:00
|
|
|
$zapytanie2="";
|
2021-02-08 21:30:39 +01:00
|
|
|
$polaczenie=mysqli_connect('localhost','root','','rejestracja');
|
2021-01-30 17:10:07 +01:00
|
|
|
$zapytanie="SELECT `dzien`,`godzina`, `stan` FROM `wizyty` WHERE `dzien`='2020-12-13' ORDER BY `godzina`";
|
|
|
|
$wynik=mysqli_query($polaczenie,$zapytanie);
|
2021-02-08 21:30:39 +01:00
|
|
|
print '<form method="post" >';
|
2021-01-30 17:10:07 +01:00
|
|
|
print "<div class=\"dni\"><table>";
|
|
|
|
print "<br>";
|
|
|
|
for($i=10;$i<18;$i++)
|
|
|
|
{
|
|
|
|
if($wiersz = mysqli_fetch_assoc($wynik))
|
|
|
|
{
|
|
|
|
$data = explode(":", $wiersz["godzina"]);
|
|
|
|
if ($data[0]==$i)
|
|
|
|
{
|
2021-02-08 21:30:39 +01:00
|
|
|
echo $wiersz["dzien"]." ".$wiersz["godzina"]." ".$wiersz["stan"]." "."<input type='submit' name='<?php zmiana$i;?>'".' <?php print("zmiana&i");?><br>';
|
|
|
|
print("zmiana$i");
|
2021-01-30 17:10:07 +01:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
for ($x=$i++;$x<$data[0];$x++)
|
|
|
|
echo "brak zaplanowanych wizyt<br>";
|
2021-02-08 21:30:39 +01:00
|
|
|
echo $wiersz["dzien"]." ".$wiersz["godzina"]." ".$wiersz["stan"]." ".'<input type="submit" name="zmiana$i" value="Submit">'."<br>";
|
2021-01-30 17:10:07 +01:00
|
|
|
|
|
|
|
if ($data[0]<17)
|
|
|
|
{
|
|
|
|
for ($x=$i++;$x<$data[0];$x++)
|
|
|
|
echo "brak zaplanowanych wizyt<br>";
|
|
|
|
}}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
print "</table></div>";
|
2021-02-08 21:30:39 +01:00
|
|
|
print '</form>';
|
2021-01-30 17:10:07 +01:00
|
|
|
mysqli_close($polaczenie);
|
2021-02-08 21:30:39 +01:00
|
|
|
if(isset($_POST['zmiana10']) and $_SERVER['REQUEST_METHOD'] == "POST"){
|
|
|
|
print"fdsfs";
|
|
|
|
}
|
2021-01-30 17:10:07 +01:00
|
|
|
?>
|
2021-02-08 21:30:39 +01:00
|
|
|
<span name="abc" ><?php echo "zmiana$i"?></span>
|
2020-12-06 20:15:35 +01:00
|
|
|
<input type="button" value="home" onClick="przekierowanie()">
|
|
|
|
</body>
|
|
|
|
</html>
|