-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsingle_r.php
212 lines (128 loc) · 5.09 KB
/
single_r.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
<?php
$title = "Reviewer";
include 'includes/header.php';
?>
<body id="top">
<?php
include 'includes/navbar.php';
?>
<section class="s-content s-content--top-padding s-content--narrow">
<?php
if(isset($_GET['user'])){
$u_id = $_GET['user'];
$query = "SELECT * FROM user WHERE U_id = $u_id";
$result = mysqli_query($connection, $query);
$sql1 = "SELECT * FROM post WHERE P_user_id = $u_id";
$res1 = mysqli_query($connection, $sql1);
}else{
header("Location: index.php");
}
?>
<?php
while($row = mysqli_fetch_assoc($result)){
$user_id = $row['U_id'];
$user_title = $row['U_username'];
$user_blog = $row['U_blog'];
$user_blog_url = $row['U_blog_url'];
$user_image = $row['U_profile_pic'];
$user_intro = $row['U_intro'];
$instagram = $row['U_insta'];
$facebook = $row['U_facebook'];
$twitter = $row['U_twitter'];
$youtube = $row['U_youtube'];
$goodreads = $row['U_goodread'];
?>
<article class="row entry format-standard">
<div class="entry__header col-full">
<h1 class="entry__header-title display-1">
<?php echo $user_title; ?>
</h1>
<ul class="entry__header-meta">
<li class="byline">
<a href="#0">VERIFIED REVIEWER OF THE ARCADIAN</a>
</li>
</ul>
</div>
<div class="col-full entry__main">
<p><?php echo $user_intro; ?></p>
</div>
</article>
<?php }
?>
<section class="s-content s-content--top-padding">
<div class="row half-bottom">
<div class="col-six tab-full">
<p><img src="images/Arcadian1.png"
sizes="(max-width: 1000px) 100vw, 1000px" alt=""></p>
</div>
<div class="col-six tab-full">
<aside class="pull-quote">
<blockquote>
<p>I hope you can spare a minute of your time to look at my blog and provide some feedback.</p>
</blockquote>
</aside>
<a class="btn btn--primary full-width" href="<?php echo $user_blog_url; ?>"><?php echo $user_blog; ?></a>
<ul class="footer-social">
<li>
<a class="btn btn--primary full-width" href="<?php echo $facebook; ?>"><i class="fab fa-facebook"></i></a>
</li>
<li>
<a class="btn btn--primary full-width" href="<?php echo $twitter; ?>"><i class="fab fa-twitter"></i></a>
</li>
<li>
<a class="btn btn--primary full-width" href="<?php echo $instagram; ?>"><i class="fab fa-instagram"></i></a>
</li>
<li>
<a class="btn btn--primary full-width" href="<?php echo $youtube; ?>"><i class="fab fa-youtube"></i></a>
</li>
</ul>
</div>
<div class="entry__header col-full">
<h1 class="entry__header-title display-1">
</h1>
</div>
<div class="entry__header col-full">
<h1 class="entry__header-title display-1">
Posts
</h1>
</div>
</div>
<?php
while ($row = mysqli_fetch_array($res1)) {
$cat_title = $row['P_title'];
$post_id = $row['P_id'];
$post_content = substr($row['P_content'], 0,500);
?>
<!-- end s-content__taxonomies -->
<article>
<div class="entry__author">
<div class="entry__author-about">
<h5 class="entry__author-name">
<span>Review</span>
<a href="single.php?post=<?php echo $post_id; ?>"><?php echo $cat_title; ?></a>
</h5>
<div class="entry__author-desc">
<p>
<?php echo $post_content; ?> </p>
</div>
</div>
</div>
</article>
<?php }
?>
</div>
</section>
</ol>
</div>
</div>
<!-- START respond -->
</div>
</div>
</section>
<?php
include 'includes/post.php';
include 'includes/footer.php';
include 'includes/scripts.php';
?>
</body>
</html>