forked from codewithsadee/filmlane
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
306 lines (226 loc) · 9.34 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
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
<?php
require_once 'api.php';
// Fetch recent anime movies
$recentMovies = $tmdbApi->getLatestAnime();
// Fetch popular anime
$popularAnime = $tmdbApi->getPopularAnimeMovies();
// Fet Now playing anime
$nowPlaying = $tmdbApi->getNowPlayingMovies();
// Meta Information
$metaDescription = "Watch Latest trending and popular Japnese Anime Movies and TV Shows for free in HD in Both English Dubbed, Subbed as well as frech subbed";
$metaTitle = "Watch Latest Anime Movies & TV Shows";
$siteName = "AnimeOcean";
$metaAuthor = "AnimeOcean";
$metaImage = "/assets/images/banner.png";
$metaKeywords = "Anime, free anime tvshows, anime tv shows in hd, watch anime tv shows for free, animeocean";
?>
<!DOCTYPE html>
<html lang="en">
<!-- HEAD SECTION STARTS -->
<?php include ($_SERVER["DOCUMENT_ROOT"] . "/include/header.php"); ?>
</head>
<!-- HEAD SECTION ENDS -->
<body id="top">
<!--
- #HEADER
-->
<?php include ($_SERVER["DOCUMENT_ROOT"] . "/include/menu.php"); ?>
<main>
<article>
<!-- cta search -->
<?php include ($_SERVER["DOCUMENT_ROOT"] . "/include/search_form.php"); ?>
<!--
- RECENT
-->
<section class="upcoming">
<div class="container">
<div class="flex-wrapper">
<div class="title-wrapper">
<p class="section-subtitle">Online Streaming</p>
<h2 class="h2 section-title">Hot TV Shows</h2>
</div>
</div>
<ul class="movies-list has-scrollbar">
<?php foreach ($recentMovies['results'] as $movie) : ?>
<?php
// Fetch movie details to get the runtime
$movieDetails = $tmdbApi->getMovieDetails($movie['id']);
$runtime2 = $movieDetails['episode_run_time'] ?? 'N/A';
?>
<li>
<div class="movie-card">
<a href="/tv/<?= $movie['id'] ;?>">
<figure class="card-banner">
<img src="https://image.tmdb.org/t/p/w500<?= $movie['poster_path'] ?>" alt="<?= $movie['name'] ?>">
</figure>
</a>
<div class="title-wrapper">
<a href="/tv/<?= $movie['id'] ;?>">
<h3 class="card-title"><?= $movie['name'] ?></h3>
</a>
<time datetime="<?= $movie['first_air_date'] ?>"><?= date('Y', strtotime($movie['first_air_date'])) ?></time>
</div>
<div class="card-meta">
<div class="badge badge-outline">HD</div>
<div class="duration">
<ion-icon name="time-outline"></ion-icon>
<time datetime="<?= $runtime2 ?>"><?= $runtime2 ?> min</time>
</div>
<div class="rating">
<ion-icon name="star"></ion-icon>
<data><?= $movie['vote_average'] ?></data>
</div>
</div>
</div>
</li>
<?php endforeach; ?>
</ul>
</div>
</section>
<!--
- #SERVICE
-->
<section class="service">
<div class="container">
<div class="service-banner">
<figure>
<img src="https://image.tmdb.org/t/p/w500/67YXOoKGODyGvJXfXzVmgHNXYh8.jpg" alt="HD 4k resolution! only $3.99">
</figure>
<a href="#" download class="service-btn">
<span>Start Watching Now!</span>
<ion-icon name="download-outline"></ion-icon>
</a>
</div>
<div class="service-content">
<p class="service-subtitle">Free Streaming</p>
<h2 class="h2 service-title">Watch and Download Anime Movies</h2>
<p class="service-text">
You can Watch and Download any Anime Movie from our website for free without having to pay or register for an account. All movies are available from multiple servers in English.
</p>
<ul class="service-list">
<li>
<div class="service-card">
<div class="card-icon">
<ion-icon name="tv"></ion-icon>
</div>
<div class="card-content">
<h3 class="h3 card-title">Enjoy on Your TV.</h3>
<p class="card-text">
Even if you visit from your smart TV, you will be able to watch Anime in HD for free!
</p>
</div>
</div>
</li>
<li>
<div class="service-card">
<div class="card-icon">
<ion-icon name="videocam"></ion-icon>
</div>
<div class="card-content">
<h3 class="h3 card-title">Watch Everywhere.</h3>
<p class="card-text">
Watch from anywhere, and on any device without restrictions
</p>
</div>
</div>
</li>
</ul>
</div>
</div>
</section>
<!--
- #TOP RATED
-->
<section class="top-rated">
<div class="container">
<p class="section-subtitle">Online Streaming</p>
<h2 class="h2 section-title">Top Rated Anime Movies</h2>
<ul class="movies-list">
<?php foreach ($popularAnime['results'] as $anime_movie) : ?>
<?php
// Fetch movie details to get the runtime
$movieDetails2 = $tmdbApi->getMovieDetails($anime_movie['id']);
$runtime1 = $movieDetails2['runtime'] ?? 'N/A';
?>
<li>
<div class="movie-card">
<a href="/movie/<?= $anime_movie['id'] ?>">
<figure class="card-banner">
<img src="https://image.tmdb.org/t/p/w500<?= $anime_movie['poster_path'] ?>" alt="<?= $anime_movie['title'] ?>">
</figure>
</a>
<div class="title-wrapper">
<a href="/movie/<?= $anime_movie['id'] ?>">
<h3 class="card-title"><?= $anime_movie['title'] ?></h3>
</a>
<time datetime="<?= $anime_movie['release_date'] ?>"><?= date('Y', strtotime($anime_movie['release_date'])) ?></time>
</div>
<div class="card-meta">
<div class="badge badge-outline">HD</div>
<div class="duration">
<ion-icon name="time-outline"></ion-icon>
<time datetime="<?= $runtime1 ?>"><?= $runtime1 ?> min</time>
</div>
<div class="rating">
<ion-icon name="star"></ion-icon>
<data><?= $anime_movie['vote_average'] ?></data>
</div>
</div>
</div>
</li>
<?php endforeach; ?>
</ul>
</div>
</section>
<!--
- #TV SERIES
-->
<section class="tv-series">
<div class="container">
<p class="section-subtitle">Now Playing</p>
<h2 class="h2 section-title">Movies currently in theatre</h2>
<ul class="movies-list">
<?php foreach ($nowPlaying['results'] as $now_movie) : ?>
<?php
// Fetch movie details to get the runtime
$movieDetails3 = $tmdbApi->getMovieDetails($now_movie['id']);
$runtime3 = $movieDetails['runtime'] ?? 'N/A';
?>
<li>
<div class="movie-card">
<a href="./movie-details.html">
<figure class="card-banner">
<img src="https://image.tmdb.org/t/p/w500<?= $now_movie['poster_path'] ?>" alt="<?= $now_movie['title'] ?>">
</figure>
</a>
<div class="title-wrapper">
<a href="./movie-details.html">
<h3 class="card-title"><?= $now_movie['title'] ?></h3>
</a>
<time datetime="<?= $now_movie['release_date'] ?>"><?= date('Y', strtotime($now_movie['release_date'])) ?></time>
</div>
<div class="card-meta">
<div class="badge badge-outline">HD</div>
<div class="duration">
<ion-icon name="time-outline"></ion-icon>
<time datetime="<?= $runtime3 ?>"><?= $runtime3 ?> min</time>
</div>
<div class="rating">
<ion-icon name="star"></ion-icon>
<data><?= $now_movie['vote_average'] ?></data>
</div>
</div>
</div>
</li>
<?php endforeach; ?>
</ul>
</div>
</section>
</article>
</main>
<!--
- #FOOTER
-->
<?php include ($_SERVER["DOCUMENT_ROOT"] . "/include/footer.php"); ?>
</body>
</html>