Passed
Pull Request — master (#20)
by
unknown
01:56
created
enable2fa.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -43,12 +43,12 @@
 block discarded – undo
43 43
     <body>
44 44
         <?php require(__DIR__ . "/important/header.php"); ?>
45 45
         <div class="container">
46
-            <?php if (isset($err)) {echo "<b style='color:red;'>" . $err . "</b><br><br>";}?>
46
+            <?php if (isset($err)) {echo "<b style='color:red;'>" . $err . "</b><br><br>"; }?>
47 47
             To enable 2FA, scan the following QR code with your authenticator app:<br><br>
48 48
             <img src="<?php echo $totp->getQrCodeUri(
49 49
                 'https://api.qrserver.com/v1/create-qr-code/?data=[DATA]&size=300x300&ecc=M&qzone=1&format=png',
50 50
                 '[DATA]'
51
-            );?>"><br><br>
51
+            ); ?>"><br><br>
52 52
             Or use the following string: <b><?php echo $secret; ?></b><br>
53 53
             Then type the 6-digit code your app generates below and click 'Submit':<br><br>
54 54
             <form method="post" enctype="multipart/form-data">
Please login to merge, or discard this patch.
uploadmusic.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -12,8 +12,8 @@  discard block
 block discarded – undo
12 12
     <body> 
13 13
         <?php require(__DIR__ . "/important/header.php"); 
14 14
         
15
-        if(@$_POST['submit']) {
16
-            if(isset($_SESSION['user'])) {
15
+        if (@$_POST['submit']) {
16
+            if (isset($_SESSION['user'])) {
17 17
                 $target_dir = __DIR__ . "/musicfiles/";
18 18
                 $target_file = $target_dir . basename($_FILES["fileToUpload"]["name"]);
19 19
                 $uploadOk = 1;
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
                     echo 'file with the same name already exists<hr>';
24 24
                     $uploadOk = 0;
25 25
                 }
26
-                if($imageFileType != "ogg" && $imageFileType != "mp3") {
26
+                if ($imageFileType != "ogg" && $imageFileType != "mp3") {
27 27
                     echo 'unsupported file type. must be ogg or mp3<hr>';
28 28
                     $uploadOk = 0;
29 29
                 }
Please login to merge, or discard this patch.
media.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
                 $stmt = $conn->prepare("SELECT * FROM files WHERE id = 27");
20 20
                 $stmt->execute();
21 21
                 $result = $stmt->get_result();
22
-                while($row = $result->fetch_assoc()) {
22
+                while ($row = $result->fetch_assoc()) {
23 23
                     echo "<br><img style='height: 5em;position: absolute;border: 1px solid white; width: 5em;' src='pfp/" . getPFP($row['author'], $conn) . "'>
24 24
                     <small>
25 25
                     <a href='view.php?id=" . $row['id'] . "'><span style='float:right;color: gold;'><i>[" . $row['agerating'] . "] " . $row['title'] . "</a></i></span><br>
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
                 $stmt = $conn->prepare("SELECT * FROM files WHERE id = 1");
39 39
                 $stmt->execute();
40 40
                 $result = $stmt->get_result();
41
-                while($row = $result->fetch_assoc()) {
41
+                while ($row = $result->fetch_assoc()) {
42 42
                     echo "<br><img style='height: 5em;position: absolute;border: 1px solid white; width: 5em;' src='pfp/" . getPFP($row['author'], $conn) . "'>
43 43
                     <small>
44 44
                     <a href='view.php?id=" . $row['id'] . "'><span style='float:right;color: gold;'><i>[" . $row['agerating'] . "] " . $row['title'] . "</a></i></span><br>
Please login to merge, or discard this patch.
uploadgame.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -12,8 +12,8 @@  discard block
 block discarded – undo
12 12
     <body> 
13 13
         <?php require(__DIR__ . "/important/header.php"); 
14 14
         
15
-        if(@$_POST['submit']) {
16
-            if(isset($_SESSION['user'])) {
15
+        if (@$_POST['submit']) {
16
+            if (isset($_SESSION['user'])) {
17 17
                 $target_dir = __DIR__ . "/gamefiles/";
18 18
                 $target_file = $target_dir . basename($_FILES["fileToUpload"]["name"]);
19 19
                 $uploadOk = 1;
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
                     echo 'file with the same name already exists<hr>';
24 24
                     $uploadOk = 0;
25 25
                 }
26
-                if($imageFileType != "swf") {
26
+                if ($imageFileType != "swf") {
27 27
                     echo 'unsupported file type. must be swf<hr>';
28 28
                     $uploadOk = 0;
29 29
                 }
Please login to merge, or discard this patch.
updateinfo.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -12,18 +12,18 @@
 block discarded – undo
12 12
     <body> 
13 13
         <?php require(__DIR__ . "/important/header.php"); 
14 14
         
15
-        if(isset($_GET['id'])) {
15
+        if (isset($_GET['id'])) {
16 16
             $stmt = $conn->prepare("SELECT * FROM files WHERE author = ? AND id = ?");
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) die('Item doesnt exist or item isnt made by you.');
21 21
         } else {
22 22
             header("Location: index.php");
23 23
         }
24 24
 
25
-        if(@$_POST['submit']) {
26
-            if(isset($_SESSION['user'])) {
25
+        if (@$_POST['submit']) {
26
+            if (isset($_SESSION['user'])) {
27 27
                 $stmt = $conn->prepare("UPDATE files SET title = ?, extrainfo = ? WHERE id = ?");
28 28
                 $stmt->bind_param("ssi", $title, $description, $_GET['id']);
29 29
                 $title = htmlspecialchars($_POST['title']);
Please login to merge, or discard this patch.
newnews.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,8 +12,8 @@
 block discarded – undo
12 12
     <body> 
13 13
         <?php require(__DIR__ . "/important/header.php"); 
14 14
         
15
-        if(@$_POST['submit']) {
16
-            if(isset($_SESSION['user'])) {
15
+        if (@$_POST['submit']) {
16
+            if (isset($_SESSION['user'])) {
17 17
                 $stmt = $conn->prepare("INSERT INTO files (type, title, extrainfo, author, filename) VALUES ('news', ?, ?, ?, '')");
18 18
                 $stmt->bind_param("sss", $title, $description, $_SESSION['user']);
19 19
 
Please login to merge, or discard this patch.
joingroup.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -2,13 +2,13 @@
 block discarded – undo
2 2
 require(__DIR__ . "/func/func.php");
3 3
 require(__DIR__ . "/func/conn.php"); 
4 4
 
5
-if(isset($_SESSION['user'])) {
6
-    if(isset($_GET['id'])) {
5
+if (isset($_SESSION['user'])) {
6
+    if (isset($_GET['id'])) {
7 7
         $stmt = $conn->prepare("SELECT * FROM `groups` WHERE id = ?");
8 8
         $stmt->bind_param("i", $_GET['id']);
9 9
         $stmt->execute();
10 10
         $result = $stmt->get_result();
11
-        if($result->num_rows === 0) {
11
+        if ($result->num_rows === 0) {
12 12
             die("Group doesn't exist");
13 13
         }
14 14
         $stmt->close();
Please login to merge, or discard this patch.
2fa.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,8 +21,8 @@
 block discarded – undo
21 21
         <?php require(__DIR__ . "/important/header.php"); ?>
22 22
         <div class="container">
23 23
              <h1>2-Factor Authentication</h1>
24
-             2FA status: <?php if ($otpstatus) {echo "enabled";} else {echo "disabled";}?><br>
25
-             <?php if ($otpstatus) {echo "Backup code: " . $result->fetch_assoc()['otpbackupcode'];} ?><br><br>
24
+             2FA status: <?php if ($otpstatus) {echo "enabled"; } else {echo "disabled"; }?><br>
25
+             <?php if ($otpstatus) {echo "Backup code: " . $result->fetch_assoc()['otpbackupcode']; } ?><br><br>
26 26
              <button>
27 27
              <?php if ($otpstatus) { ?>
28 28
              <a href="/disable2fa">Disable 2FA</a>
Please login to merge, or discard this patch.
uploadanimation.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -12,8 +12,8 @@  discard block
 block discarded – undo
12 12
     <body> 
13 13
         <?php require(__DIR__ . "/important/header.php"); 
14 14
         
15
-        if(@$_POST['submit']) {
16
-            if(isset($_SESSION['user'])) {
15
+        if (@$_POST['submit']) {
16
+            if (isset($_SESSION['user'])) {
17 17
                 $target_dir = __DIR__ . "/videos/";
18 18
                 $target_file = $target_dir . basename($_FILES["fileToUpload"]["name"]);
19 19
                 $uploadOk = 1;
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
                     echo 'file with the same name already exists<hr>';
24 24
                     $uploadOk = 0;
25 25
                 }
26
-                if($imageFileType != "mp4") {
26
+                if ($imageFileType != "mp4") {
27 27
                     echo 'unsupported file type. must be swf<hr>';
28 28
                     $uploadOk = 0;
29 29
                 }
Please login to merge, or discard this patch.