-
Notifications
You must be signed in to change notification settings - Fork 0
/
watch.php
39 lines (31 loc) · 1.02 KB
/
watch.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
<?php
require 'include/header.php';
require 'include/classes/VideoPlayer.php';
require 'include/classes/VideoInfoSection.php';
require 'include/classes/CommentSection.php';
require 'include/classes/Comment.php';
if (!isset($_GET['id']) || empty($_GET['id'])){
die("No url passed into page");
}
$video = new Video($conn, $_GET["id"], $userLoggedInObj);
$video->incrementViews();
?>
<script src="assets/js/videoPlayerAction.js"></script>
<script src="assets/js/commentAction.js"></script>
<div class="watchLeftColumn">
<?php
$videoPlayer = new VideoPlayer($video);
echo $videoPlayer->create(true);
$videoInfo = new VideoInfoSection($conn, $video, $userLoggedInObj);
echo $videoInfo->create();
$commentSection = new CommentSection($conn, $video, $userLoggedInObj);
echo $commentSection->create();
?>
</div>
<div class="suggestions">
<?php
$videoGrid = new VideoGrid($conn, $userLoggedInObj);
echo $videoGrid->create(null, null, false);
?>
</div>
<?php require 'include/footer.php'; ?>