Passed
Pull Request — master (#20)
by
unknown
01:51
created
updateinfo.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,9 @@
 block discarded – undo
17 17
             $stmt->bind_param("si", $_SESSION['user'], $_GET['id']);
18 18
             $stmt->execute();
19 19
             $result = $stmt->get_result();
20
-            if($result->num_rows === 0) die('Item doesnt exist or item isnt made by you.');
20
+            if($result->num_rows === 0) {
21
+                die('Item doesnt exist or item isnt made by you.');
22
+            }
21 23
         } else {
22 24
             header("Location: index.php");
23 25
         }
Please login to merge, or discard this patch.
index.php 1 patch
Braces   +7 added lines, -3 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
                     while($row = $result->fetch_assoc()) {
43 43
                         $grouptitle = $row['title'];
44 44
                     }
45
-                }else{
45
+                } else{
46 46
                     $grouptitle = "none";
47 47
                 }
48 48
                 $stmt->close();
@@ -168,7 +168,9 @@  discard block
 block discarded – undo
168 168
                         $stmt->bind_param("s", $username);
169 169
                         $stmt->execute();
170 170
                         $result = $stmt->get_result();
171
-                        if($result->num_rows > 0) echo('<h1>Files</h1>');
171
+                        if($result->num_rows > 0) {
172
+                            echo('<h1>Files</h1>');
173
+                        }
172 174
                         
173 175
                         while($row = $result->fetch_assoc()) { 
174 176
                             echo '<a href="/view?id=' . $row['id'] . '">' . $row['title'] . ' [' , $row['type'] . ']</a><br>';
@@ -261,7 +263,9 @@  discard block
 block discarded – undo
261 263
                             $stmt = $conn->prepare("SELECT * FROM users ORDER BY id DESC");
262 264
                             $stmt->execute();
263 265
                             $result = $stmt->get_result();
264
-                            if($result->num_rows === 0) echo('There are no users.');
266
+                            if($result->num_rows === 0) {
267
+                                echo('There are no users.');
268
+                            }
265 269
                             while($row = $result->fetch_assoc()) {
266 270
                                 $id = 1;
267 271
                                 echo "<div class='item" . $id . "'><img style='height: 8em;width: 8em;' src='/pfp/" . getPFP($row['username'], $conn) . "'><br><a href='/?id=" . $row['id'] . "'>" . $row['username'] . "</a></div>";
Please login to merge, or discard this patch.
home.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,9 @@
 block discarded – undo
9 9
             $stmt->bind_param("s", $_SESSION['user']);
10 10
             $stmt->execute();
11 11
             $result = $stmt->get_result();
12
-            if($result->num_rows === 0) header('Location: index.php');
12
+            if($result->num_rows === 0) {
13
+                header('Location: index.php');
14
+            }
13 15
             while($row = $result->fetch_assoc()) {
14 16
                 $username = $row['username'];
15 17
                 $id = $row['id'];
Please login to merge, or discard this patch.
important/header.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,9 @@
 block discarded – undo
5 5
         $stmt->execute();
6 6
         $result = $stmt->get_result();
7 7
     
8
-        if($result->num_rows == 0) echo('welcome to gamestop how may i help you');
8
+        if($result->num_rows == 0) {
9
+            echo('welcome to gamestop how may i help you');
10
+        }
9 11
     }
10 12
 ?>
11 13
 
Please login to merge, or discard this patch.
adminpanel/index.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,7 +33,9 @@  discard block
 block discarded – undo
33 33
     $stmt = $conn->prepare("SELECT * FROM files WHERE status = 'n'");
34 34
     $stmt->execute();
35 35
     $result = $stmt->get_result();
36
-    if($result->num_rows === 0) echo('There are no items waiting for approval.');
36
+    if($result->num_rows === 0) {
37
+        echo('There are no items waiting for approval.');
38
+    }
37 39
     while($row = $result->fetch_assoc()) {
38 40
         echo "" . $row['title'] . " by " . $row['author'] . " @ " . $row['date'] . " | <a href='approve.php?id=" . $row['id'] . "'>Approve</a> | <a href='deny.php?id=" . $row['id'] . "'>Deny</a><br>";
39 41
     }
@@ -45,7 +47,9 @@  discard block
 block discarded – undo
45 47
     $stmt = $conn->prepare("SELECT * FROM users ORDER BY id DESC");
46 48
     $stmt->execute();
47 49
     $result = $stmt->get_result();
48
-    if($result->num_rows === 0) echo('There are no items waiting for approval.');
50
+    if($result->num_rows === 0) {
51
+        echo('There are no items waiting for approval.');
52
+    }
49 53
     while($row = $result->fetch_assoc()) {
50 54
         echo "<a href='/index.php?id=" . $row['id'] . "'>" . $row['username'] . "</a> | <a href='ban.php?id=" . $row['id'] . "'>Ban</a><br>";
51 55
     }
Please login to merge, or discard this patch.
adminpanel/dependencies.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,9 @@
 block discarded – undo
7 7
     $stmt->bind_param("s", $user);
8 8
     $stmt->execute();
9 9
     $result = $stmt->get_result();
10
-    if($result->num_rows === 0) return "user doesn't exist";
10
+    if($result->num_rows === 0) {
11
+        return "user doesn't exist";
12
+    }
11 13
     while($row = $result->fetch_assoc()) {
12 14
         if($row['rank'] == "Admin" || $row['rank'] == "Owner") {
13 15
             return "admin";
Please login to merge, or discard this patch.
func/func.php 1 patch
Braces   +12 added lines, -4 removed lines patch added patch discarded remove patch
@@ -43,7 +43,9 @@  discard block
 block discarded – undo
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';
46
+	if($result->num_rows === 0) {
47
+	    return 'error';
48
+	}
47 49
 	while($row = $result->fetch_assoc()) {
48 50
 		$id = $row['id'];
49 51
 	} 
@@ -56,7 +58,9 @@  discard block
 block discarded – undo
56 58
 	$stmt->bind_param("s", $id);
57 59
 	$stmt->execute();
58 60
 	$result = $stmt->get_result();
59
-	if($result->num_rows === 0) return('error');
61
+	if($result->num_rows === 0) {
62
+	    return('error');
63
+	}
60 64
 	while($row = $result->fetch_assoc()) {
61 65
 		$name = htmlspecialchars($row['username']);
62 66
 	} 
@@ -69,7 +73,9 @@  discard block
 block discarded – undo
69 73
 	$stmt->bind_param("s", $user);
70 74
 	$stmt->execute();
71 75
 	$result = $stmt->get_result();
72
-	if($result->num_rows === 0) return('error');
76
+	if($result->num_rows === 0) {
77
+	    return('error');
78
+	}
73 79
 	while($row = $result->fetch_assoc()) {
74 80
 		$pfp = htmlspecialchars($row['pfp']);
75 81
 	} 
@@ -93,7 +99,9 @@  discard block
 block discarded – undo
93 99
 	$stmt->bind_param("i", $id);
94 100
 	$stmt->execute();
95 101
 	$result = $stmt->get_result();
96
-	if($result->num_rows === 0) echo('That user does not exist.');
102
+	if($result->num_rows === 0) {
103
+	    echo('That user does not exist.');
104
+	}
97 105
 	while($row = $result->fetch_assoc()) {
98 106
 		$userResult['username'] = $row['username'];
99 107
 		$userResult['id'] = $row['id'];
Please login to merge, or discard this patch.
view/groups.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,9 @@
 block discarded – undo
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='/pfp/" . getPFP($row['author'], $conn) . "'>
24 26
                     <small>
Please login to merge, or discard this patch.
view/index.php 1 patch
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -12,7 +12,9 @@  discard block
 block discarded – undo
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
 block discarded – undo
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();
Please login to merge, or discard this patch.