@@ -14,8 +14,8 @@ discard block |
||
14 | 14 | if(!isset($_COOKIE["JodelDeviceId"])) |
15 | 15 | { |
16 | 16 | $deviceUid = createAccount(); |
17 | - setcookie('JodelDeviceId', $deviceUid, time()+60*60*24*365*10); |
|
18 | - error_log('Created account with JodelDeviceId:' . $deviceUid . ' for [' . $_SERVER['REMOTE_ADDR'] . '][' . $_SERVER ['HTTP_USER_AGENT'] . ']'); |
|
17 | + setcookie('JodelDeviceId', $deviceUid, time() + 60 * 60 * 24 * 365 * 10); |
|
18 | + error_log('Created account with JodelDeviceId:' . $deviceUid . ' for [' . $_SERVER['REMOTE_ADDR'] . '][' . $_SERVER ['HTTP_USER_AGENT'] . ']'); |
|
19 | 19 | |
20 | 20 | } |
21 | 21 | else |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | //Set View |
35 | 35 | if(isset($_GET['view'])) |
36 | 36 | { |
37 | - switch ($_GET['view']) { |
|
37 | + switch($_GET['view']) { |
|
38 | 38 | case 'comment': |
39 | 39 | $view = 'comment'; |
40 | 40 | break; |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | else |
93 | 93 | { |
94 | 94 | $newPositionStatus = $name; |
95 | - error_log('User with JodelDeviceId:' . $deviceUid . ' [' . $_SERVER['REMOTE_ADDR'] . '][' . $_SERVER ['HTTP_USER_AGENT'] . '] changed to Location: ' . $name); |
|
95 | + error_log('User with JodelDeviceId:' . $deviceUid . ' [' . $_SERVER['REMOTE_ADDR'] . '][' . $_SERVER ['HTTP_USER_AGENT'] . '] changed to Location: ' . $name); |
|
96 | 96 | } |
97 | 97 | } |
98 | 98 | } |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | if(isset($_POST['color'])) |
128 | 128 | { |
129 | 129 | $color = $_POST['color']; |
130 | - switch ($color) { |
|
130 | + switch($color) { |
|
131 | 131 | case '8ABDB0': |
132 | 132 | $color = '8ABDB0'; |
133 | 133 | break; |
@@ -305,13 +305,13 @@ discard block |
||
305 | 305 | else |
306 | 306 | { |
307 | 307 | $version = 'v2'; |
308 | - if($view=='comment') |
|
308 | + if($view == 'comment') |
|
309 | 309 | { |
310 | 310 | $url = "/v2/posts/location/discussed/"; |
311 | 311 | } |
312 | 312 | else |
313 | 313 | { |
314 | - if($view=='upVote') |
|
314 | + if($view == 'upVote') |
|
315 | 315 | { |
316 | 316 | $url = "/v2/posts/location/popular/"; |
317 | 317 | } |
@@ -335,7 +335,7 @@ discard block |
||
335 | 335 | } |
336 | 336 | |
337 | 337 | |
338 | - for($i = 0; $i<$loops; $i++) |
|
338 | + for($i = 0; $i < $loops; $i++) |
|
339 | 339 | { |
340 | 340 | if(array_key_exists($i, $posts)) |
341 | 341 | { |
@@ -379,7 +379,7 @@ discard block |
||
379 | 379 | <?php if(isset($_GET['postID']) && isset($_GET['getPostDetails'])) { ?> |
380 | 380 | <h2>Comment on Jodel</h2> |
381 | 381 | <form method="POST"> |
382 | - <input type="hidden" name="ancestor" value="<?php echo htmlspecialchars($_GET['postID']);?>" /> |
|
382 | + <input type="hidden" name="ancestor" value="<?php echo htmlspecialchars($_GET['postID']); ?>" /> |
|
383 | 383 | <textarea id="message" name="message" placeholder="Send a comment on a Jodel to all students within 10km" required></textarea> |
384 | 384 | <br /> |
385 | 385 | <input type="submit" value="SEND" /> |
@@ -416,13 +416,13 @@ discard block |
||
416 | 416 | <div class="col-sm-12"> |
417 | 417 | <div class="row"> |
418 | 418 | <div class="col-sm-3"> |
419 | - <a href="index.php" <?php if($view=='time') echo 'class="active"';?>><i class="fa fa-clock-o fa-3x"></i></a> |
|
419 | + <a href="index.php" <?php if($view == 'time') echo 'class="active"'; ?>><i class="fa fa-clock-o fa-3x"></i></a> |
|
420 | 420 | </div> |
421 | 421 | <div class="col-sm-3"> |
422 | - <a href="index.php?view=comment" <?php if($view=='comment') echo 'class="active"';?>><i class="fa fa-commenting-o fa-3x"></i></a> |
|
422 | + <a href="index.php?view=comment" <?php if($view == 'comment') echo 'class="active"'; ?>><i class="fa fa-commenting-o fa-3x"></i></a> |
|
423 | 423 | </div> |
424 | 424 | <div class="col-sm-3"> |
425 | - <a href="index.php?view=upVote" <?php if($view=='upVote') echo 'class="active"';?>><i class="fa fa-angle-up fa-3x"></i></a> |
|
425 | + <a href="index.php?view=upVote" <?php if($view == 'upVote') echo 'class="active"'; ?>><i class="fa fa-angle-up fa-3x"></i></a> |
|
426 | 426 | </div> |
427 | 427 | <div class="col-sm-3"> |
428 | 428 | <nav> |