@@ -12,7 +12,9 @@ discard block |
||
| 12 | 12 | $stmt->bind_param("i", $_GET['id']); |
| 13 | 13 | $stmt->execute(); |
| 14 | 14 | $result = $stmt->get_result(); |
| 15 | - if($result->num_rows === 0) echo('There are no users.'); |
|
| 15 | + if($result->num_rows === 0) { |
|
| 16 | + echo('There are no users.'); |
|
| 17 | + } |
|
| 16 | 18 | while($row = $result->fetch_assoc()) { |
| 17 | 19 | $author = $row['author']; |
| 18 | 20 | $id = $row['id']; |
@@ -215,12 +217,13 @@ discard block |
||
| 215 | 217 | <form method="post" enctype="multipart/form-data" id="submitform"> |
| 216 | 218 | <textarea required cols="77" placeholder="Comment" name="comment"></textarea><br> |
| 217 | 219 | <input type="submit" value="Post" <?php |
| 218 | - if ($config['use_recaptcha']) |
|
| 219 | - echo 'class="g-recaptcha" data-sitekey="' . $config['recaptcha_sitekey'] . '" data-callback="onSubmit"' |
|
| 220 | + if ($config['use_recaptcha']) { |
|
| 221 | + echo 'class="g-recaptcha" data-sitekey="' . $config['recaptcha_sitekey'] . '" data-callback="onSubmit"' |
|
| 220 | 222 | ?>> <small>max limit: 500 characters | supports <a href="https://www.markdownguide.org/basic-syntax">Markdown</a></small> |
| 221 | 223 | </form> |
| 222 | 224 | <?php |
| 223 | 225 | $stmt = $conn->prepare("SELECT * FROM `gamecomments` WHERE toid = ? ORDER BY id DESC"); |
| 226 | + } |
|
| 224 | 227 | $stmt->bind_param("s", $_GET['id']); |
| 225 | 228 | $stmt->execute(); |
| 226 | 229 | $result = $stmt->get_result(); |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | while($row = $result->fetch_assoc()) { |
| 46 | 46 | $grouptitle = $row['title']; |
| 47 | 47 | } |
| 48 | - }else{ |
|
| 48 | + } else{ |
|
| 49 | 49 | $grouptitle = "none"; |
| 50 | 50 | } |
| 51 | 51 | $stmt->close(); |
@@ -143,7 +143,9 @@ discard block |
||
| 143 | 143 | $stmt->bind_param("s", $username); |
| 144 | 144 | $stmt->execute(); |
| 145 | 145 | $result = $stmt->get_result(); |
| 146 | - if($result->num_rows > 0) echo('<h1>Files</h1>'); |
|
| 146 | + if($result->num_rows > 0) { |
|
| 147 | + echo('<h1>Files</h1>'); |
|
| 148 | + } |
|
| 147 | 149 | |
| 148 | 150 | while($row = $result->fetch_assoc()) { |
| 149 | 151 | echo '<a href="/view?id=' . $row['id'] . '">' . $row['title'] . ' [' , $row['type'] . ']</a><br>'; |
@@ -99,7 +99,9 @@ |
||
| 99 | 99 | $stmt = $conn->prepare("SELECT * FROM users ORDER BY id DESC"); |
| 100 | 100 | $stmt->execute(); |
| 101 | 101 | $result = $stmt->get_result(); |
| 102 | - if($result->num_rows === 0) echo('There are no users.'); |
|
| 102 | + if($result->num_rows === 0) { |
|
| 103 | + echo('There are no users.'); |
|
| 104 | + } |
|
| 103 | 105 | while($row = $result->fetch_assoc()) { |
| 104 | 106 | $id = 1; |
| 105 | 107 | echo "<div class='item" . $id . "'><img style='height: 8em;width: 8em;' src='/dynamic/pfp/" . getPFP($row['username'], $conn) . "'><br><a href='/view/profile?id=" . $row['id'] . "'>" . $row['username'] . "</a></div>"; |
@@ -18,7 +18,9 @@ |
||
| 18 | 18 | $stmt = $conn->prepare("SELECT * FROM `groups` ORDER BY id DESC"); |
| 19 | 19 | $stmt->execute(); |
| 20 | 20 | $result = $stmt->get_result(); |
| 21 | - if($result->num_rows === 0) echo('There are no users.'); |
|
| 21 | + if($result->num_rows === 0) { |
|
| 22 | + echo('There are no users.'); |
|
| 23 | + } |
|
| 22 | 24 | while($row = $result->fetch_assoc()) { |
| 23 | 25 | echo "<img style='position: absolute;border: 1px solid white; width: 5em;' src='/dynamic/pfp/" . getPFP($row['author'], $conn) . "'> |
| 24 | 26 | <small> |