Passed
Push — master ( c8181e...bb1610 )
by
unknown
02:36
created
view.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,9 @@
 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'];
Please login to merge, or discard this patch.
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.
func/func.php 1 patch
Braces   +12 added lines, -4 removed lines patch added patch discarded remove patch
@@ -44,7 +44,9 @@  discard block
 block discarded – undo
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';
47
+	if($result->num_rows === 0) {
48
+	    return 'error';
49
+	}
48 50
 	while($row = $result->fetch_assoc()) {
49 51
 		$id = $row['id'];
50 52
 	} 
@@ -57,7 +59,9 @@  discard block
 block discarded – undo
57 59
 	$stmt->bind_param("s", $id);
58 60
 	$stmt->execute();
59 61
 	$result = $stmt->get_result();
60
-	if($result->num_rows === 0) return('error');
62
+	if($result->num_rows === 0) {
63
+	    return('error');
64
+	}
61 65
 	while($row = $result->fetch_assoc()) {
62 66
 		$name = htmlspecialchars($row['username']);
63 67
 	} 
@@ -70,7 +74,9 @@  discard block
 block discarded – undo
70 74
 	$stmt->bind_param("s", $user);
71 75
 	$stmt->execute();
72 76
 	$result = $stmt->get_result();
73
-	if($result->num_rows === 0) return('error');
77
+	if($result->num_rows === 0) {
78
+	    return('error');
79
+	}
74 80
 	while($row = $result->fetch_assoc()) {
75 81
 		$pfp = htmlspecialchars($row['pfp']);
76 82
 	} 
@@ -98,7 +104,9 @@  discard block
 block discarded – undo
98 104
 	$stmt->bind_param("i", $id);
99 105
 	$stmt->execute();
100 106
 	$result = $stmt->get_result();
101
-	if($result->num_rows === 0) echo('That user does not exist.');
107
+	if($result->num_rows === 0) {
108
+	    echo('That user does not exist.');
109
+	}
102 110
 	while($row = $result->fetch_assoc()) {
103 111
 		$username = $row['username'];
104 112
 		$id = $row['id'];
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.
viewgroup.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -50,7 +50,9 @@  discard block
 block discarded – undo
50 50
                     $stmt->bind_param("i", $_GET['id']);
51 51
                     $stmt->execute();
52 52
                     $result = $stmt->get_result();
53
-                    if($result->num_rows === 0) echo('Group doesnt exist.');
53
+                    if($result->num_rows === 0) {
54
+                        echo('Group doesnt exist.');
55
+                    }
54 56
                     while($row = $result->fetch_assoc()) {
55 57
                         $id = $row['id'];
56 58
                         ?>
@@ -80,7 +82,9 @@  discard block
 block discarded – undo
80 82
                     $stmt->bind_param("i", $id);
81 83
                     $stmt->execute();
82 84
                     $result = $stmt->get_result();
83
-                    if($result->num_rows === 0) echo('There are no users.');
85
+                    if($result->num_rows === 0) {
86
+                        echo('There are no users.');
87
+                    }
84 88
                     $members = 0;
85 89
                     while($row = $result->fetch_assoc()) {
86 90
                         $members++;
Please login to merge, or discard this patch.
viewgroups.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.
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.