-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoverview.php
executable file
·85 lines (77 loc) · 4.92 KB
/
overview.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
<!DOCTYPE html>
<html lang="en">
<?php
include('includes/header.php');
if(isset($_GET['post_type_id']) && !empty($_GET['post_type_id'])){
$post_type_id = $_GET['post_type_id'];
$sql = "SELECT * FROM post_type WHERE post_type_id = '$post_type_id' LIMIT 1";
$result = $con->query($sql);
} else{
$sql = "SELECT * FROM post_type ORDER BY RAND()";
$result = $con->query($sql);
}
?>
<body class="Category-page">
<?php
if($result->num_rows > 0){
while($row = $result->fetch_assoc()){
$post_type_id = $row['post_type_id'];
?>
<div class="tread-overview-area">
<div class="container-fluid">
<div class="row">
<div class="col-lg-12 nopadding">
<div class="tread-title">
<h2><?= $row['type_name']; ?></h2>
</div>
</div>
</div>
<div class="row tread-overview">
<div class="col-lg-12 nopadding">
<div class="overview_slide owl-carousel">
<?php
$sql2 = "SELECT * FROM video WHERE post_type_id IN ('$post_type_id') AND status = 'Active' ORDER BY RAND()";
$result2 = $con->query($sql2);
if($result2->num_rows > 0){
while($row2 = $result2->fetch_assoc()){
$video_id = $row2['video_id'];
$video_url = explode(',', $row2['video_url']);
$video_height = explode(',', $row2['video_height']);
?>
<div class="sigle-blg-item">
<a href="single-post.php?video_id=<?= $video_id; ?>"><div class="blog-img blog-bg-1" style="background-image: url(backend/uploads/videos/<?= $row2['thumbnail']; ?>)">
</div></a>
<div class="blog-content">
<div class="blog-content-top-sec">
<p><img src="assets/img/vd-cam-icon.png" alt=""><?= $row2['creation_datetime']; ?></p>
<div class="social-icons">
<a href="#"><i class="fa fa-facebook"></i></a>
<a href="#"><i class="fa fa-twitter"></i></a>
</div>
</div>
<div class="main-content-sec">
<h3><a class="custom-link" href="single-post.php?video_id=<?= $video_id; ?>"><?= $row2['video_title']; ?></a></h3>
</div>
<div class="blog-activitis">
<a style="color: #fff"><i class="fa fa-thumbs-o-up" aria-hidden="true"></i><span><?= $row2['no_of_likes']; ?></span></a>
<a style="color: #fff"><i class="fa fa-thumbs-o-down" aria-hidden="true"></i><span><?= $row2['no_of_dislikes']; ?></span></a>
<a style="color: #fff"><i class="fa fa-eye" aria-hidden="true"></i><span><?= $row2['no_of_views']; ?></span></a>
</div>
</div>
</div>
<?php
}
}
?>
</div>
</div>
</div>
</div>
</div>
<?php
}
}
?>
<?php include('includes/footer.php') ?>
</body>
</html>