@@ -19,14 +19,14 @@ discard block |
||
| 19 | 19 | |
| 20 | 20 | function getPosts($lastPostId, $url) { |
| 21 | 21 | $db = new DatabaseConnect(); |
| 22 | - if ($db->connect_errno) { |
|
| 22 | + if($db->connect_errno) { |
|
| 23 | 23 | echo 'Sorry, die Verbindung zu unserem superfetten endgeilen |
| 24 | 24 | Server ist hops gegangen. Wegen '. $db -> connect_error; |
| 25 | 25 | } |
| 26 | 26 | |
| 27 | 27 | $result = $db->query("SELECT * FROM accounts WHERE id='1'"); |
| 28 | 28 | |
| 29 | - if ($result->num_rows > 0) { |
|
| 29 | + if($result->num_rows > 0) { |
|
| 30 | 30 | // output data of each row |
| 31 | 31 | while($row = $result->fetch_assoc()) { |
| 32 | 32 | $access_token = $row["access_token"]; |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | |
| 50 | 50 | if(isset($_GET['view'])) |
| 51 | 51 | { |
| 52 | - switch ($_GET['view']) { |
|
| 52 | + switch($_GET['view']) { |
|
| 53 | 53 | case 'comment': |
| 54 | 54 | $view = 'comment'; |
| 55 | 55 | break; |
@@ -68,13 +68,13 @@ discard block |
||
| 68 | 68 | $view = 'time'; |
| 69 | 69 | } |
| 70 | 70 | |
| 71 | - if($view=='comment') |
|
| 71 | + if($view == 'comment') |
|
| 72 | 72 | { |
| 73 | 73 | $url = "/v2/posts/location/discussed/"; |
| 74 | 74 | } |
| 75 | 75 | else |
| 76 | 76 | { |
| 77 | - if($view=='upVote') |
|
| 77 | + if($view == 'upVote') |
|
| 78 | 78 | { |
| 79 | 79 | $url = "/v2/posts/location/popular/"; |
| 80 | 80 | } |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | ?> |
| 95 | 95 | <div class="nextPosts"> |
| 96 | 96 | <?php |
| 97 | - for($i = 0; $i<$loops; $i++) { |
|
| 97 | + for($i = 0; $i < $loops; $i++) { |
|
| 98 | 98 | |
| 99 | 99 | if(isset($posts[$i])) { |
| 100 | 100 | $lastPostId = $posts[$i]['post_id']; |
@@ -112,24 +112,24 @@ discard block |
||
| 112 | 112 | $timediff_inHours = (string)$timediff->format('%h'); |
| 113 | 113 | $timediff_inDays = (string)$timediff->format('%d'); |
| 114 | 114 | $timediff_inMonth = (string)$timediff->format('%m'); |
| 115 | - if($timediff_inMonth!=0) { |
|
| 115 | + if($timediff_inMonth != 0) { |
|
| 116 | 116 | $timediff = $timediff_inMonth . "m"; |
| 117 | 117 | } |
| 118 | 118 | else |
| 119 | 119 | { |
| 120 | - if($timediff_inDays!=0) |
|
| 120 | + if($timediff_inDays != 0) |
|
| 121 | 121 | { |
| 122 | 122 | $timediff = $timediff_inDays . "d"; |
| 123 | 123 | } |
| 124 | 124 | else |
| 125 | 125 | { |
| 126 | - if($timediff_inHours!=0) |
|
| 126 | + if($timediff_inHours != 0) |
|
| 127 | 127 | { |
| 128 | 128 | $timediff = $timediff_inHours . "h"; |
| 129 | 129 | } |
| 130 | 130 | else |
| 131 | 131 | { |
| 132 | - if($timediff_inMinutes!=0) |
|
| 132 | + if($timediff_inMinutes != 0) |
|
| 133 | 133 | { |
| 134 | 134 | $timediff = $timediff_inMinutes . "m"; |
| 135 | 135 | } |
@@ -142,7 +142,7 @@ discard block |
||
| 142 | 142 | } |
| 143 | 143 | ?> |
| 144 | 144 | |
| 145 | - <article id ="postId-<?php echo $posts[$i]["post_id"]; ?>" class="jodel" style="background-color: #<?php echo $posts[$i]["color"];?>;"> |
|
| 145 | + <article id ="postId-<?php echo $posts[$i]["post_id"]; ?>" class="jodel" style="background-color: #<?php echo $posts[$i]["color"]; ?>;"> |
|
| 146 | 146 | <content> |
| 147 | 147 | <?php |
| 148 | 148 | if(isset($posts[$i]["image_url"])) { |
@@ -154,12 +154,12 @@ discard block |
||
| 154 | 154 | ?> |
| 155 | 155 | </content> |
| 156 | 156 | <aside> |
| 157 | - <a href="index.php?vote=up&postID=<?php echo $posts[$i]["post_id"];?>"> |
|
| 157 | + <a href="index.php?vote=up&postID=<?php echo $posts[$i]["post_id"]; ?>"> |
|
| 158 | 158 | <i class="fa fa-angle-up fa-3x"></i> |
| 159 | 159 | </a> |
| 160 | 160 | <br /> |
| 161 | - <?php echo $posts[$i]["vote_count"];?><br /> |
|
| 162 | - <a href="index.php?vote=down&postID=<?php echo $posts[$i]["post_id"];?>"> |
|
| 161 | + <?php echo $posts[$i]["vote_count"]; ?><br /> |
|
| 162 | + <a href="index.php?vote=down&postID=<?php echo $posts[$i]["post_id"]; ?>"> |
|
| 163 | 163 | <i class="fa fa-angle-down fa-3x"></i> |
| 164 | 164 | </a> |
| 165 | 165 | </aside> |
@@ -170,13 +170,13 @@ discard block |
||
| 170 | 170 | <td class="time"> |
| 171 | 171 | <span data-tooltip="Time"> |
| 172 | 172 | <i class="fa fa-clock-o"></i> |
| 173 | - <?php echo $timediff;?> |
|
| 173 | + <?php echo $timediff; ?> |
|
| 174 | 174 | </span> |
| 175 | 175 | </td> |
| 176 | 176 | <td class="comments"> |
| 177 | 177 | <?php if($showCommentIcon) {?> |
| 178 | 178 | <span data-tooltip="Comments"> |
| 179 | - <a href="index.php?getPostDetails=true&view=<?php echo $view;?>&postID=<?php echo $posts[$i]["post_id"];?>"> |
|
| 179 | + <a href="index.php?getPostDetails=true&view=<?php echo $view; ?>&postID=<?php echo $posts[$i]["post_id"]; ?>"> |
|
| 180 | 180 | <i class="fa fa-commenting-o"></i> |
| 181 | 181 | <?php if(array_key_exists("child_count", $posts[$i])) { |
| 182 | 182 | echo $posts[$i]["child_count"]; |
@@ -189,7 +189,7 @@ discard block |
||
| 189 | 189 | <td class="distance"> |
| 190 | 190 | <span data-tooltip="Distance"> |
| 191 | 191 | <i class="fa fa-map-marker"></i> |
| 192 | - <?php echo $posts[$i]["distance"];?> km |
|
| 192 | + <?php echo $posts[$i]["distance"]; ?> km |
|
| 193 | 193 | </span> |
| 194 | 194 | </td> |
| 195 | 195 | </tr> |