Skip to content

Commit 6356dc2

Browse files
committed
create pagine vedi_recensioni e scrivi_una_recensione, sistemati messaggi di errore e submenu delle recensioni nell'index
1 parent c4b67a3 commit 6356dc2

5 files changed

+138
-4
lines changed

Impostazioni.php

+28
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,34 @@
1515
window.history.replaceState(null, null, window.location.href);
1616
1717
</script>
18+
<style>
19+
/*stile scrollbar*/
20+
21+
::-webkit-scrollbar
22+
{
23+
width: 1vw;
24+
border-radius: 1vw;
25+
}
26+
27+
::-webkit-scrollbar-thumb
28+
{
29+
background-color: rgb(37, 36, 36);
30+
height: 1vw;
31+
width: 2vw;
32+
border: .2vw solid rgb(172, 172, 172);
33+
border-radius: 1vw;
34+
}
35+
36+
::-webkit-scrollbar-thumb:hover
37+
{
38+
background-color: rgb(87, 82, 82);
39+
}
40+
41+
::-webkit-scrollbar-track
42+
{
43+
background-color: grey;
44+
}
45+
</style>
1846
</head>
1947
2048
<body class = "bg-info pb-5">

index.php

+44-3
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@
3333
/*****************/
3434

3535
/*stile dei link presenti nella barra di navigazione*/
36+
37+
/*submenu profilo*/
3638
#opzioni_profilo
3739
{
3840
position: absolute;
@@ -77,6 +79,42 @@
7779
{
7880
display: flex;
7981
}
82+
/**********/
83+
84+
/*submenu recensioni*/
85+
#recensioni:hover,
86+
#scrivi_recensione:hover,
87+
#vedi_recensioni:hover
88+
{
89+
background-color: red;
90+
cursor: pointer;
91+
}
92+
93+
#recensioni a,
94+
#scrivi_recensione a,
95+
#vedi_recensioni a
96+
{
97+
display: inline-block;
98+
padding: 1em;
99+
}
100+
101+
#opzioni_recensioni
102+
{
103+
position: absolute;
104+
top: 3.5em;
105+
right: 0;
106+
display: none;
107+
flex-direction: column;
108+
background-color: rgb(13, 110, 253);
109+
z-index: 1;
110+
}
111+
112+
#recensioni:hover ~ #opzioni_recensioni,
113+
#opzioni_recensioni:hover
114+
{
115+
display: flex;
116+
}
117+
/*******************/
80118
</style>
81119

82120
<script>
@@ -100,9 +138,12 @@
100138
else print('<li id="login"><a style="color: white; font-weight: bold" class="text-decoration-none" href="login.php">Login</a></li>');
101139
?>
102140
<li id="registrazione"><a style="color: white; font-weight: bold" class="text-decoration-none" href="registrazione.php">Registrati</a></li>
103-
<li id="prenotazione">
104-
<a style="color: white; font-weight: bold" class="text-decoration-none" href="prenotazione.php">Prenota ora</a>
105-
</li>
141+
<li id="prenotazione"><a style="color: white; font-weight: bold" class="text-decoration-none" href="prenotazione.php">Prenota ora</a></li>
142+
<li id="recensioni"><a style="color: white; font-weight: bold" class="text-decoration-none">Recensioni</a></li>
143+
<div id="opzioni_recensioni">
144+
<div id="vedi_recensioni"><a style="color: white; font-weight: bold" class="text-decoration-none" href="vedi_recensioni.php">Vedi recensioni</a></div>
145+
<div id="scrivi_recensione"><a style="color: white; font-weight: bold" class="text-decoration-none" href="scrivi_recensione.php">Scrivi recensione</a></div>
146+
</div>
106147
</ul>
107148
</nav>
108149
<?php

prenotazione.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
session_start();
33
if(!isset($_SESSION['email']))
44
{
5-
$_SESSION['error_message'] = 'Per accedere a questa pagina devi prima aver effettuato il login';
5+
$_SESSION['error_message'] = 'Per poter prenotare devi prima aver effettuato il login';
66
header('Location: http://localhost:8080/booking-appointments/');
77
}
88
?>

scrivi_recensione.php

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<?php
2+
session_start();
3+
if(!isset($_SESSION['email']))
4+
{
5+
$_SESSION['error_message'] = 'Per poter scrivere una recensione devi prima aver effettuato il login';
6+
header('Location: http://localhost:8080/booking-appointments/');
7+
}
8+
?>
9+
10+
<!DOCTYPE html>
11+
<html lang = "en">
12+
13+
<head>
14+
<meta charset="UTF-8">
15+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
16+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
17+
<title>Scrivi recensione</title>
18+
<link rel="icon" href="img/booking.png">
19+
<!-- Bootstrap -->
20+
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-Zenh87qX5JnK2Jl0vWa8Ck2rdkQ2Bzep5IDxbcnCeuOxjzrPF/et3URy9Bv1WTRi" crossorigin="anonymous">
21+
<script>
22+
23+
if (window.history.replaceState) //evita di ricevere messaggio errore dopo refresh pagina
24+
window.history.replaceState(null, null, window.location.href);
25+
26+
</script>
27+
</head>
28+
29+
<body class = "bg-info">
30+
<h1 class = "text-center text-white mt-5">SCRIVI UNA RECENSIONE</h1>
31+
32+
33+
<!-- Bootstrap -->
34+
<script src = "https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity = "sha384-OERcA2EqjJCMA+/3y+gxIOqMEjwtxJY7qPCqsdltbNJuaOe923+mo//f6V8Qbsw3" crossorigin = "anonymous"></script>
35+
</body>
36+
37+
</html>

vedi_recensioni.php

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<!DOCTYPE html>
2+
<html lang = "en">
3+
4+
<head>
5+
<meta charset="UTF-8">
6+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
7+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
8+
<title>Vedi recensioni</title>
9+
<link rel="icon" href="img/booking.png">
10+
<!-- Bootstrap -->
11+
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-Zenh87qX5JnK2Jl0vWa8Ck2rdkQ2Bzep5IDxbcnCeuOxjzrPF/et3URy9Bv1WTRi" crossorigin="anonymous">
12+
<script>
13+
14+
if (window.history.replaceState) //evita di ricevere messaggio errore dopo refresh pagina
15+
window.history.replaceState(null, null, window.location.href);
16+
17+
</script>
18+
</head>
19+
20+
<body class = "bg-info">
21+
<h1 class = "text-center text-white mt-5">VEDI RECENSIONI</h1>
22+
23+
24+
<!-- Bootstrap -->
25+
<script src = "https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity = "sha384-OERcA2EqjJCMA+/3y+gxIOqMEjwtxJY7qPCqsdltbNJuaOe923+mo//f6V8Qbsw3" crossorigin = "anonymous"></script>
26+
</body>
27+
28+
</html>

0 commit comments

Comments
 (0)