-
Notifications
You must be signed in to change notification settings - Fork 0
/
hit.php
100 lines (83 loc) · 4.61 KB
/
hit.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
$sql = "SELECT * from posts ORDER by post_id DESC limit 0,5";
$qu = mysqli_query($conn,$sql);
<div class="d-flex flex-column mt-4 mb-4">
<div class='card' style='width: 700px;'>
<div class='card-header p-3'>
<div class='d-flex flex-row align-items-center'>
<div
class='rounded-circle overflow-hidden d-flex justify-content-center align-items-center border border-danger post-profile-photo mr-3'>
<img src='' alt=''...
style='transform: scale(1.5); width: 100%; position: absolute; left: 0;'>
</div>
<span class='font-weight-bold'></span>
</div>
</div>
<div class="card-body p-0">
<?php
include 'connection.php';
$sql = "SELECT * from posts ORDER by post_id DESC limit 0,5";
$qu = mysqli_query($conn,$sql);
while($roww=mysqli_fetch_array($qu)){
$content=$roww['caption'];
$imgg = $roww['post_url'];
$userid =$roww['user_id'];
$sqll = "select * from users where user_id= '$userid'";
$quu = mysqli_query($conn,$sqll);
$rowww=mysqli_fetch_array($quu);
$name =$rowww['user_name'];
echo "<div class='mainpost'>";
echo "<p class='quotes'>$content</p>";
echo" <div class='post'><img class='postimg' src='$imgg'/></div>";
echo "</div>";
echo " <div class='card-header p-3'>
<div class='d-flex flex-row '>
<div
class='rounded-circle overflow-hidden d-flex justify-content-center align-items-center border border-danger post-profile-photo mr-3'>
<img src='assets/images/profiles/profile-1.jpg' alt=''...
style='transform: scale(1.5); width: 100%; position: absolute; left: 0;'>
</div>
<span style='font-weight:bold; color: black; float:left;' >$name</span>
</div>";
}
?>
</div>
<!-- posted content view -->
<div class="allpost">
<!-- post 1 by creator-->
<div class="mainpost">
<p class="quotes">
</p>
<div class="post">
<img class="postimg" src=""/>
</div>
<div class="likedislike">
<p class="like">
<span class="nooflike" id="like1">0 </span> likes   <span class="noofdislike" id="dislike1">0 </span> dislikes
</p>
<p class="likedisbttn">
<span id="thumbsup1" class="fa fa-thumbs-up" onclick="increase('like1','dislike1','thumbsup1','thumbsdown1');"></span> <span id="thumbsdown1" class="fa fa-thumbs-down" onclick="decrease('like1','dislike1','thumbsup1','thumbsdown1');"></span>
</p>
<p class="like">
<span class="nooflike" id="like1">0 </span> Comments</span>
</p>
</div>
</div>
<!-- end of post 1 by creator -->
</div>
<!-- end of posted content view -->
<!-- button to view more previous post -->
<!-- <button type="button" id="viewmore" class="viewmore" onclick="newpost();">View More</button> -->
</div>
</div>
</div>
<!-- END OF POSTS -->
</div>
<!-- RIGHT SIDE START
<div class="col-4">
<div class="d-flex flex-row align-items-center" >
<div
class="rounded-circle overflow-hidden d-flex justify-content-center align-items-center border sidenav-profile-photo">
<img src="assets/images/profiles/profile-6.jpg" alt="..."
style="transform: scale(1.5); width: 100%; position: absolute;">
</div>
<div class="profile-info ml-3">