@@ -5,7 +5,7 @@ discard block |
||
| 5 | 5 | |
| 6 | 6 | define("DEBUG_MODE", true); |
| 7 | 7 | session_start(); |
| 8 | -if(isset(DEBUG_MODE) && DEBUG_MODE) { |
|
| 8 | +if (isset(DEBUG_MODE) && DEBUG_MODE) { |
|
| 9 | 9 | ini_set('display_errors', 1); |
| 10 | 10 | ini_set('display_startup_errors', 1); |
| 11 | 11 | error_reporting(E_ALL); |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | } |
| 30 | 30 | |
| 31 | 31 | function validateCaptcha($privatekey, $response) { |
| 32 | - $responseData = json_decode(file_get_contents('https://www.google.com/recaptcha/api/siteverify?secret='.$privatekey.'&response='.$response)); |
|
| 32 | + $responseData = json_decode(file_get_contents('https://www.google.com/recaptcha/api/siteverify?secret=' . $privatekey . '&response=' . $response)); |
|
| 33 | 33 | return $responseData->success; |
| 34 | 34 | } |
| 35 | 35 | |
@@ -44,8 +44,8 @@ discard block |
||
| 44 | 44 | $stmt->bind_param("s", $user); |
| 45 | 45 | $stmt->execute(); |
| 46 | 46 | $result = $stmt->get_result(); |
| 47 | - if($result->num_rows === 0) return 'error'; |
|
| 48 | - while($row = $result->fetch_assoc()) { |
|
| 47 | + if ($result->num_rows === 0) return 'error'; |
|
| 48 | + while ($row = $result->fetch_assoc()) { |
|
| 49 | 49 | $id = $row['id']; |
| 50 | 50 | } |
| 51 | 51 | $stmt->close(); |
@@ -57,8 +57,8 @@ discard block |
||
| 57 | 57 | $stmt->bind_param("s", $id); |
| 58 | 58 | $stmt->execute(); |
| 59 | 59 | $result = $stmt->get_result(); |
| 60 | - if($result->num_rows === 0) return('error'); |
|
| 61 | - while($row = $result->fetch_assoc()) { |
|
| 60 | + if ($result->num_rows === 0) return('error'); |
|
| 61 | + while ($row = $result->fetch_assoc()) { |
|
| 62 | 62 | $name = htmlspecialchars($row['username']); |
| 63 | 63 | } |
| 64 | 64 | $stmt->close(); |
@@ -70,8 +70,8 @@ discard block |
||
| 70 | 70 | $stmt->bind_param("s", $user); |
| 71 | 71 | $stmt->execute(); |
| 72 | 72 | $result = $stmt->get_result(); |
| 73 | - if($result->num_rows === 0) return('error'); |
|
| 74 | - while($row = $result->fetch_assoc()) { |
|
| 73 | + if ($result->num_rows === 0) return('error'); |
|
| 74 | + while ($row = $result->fetch_assoc()) { |
|
| 75 | 75 | $pfp = htmlspecialchars($row['pfp']); |
| 76 | 76 | } |
| 77 | 77 | $stmt->close(); |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | $stmt->bind_param("ssss", $friend1, $friend2, $friend2, $friend1); |
| 85 | 85 | $stmt->execute(); |
| 86 | 86 | $result = $stmt->get_result(); |
| 87 | - if($result->num_rows === 1){ return true; } |
|
| 87 | + if ($result->num_rows === 1) { return true; } |
|
| 88 | 88 | return false; |
| 89 | 89 | } |
| 90 | 90 | |
@@ -93,8 +93,8 @@ discard block |
||
| 93 | 93 | $stmt->bind_param("i", $id); |
| 94 | 94 | $stmt->execute(); |
| 95 | 95 | $result = $stmt->get_result(); |
| 96 | - if($result->num_rows === 0) echo('That user does not exist.'); |
|
| 97 | - while($row = $result->fetch_assoc()) { |
|
| 96 | + if ($result->num_rows === 0) echo('That user does not exist.'); |
|
| 97 | + while ($row = $result->fetch_assoc()) { |
|
| 98 | 98 | $username = $row['username']; |
| 99 | 99 | $id = $row['id']; |
| 100 | 100 | $date = $row['date']; |
@@ -112,7 +112,7 @@ discard block |
||
| 112 | 112 | $result = $stmt->get_result(); |
| 113 | 113 | |
| 114 | 114 | $comments = 0; |
| 115 | - while($row = $result->fetch_assoc()) { |
|
| 115 | + while ($row = $result->fetch_assoc()) { |
|
| 116 | 116 | $comments++; |
| 117 | 117 | } |
| 118 | 118 | $stmt->close(); |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | $result = $stmt->get_result(); |
| 124 | 124 | |
| 125 | 125 | $profilecomments = 0; |
| 126 | - while($row = $result->fetch_assoc()) { |
|
| 126 | + while ($row = $result->fetch_assoc()) { |
|
| 127 | 127 | $profilecomments++; |
| 128 | 128 | } |
| 129 | 129 | $stmt->close(); |
@@ -134,7 +134,7 @@ discard block |
||
| 134 | 134 | $result = $stmt->get_result(); |
| 135 | 135 | |
| 136 | 136 | $filesuploaded = 0; |
| 137 | - while($row = $result->fetch_assoc()) { |
|
| 137 | + while ($row = $result->fetch_assoc()) { |
|
| 138 | 138 | $filesuploaded++; |
| 139 | 139 | } |
| 140 | 140 | $stmt->close(); |