-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhomepage.php
More file actions
132 lines (96 loc) · 4.93 KB
/
Copy pathhomepage.php
File metadata and controls
132 lines (96 loc) · 4.93 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
<?php
//HOMEPAGE
// Copyright © 2021/2022 - Ciakmov - Simone Lutero & Eleonora Fabbri- all rights reserved.
?>
<!DOCTYPE html>
<html>
<head>
<title>Homepage</title>
<!-- IMMAGINE FAVICON -->
<link rel="icon" type="image/x-icon" href="./media/logo/logo_min.png"/>
<?php
echo "<link rel='stylesheet' type='text/css' href='stile.css'>";
echo "<link rel='stylesheet' type='text/css' href='stileNavFoot.css'>";
echo "<link rel='preconnect' href='https://fonts.googleapis.com'>";
echo "<link rel='preconnect' href='https://fonts.gstatic.com' crossorigin>";
echo "<link href='https://fonts.googleapis.com/css2?family=DM+Sans:wght@500&display=swap' rel='stylesheet'>";
echo "<link rel='stylesheet' href='https://www.w3schools.com/w3css/4/w3.css'>";
//FONT NAVBAR
echo "<link href='https://fonts.googleapis.com/css2?family=Poppins&display=swap' rel='stylesheet'>";
echo "<link href='https://fonts.googleapis.com/css2?family=Nanum+Pen+Script&family=Righteous&display=swap' rel='stylesheet'>";
/*font per pulsante della <subscribearea></subscribearea>*/
echo "<link href='https://fonts.googleapis.com/css2?family=Poppins&display=swap' rel='stylesheet'>";
?>
</head>
<body>
<?php
include('navbar.php');
?>
<div id="collage">
<?php // <button onclick="lightmode()">LightMode</button> ?>
<h1 id="nomesito">CIAKMOV</h1>
<div id="search">
<button id="btnfilm" class="button"><a href="filmspage.php"><span>Film</span></a></button>
<button id="btncinema" class="button"><a href="cinemaspage.php"><span>Città</span></a></button>
</div>
</div>
<h2 id="t1"><mark class="stickers">🎬</mark> Tra le ultime uscite </h2>
<div id="lastfilms">
<?php
require_once("files/connproj.php");//inclusione file connessione al database
$query= "SELECT * FROM film ORDER BY datauscita DESC LIMIT 6"; //seleziona solo gli ultimi 6 film usciti
$res = mysqli_query($connection, $query);
if(mysqli_num_rows($res) > 0){
while($row = mysqli_fetch_assoc($res)){
?>
<a href="filmspage.php"><img class="filmc" src="<?= $row['copertina'] ?>"></a>
<?php } } ?>
</div>
<div id="subscribearea">
<?php //se admin
if (isset($_SESSION['email']) && ($_SESSION['email']==$admin1 || $_SESSION['email']==$admin2)){ ?>
<div id="subscribe">
<h2 id="subtit"> Funzioni amministratore: </h2>
</div>
<div id="functionsarea">
<button id="newc" class="button"> <div id="f3icon"></div> <span><a id="link" href="files/formaddcinema.php"> Inserisci un nuovo Cinema! </a></span> </button>
<button id="newf" class="button"> <div id="f4icon"></div> <span><a id="link" href="files/formaddfilm.php"> Inserisci un nuovo Film! </a> </span> </button>
<button id="newsletter" class="button"> <div id="f1icon"></div> <span><a id="link" href="files/formnewsletter.php"> Invia Newsletter! </a> </span> </button>
</div>
<?php }else{?>
<div id="subscribe">
<h2 id="subtit">Ti piacciono i film?</h2>
</div>
<div id="functionsarea">
<div id="f1">
<div id="f1icon"></div>
<div class="ftit">
<p>Newsletter</p>
</div>
<p class="descr">Rimanere aggiornato sulle ultime uscite</p>
</div>
<div id="f2">
<div id="f2icon"></div>
<div class="ftit">
<p>Recensioni</p>
</div>
<p class="descr">Scoprire i pareri degli altri utenti</p>
</div>
<?php //se non ha fatto accesso
if (!isset($_SESSION['email'])){ ?>
<div id="arw"></div>
</div>
<button id="loginbtn" class="button"><span><a id="link" href="formlogin.php">Login</a></span></button>
<?php }} ?>
</div>
<?php include('footer.html'); ?>
</div>
<script>
function lightmode()
{
var bd = document.body; //body pagina
bd.classList.toggle("body-light-mode");
}
</script>
</body>
</html>