-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwatchVideo.php
58 lines (42 loc) · 1.76 KB
/
watchVideo.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
<?php
if(!isset($_GET["id"])) {
header("Location: index.php");
exit;
}
require_once("./includeClasses.php");
$entity = new Entity($con, $_GET["id"], 1); //1 for videos
if(!$entity->getName()) {
header("Location: error?error=12");
exit;
}
$metaInfo = MetaProvider::getMetaInfo($con, 12, $_GET["id"]); //index page
$title = $metaInfo["title"];
$metaDescription = $metaInfo["description"];
$metaKeywords = $metaInfo["keywords"];
require_once("./includes/header.php");
$entity->incrementViews();
?>
<div class="watchContainer" style="padding-top: 90px;">
<iframe src="<?php echo $entity->getPreview() ?>" frameborder="0" marginwidth="0" marginheight="0"
scrolling="NO" width="100%" height="460" allowfullscreen>
</iframe>
<div class="videoDetailsContainer">
<div class="videoDetail">
<h1 style="width: 65%;overflow: hidden; text-overflow: ellipsis; height: 50px;"><?php echo $entity->getName(); ?></h1>
<a href="<?php echo $entity->getFullVideo() ?>" class="videoLinkButton">Download full video</a>
</div>
<div class="videoDetailIcons">
<i class="fa fa-eye"></i>
<span><?php echo $entity->getViews(); ?></span>
<button onclick="likeVideo(<?php echo $entity->getId(); ?>)"><i class="fa fa-heart" id="likeBtn" style="margin-left: 20px;"></i></button>
<span id="numOfLikes"><?php echo $entity->getLikes(); ?></span>
</div>
<div style="padding: 20px;"><?php echo $entity->getDescription(); ?></div>
</div>
</div>
<?php
$categoryId = $entity->getCategoryId();
$container = new Container($con, null, $categoryId, null);
echo $container->showCategory(4, $categoryId, null, 10, "You might also like");
require_once("./includes/footer.php");
?>