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-13 21:48:18 +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-13 21:48:18 +01:00
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-02-13 21:48:18 +01:00
$zapytanie = " SELECT `dzien`,`godzina`, `stan`, `imie`, `nazwisko` FROM `wizyty` INNER JOIN `pacjenci` WHERE `dzien`='2020-12-13' AND pacjenci.telefon=wizyty.telefon ORDER BY `godzina` " ;
2021-01-30 17:10:07 +01:00
$wynik = mysqli_query ( $polaczenie , $zapytanie );
2021-02-13 21:48:18 +01:00
echo '<form method="POST" id="formularz2">' ;
print " <div id= 'tabele'> " ;
/*print '<form method="post" >';*/
print " <table class='tabela'> " ;
2021-01-30 17:10:07 +01:00
print " <br> " ;
2021-02-13 21:48:18 +01:00
$tab = [];
$licznik = 0 ;
for ( $i = 10 ; $i < 18 ; $i ++ )
2021-01-30 17:10:07 +01:00
{
if ( $wiersz = mysqli_fetch_assoc ( $wynik ))
{
$data = explode ( " : " , $wiersz [ " godzina " ]);
2021-02-13 21:48:18 +01:00
$tab [ $data [ 0 ]] = $wiersz [ " dzien " ];
$tab [ $data [ 0 ] + 10 ] = $wiersz [ " godzina " ];
$tab [ $data [ 0 ] + 20 ] = $wiersz [ " imie " ];
$tab [ $data [ 0 ] + 30 ] = $wiersz [ " nazwisko " ];
$tab [ $data [ 0 ] + 40 ] = $wiersz [ " stan " ];
2021-01-30 17:10:07 +01:00
}
}
2021-02-13 21:48:18 +01:00
print " <tr><td>godzina</td><td colspan='2'>terminy</td><td>imie</td><td>nazwisko</td><td>stan</td><td>potwierdzenie</td></tr><br> " ;
for ( $i = 10 ; $i < 18 ; $i ++ )
{
if ( isset ( $tab [ $i ]) && $tab [ $i + 40 ] == 0 )
print " <tr><td> " . $i . " </td><td> " . $tab [ $i ] . " </td><td> " . $tab [ $i + 10 ] . " </td><td> " . $tab [ $i + 20 ] . " </td><td> " . $tab [ $i + 30 ] . " </td><td> " . $tab [ $i + 40 ] . " </td><td><input type='submit' value='zatwierdz' name='wizyta1'></td></tr><br> " ;
else if ( isset ( $tab [ $i ]) && $tab [ $i + 40 ] == 1 )
print " <tr><td> " . $i . " </td><td> " . $tab [ $i ] . " </td><td> " . $tab [ $i + 10 ] . " </td><td> " . $tab [ $i + 20 ] . " </td><td> " . $tab [ $i + 30 ] . " </td><td> " . $tab [ $i + 40 ] . " </td><td>zatwierdzono</td></tr><br> " ;
else
echo " <tr><td> " . $i . " </td><td colspan='6'>wolny termin / brak chętnych</td></tr><br> " ;
$licznik ++ ;
2021-02-08 21:30:39 +01:00
}
2021-02-13 21:48:18 +01:00
print " </table> " ;
$zapytanie = " SELECT `dzien`,`godzina`, `stan`, `imie`, `nazwisko` FROM `wizyty` INNER JOIN `pacjenci` WHERE `dzien`='2020-12-14' AND pacjenci.telefon=wizyty.telefon ORDER BY `godzina` " ;
$wynik = mysqli_query ( $polaczenie , $zapytanie );
print " <table class='tabela'> " ;
print " <br> " ;
$tab = [];
for ( $i = 10 ; $i < 18 ; $i ++ )
{
if ( $wiersz = mysqli_fetch_assoc ( $wynik ))
{
$data = explode ( " : " , $wiersz [ " godzina " ]);
$tab [ $data [ 0 ]] = $wiersz [ " dzien " ];
$tab [ $data [ 0 ] + 10 ] = $wiersz [ " godzina " ];
$tab [ $data [ 0 ] + 20 ] = $wiersz [ " imie " ];
$tab [ $data [ 0 ] + 30 ] = $wiersz [ " nazwisko " ];
$tab [ $data [ 0 ] + 40 ] = $wiersz [ " stan " ];
}
}
print " <tr><td>godzina</td><td colspan='2'>terminy</td><td>imie</td><td>nazwisko</td><td>stan</td><td>potwierdzenie</td></tr><br> " ;
for ( $i = 10 ; $i < 18 ; $i ++ )
{
if ( isset ( $tab [ $i ]) && $tab [ $i + 40 ] == 0 )
print " <tr><td> " . $i . " </td><td> " . $tab [ $i ] . " </td><td> " . $tab [ $i + 10 ] . " </td><td> " . $tab [ $i + 20 ] . " </td><td> " . $tab [ $i + 30 ] . " </td><td> " . $tab [ $i + 40 ] . " </td><td><input type='submit' value='zatwierdz' name='<?php echo wizyta " . $licznik . " ?>'></td></tr><br> " ;
else if ( isset ( $tab [ $i ]) && $tab [ $i + 40 ] == 1 )
print " <tr><td> " . $i . " </td><td> " . $tab [ $i ] . " </td><td> " . $tab [ $i + 10 ] . " </td><td> " . $tab [ $i + 20 ] . " </td><td> " . $tab [ $i + 30 ] . " </td><td> " . $tab [ $i + 40 ] . " </td><td>zatwierdzono</td></tr><br> " ;
else
echo " <tr><td> " . $i . " </td><td colspan='6'>wolny termin / brak chętnych</td></tr><br> " ;
}
print " </table> " ;
$zapytanie = " SELECT `dzien`,`godzina`, `stan`, `imie`, `nazwisko` FROM `wizyty` INNER JOIN `pacjenci` WHERE `dzien`='2020-12-15' AND pacjenci.telefon=wizyty.telefon ORDER BY `godzina` " ;
$wynik = mysqli_query ( $polaczenie , $zapytanie );
print " <table class='tabela'> " ;
print " <br> " ;
$tab = [];
for ( $i = 10 ; $i < 18 ; $i ++ )
{
if ( $wiersz = mysqli_fetch_assoc ( $wynik ))
{
$data = explode ( " : " , $wiersz [ " godzina " ]);
$tab [ $data [ 0 ]] = $wiersz [ " dzien " ];
$tab [ $data [ 0 ] + 10 ] = $wiersz [ " godzina " ];
$tab [ $data [ 0 ] + 20 ] = $wiersz [ " imie " ];
$tab [ $data [ 0 ] + 30 ] = $wiersz [ " nazwisko " ];
$tab [ $data [ 0 ] + 40 ] = $wiersz [ " stan " ];
}
}
print " <tr><td>godzina</td><td colspan='2'>terminy</td><td>imie</td><td>nazwisko</td><td>stan</td><td>potwierdzenie</td></tr><br> " ;
for ( $i = 10 ; $i < 18 ; $i ++ )
{
if ( isset ( $tab [ $i ]) && $tab [ $i + 40 ] == 0 )
print " <tr><td> " . $i . " </td><td> " . $tab [ $i ] . " </td><td> " . $tab [ $i + 10 ] . " </td><td> " . $tab [ $i + 20 ] . " </td><td> " . $tab [ $i + 30 ] . " </td><td> " . $tab [ $i + 40 ] . " </td><td><input type='button' value='zatwierdz'></td></tr><br> " ;
else if ( isset ( $tab [ $i ]) && $tab [ $i + 40 ] == 1 )
print " <tr><td> " . $i . " </td><td> " . $tab [ $i ] . " </td><td> " . $tab [ $i + 10 ] . " </td><td> " . $tab [ $i + 20 ] . " </td><td> " . $tab [ $i + 30 ] . " </td><td> " . $tab [ $i + 40 ] . " </td><td>zatwierdzono</td></tr><br> " ;
else
echo " <tr><td> " . $i . " </td><td colspan='6'>wolny termin / brak chętnych</td></tr><br> " ;
}
print " </table></div></form><div id='czysc'></div> " ;
for ( $i = 10 ; $i < 38 ; $i ++ )
{
if ( isset ( $_POST [ " formularz2 " ]))
if ( isset ( $_POST [ " wizyta1 " ]))
print " wizyta " ;
}
mysqli_close ( $polaczenie );
2021-01-30 17:10:07 +01:00
?>
2021-02-13 21:48:18 +01:00
<!--< span name = " abc " >< ? php //echo "wizyta$licznik"?></span>-->
2020-12-06 20:15:35 +01:00
< input type = " button " value = " home " onClick = " przekierowanie() " >
</ body >
</ html >