@@ -36,8 +36,8 @@ discard block |
||
36 | 36 | if(!isset($_COOKIE['JodelDeviceId']) || !isDeviceUidInDatabase($_COOKIE['JodelDeviceId'])) |
37 | 37 | { |
38 | 38 | $deviceUid = createAccount(); |
39 | - setcookie('JodelDeviceId', $deviceUid, time()+60*60*24*365*10); |
|
40 | - error_log('Created account with JodelDeviceId:' . $deviceUid . ' for [' . $_SERVER ['HTTP_USER_AGENT'] . ']'); |
|
39 | + setcookie('JodelDeviceId', $deviceUid, time() + 60 * 60 * 24 * 365 * 10); |
|
40 | + error_log('Created account with JodelDeviceId:' . $deviceUid . ' for [' . $_SERVER ['HTTP_USER_AGENT'] . ']'); |
|
41 | 41 | |
42 | 42 | } |
43 | 43 | else |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | //Set View |
58 | 58 | if(isset($_GET['view'])) |
59 | 59 | { |
60 | - switch ($_GET['view']) { |
|
60 | + switch($_GET['view']) { |
|
61 | 61 | case 'comment': |
62 | 62 | $view = 'comment'; |
63 | 63 | break; |
@@ -244,13 +244,13 @@ discard block |
||
244 | 244 | else |
245 | 245 | { |
246 | 246 | $version = 'v2'; |
247 | - if($view=='comment') |
|
247 | + if($view == 'comment') |
|
248 | 248 | { |
249 | 249 | $url = "/v2/posts/location/discussed/"; |
250 | 250 | } |
251 | 251 | else |
252 | 252 | { |
253 | - if($view=='upVote') |
|
253 | + if($view == 'upVote') |
|
254 | 254 | { |
255 | 255 | $url = "/v2/posts/location/popular/"; |
256 | 256 | } |
@@ -277,13 +277,13 @@ discard block |
||
277 | 277 | <!DOCTYPE html> |
278 | 278 | <html lang="en"> |
279 | 279 | <head> |
280 | - <title><?php echo getTitle($posts[0], $view, $isDetailedView);?></title> |
|
280 | + <title><?php echo getTitle($posts[0], $view, $isDetailedView); ?></title> |
|
281 | 281 | |
282 | 282 | <meta charset="utf-8"> |
283 | 283 | <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> |
284 | 284 | <meta http-equiv="x-ua-compatible" content="ie=edge"> |
285 | 285 | |
286 | - <meta name="description" content="<?php echo getMetaDescription($posts[0], $view, $isDetailedView);?>"> |
|
286 | + <meta name="description" content="<?php echo getMetaDescription($posts[0], $view, $isDetailedView); ?>"> |
|
287 | 287 | <meta name="keywords" content="jodelblue, jodel, blue, webclient, web, client, web-app, browser, app"> |
288 | 288 | |
289 | 289 | <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.5/css/bootstrap.min.css" integrity="sha384-AysaV+vQoT3kOAXZkl02PThvDr8HYKPZhNT5h/CXfBThSRXQ6jW5DO2ekP5ViFdi" crossorigin="anonymous"> |
@@ -365,7 +365,7 @@ discard block |
||
365 | 365 | |
366 | 366 | <content id="posts"> |
367 | 367 | <?php |
368 | - for($i = 0; $i<$loops; $i++) |
|
368 | + for($i = 0; $i < $loops; $i++) |
|
369 | 369 | { |
370 | 370 | if(array_key_exists($i, $posts) && array_key_exists('post_id', $posts[$i]) && isset($posts[$i]['post_id'])) |
371 | 371 | { |
@@ -409,7 +409,7 @@ discard block |
||
409 | 409 | <?php if(isset($_GET['postID']) && isset($_GET['getPostDetails'])) { ?> |
410 | 410 | <h2>Comment on Jodel</h2> |
411 | 411 | <form method="POST"> |
412 | - <input type="hidden" name="ancestor" value="<?php echo htmlspecialchars($_GET['postID']);?>" /> |
|
412 | + <input type="hidden" name="ancestor" value="<?php echo htmlspecialchars($_GET['postID']); ?>" /> |
|
413 | 413 | <textarea id="message" name="message" placeholder="Send a comment on a Jodel to all students within 10km" required></textarea> |
414 | 414 | <br /> |
415 | 415 | <input type="submit" value="SEND" /> |
@@ -446,13 +446,13 @@ discard block |
||
446 | 446 | <div class="col-xs-12"> |
447 | 447 | <div class="row"> |
448 | 448 | <div class="col-xs-3"> |
449 | - <a href="index.php" <?php if($view=='time') echo 'class="active"';?>><i class="fa fa-clock-o fa-3x"></i></a> |
|
449 | + <a href="index.php" <?php if($view == 'time') echo 'class="active"'; ?>><i class="fa fa-clock-o fa-3x"></i></a> |
|
450 | 450 | </div> |
451 | 451 | <div class="col-xs-3"> |
452 | - <a href="index.php?view=comment" <?php if($view=='comment') echo 'class="active"';?>><i class="fa fa-commenting-o fa-3x"></i></a> |
|
452 | + <a href="index.php?view=comment" <?php if($view == 'comment') echo 'class="active"'; ?>><i class="fa fa-commenting-o fa-3x"></i></a> |
|
453 | 453 | </div> |
454 | 454 | <div class="col-xs-3"> |
455 | - <a href="index.php?view=upVote" <?php if($view=='upVote') echo 'class="active"';?>><i class="fa fa-angle-up fa-3x"></i></a> |
|
455 | + <a href="index.php?view=upVote" <?php if($view == 'upVote') echo 'class="active"'; ?>><i class="fa fa-angle-up fa-3x"></i></a> |
|
456 | 456 | </div> |
457 | 457 | <div class="col-xs-3"> |
458 | 458 | <nav> |