-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
180 lines (147 loc) · 8.37 KB
/
index.php
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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
<?php session_start();
$login="login.php";
$subscribe="subscribe.php";
$msg = "";
if (isset($_SESSION['firstname'])) {
$name = $_SESSION['firstname'];
$msg = '<li class="nav-item"><a class="nav-link text-danger disabled" href="#">Welcome '.$name.'</a></li>';
}else {
header("location: login.php");
// $msg = '<li class="nav-item"><a class="nav-link text-danger" href="'.$login.'">Log in</a></li><li class="nav-item"><a class="nav-link text-danger" href="'.$subscribe.'">Subscribe</a></li>';
}
if(isset($_POST['logout'])){ //logging out
session_destroy();
header("location: login.php");
}
?>
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z" crossorigin="anonymous">
<!--stylesheet-->
<link rel="stylesheet" href="css/style.css">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Oswald&display=swap" rel="stylesheet">
<title>Nextflix</title>
</head>
<body>
<!--navbar start-->
<nav class="navbar navbar-expand-lg navbar-expand-sm navbar-dark" style="background-color: #2d2d2d;">
<a class="navbar-brand" href="#"><img src="./images/logo.png" href="#" alt="Nextflix logo"></a>
<button class="navbar-toggler" type="button" class="btn btn-danger" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav mr-auto">
<li class="nav-item active">
<a class="nav-link" href="index.php">Home <span class="sr-only">(current)</span></a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Categories
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
<a class="dropdown-item" href="index.php">Movies</a>
<a class="dropdown-item" href="series.php">Series</a>
</div>
</li>
<li class="nav-item">
<a class="nav-link" href="contact.php">contact</a>
</li>
<?php echo $msg; ?>
</ul>
<form method="POST" class="form-inline my-2 my-lg-0">
<input id="search" class="form-control mr-sm-2" type="search" placeholder="Search" aria-label="Search">
<div class="btn-toolbar">
<button id="goSearch" type="button" class="btn btn-danger" style="background-color: #761313;">search</button>
</div>
<div class="btn-toolbar">
<button name="logout" type="submit" class="btn btn-danger" style="background-color: #761313; margin-left: 9px;">log out</button>
</div>
</form>
</div>
</nav>
<!--navbar end-->
<div id="div0" class="posters">
</div>
<!--slider start-->
<div class="home">
<div id="carouselExampleCaptions" class="carousel slide" data-ride="carousel">
<ol class="carousel-indicators">
<li data-target="#carouselExampleCaptions" data-slide-to="0" class="active"></li>
<li data-target="#carouselExampleCaptions" data-slide-to="1"></li>
<li data-target="#carouselExampleCaptions" data-slide-to="2"></li>
</ol>
<div class="carousel-inner">
<div class="carousel-item active">
<!-- <img src="images/avengers.jpg" class="d-block w-100" alt="..."> -->
<div class="embed-responsive embed-responsive-16by9">
<iframe class="d-block w-100" width="560" height="315" src="https://www.youtube.com/embed/6ZfuNTqbHE8"></iframe>
</div>
<!-- <div class="carousel-caption d-none d-md-block">
<h5>Action</h5>
<p>Nulla vitae elit libero, a pharetra augue mollis interdum.</p>
</div> -->
</div>
<div class="carousel-item">
<!-- <img src="images/joker.jpg" class="d-block w-100" alt="..."> -->
<div class="embed-responsive embed-responsive-16by9">
<iframe class="d-block w-100" width="560" height="315" src="https://www.youtube.com/embed/-_DJEzZk2pc"></iframe>
</div>
<!-- <div class="embed-responsive embed-responsive-16by9">
<iframe class="embed-responsive-item" src="https://www.youtube.com/embed/watch?v=6ZfuNTqbHE8" allowfullscreen></iframe>
</div> -->
<!-- <div class="carousel-caption d-none d-md-block">
<h5>Horror</h5>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
</div> -->
</div>
<div class="carousel-item">
<!-- <img src="./images/fastandfurious.jpg" class="d-block w-100" alt="..."> -->
<div class="embed-responsive embed-responsive-16by9">
<iframe class="d-block w-100" width="560" height="315" src="https://www.youtube.com/embed/b736ZM_KfEk"></iframe>
</div>
<!-- <div class="carousel-caption d-none d-md-block">
<h5>Animation</h5>
<p>Praesent commodo cursus magna, vel scelerisque nisl consectetur.</p>
</div> -->
</div>
</div>
<a class="carousel-control-prev" href="#carouselExampleCaptions" role="button" data-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="carousel-control-next" href="#carouselExampleCaptions" role="button" data-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
</div>
<!--slider end-->
<div class="container" style="padding: 0; max-width: 100%;">
<div id="div1" class="posters">
<h1>Latest Movies</h1>
</div>
<div id="div2" class="posters">
<h1>Popular Movies</h1>
</div>
<div id="div3" class="posters">
<h1>Upcoming Movies</h1>
</div>
<footer style="max-width: 100%; padding: 2% 20%; background-color: #2d2d2d">
<p class="float-right"><a href="#">Back to top</a></p>
<p> © 2020-2021 Company,Inc <a href="#"> Privacy </a> <a href="#"> Terms </a> </p>
</footer>
</div>
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js" integrity="sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js" integrity="sha384-B4gt1jrGC7Jh4AgTPSdUtOBvfO8shuf57BaghqFfPlYxofvL8/KUEfYiJOMMV+rV" crossorigin="anonymous"></script>
<script src="javascript/home.js"></script>
</body>
</html>