@@ -3,7 +3,7 @@ |
||
3 | 3 | $config = parse_ini_file('config/config.ini.php'); |
4 | 4 | if(!isset($_GET['pw']) || $config['pw'] != $_GET['pw']) |
5 | 5 | { |
6 | - error_log($_SERVER['REMOTE_ADDR'] . ' used a wrong password on admin.php'); |
|
6 | + error_log($_SERVER['REMOTE_ADDR'] . ' used a wrong password on admin.php'); |
|
7 | 7 | die(); |
8 | 8 | } |
9 | 9 |
@@ -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']); |
|
17 | + setcookie('JodelDeviceId', $deviceUid, time() + 60 * 60 * 24 * 365 * 10); |
|
18 | + error_log('Created account with JodelDeviceId:' . $deviceUid . ' for ' . $_SERVER['REMOTE_ADDR']); |
|
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; |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | if(isset($_POST['color'])) |
127 | 127 | { |
128 | 128 | $color = $_POST['color']; |
129 | - switch ($color) { |
|
129 | + switch($color) { |
|
130 | 130 | case '8ABDB0': |
131 | 131 | $color = '8ABDB0'; |
132 | 132 | break; |
@@ -304,13 +304,13 @@ discard block |
||
304 | 304 | else |
305 | 305 | { |
306 | 306 | $version = 'v2'; |
307 | - if($view=='comment') |
|
307 | + if($view == 'comment') |
|
308 | 308 | { |
309 | 309 | $url = "/v2/posts/location/discussed/"; |
310 | 310 | } |
311 | 311 | else |
312 | 312 | { |
313 | - if($view=='upVote') |
|
313 | + if($view == 'upVote') |
|
314 | 314 | { |
315 | 315 | $url = "/v2/posts/location/popular/"; |
316 | 316 | } |
@@ -334,7 +334,7 @@ discard block |
||
334 | 334 | } |
335 | 335 | |
336 | 336 | |
337 | - for($i = 0; $i<$loops; $i++) |
|
337 | + for($i = 0; $i < $loops; $i++) |
|
338 | 338 | { |
339 | 339 | if(array_key_exists($i, $posts)) |
340 | 340 | { |
@@ -378,7 +378,7 @@ discard block |
||
378 | 378 | <?php if(isset($_GET['postID']) && isset($_GET['getPostDetails'])) { ?> |
379 | 379 | <h2>Comment on Jodel</h2> |
380 | 380 | <form method="POST"> |
381 | - <input type="hidden" name="ancestor" value="<?php echo htmlspecialchars($_GET['postID']);?>" /> |
|
381 | + <input type="hidden" name="ancestor" value="<?php echo htmlspecialchars($_GET['postID']); ?>" /> |
|
382 | 382 | <textarea id="message" name="message" placeholder="Send a comment on a Jodel to all students within 10km" required></textarea> |
383 | 383 | <br /> |
384 | 384 | <input type="submit" value="SEND" /> |
@@ -415,13 +415,13 @@ discard block |
||
415 | 415 | <div class="col-sm-12"> |
416 | 416 | <div class="row"> |
417 | 417 | <div class="col-sm-3"> |
418 | - <a href="index.php" <?php if($view=='time') echo 'class="active"';?>><i class="fa fa-clock-o fa-3x"></i></a> |
|
418 | + <a href="index.php" <?php if($view == 'time') echo 'class="active"'; ?>><i class="fa fa-clock-o fa-3x"></i></a> |
|
419 | 419 | </div> |
420 | 420 | <div class="col-sm-3"> |
421 | - <a href="index.php?view=comment" <?php if($view=='comment') echo 'class="active"';?>><i class="fa fa-commenting-o fa-3x"></i></a> |
|
421 | + <a href="index.php?view=comment" <?php if($view == 'comment') echo 'class="active"'; ?>><i class="fa fa-commenting-o fa-3x"></i></a> |
|
422 | 422 | </div> |
423 | 423 | <div class="col-sm-3"> |
424 | - <a href="index.php?view=upVote" <?php if($view=='upVote') echo 'class="active"';?>><i class="fa fa-angle-up fa-3x"></i></a> |
|
424 | + <a href="index.php?view=upVote" <?php if($view == 'upVote') echo 'class="active"'; ?>><i class="fa fa-angle-up fa-3x"></i></a> |
|
425 | 425 | </div> |
426 | 426 | <div class="col-sm-3"> |
427 | 427 | <nav> |