-
Notifications
You must be signed in to change notification settings - Fork 0
/
fil_actu.php
706 lines (552 loc) · 30.4 KB
/
fil_actu.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
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
<?php
// ini_set('display_errors', 1);
// ini_set('display_startup_errors', 1);
include('assets/php/config.php');
// include("ressources/pop_up_film_information.php");
include("ressources/pop_up_connexion.php");
// include("ressources/pop_up_share.php");
include('assets/php/comments.php');
?>
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- <meta http-equiv= »Content-Type » content= »text/html; charset=utf-8″ /> -->
<title>REAH | Fil d'actualité</title>
<!-- <link rel="stylesheet" href="assets/css/profil.css"> -->
<link rel="stylesheet" href="assets/css/defis.css">
<link rel="stylesheet" href="assets/css/styles.css">
<link rel="stylesheet" href="assets/css/fil_actu.css">
<link rel="stylesheet" href="assets/css/fil_actu2.css">
<link rel="apple-touch-icon" sizes="180x180" href="sources/img/favicon/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="sources/img/favicon/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="sources/img/favicon/favicon-16x16.png">
<link rel="manifest" href="sources/img/favicon/site.webmanifest">
<link rel="mask-icon" href="sources/img/favicon/safari-pinned-tab.svg" color="#d60036">
<meta name="msapplication-TileColor" content="#2b5797">
<meta name="theme-color" content="#ffffff">
<link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;900&display=swap"
rel="stylesheet">
<script src="assets/js/libraries/svg-inject-master/src/svg-inject.js"></script>
<script src="https://player.vimeo.com/api/player.js"></script>
</head>
<body>
<!-- Accueil -->
<?php
if (!func::checkLoginState($db)) { #If the user is not connected
if (!isset($_GET['accueil'])) {
if (!isset($_GET['comment_send'])) {
echo '
<section class="accueil" id="accueil">
<a class="accueil_reah_logo" href="fil_actu.php"></a>
<img src="sources/img/accueil_img.png" class="accueil_img" alt="">
<div class="accueil_text">
<p class="h1"><span>R</span>EAH
</p>
<p>Stimule ton esprit créatif en participant aux défis avec tes <nobr> courts-métrages.</nobr> <br>
Tente ta chance de te faire connaître ou contribue au succès des autres. <br> <br> <b> Réalisateurs,
amateurs ou <nobr> débutants ? </nobr> <br> À vos marques, prêt·e·s, <span>tournez !</span> </b></p>
<div class="btn_container">
<a href="login.php" class="btn btn_connexion">Se connecter</a>
<a href="signup.php" class="btn btn_connexion">S\'inscrire</a>
</div>
</div>
<img src="sources/img/accueil_arrow.svg" class="scroll_arrow" alt="">
</section>';
}
}
}
?>
<main class="main_content">
<!-- Signalement -->
<?php
if (isset($message_true)) {
echo '
<p class="message_true_container">
'.$message_true.'
</p>';
}
if (isset($_GET['delete_account'])) {
echo '<p class="message_true_container">Votre compte a bien été supprimé.</p>';
}
?>
<!-- Navigation menu -->
<nav>
<!-- Logo Réah -->
<a class="reah_logo" href="fil_actu.php"> </a>
<div class="menu_nav">
<!-- Categories's title -->
<div class="menu_category">
<p class="category_title category_title1" number="1" number1="2" number2="3">
<?php
if (func::checkLoginState($db)) { #If the user is connected
echo 'Fil d\'actualité';
} else {
echo 'Nouveautés';
}
?>
</p>
<p class="category_title category_title2" number="2" number1="1" number2="3">Défis du moment</p>
<p class="category_title category_title3" number="3" number1="1" number2="2">Explorer</p>
<div class="red_line underline"></div>
<div class="fb_jsb ai-c category_list">
<p class="category_list_title">Catégories</p>
<div class="category_triangle"></div>
</div>
</div>
<!-- Search bar -->
<form action="search.php" method="GET" class="form_search_bar">
<input class="search_bar" name="research" type="text"
placeholder="Défis, courts-métrages, utilisateurs..." oninput="searchEngine(this.value)">
</form>
<?php
if (func::checkLoginState($db)) { # If the user is connected
$query = "SELECT * FROM `users` WHERE user_id = " . $_COOKIE['userid'] . ";";
$stmt = $db->prepare($query);
$stmt->execute();
$row = $stmt->fetch(PDO::FETCH_ASSOC);
echo "<div class='menu_profile'>
<!-- Defi icon -->
<a href='defis.php' class='defi_icon'></a>
<!-- Profile photo -->
<img src='database/profile_pictures/".$row['user_profile_picture']."' class='menu_pp' onclick='toggleBurgerMenu()'>";
} else {
echo "<div class='menu_profile'>
<!-- Defi icon -->
<a href='defis.php' class='defi_icon'></a>
<!-- Profile photo -->
<div class='se-connecter menu_pp_icon' onclick='redirect(`login.php`)' onload='SVGInject(this)'>
</div>";
}
?>
</div>
</nav>
<!-- Category list -->
<div class="category_list_container">
<p class="category_list_category category_list_category1" number="1" number2="2" number3="3">
<?php
if (func::checkLoginState($db)) { #If the user is connected
echo 'Fil d\'actualité';
} else {
echo 'Nouveautés';
}
?>
</p>
<p class="category_list_category category_list_category2" number="2" number2="1" number3="3">
Défis du moment</p>
<p class="category_list_category category_list_category3" number="3" number2="1" number3="2">
Explorer</p>
</div>
<!-- Menu -->
<?php require("ressources/menu.php"); ?>
<!-- Nav footer -->
<div class="nav_footer">
<div class="nav_footer_category" number="1" number2="2" number3="3">
<div class="nouveaute_icon"></div>
<?php
if (func::checkLoginState($db)) { #If the user is connected
echo 'Fil d\'actualité';
} else {
echo 'Nouveautés';
}
?>
</div>
<div class="nav_footer_category" number="2" number2="1" number3="3">
<div class="defi_constraints_icon"></div>
Défis du moment
</div>
<div class="nav_footer_category" number="3" number2="1" number3="2">
<div class="explorer_icon"></div>
Explorer
</div>
</div>
<div class="all_category_container">
<!-- "Ajout récent" catégory -->
<div class="first_category" id="category" number="1">
<!-- prev arrow -->
<div class="arrow_prev_container" onclick="prevArrowClick($(this))"></div>
<!-- Category content -->
<div class="category_content">
<!-- Category title -->
<h1 id="title1">
<div class="red_line title_line"></div>
<?php
if (func::checkLoginState($db)) { #If the user is connected
echo"
FIL D'ACTUALITÉ
<div class='help_icon_container'>
<img src='sources/img/help_icon.png' alt='' class='help_icon'>
<p class='help_message'>La catégorie \"Fil d'actualité\" présente tous les courts-métrages de tes abonnements.</p>
</div>";
}else {
echo"
NOUVEAUTÉS
<div class='help_icon_container'>
<img src='sources/img/help_icon.png' alt='' class='help_icon'>
<p class='help_message'>La catégorie \"Nouveautés\" présente tous les courts-métrages récemment déposés.</p>
</div>";
}
?>
</h1>
<!-- All videos -->
<div class="all_video_container" id="all_video_container">
<?php
if (func::checkLoginState($db)) { # If the user is connected
$user_id = $_COOKIE['userid'];
$query = "SELECT *, DATE_FORMAT(video_duration, '%imin %ss' ) as time FROM `videos`, `users`, `subscription` WHERE user_id = video_user_id AND subscription_subscriber_id = $user_id AND subscription_artist_id = user_id ORDER BY video_id DESC";
$stmt = $db->prepare($query);
$stmt->execute();
$rows = $stmt->fetchAll(PDO::FETCH_ASSOC);
foreach ($rows as $row) {
echo "<!-- Video container -->
<div class='video_container'>
<!-- Short film (class=video) -->
<div class='video_content'>";
if($row['video_poster'] != ''){
echo"
<img src='database/videos_posters/".$row['video_poster']."' class='video_poster'>";
}
echo"
<iframe src='https://player.vimeo.com/video/" . $row['video_url'] . "' frameborder='0' webkitallowfullscreen mozallowfullscreen allowfullscreen class='video'></iframe>
<!-- Name + pp -->
<a href='profil.php?id=" . $row['user_id'] . "' class='user_container'>
<img src='database/profile_pictures/".$row['user_profile_picture'] . "' alt='' class='pp_profile'>
<p class='pseudo'>" . $row['user_username'] . "</p>
<div class='flou'></div>
</a>
<!-- Time -->
<p class='time'>" . $row['time'] . "</p>
</div>
<!-- Short film\'s informations -->
<div class='description_container'>
<div class='fb_jsb'>
<div class='synopsis_title_container' title=" . $row['video_id'] . " onclick='popupFilm(this)' >
<h3 class='synopsis_title'>" . $row['video_title'] . "</h3>
<p class='see_more'>Voir plus
<img src='sources/img/see_more_arrow.svg' class='see_more_arrow' alt=''>
</p>
</div>
<div class='reaction_container'>
<div class='fb_jsb like_container'>";
// <!-- Pop corn image -->
$query10 = "SELECT COUNT(*) as nbr FROM liked WHERE liked_user_id={$_COOKIE['userid']} AND liked_video_id={$row['video_id']}";
$stmt10 = $db->prepare($query10);
$stmt10->execute();
$row10 = $stmt10->fetch(PDO::FETCH_ASSOC);
if ($row10['nbr'] >= 1) {
echo"
<img src='sources/img/pop_corn.png' class='pop_corn_icon' onclick='addLike(this)'>";
} else {
echo"
<img src='sources/img/pop_corn_icon.svg' class='pop_corn_icon' onclick='addLike(this)'>";
}
echo"
<!-- Like\'s number -->
<p class='pop_corn_number' title='".$row["video_id"]."' onclick='popupUserLike(this)'>" . $row['video_like_number'] . " J'aime</p>
</div>
<!-- Comment icon -->
<div class='fb_jc ai-c' title=" . $row['video_id'] . " onclick='popupComment(this)' >
<div class='comment_icon'></div>";
// Comment's number
$query2 = "SELECT COUNT(*) as number FROM comments, videos WHERE comment_video_id=video_id AND video_id={$row['video_id']}";
$stmt2 = $db->prepare($query2);
$stmt2->execute();
$row2 = $stmt2->fetch(PDO::FETCH_ASSOC);
echo "
<p class='profile_comment_title'><nobr>" . $row2['number'] . " commentaires</nobr></p>";
echo "
</div>
<!-- Share icon -->
<div class='share_icon' title=".$row['video_id']." onclick='popupShare(this)'></div>
</div>";
echo "
</div>
<p>" . nl2br($row['video_synopsis']) . "</p>
</div>
</div>";
}
} else {
$query = "SELECT *, DATE_FORMAT(video_duration, '%imin %ss' ) as time FROM `videos`, `users` WHERE user_id = video_user_id ORDER BY video_id DESC";
$stmt = $db->prepare($query);
$stmt->execute();
$rows = $stmt->fetchAll(PDO::FETCH_ASSOC);
foreach ($rows as $row) {
echo "<!-- Video container -->
<div class='video_container'>
<!-- Short film (class=video) -->
<div class='video_content'>";
if($row['video_poster'] != ''){
echo"
<img src='database/videos_posters/".$row['video_poster']."' class='video_poster'>";
}
echo"
<iframe src='https://player.vimeo.com/video/" . $row['video_url'] . "' frameborder='0' webkitallowfullscreen mozallowfullscreen allowfullscreen class='video'></iframe>
<!-- Name + pp -->
<a href='profil.php?id=" . $row['user_id'] . "' class='user_container'>
<img src='database/profile_pictures/".$row['user_profile_picture'] . "' alt='' class='pp_profile'>
<p class='pseudo'>" . $row['user_username'] . "</p>
<div class='flou'></div>
</a>
<!-- Time -->
<p class='time'>" . $row['time'] . "</p>
</div>
<!-- Short film\'s informations -->
<div class='description_container'>
<div class='fb_jsb'>
<div class='synopsis_title_container' title=" . $row['video_id'] . " onclick='popupFilm(this)' >
<h3 class='synopsis_title'>" . $row['video_title'] . "</h3>
<p class='see_more'>Voir plus
<img src='sources/img/see_more_arrow.svg' class='see_more_arrow' alt=''>
</p>
</div>";
if (func::checkLoginState($db)) { # If the user is connected
echo "
<div class='reaction_container'>
<div class='fb_jsb like_container'>";
// <!-- Pop corn image -->
$query10 = "SELECT COUNT(*) as nbr FROM liked WHERE liked_user_id={$_COOKIE['userid']} AND liked_video_id={$row['video_id']}";
$stmt10 = $db->prepare($query10);
$stmt10->execute();
$row10 = $stmt10->fetch(PDO::FETCH_ASSOC);
if ($row10['nbr'] >= 1) {
echo"
<img src='sources/img/pop_corn.png' class='pop_corn_icon' onclick='addLike(this)'>";
} else {
echo"
<img src='sources/img/pop_corn_icon.svg' class='pop_corn_icon' onclick='addLike(this)'>";
}
echo"
<!-- Like\'s number -->
<p class='pop_corn_number' title='".$row["video_id"]."' onclick='popupUserLike(this)'>" . $row['video_like_number'] . " J'aime</p>
</div>
<!-- Comment icon -->
<div class='fb_jc ai-c' title=" . $row['video_id'] . " onclick='popupComment($(this))' >
<div class='comment_icon'></div>";
// Comment's number
$query2 = "SELECT COUNT(*) as number FROM comments, videos WHERE comment_video_id=video_id AND video_id={$row['video_id']}";
$stmt2 = $db->prepare($query2);
$stmt2->execute();
$row2 = $stmt2->fetch(PDO::FETCH_ASSOC);
echo "
<p class='profile_comment_title'><nobr>" . $row2['number'] . " commentaires</nobr></p>";
echo "
</div>
<!-- Share icon -->
<div class='share_icon' title=".$row['video_id']." onclick='popupShare(this)'></div>
</div>";
} else { # If the user is an asshole
echo "
<div class='reaction_container'>
<div class='fb_jsb like_container'>
<!-- Pop corn image -->
<img src='sources/img/pop_corn_icon.svg' class='pop_corn_icon' onclick='popupConnexion()'>
<!-- Like\'s number -->
<p class='pop_corn_number' title='".$row["video_id"]."' onclick='popupUserLike(this)'>" . $row['video_like_number'] . " J'aime</p>
</div>
<!-- Comment icon -->
<div class='fb_jc ai-c' title=" . $row['video_id'] . " onclick='popupConnexion()' >
<div class='comment_icon'></div>";
// Comment's number
$query2 = "SELECT COUNT(*) as number FROM comments, videos WHERE comment_video_id=video_id AND video_id={$row['video_id']}";
$stmt2 = $db->prepare($query2);
$stmt2->execute();
$row2 = $stmt2->fetch(PDO::FETCH_ASSOC);
echo "
<p class='profile_comment_title'><nobr>" . $row2['number'] . " commentaires</nobr></p>";
echo "
</div>
<!-- Share icon -->
<div class='share_icon' onclick='popupConnexion()'></div>
</div>";
}
echo "
</div>
<p>" . nl2br($row['video_synopsis']) . "</p>
</div>
</div>";
}
}
$stmt = null;
$query = null;
$rows = null;
?>
</div>
</div>
<!-- next arrow -->
<div class="arrow_next_container" onclick="nextArrowClick($(this))"></div>
</div>
<div class="second_category" id="category" number="2">
<!-- Category content -->
<div class="category_content">
<!-- Category title -->
<h1 class="title2" id="title2">
<div class="red_line title_line"></div>
DÉFIS DU MOMENT
<div class='help_icon_container'>
<img src='sources/img/help_icon.png' alt='' class='help_icon'>
<p class='help_message'>La catégorie "Défis du moment" présente les deux défis auxquels tu peux participer. Les défis du moment changent tous les mois.</p>
</div>
<a href="defis.php" class="see_defis"><div class="defi_icon"></div>Voir tous les défis</a>
</h1>
<!-- Challenges container -->
<div class="defi_container ">
<?php
$query = "SELECT * FROM defis WHERE defi_verified='1' AND defi_current='1'";
$stmt = $db->prepare($query);
$stmt->execute();
$rows = $stmt->fetchAll(PDO::FETCH_ASSOC);
foreach ($rows as $row) {
echo '
<a href="defi_details.php?defi=' . $row['defi_id'] . '" class="defi_content">
<img src="database/defis_img/'.$row['defi_image'].'" alt="" class="defi_img defi1_img">
<p class="defi_time">Temps restant : <span id="time" time='.$row['defi_date_end'].'></span></p>
</a>';
}
?>
<!-- -->
</div>
<a href="defis.php" class="see_defis2"><div class="defi_icon"></div>Voir tous les défis</a>
</div>
</div>
<div class="third_category" id="category" number="3">
<!-- prev arrow -->
<div class="arrow_prev_container" onclick="prevArrowClick($(this))"></div>
<!-- Category content -->
<div class="category_content">
<!-- Category title -->
<h1 id="title3">
<div class="red_line title_line"></div>
EXPLORER
<div class="help_icon_container">
<img src="sources/img/help_icon.png" alt="" class="help_icon">
<p class="help_message">La catégorie "Explorer" présente tous les courts-métrages déposés sur REAH.</p>
</div>
</h1>
<!-- All videos -->
<div class="all_video_container">
<?php
$query = "SELECT *, DATE_FORMAT(video_duration, '%imin %ss' ) as time FROM `videos`, `users` WHERE user_id = video_user_id ORDER BY RAND()";
$stmt = $db->prepare($query);
$stmt->execute();
$rows = $stmt->fetchAll(PDO::FETCH_ASSOC);
foreach ($rows as $row) {
echo "<!-- Video container -->
<div class='video_container'>
<!-- Short film (class=video) -->
<div class='video_content'>";
if($row['video_poster'] != ''){
echo"
<img src='database/videos_posters/".$row['video_poster']."' class='video_poster'>";
}
echo"
<iframe src='https://player.vimeo.com/video/" . $row['video_url'] . "' frameborder='0' webkitallowfullscreen mozallowfullscreen allowfullscreen class='video'></iframe>
<!-- Name + pp -->
<a href='profil.php?id=" . $row['user_id'] . "' class='user_container'>
<img src='database/profile_pictures/".$row['user_profile_picture'] . "' alt='' class='pp_profile'>
<p class='pseudo'>" . $row['user_username'] . "</p>
<div class='flou'></div>
</a>
<!-- Time -->
<p class='time'>" . $row['time'] . "</p>
</div>
<!-- Short film\'s informations -->
<div class='description_container'>
<div class='fb_jsb'>
<div class='synopsis_title_container' title=" . $row['video_id'] . " onclick='popupFilm(this)'>
<h3 class='synopsis_title'>" . $row['video_title'] . "</h3>
<p class='see_more'>Voir plus
<img src='sources/img/see_more_arrow.svg' class='see_more_arrow' alt=''>
</p>
</div>";
if (func::checkLoginState($db)) { # If the user is connected
echo "
<div class='reaction_container'>
<div class='fb_jsb like_container'>";
// <!-- Pop corn image -->
$query10 = "SELECT COUNT(*) as nbr FROM liked WHERE liked_user_id={$_COOKIE['userid']} AND liked_video_id={$row['video_id']}";
$stmt10 = $db->prepare($query10);
$stmt10->execute();
$row10 = $stmt10->fetch(PDO::FETCH_ASSOC);
if ($row10['nbr'] >= 1) {
echo"
<img src='sources/img/pop_corn.png' class='pop_corn_icon' onclick='addLike(this)'>";
} else {
echo"
<img src='sources/img/pop_corn_icon.svg' class='pop_corn_icon' onclick='addLike(this)'>";
}
echo"
<!-- Like\'s number -->
<p class='pop_corn_number' title='".$row["video_id"]."' onclick='popupUserLike(this)'>" . $row['video_like_number'] . " J'aime</p>
</div>
<!-- Comment icon -->
<div class='fb_jc ai-c' title=" . $row['video_id'] . " onclick='popupComment(this)' >
<div class='comment_icon'></div>";
// Comment's number
$query2 = "SELECT COUNT(*) as number FROM comments, videos WHERE comment_video_id=video_id AND video_id={$row['video_id']}";
$stmt2 = $db->prepare($query2);
$stmt2->execute();
$row2 = $stmt2->fetch(PDO::FETCH_ASSOC);
echo "
<p class='profile_comment_title'><nobr>" . $row2['number'] . " commentaires</nobr></p>";
echo "
</div>
<!-- Share icon -->
<div class='share_icon' title=".$row['video_id']." onclick='popupShare(this)'></div>
</div>";
} else { # If the user is an asshole
echo "
<div class='reaction_container'>
<div class='fb_jsb like_container'>
<!-- Pop corn image -->
<img src='sources/img/pop_corn_icon.svg' class='pop_corn_icon' onclick='popupConnexion()'>
<!-- Like\'s number -->
<p class='pop_corn_number' title='".$row["video_id"]."' onclick='popupUserLike(this)'>" . $row['video_like_number'] . " J'aime</p>
</div>
<!-- Comment icon -->
<div class='fb_jc ai-c' title=" . $row['video_id'] . " onclick='popupConnexion(this)' >
<div class='comment_icon'></div>";
// Comment's number
$query2 = "SELECT COUNT(*) as number FROM comments, videos WHERE comment_video_id=video_id AND video_id={$row['video_id']}";
$stmt2 = $db->prepare($query2);
$stmt2->execute();
$row2 = $stmt2->fetch(PDO::FETCH_ASSOC);
echo "
<p class='profile_comment_title'><nobr>" . $row2['number'] . " commentaires</nobr></p>";
echo "
</div>
<!-- Share icon -->
<div class='share_icon' onclick='popupConnexion()'></div>
</div>";
}
echo "
</div>
<p>" . nl2br($row['video_synopsis']) . "</p>
</div>
</div>";
}
$stmt = null;
$query = null;
$rows = null;
?>
</div>
</div>
<!-- next arrow -->
<div class="arrow_next_container" onclick="nextArrowClick($(this))"></div>
</div>
</div>
<?php
require("ressources/footer.php");
?>
<div class='dark_filter dark_filter_film_data' onclick="closePopupFilm(this)"></div>
<div class="share_dark_filter" onclick="closePopupShare()"></div>
<div class="like_dark_filter" onclick="closePopupUserLike()"></div>
<div class="delete_dark_filter" onclick="closePopupDeleteFilm()"></div>
</main>
<script type="text/javascript" src="assets/js/libraries/jquery/jquery.min.js"></script>
<script src="assets/js/fil_actu.js"></script>
<script src="assets/js/app2.js"></script>
<script src="assets/js/functions.js"></script>
<!-- <script>console.log('bite');</script> -->
</body>
</html>