@@ -14,7 +14,7 @@ discard block |
||
| 14 | 14 | $accessToken; |
| 15 | 15 | $newPostionStatus; |
| 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()) |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | <a href="index.php"> |
| 116 | 116 | <h1> |
| 117 | 117 | JodelBlue |
| 118 | - <?php if(!isset($_GET['postID']) && !isset($_GET['getPostDetails'])) echo '<i class="fa fa-refresh fa-1x"></i>';?> |
|
| 118 | + <?php if(!isset($_GET['postID']) && !isset($_GET['getPostDetails'])) echo '<i class="fa fa-refresh fa-1x"></i>'; ?> |
|
| 119 | 119 | </h1> |
| 120 | 120 | </a> |
| 121 | 121 | <div class="clear"></div> |
@@ -132,11 +132,11 @@ discard block |
||
| 132 | 132 | if(isset($_GET['postID']) && isset($_GET['getPostDetails'])) { |
| 133 | 133 | //Header Nav in Comment View |
| 134 | 134 | ?> |
| 135 | - <a id="comment-back" href="index.php#postId-<?php echo $_GET['postID'];?>"> |
|
| 135 | + <a id="comment-back" href="index.php#postId-<?php echo $_GET['postID']; ?>"> |
|
| 136 | 136 | <i class="fa fa-angle-left fa-3x"></i> |
| 137 | 137 | </a> |
| 138 | 138 | |
| 139 | - <a id="comment-refresh" href="index.php?getPostDetails=<?php echo $_GET['getPostDetails'];?>&postID=<?php echo $_GET['postID'];?>"> |
|
| 139 | + <a id="comment-refresh" href="index.php?getPostDetails=<?php echo $_GET['getPostDetails']; ?>&postID=<?php echo $_GET['postID']; ?>"> |
|
| 140 | 140 | <i class="fa fa-refresh fa-2x"></i> |
| 141 | 141 | </a> |
| 142 | 142 | <?php |
@@ -183,7 +183,7 @@ discard block |
||
| 183 | 183 | } |
| 184 | 184 | |
| 185 | 185 | |
| 186 | - for($i = 0; $i<$loops; $i++) { |
|
| 186 | + for($i = 0; $i < $loops; $i++) { |
|
| 187 | 187 | |
| 188 | 188 | if(isset($posts[$i])) { |
| 189 | 189 | $lastPostId = $posts[$i]['post_id']; |
@@ -201,24 +201,24 @@ discard block |
||
| 201 | 201 | $timediff_inHours = (string)$timediff->format('%h'); |
| 202 | 202 | $timediff_inDays = (string)$timediff->format('%d'); |
| 203 | 203 | $timediff_inMonth = (string)$timediff->format('%m'); |
| 204 | - if($timediff_inMonth!=0) { |
|
| 204 | + if($timediff_inMonth != 0) { |
|
| 205 | 205 | $timediff = $timediff_inMonth . "m"; |
| 206 | 206 | } |
| 207 | 207 | else |
| 208 | 208 | { |
| 209 | - if($timediff_inDays!=0) |
|
| 209 | + if($timediff_inDays != 0) |
|
| 210 | 210 | { |
| 211 | 211 | $timediff = $timediff_inDays . "d"; |
| 212 | 212 | } |
| 213 | 213 | else |
| 214 | 214 | { |
| 215 | - if($timediff_inHours!=0) |
|
| 215 | + if($timediff_inHours != 0) |
|
| 216 | 216 | { |
| 217 | 217 | $timediff = $timediff_inHours . "h"; |
| 218 | 218 | } |
| 219 | 219 | else |
| 220 | 220 | { |
| 221 | - if($timediff_inMinutes!=0) |
|
| 221 | + if($timediff_inMinutes != 0) |
|
| 222 | 222 | { |
| 223 | 223 | $timediff = $timediff_inMinutes . "m"; |
| 224 | 224 | } |
@@ -231,7 +231,7 @@ discard block |
||
| 231 | 231 | } |
| 232 | 232 | ?> |
| 233 | 233 | |
| 234 | - <article id ="postId-<?php echo $posts[$i]["post_id"]; ?>" class="jodel" style="background-color: #<?php echo $posts[$i]["color"];?>;"> |
|
| 234 | + <article id ="postId-<?php echo $posts[$i]["post_id"]; ?>" class="jodel" style="background-color: #<?php echo $posts[$i]["color"]; ?>;"> |
|
| 235 | 235 | <content> |
| 236 | 236 | <?php |
| 237 | 237 | if(isset($posts[$i]["image_url"])) { |
@@ -243,12 +243,12 @@ discard block |
||
| 243 | 243 | ?> |
| 244 | 244 | </content> |
| 245 | 245 | <aside> |
| 246 | - <a href="index.php?vote=up&postID=<?php echo $posts[$i]["post_id"];?>"> |
|
| 246 | + <a href="index.php?vote=up&postID=<?php echo $posts[$i]["post_id"]; ?>"> |
|
| 247 | 247 | <i class="fa fa-angle-up fa-3x"></i> |
| 248 | 248 | </a> |
| 249 | 249 | <br /> |
| 250 | - <?php echo $posts[$i]["vote_count"];?><br /> |
|
| 251 | - <a href="index.php?vote=down&postID=<?php echo $posts[$i]["post_id"];?>"> |
|
| 250 | + <?php echo $posts[$i]["vote_count"]; ?><br /> |
|
| 251 | + <a href="index.php?vote=down&postID=<?php echo $posts[$i]["post_id"]; ?>"> |
|
| 252 | 252 | <i class="fa fa-angle-down fa-3x"></i> |
| 253 | 253 | </a> |
| 254 | 254 | </aside> |
@@ -259,13 +259,13 @@ discard block |
||
| 259 | 259 | <td class="time"> |
| 260 | 260 | <span data-tooltip="Time"> |
| 261 | 261 | <i class="fa fa-clock-o"></i> |
| 262 | - <?php echo $timediff;?> |
|
| 262 | + <?php echo $timediff; ?> |
|
| 263 | 263 | </span> |
| 264 | 264 | </td> |
| 265 | 265 | <td class="comments"> |
| 266 | 266 | <?php if($showCommentIcon) {?> |
| 267 | 267 | <span data-tooltip="Comments"> |
| 268 | - <a href="index.php?getPostDetails=true&postID=<?php echo $posts[$i]["post_id"];?>"> |
|
| 268 | + <a href="index.php?getPostDetails=true&postID=<?php echo $posts[$i]["post_id"]; ?>"> |
|
| 269 | 269 | <i class="fa fa-commenting-o"></i> |
| 270 | 270 | <?php if(array_key_exists("child_count", $posts[$i])) { |
| 271 | 271 | echo $posts[$i]["child_count"]; |
@@ -278,7 +278,7 @@ discard block |
||
| 278 | 278 | <td class="distance"> |
| 279 | 279 | <span data-tooltip="Distance"> |
| 280 | 280 | <i class="fa fa-map-marker"></i> |
| 281 | - <?php echo $posts[$i]["distance"];?> km |
|
| 281 | + <?php echo $posts[$i]["distance"]; ?> km |
|
| 282 | 282 | </span> |
| 283 | 283 | </td> |
| 284 | 284 | </tr> |
@@ -320,7 +320,7 @@ discard block |
||
| 320 | 320 | <?php if(isset($_GET['postID']) && isset($_GET['getPostDetails'])) { ?> |
| 321 | 321 | <h2>Comment on Jodel</h2> |
| 322 | 322 | <form method="POST"> |
| 323 | - <input type="hidden" name="ancestor" value="<?php echo $_GET['postID'];?>" /> |
|
| 323 | + <input type="hidden" name="ancestor" value="<?php echo $_GET['postID']; ?>" /> |
|
| 324 | 324 | <textarea id="message" name="message" placeholder="Send a comment on a Jodel to all students within 10km" required></textarea> |
| 325 | 325 | <br /> |
| 326 | 326 | <input type="submit" value="SEND" /> |
@@ -345,13 +345,13 @@ discard block |
||
| 345 | 345 | <div class="col-sm-12"> |
| 346 | 346 | <div class="row"> |
| 347 | 347 | <div class="col-sm-3"> |
| 348 | - <a href="index.php" <?php if(isset($timeView)) echo 'class="active"';?>><i class="fa fa-clock-o fa-3x"></i></a> |
|
| 348 | + <a href="index.php" <?php if(isset($timeView)) echo 'class="active"'; ?>><i class="fa fa-clock-o fa-3x"></i></a> |
|
| 349 | 349 | </div> |
| 350 | 350 | <div class="col-sm-3"> |
| 351 | - <a href="index.php?commentView=true" <?php if(isset($commentView)) echo 'class="active"';?>><i class="fa fa-commenting-o fa-3x"></i></a> |
|
| 351 | + <a href="index.php?commentView=true" <?php if(isset($commentView)) echo 'class="active"'; ?>><i class="fa fa-commenting-o fa-3x"></i></a> |
|
| 352 | 352 | </div> |
| 353 | 353 | <div class="col-sm-3"> |
| 354 | - <a href="index.php?upVoteView=true" <?php if(isset($upVoteView)) echo 'class="active"';?>><i class="fa fa-angle-up fa-3x"></i></a> |
|
| 354 | + <a href="index.php?upVoteView=true" <?php if(isset($upVoteView)) echo 'class="active"'; ?>><i class="fa fa-angle-up fa-3x"></i></a> |
|
| 355 | 355 | </div> |
| 356 | 356 | <div class="col-sm-3"> |
| 357 | 357 | <nav> |