@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | $accessToken; |
15 | 15 | $newPositionStatus; |
16 | 16 | |
17 | - if ($result->num_rows > 0) |
|
17 | + if($result->num_rows > 0) |
|
18 | 18 | { |
19 | 19 | // output data of each row |
20 | 20 | while($row = $result->fetch_assoc()) |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | if(isset($_POST['color'])) |
80 | 80 | { |
81 | 81 | $color = $_POST['color']; |
82 | - switch ($color) { |
|
82 | + switch($color) { |
|
83 | 83 | case '8ABDB0': |
84 | 84 | $color = '8ABDB0'; |
85 | 85 | break; |
@@ -174,7 +174,7 @@ discard block |
||
174 | 174 | //Set View |
175 | 175 | if(isset($_GET['view'])) |
176 | 176 | { |
177 | - switch ($_GET['view']) { |
|
177 | + switch($_GET['view']) { |
|
178 | 178 | case 'comment': |
179 | 179 | $view = 'comment'; |
180 | 180 | break; |
@@ -213,13 +213,13 @@ discard block |
||
213 | 213 | //Get Posts |
214 | 214 | else |
215 | 215 | { |
216 | - if($view=='comment') |
|
216 | + if($view == 'comment') |
|
217 | 217 | { |
218 | 218 | $url = "/v2/posts/location/discussed/"; |
219 | 219 | } |
220 | 220 | else |
221 | 221 | { |
222 | - if($view=='upVote') |
|
222 | + if($view == 'upVote') |
|
223 | 223 | { |
224 | 224 | $url = "/v2/posts/location/popular/"; |
225 | 225 | } |
@@ -235,7 +235,7 @@ discard block |
||
235 | 235 | } |
236 | 236 | |
237 | 237 | |
238 | - for($i = 0; $i<$loops; $i++) { |
|
238 | + for($i = 0; $i < $loops; $i++) { |
|
239 | 239 | |
240 | 240 | if(isset($posts[$i])) { |
241 | 241 | $lastPostId = $posts[$i]['post_id']; |
@@ -253,24 +253,24 @@ discard block |
||
253 | 253 | $timediff_inHours = (string)$timediff->format('%h'); |
254 | 254 | $timediff_inDays = (string)$timediff->format('%d'); |
255 | 255 | $timediff_inMonth = (string)$timediff->format('%m'); |
256 | - if($timediff_inMonth!=0) { |
|
256 | + if($timediff_inMonth != 0) { |
|
257 | 257 | $timediff = $timediff_inMonth . "m"; |
258 | 258 | } |
259 | 259 | else |
260 | 260 | { |
261 | - if($timediff_inDays!=0) |
|
261 | + if($timediff_inDays != 0) |
|
262 | 262 | { |
263 | 263 | $timediff = $timediff_inDays . "d"; |
264 | 264 | } |
265 | 265 | else |
266 | 266 | { |
267 | - if($timediff_inHours!=0) |
|
267 | + if($timediff_inHours != 0) |
|
268 | 268 | { |
269 | 269 | $timediff = $timediff_inHours . "h"; |
270 | 270 | } |
271 | 271 | else |
272 | 272 | { |
273 | - if($timediff_inMinutes!=0) |
|
273 | + if($timediff_inMinutes != 0) |
|
274 | 274 | { |
275 | 275 | $timediff = $timediff_inMinutes . "m"; |
276 | 276 | } |
@@ -283,7 +283,7 @@ discard block |
||
283 | 283 | } |
284 | 284 | ?> |
285 | 285 | |
286 | - <article id ="postId-<?php echo $posts[$i]["post_id"]; ?>" class="jodel" style="background-color: #<?php echo $posts[$i]["color"];?>;"> |
|
286 | + <article id ="postId-<?php echo $posts[$i]["post_id"]; ?>" class="jodel" style="background-color: #<?php echo $posts[$i]["color"]; ?>;"> |
|
287 | 287 | <content> |
288 | 288 | <?php |
289 | 289 | if(isset($posts[$i]["image_url"])) { |
@@ -295,12 +295,12 @@ discard block |
||
295 | 295 | ?> |
296 | 296 | </content> |
297 | 297 | <aside> |
298 | - <a href="index.php?vote=up&postID=<?php echo $posts[$i]["post_id"];?>"> |
|
298 | + <a href="index.php?vote=up&postID=<?php echo $posts[$i]["post_id"]; ?>"> |
|
299 | 299 | <i class="fa fa-angle-up fa-3x"></i> |
300 | 300 | </a> |
301 | 301 | <br /> |
302 | - <?php echo $posts[$i]["vote_count"];?><br /> |
|
303 | - <a href="index.php?vote=down&postID=<?php echo $posts[$i]["post_id"];?>"> |
|
302 | + <?php echo $posts[$i]["vote_count"]; ?><br /> |
|
303 | + <a href="index.php?vote=down&postID=<?php echo $posts[$i]["post_id"]; ?>"> |
|
304 | 304 | <i class="fa fa-angle-down fa-3x"></i> |
305 | 305 | </a> |
306 | 306 | </aside> |
@@ -311,13 +311,13 @@ discard block |
||
311 | 311 | <td class="time"> |
312 | 312 | <span data-tooltip="Time"> |
313 | 313 | <i class="fa fa-clock-o"></i> |
314 | - <?php echo $timediff;?> |
|
314 | + <?php echo $timediff; ?> |
|
315 | 315 | </span> |
316 | 316 | </td> |
317 | 317 | <td class="comments"> |
318 | 318 | <?php if($showCommentIcon) {?> |
319 | 319 | <span data-tooltip="Comments"> |
320 | - <a href="index.php?getPostDetails=true&view=<?php echo $view;?>&postID=<?php echo $posts[$i]["post_id"];?>"> |
|
320 | + <a href="index.php?getPostDetails=true&view=<?php echo $view; ?>&postID=<?php echo $posts[$i]["post_id"]; ?>"> |
|
321 | 321 | <i class="fa fa-commenting-o"></i> |
322 | 322 | <?php if(array_key_exists("child_count", $posts[$i])) { |
323 | 323 | echo $posts[$i]["child_count"]; |
@@ -330,7 +330,7 @@ discard block |
||
330 | 330 | <td class="distance"> |
331 | 331 | <span data-tooltip="Distance"> |
332 | 332 | <i class="fa fa-map-marker"></i> |
333 | - <?php echo $posts[$i]["distance"];?> km |
|
333 | + <?php echo $posts[$i]["distance"]; ?> km |
|
334 | 334 | </span> |
335 | 335 | </td> |
336 | 336 | </tr> |
@@ -377,7 +377,7 @@ discard block |
||
377 | 377 | <?php if(isset($_GET['postID']) && isset($_GET['getPostDetails'])) { ?> |
378 | 378 | <h2>Comment on Jodel</h2> |
379 | 379 | <form method="POST"> |
380 | - <input type="hidden" name="ancestor" value="<?php echo htmlspecialchars($_GET['postID']);?>" /> |
|
380 | + <input type="hidden" name="ancestor" value="<?php echo htmlspecialchars($_GET['postID']); ?>" /> |
|
381 | 381 | <textarea id="message" name="message" placeholder="Send a comment on a Jodel to all students within 10km" required></textarea> |
382 | 382 | <br /> |
383 | 383 | <input type="submit" value="SEND" /> |
@@ -414,13 +414,13 @@ discard block |
||
414 | 414 | <div class="col-sm-12"> |
415 | 415 | <div class="row"> |
416 | 416 | <div class="col-sm-3"> |
417 | - <a href="index.php" <?php if($view=='time') echo 'class="active"';?>><i class="fa fa-clock-o fa-3x"></i></a> |
|
417 | + <a href="index.php" <?php if($view == 'time') echo 'class="active"'; ?>><i class="fa fa-clock-o fa-3x"></i></a> |
|
418 | 418 | </div> |
419 | 419 | <div class="col-sm-3"> |
420 | - <a href="index.php?view=comment" <?php if($view=='comment') echo 'class="active"';?>><i class="fa fa-commenting-o fa-3x"></i></a> |
|
420 | + <a href="index.php?view=comment" <?php if($view == 'comment') echo 'class="active"'; ?>><i class="fa fa-commenting-o fa-3x"></i></a> |
|
421 | 421 | </div> |
422 | 422 | <div class="col-sm-3"> |
423 | - <a href="index.php?view=upVote" <?php if($view=='upVote') echo 'class="active"';?>><i class="fa fa-angle-up fa-3x"></i></a> |
|
423 | + <a href="index.php?view=upVote" <?php if($view == 'upVote') echo 'class="active"'; ?>><i class="fa fa-angle-up fa-3x"></i></a> |
|
424 | 424 | </div> |
425 | 425 | <div class="col-sm-3"> |
426 | 426 | <nav> |