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