Test Failed
Push — main ( b1c027...83cec3 )
by chief
03:12
created
web/public/inbox/compose.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -10,18 +10,18 @@
 block discarded – undo
10 10
 <?php $__user_u = new user_update($__db); ?>
11 11
 <?php $__db_h = new db_helper(); ?>
12 12
 <?php $__time_h = new time_helper(); ?>
13
-<?php if(!isset($_SESSION['siteusername'])) { header("Location: /sign_in"); } ?>
13
+<?php if (!isset($_SESSION['siteusername'])) { header("Location: /sign_in"); } ?>
14 14
 <?php
15
-    if($_SERVER['REQUEST_METHOD'] == 'POST') {
15
+    if ($_SERVER['REQUEST_METHOD'] == 'POST') {
16 16
         $error = array();
17 17
 
18
-        if(!isset($_SESSION['siteusername'])){ $error['message'] = "You are not logged in"; $error['status'] = true; }
19
-        if(!$_POST['contents']){ $error['message'] = "Your description cannot be blank"; $error['status'] = true; }
20
-        if(empty(trim($_POST['subject']))){ $error['message'] = "Your subject cannot be blank"; $error['status'] = true; }
21
-        if(strlen($_POST['contents']) > 1000){ $error['message'] = "Your description must be shorter than 1000 characters"; $error['status'] = true; }
22
-        if($__user_h->if_cooldown($_SESSION['siteusername'])) { $error['message'] = "You are on a cooldown! Wait for a minute before sending a private message."; $error['status'] = true; }
18
+        if (!isset($_SESSION['siteusername'])) { $error['message'] = "You are not logged in"; $error['status'] = true; }
19
+        if (!$_POST['contents']) { $error['message'] = "Your description cannot be blank"; $error['status'] = true; }
20
+        if (empty(trim($_POST['subject']))) { $error['message'] = "Your subject cannot be blank"; $error['status'] = true; }
21
+        if (strlen($_POST['contents']) > 1000) { $error['message'] = "Your description must be shorter than 1000 characters"; $error['status'] = true; }
22
+        if ($__user_h->if_cooldown($_SESSION['siteusername'])) { $error['message'] = "You are on a cooldown! Wait for a minute before sending a private message."; $error['status'] = true; }
23 23
 
24
-        if(!isset($error['message'])) {
24
+        if (!isset($error['message'])) {
25 25
             $stmt = $__db->prepare("INSERT INTO pms (touser, subject, message, owner) VALUES (:touser, :subject, :message, :owner)");
26 26
             $stmt->bindParam(":subject", $_POST['subject']);
27 27
             $stmt->bindParam(":message", $_POST['contents']);
Please login to merge, or discard this patch.
web/public/inbox/notifications.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
 <?php $__user_u = new user_update($__db); ?>
11 11
 <?php $__db_h = new db_helper(); ?>
12 12
 <?php $__time_h = new time_helper(); ?>
13
-<?php if(!isset($_SESSION['siteusername'])) { header("Location: /sign_in"); } ?>
13
+<?php if (!isset($_SESSION['siteusername'])) { header("Location: /sign_in"); } ?>
14 14
 <!DOCTYPE html>
15 15
 <html dir="ltr">
16 16
 	<head>
@@ -165,15 +165,15 @@  discard block
 block discarded – undo
165 165
                                     $stmt->execute();
166 166
 
167 167
                                     $number_of_result = $stmt->rowCount();
168
-                                    $number_of_page = ceil ($number_of_result / $results_per_page);  
168
+                                    $number_of_page = ceil($number_of_result/$results_per_page);  
169 169
 
170
-                                    if (!isset ($_GET['page']) ) {  
170
+                                    if (!isset ($_GET['page'])) {  
171 171
                                         $page = 1;  
172 172
                                     } else {  
173
-                                        $page = (int)$_GET['page'];  
173
+                                        $page = (int) $_GET['page'];  
174 174
                                     }  
175 175
 
176
-                                    $page_first_result = ($page - 1) * $results_per_page;  
176
+                                    $page_first_result = ($page - 1)*$results_per_page;  
177 177
 
178 178
                                     $stmt6 = $__db->prepare("SELECT * FROM pms WHERE touser = :search AND type = 'nt' ORDER BY id DESC LIMIT :pfirst, :pper");
179 179
                                     $stmt6->bindParam(":search", $search);
@@ -198,8 +198,8 @@  discard block
 block discarded – undo
198 198
                                     </tr>
199 199
                                     
200 200
                                     <?php
201
-                                        while($inbox = $stmt->fetch(PDO::FETCH_ASSOC)) { 
202
-                                            if($__video_h->video_exists($inbox['video_attribute'])) {
201
+                                        while ($inbox = $stmt->fetch(PDO::FETCH_ASSOC)) { 
202
+                                            if ($__video_h->video_exists($inbox['video_attribute'])) {
203 203
                                                 $inbox['video'] = $__video_h->fetch_video_rid($inbox['video_attribute']);
204 204
                                                 $inbox['video_attr_exists'] = true;
205 205
 
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
                                     ?> 
214 214
                                     <tr style="margin-top: 5px;" id="videoslist">
215 215
                                             <!--
216
-                                            <?php if($inbox['readed'] == "n") { ?>
216
+                                            <?php if ($inbox['readed'] == "n") { ?>
217 217
                                                 <a style="position:relative;top:7px;color: white;text-decoration: none;background-color: #d54343;padding: 7px;padding-left: 10px;margin-right: 12px;display: inline;" href="/inbox/">
218 218
                                                 NEW
219 219
                                                 </a>
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
                                         <td class="video-manager-stats" style="background: none;padding-left: 8px;">
237 237
                                             <h3><?php echo htmlspecialchars($inbox['subject']); ?></h3>
238 238
                                             <?php echo $__video_h->shorten_description($inbox['message'], 300, true); ?>
239
-                                            <?php if($inbox['video_attr_exists']) { ?>
239
+                                            <?php if ($inbox['video_attr_exists']) { ?>
240 240
                                                 <hr>
241 241
                                                 <ul>
242 242
                                                     <li class="video-list-item "><a href="/watch?v=<?php echo $inbox['video']['rid']; ?>" class="video-list-item-link yt-uix-sessionlink" data-sessionlink="ei=CNLr3rbS3rICFSwSIQodSW397Q%3D%3D&amp;feature=g-sptl%26cid%3Dinp-hs-ytg"><span class="ux-thumb-wrap contains-addto "><span class="video-thumb ux-thumb yt-thumb-default-120 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="http://s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="<?php echo $inbox['video']['title']; ?>" data-thumb="/dynamic/thumbs/<?php echo $inbox['video']['thumbnail']; ?>" width="120"><span class="vertical-align"></span></span></span></span><span class="video-time"><?php echo $inbox['video']['duration']; ?></span>
@@ -263,7 +263,7 @@  discard block
 block discarded – undo
263 263
                                     </div>
264 264
                                 </center><br>
265 265
 
266
-                                <?php for($page = 1; $page<= $number_of_page; $page++) { ?>
266
+                                <?php for ($page = 1; $page <= $number_of_page; $page++) { ?>
267 267
                                     <button class="yt-uix-button yt-uix-button-default" onclick="ajax_fetch(<?php echo $page; ?>)"><?php echo $page; ?></button>
268 268
                                 <?php } ?>   
269 269
 
@@ -287,7 +287,7 @@  discard block
 block discarded – undo
287 287
                                 </script>
288 288
 
289 289
                                 <?php 
290
-                                    if($stmt6->rowCount() == 0) { echo "
290
+                                    if ($stmt6->rowCount() == 0) { echo "
291 291
                                         You currently have no notifications in your inbox.
292 292
                                     "; 
293 293
                                 } ?>
Please login to merge, or discard this patch.
web/public/inbox/index.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
 <?php $__user_u = new user_update($__db); ?>
11 11
 <?php $__db_h = new db_helper(); ?>
12 12
 <?php $__time_h = new time_helper(); ?>
13
-<?php if(!isset($_SESSION['siteusername'])) { header("Location: /sign_in"); } ?>
13
+<?php if (!isset($_SESSION['siteusername'])) { header("Location: /sign_in"); } ?>
14 14
 <!DOCTYPE html>
15 15
 <html dir="ltr">
16 16
 	<head>
@@ -165,15 +165,15 @@  discard block
 block discarded – undo
165 165
                                     $stmt->execute();
166 166
 
167 167
                                     $number_of_result = $stmt->rowCount();
168
-                                    $number_of_page = ceil ($number_of_result / $results_per_page);  
168
+                                    $number_of_page = ceil($number_of_result/$results_per_page);  
169 169
 
170
-                                    if (!isset ($_GET['page']) ) {  
170
+                                    if (!isset ($_GET['page'])) {  
171 171
                                         $page = 1;  
172 172
                                     } else {  
173
-                                        $page = (int)$_GET['page'];  
173
+                                        $page = (int) $_GET['page'];  
174 174
                                     }  
175 175
 
176
-                                    $page_first_result = ($page - 1) * $results_per_page;  
176
+                                    $page_first_result = ($page - 1)*$results_per_page;  
177 177
 
178 178
                                     $stmt6 = $__db->prepare("SELECT * FROM pms WHERE touser = :search ORDER BY id DESC LIMIT :pfirst, :pper");
179 179
                                     $stmt6->bindParam(":search", $search);
@@ -198,8 +198,8 @@  discard block
 block discarded – undo
198 198
                                     </tr>
199 199
                                     
200 200
                                     <?php
201
-                                        while($inbox = $stmt->fetch(PDO::FETCH_ASSOC)) { 
202
-                                            if($__video_h->video_exists($inbox['video_attribute'])) {
201
+                                        while ($inbox = $stmt->fetch(PDO::FETCH_ASSOC)) { 
202
+                                            if ($__video_h->video_exists($inbox['video_attribute'])) {
203 203
                                                 $inbox['video'] = $__video_h->fetch_video_rid($inbox['video_attribute']);
204 204
                                                 $inbox['video_attr_exists'] = true;
205 205
 
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
                                     ?> 
214 214
                                     <tr style="margin-top: 5px;" id="videoslist">
215 215
                                             <!--
216
-                                            <?php if($inbox['readed'] == "n") { ?>
216
+                                            <?php if ($inbox['readed'] == "n") { ?>
217 217
                                                 <a style="position:relative;top:7px;color: white;text-decoration: none;background-color: #d54343;padding: 7px;padding-left: 10px;margin-right: 12px;display: inline;" href="/inbox/">
218 218
                                                 NEW
219 219
                                                 </a>
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
                                         <td class="video-manager-stats" style="background: none;padding-left: 8px;">
237 237
                                             <h3><?php echo htmlspecialchars($inbox['subject']); ?></h3>
238 238
                                             <?php echo $__video_h->shorten_description($inbox['message'], 300, true); ?>
239
-                                            <?php if($inbox['video_attr_exists']) { ?>
239
+                                            <?php if ($inbox['video_attr_exists']) { ?>
240 240
                                                 <hr>
241 241
                                                 <ul>
242 242
                                                     <li class="video-list-item "><a href="/watch?v=<?php echo $inbox['video']['rid']; ?>" class="video-list-item-link yt-uix-sessionlink" data-sessionlink="ei=CNLr3rbS3rICFSwSIQodSW397Q%3D%3D&amp;feature=g-sptl%26cid%3Dinp-hs-ytg"><span class="ux-thumb-wrap contains-addto "><span class="video-thumb ux-thumb yt-thumb-default-120 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="http://s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="<?php echo $inbox['video']['title']; ?>" data-thumb="/dynamic/thumbs/<?php echo $inbox['video']['thumbnail']; ?>" width="120"><span class="vertical-align"></span></span></span></span><span class="video-time"><?php echo $inbox['video']['duration']; ?></span>
@@ -263,7 +263,7 @@  discard block
 block discarded – undo
263 263
                                     </div>
264 264
                                 </center><br>
265 265
 
266
-                                <?php for($page = 1; $page<= $number_of_page; $page++) { ?>
266
+                                <?php for ($page = 1; $page <= $number_of_page; $page++) { ?>
267 267
                                     <button class="yt-uix-button yt-uix-button-default" onclick="ajax_fetch(<?php echo $page; ?>)"><?php echo $page; ?></button>
268 268
                                 <?php } ?>   
269 269
 
@@ -287,7 +287,7 @@  discard block
 block discarded – undo
287 287
                                 </script>
288 288
 
289 289
                                 <?php 
290
-                                    if($stmt6->rowCount() == 0) { echo "
290
+                                    if ($stmt6->rowCount() == 0) { echo "
291 291
                                         You currently have no messages in your inbox.
292 292
                                     "; 
293 293
                                 } ?>
Please login to merge, or discard this patch.
web/public/inbox/sent.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
 <?php $__user_u = new user_update($__db); ?>
11 11
 <?php $__db_h = new db_helper(); ?>
12 12
 <?php $__time_h = new time_helper(); ?>
13
-<?php if(!isset($_SESSION['siteusername'])) { header("Location: /sign_in"); } ?>
13
+<?php if (!isset($_SESSION['siteusername'])) { header("Location: /sign_in"); } ?>
14 14
 <!DOCTYPE html>
15 15
 <html dir="ltr">
16 16
 	<head>
@@ -165,15 +165,15 @@  discard block
 block discarded – undo
165 165
                                     $stmt->execute();
166 166
 
167 167
                                     $number_of_result = $stmt->rowCount();
168
-                                    $number_of_page = ceil ($number_of_result / $results_per_page);  
168
+                                    $number_of_page = ceil($number_of_result/$results_per_page);  
169 169
 
170
-                                    if (!isset ($_GET['page']) ) {  
170
+                                    if (!isset ($_GET['page'])) {  
171 171
                                         $page = 1;  
172 172
                                     } else {  
173
-                                        $page = (int)$_GET['page'];  
173
+                                        $page = (int) $_GET['page'];  
174 174
                                     }  
175 175
 
176
-                                    $page_first_result = ($page - 1) * $results_per_page;  
176
+                                    $page_first_result = ($page - 1)*$results_per_page;  
177 177
 
178 178
                                     $stmt6 = $__db->prepare("SELECT * FROM pms WHERE owner = :search ORDER BY id DESC LIMIT :pfirst, :pper");
179 179
                                     $stmt6->bindParam(":search", $search);
@@ -198,8 +198,8 @@  discard block
 block discarded – undo
198 198
                                     </tr>
199 199
                                     
200 200
                                     <?php
201
-                                        while($inbox = $stmt->fetch(PDO::FETCH_ASSOC)) { 
202
-                                            if($__video_h->video_exists($inbox['video_attribute'])) {
201
+                                        while ($inbox = $stmt->fetch(PDO::FETCH_ASSOC)) { 
202
+                                            if ($__video_h->video_exists($inbox['video_attribute'])) {
203 203
                                                 $inbox['video'] = $__video_h->fetch_video_rid($inbox['video_attribute']);
204 204
                                                 $inbox['video_attr_exists'] = true;
205 205
 
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
                                     ?> 
214 214
                                     <tr style="margin-top: 5px;" id="videoslist">
215 215
                                             <!--
216
-                                            <?php if($inbox['readed'] == "n") { ?>
216
+                                            <?php if ($inbox['readed'] == "n") { ?>
217 217
                                                 <a style="position:relative;top:7px;color: white;text-decoration: none;background-color: #d54343;padding: 7px;padding-left: 10px;margin-right: 12px;display: inline;" href="/inbox/">
218 218
                                                 NEW
219 219
                                                 </a>
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
                                         <td class="video-manager-stats" style="background: none;padding-left: 8px;">
237 237
                                             <h3><?php echo htmlspecialchars($inbox['subject']); ?></h3>
238 238
                                             <?php echo $__video_h->shorten_description($inbox['message'], 300, true); ?>
239
-                                            <?php if($inbox['video_attr_exists']) { ?>
239
+                                            <?php if ($inbox['video_attr_exists']) { ?>
240 240
                                                 <hr>
241 241
                                                 <ul>
242 242
                                                     <li class="video-list-item "><a href="/watch?v=<?php echo $inbox['video']['rid']; ?>" class="video-list-item-link yt-uix-sessionlink" data-sessionlink="ei=CNLr3rbS3rICFSwSIQodSW397Q%3D%3D&amp;feature=g-sptl%26cid%3Dinp-hs-ytg"><span class="ux-thumb-wrap contains-addto "><span class="video-thumb ux-thumb yt-thumb-default-120 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="http://s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="<?php echo $inbox['video']['title']; ?>" data-thumb="/dynamic/thumbs/<?php echo $inbox['video']['thumbnail']; ?>" width="120"><span class="vertical-align"></span></span></span></span><span class="video-time"><?php echo $inbox['video']['duration']; ?></span>
@@ -263,7 +263,7 @@  discard block
 block discarded – undo
263 263
                                     </div>
264 264
                                 </center><br>
265 265
 
266
-                                <?php for($page = 1; $page<= $number_of_page; $page++) { ?>
266
+                                <?php for ($page = 1; $page <= $number_of_page; $page++) { ?>
267 267
                                     <button class="yt-uix-button yt-uix-button-default" onclick="ajax_fetch(<?php echo $page; ?>)"><?php echo $page; ?></button>
268 268
                                 <?php } ?>   
269 269
 
@@ -287,7 +287,7 @@  discard block
 block discarded – undo
287 287
                                 </script>
288 288
 
289 289
                                 <?php 
290
-                                    if($stmt6->rowCount() == 0) { echo "
290
+                                    if ($stmt6->rowCount() == 0) { echo "
291 291
                                         You currently have no sent messages in your inbox.
292 292
                                     "; 
293 293
                                 } ?>
Please login to merge, or discard this patch.
web/public/inbox/pm.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
 <?php $__user_u = new user_update($__db); ?>
11 11
 <?php $__db_h = new db_helper(); ?>
12 12
 <?php $__time_h = new time_helper(); ?>
13
-<?php if(!isset($_SESSION['siteusername'])) { header("Location: /sign_in"); } ?>
13
+<?php if (!isset($_SESSION['siteusername'])) { header("Location: /sign_in"); } ?>
14 14
 <!DOCTYPE html>
15 15
 <html dir="ltr">
16 16
 	<head>
@@ -165,15 +165,15 @@  discard block
 block discarded – undo
165 165
                                     $stmt->execute();
166 166
 
167 167
                                     $number_of_result = $stmt->rowCount();
168
-                                    $number_of_page = ceil ($number_of_result / $results_per_page);  
168
+                                    $number_of_page = ceil($number_of_result/$results_per_page);  
169 169
 
170
-                                    if (!isset ($_GET['page']) ) {  
170
+                                    if (!isset ($_GET['page'])) {  
171 171
                                         $page = 1;  
172 172
                                     } else {  
173
-                                        $page = (int)$_GET['page'];  
173
+                                        $page = (int) $_GET['page'];  
174 174
                                     }  
175 175
 
176
-                                    $page_first_result = ($page - 1) * $results_per_page;  
176
+                                    $page_first_result = ($page - 1)*$results_per_page;  
177 177
 
178 178
                                     $stmt6 = $__db->prepare("SELECT * FROM pms WHERE touser = :search AND type = 'nm' ORDER BY id DESC LIMIT :pfirst, :pper");
179 179
                                     $stmt6->bindParam(":search", $search);
@@ -198,8 +198,8 @@  discard block
 block discarded – undo
198 198
                                     </tr>
199 199
                                     
200 200
                                     <?php
201
-                                        while($inbox = $stmt->fetch(PDO::FETCH_ASSOC)) { 
202
-                                            if($__video_h->video_exists($inbox['video_attribute'])) {
201
+                                        while ($inbox = $stmt->fetch(PDO::FETCH_ASSOC)) { 
202
+                                            if ($__video_h->video_exists($inbox['video_attribute'])) {
203 203
                                                 $inbox['video'] = $__video_h->fetch_video_rid($inbox['video_attribute']);
204 204
                                                 $inbox['video_attr_exists'] = true;
205 205
 
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
                                     ?> 
214 214
                                     <tr style="margin-top: 5px;" id="videoslist">
215 215
                                             <!--
216
-                                            <?php if($inbox['readed'] == "n") { ?>
216
+                                            <?php if ($inbox['readed'] == "n") { ?>
217 217
                                                 <a style="position:relative;top:7px;color: white;text-decoration: none;background-color: #d54343;padding: 7px;padding-left: 10px;margin-right: 12px;display: inline;" href="/inbox/">
218 218
                                                 NEW
219 219
                                                 </a>
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
                                         <td class="video-manager-stats" style="background: none;padding-left: 8px;">
237 237
                                             <h3><?php echo htmlspecialchars($inbox['subject']); ?></h3>
238 238
                                             <?php echo $__video_h->shorten_description($inbox['message'], 300, true); ?>
239
-                                            <?php if($inbox['video_attr_exists']) { ?>
239
+                                            <?php if ($inbox['video_attr_exists']) { ?>
240 240
                                                 <hr>
241 241
                                                 <ul>
242 242
                                                     <li class="video-list-item "><a href="/watch?v=<?php echo $inbox['video']['rid']; ?>" class="video-list-item-link yt-uix-sessionlink" data-sessionlink="ei=CNLr3rbS3rICFSwSIQodSW397Q%3D%3D&amp;feature=g-sptl%26cid%3Dinp-hs-ytg"><span class="ux-thumb-wrap contains-addto "><span class="video-thumb ux-thumb yt-thumb-default-120 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="http://s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="<?php echo $inbox['video']['title']; ?>" data-thumb="/dynamic/thumbs/<?php echo $inbox['video']['thumbnail']; ?>" width="120"><span class="vertical-align"></span></span></span></span><span class="video-time"><?php echo $inbox['video']['duration']; ?></span>
@@ -263,7 +263,7 @@  discard block
 block discarded – undo
263 263
                                     </div>
264 264
                                 </center><br>
265 265
 
266
-                                <?php for($page = 1; $page<= $number_of_page; $page++) { ?>
266
+                                <?php for ($page = 1; $page <= $number_of_page; $page++) { ?>
267 267
                                     <button class="yt-uix-button yt-uix-button-default" onclick="ajax_fetch(<?php echo $page; ?>)"><?php echo $page; ?></button>
268 268
                                 <?php } ?>   
269 269
 
@@ -287,7 +287,7 @@  discard block
 block discarded – undo
287 287
                                 </script>
288 288
 
289 289
                                 <?php 
290
-                                    if($stmt6->rowCount() == 0) { echo "
290
+                                    if ($stmt6->rowCount() == 0) { echo "
291 291
                                         You currently have no personal messages in your inbox.
292 292
                                     "; 
293 293
                                 } ?>
Please login to merge, or discard this patch.
web/public/get/unfavorite.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,8 +26,8 @@
 block discarded – undo
26 26
 
27 27
 $stmt = $__db->prepare("DELETE FROM favorite_video WHERE sender = :sender AND reciever = :reciever");
28 28
 $stmt->execute(array(
29
-  ':sender' => $_SESSION['siteusername'],
30
-  ':reciever' => $name,
29
+    ':sender' => $_SESSION['siteusername'],
30
+    ':reciever' => $name,
31 31
 ));
32 32
 
33 33
 header('Location: ' . $_SERVER['HTTP_REFERER']);
Please login to merge, or discard this patch.
web/public/get/favorite.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
 $stmt->bindParam(":reciever", $name);
20 20
 $stmt->execute();
21 21
 
22
-if($stmt->rowCount() == 1) { 
22
+if ($stmt->rowCount() == 1) { 
23 23
     $_SESSION['error']->message = "You have already favorited this video.";
24 24
     header('Location: ' . $_SERVER['HTTP_REFERER']);
25 25
     die();
Please login to merge, or discard this patch.
web/public/channel.php 3 patches
Spacing   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -13,10 +13,10 @@  discard block
 block discarded – undo
13 13
 <?php $__db_h = new db_helper(); ?>
14 14
 <?php $__time_h = new time_helper(); ?>
15 15
 <?php
16
-	if(isset($_SESSION['siteusername']))
16
+	if (isset($_SESSION['siteusername']))
17 17
 	    $_user_hp = $__user_h->fetch_user_username($_SESSION['siteusername']);
18 18
 
19
-    if(!$__user_h->user_exists($_GET['n']))
19
+    if (!$__user_h->user_exists($_GET['n']))
20 20
         header("Location: /?userdoesntexist");
21 21
 
22 22
     $_user = $__user_h->fetch_user_username($_GET['n']);
@@ -68,28 +68,28 @@  discard block
 block discarded – undo
68 68
     $_user['genre'] = strtolower($_user['genre']);
69 69
 	$_user['subscribed'] = $__user_h->if_subscribed(@$_SESSION['siteusername'], $_user['username']);
70 70
 
71
-    if(!check_valid_colorhex($_user['primary_color']) && strlen($_user['primary_color']) != 6) { $_user['primary_color'] = ""; }
72
-    if(!check_valid_colorhex($_user['secondary_color']) && strlen($_user['secondary_color']) != 6) { $_user['secondary_color'] = ""; }
73
-    if(!check_valid_colorhex($_user['third_color']) && strlen($_user['third_color']) != 6) { $_user['third_color'] = ""; }
74
-    if(!check_valid_colorhex($_user['text_color']) && strlen($_user['text_color']) != 6) { $_user['text_color'] = ""; }
75
-    if(!check_valid_colorhex($_user['primary_color_text']) && strlen($_user['primary_color_text']) != 6) { $_user['primary_color_text'] = ""; }
76
-    if(!check_valid_colorhex($_user['2009_bgcolor']) && strlen($_user['2009_bgcolor']) != 6) { $_user['2009_bgcolor'] = ""; }
71
+    if (!check_valid_colorhex($_user['primary_color']) && strlen($_user['primary_color']) != 6) { $_user['primary_color'] = ""; }
72
+    if (!check_valid_colorhex($_user['secondary_color']) && strlen($_user['secondary_color']) != 6) { $_user['secondary_color'] = ""; }
73
+    if (!check_valid_colorhex($_user['third_color']) && strlen($_user['third_color']) != 6) { $_user['third_color'] = ""; }
74
+    if (!check_valid_colorhex($_user['text_color']) && strlen($_user['text_color']) != 6) { $_user['text_color'] = ""; }
75
+    if (!check_valid_colorhex($_user['primary_color_text']) && strlen($_user['primary_color_text']) != 6) { $_user['primary_color_text'] = ""; }
76
+    if (!check_valid_colorhex($_user['2009_bgcolor']) && strlen($_user['2009_bgcolor']) != 6) { $_user['2009_bgcolor'] = ""; }
77 77
 
78
-	if(isset($_SESSION['siteusername']))
78
+	if (isset($_SESSION['siteusername']))
79 79
     	$__user_i->check_view_channel($_user['username'], @$_SESSION['siteusername']);
80 80
 
81
-    if($_SERVER['REQUEST_METHOD'] == 'POST') {
81
+    if ($_SERVER['REQUEST_METHOD'] == 'POST') {
82 82
         $error = array();
83 83
 
84
-        if(!isset($_SESSION['siteusername'])){ $error['message'] = "you are not logged in"; $error['status'] = true; }
85
-        if(!$_POST['comment']){ $error['message'] = "your comment cannot be blank"; $error['status'] = true; }
86
-        if(strlen($_POST['comment']) > 1000){ $error['message'] = "your comment must be shorter than 1000 characters"; $error['status'] = true; }
84
+        if (!isset($_SESSION['siteusername'])) { $error['message'] = "you are not logged in"; $error['status'] = true; }
85
+        if (!$_POST['comment']) { $error['message'] = "your comment cannot be blank"; $error['status'] = true; }
86
+        if (strlen($_POST['comment']) > 1000) { $error['message'] = "your comment must be shorter than 1000 characters"; $error['status'] = true; }
87 87
         //if(!isset($_POST['g-recaptcha-response'])){ $error['message'] = "captcha validation failed"; $error['status'] = true; }
88 88
         //if(!$_user_insert_utils->validateCaptcha($config['recaptcha_secret'], $_POST['g-recaptcha-response'])) { $error['message'] = "captcha validation failed"; $error['status'] = true; }
89
-        if($__user_h->if_cooldown($_SESSION['siteusername'])) { $error['message'] = "You are on a cooldown! Wait for a minute before posting another comment."; $error['status'] = true; }
89
+        if ($__user_h->if_cooldown($_SESSION['siteusername'])) { $error['message'] = "You are on a cooldown! Wait for a minute before posting another comment."; $error['status'] = true; }
90 90
         //if(ifBlocked(@$_SESSION['siteusername'], $user['username'], $__db)) { $error = "This user has blocked you!"; $error['status'] = true; } 
91 91
 
92
-        if(!isset($error['message'])) {
92
+        if (!isset($error['message'])) {
93 93
 			$text = $_POST['comment'];
94 94
             $stmt = $__db->prepare("INSERT INTO profile_comments (toid, author, comment) VALUES (:id, :username, :comment)");
95 95
 			$stmt->bindParam(":id", $_user['username']);
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 
100 100
             $_user_update_utils->update_comment_cooldown_time($_SESSION['siteusername']);
101 101
 
102
-            if(@$_SESSION['siteusername'] != $_user['username']) { 
102
+            if (@$_SESSION['siteusername'] != $_user['username']) { 
103 103
                 $_user_insert_utils->send_message($_user['username'], "New comment", 'I commented "' . $_POST['comment'] . '" on your profile!', $_SESSION['siteusername']);
104 104
             }
105 105
         }
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
 		<link rel="stylesheet" href="/yt/cssbin/www-extra.css">
127 127
 		<style>
128 128
 			#content-container {
129
-				background-color: <?php echo $_user['primary_color'];  ?>;
129
+				background-color: <?php echo $_user['primary_color']; ?>;
130 130
 				background-image: url(/dynamic/banners/<?php echo $_user['2009_bg']; ?>);
131 131
 				background-repeat: repeat;
132 132
 				background-position: center top;
@@ -142,11 +142,11 @@  discard block
 block discarded – undo
142 142
 			<div id="masthead-container"><?php require($_SERVER['DOCUMENT_ROOT'] . "/s/mod/header.php"); ?></div>
143 143
 			<div id="content-container">
144 144
 				<!-- begin content -->
145
-				<?php if(isset($_SESSION['siteusername']) && $_user['username'] == $_SESSION['siteusername']) { ?>
145
+				<?php if (isset($_SESSION['siteusername']) && $_user['username'] == $_SESSION['siteusername']) { ?>
146 146
 					<div class="channel_customization"><?php require($_SERVER['DOCUMENT_ROOT'] . "/s/mod/channel_customization.php"); ?></div>
147 147
 				<?php } ?>
148 148
 				<?php
149
-					if(empty(trim($_user['bio'])))
149
+					if (empty(trim($_user['bio'])))
150 150
 						$_user['bio'] = "This user has no description.";
151 151
 				?>
152 152
 				<div id="content">
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
 												<h1><?php echo htmlspecialchars($_user['username']); ?></h1>
202 202
 											</div>
203 203
 											<div class="upper-left-section enable-fancy-subscribe-button">
204
-												<?php if($_user['username'] != @$_SESSION['siteusername']) { ?>
204
+												<?php if ($_user['username'] != @$_SESSION['siteusername']) { ?>
205 205
 													<div class="yt-subscription-button-hovercard yt-uix-hovercard">
206 206
 														<button 
207 207
 															href="#" 
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
 															title="" 
210 210
 															id="subscribe-button"
211 211
 															type="button" 
212
-															class="yt-subscription-button <?php if($_user['subscribed']) { echo "subscribed "; } ?>  yt-uix-button yt-uix-button-subscription yt-uix-tooltip" 
212
+															class="yt-subscription-button <?php if ($_user['subscribed']) { echo "subscribed "; } ?>  yt-uix-button yt-uix-button-subscription yt-uix-tooltip" 
213 213
 															role="button"><span class="yt-uix-button-icon-wrapper"><img class="yt-uix-button-icon yt-uix-button-icon-subscribe" 
214 214
 															src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt=""></span><span class="yt-uix-button-content">  <span class="subscribe-label">Subscribe</span>
215 215
 														<span class="subscribed-label">Subscribed</span>
@@ -275,12 +275,12 @@  discard block
 block discarded – undo
275 275
 									</div>
276 276
 								</div>
277 277
 							</div>
278
-                            <?php if($_user['featured'] != "None") { $video = $__video_h->fetch_video_rid($_user['featured']); } else { $_user['featured'] = false; } ?>
278
+                            <?php if ($_user['featured'] != "None") { $video = $__video_h->fetch_video_rid($_user['featured']); } else { $_user['featured'] = false; } ?>
279 279
 							<div id="branded-page-body">
280 280
 								<div class="channel-tab-content channel-layout-two-column selected blogger-template">
281 281
 									<div class="tab-content-body">
282 282
 										<div class="primary-pane">
283
-                                            <?php if($_user['featured'] != false && $__video_h->video_exists($_user['featured'])) { ?>
283
+                                            <?php if ($_user['featured'] != false && $__video_h->video_exists($_user['featured'])) { ?>
284 284
 											<div class="channels-featured-video channel-module yt-uix-c3-module-container has-visible-edge">
285 285
 												<div class="module-view featured-video-view-module">
286 286
 													<div class="channels-video-player " data-swf-config="{&quot;assets&quot;: {&quot;html&quot;: &quot;\/html5_player_template&quot;, &quot;css&quot;: &quot;http:\/\/s.ytimg.com\/yt\/cssbin\/www-player-vfllhw7HB.css&quot;, &quot;js&quot;: &quot;http:\/\/s.ytimg.com\/yt\/jsbin\/html5player-vflzTrRqK.js&quot;}, &quot;url&quot;: &quot;http:\/\/s.ytimg.com\/yt\/swfbin\/watch_as3-vflbPspVE.swf&quot;, &quot;min_version&quot;: &quot;8.0.0&quot;, &quot;args&quot;: {&quot;ttsurl&quot;: &quot;http:\/\/www.youtube.com\/api\/timedtext?sparams=asr_langs%2Ccaps%2Cv%2Cexpire\u0026asr_langs=en%2Cko%2Cja%2Ces\u0026v=/watch?v=<?php echo $video['rid']; ?>\u0026caps=asr\u0026expire=1339746882\u0026key=yttt1\u0026signature=A1B858FF427B45672676C7403417ED1F4091A806.C347A6021C0F843E46F2056AEBA38FC93A0A47B8\u0026hl=en_US&quot;, &quot;el&quot;: &quot;profilepage&quot;, &quot;fexp&quot;: &quot;904001,907342,904824,910206,908620,907217,907335,921602,919306,922600,919316,920704,912804,913542,919324,912706&quot;, &quot;url_encoded_fmt_stream_map&quot;: &quot;url=http%3A%2F%2Fo-o.preferred.nuq04s10.v1.lscache4.c.youtube.com%2Fvideoplayback%3Fupn%3D_7WL7XeDtjs%26sparams%3Dcp%252Cid%252Cip%252Cipbits%252Citag%252Cratebypass%252Csource%252Cupn%252Cexpire%26fexp%3D904001%252C907342%252C904824%252C910206%252C908620%252C907217%252C907335%252C921602%252C919306%252C922600%252C919316%252C920704%252C912804%252C913542%252C919324%252C912706%26ms%3Dau%26itag%3D44%26ip%3D207.0.0.0%26signature%3D9B9B5ECF02F2F66BDCCB0ACED26D3406F9F83241.1B2CC833461E3D2C4D081B7DFBC65B0948C61FB9%26sver%3D3%26mt%3D1339721111%26ratebypass%3Dyes%26source%3Dyoutube%26expire%3D1339743583%26key%3Dyt1%26ipbits%3D8%26cp%3DU0hSTldPUV9NTUNOMl9PSVVGOmdTcVlPRFNNTEdM%26id%3D56ffd0bfee85d71f\u0026quality=large\u0026fallback_host=tc.v1.cache4.c.youtube.com\u0026type=video%2Fwebm%3B+codecs%3D%22vp8.0%2C+vorbis%22\u0026itag=44,url=http%3A%2F%2Fo-o.preferred.nuq04s10.v14.lscache1.c.youtube.com%2Fvideoplayback%3Fupn%3D_7WL7XeDtjs%26sparams%3Dalgorithm%252Cburst%252Ccp%252Cfactor%252Cid%252Cip%252Cipbits%252Citag%252Csource%252Cupn%252Cexpire%26fexp%3D904001%252C907342%252C904824%252C910206%252C908620%252C907217%252C907335%252C921602%252C919306%252C922600%252C919316%252C920704%252C912804%252C913542%252C919324%252C912706%26mt%3D1339721111%26ms%3Dau%26algorithm%3Dthrottle-factor%26itag%3D35%26ip%3D207.0.0.0%26burst%3D40%26sver%3D3%26signature%3DB702D7CA72653169BDC2C945B5A35F4A23A3FEBF.ACC660CDAB11901FF8D3DA8D384D61F0AB0F0125%26source%3Dyoutube%26expire%3D1339743583%26key%3Dyt1%26ipbits%3D8%26factor%3D1.25%26cp%3DU0hSTldPUV9NTUNOMl9PSVVGOmdTcVlPRFNNTEdM%26id%3D56ffd0bfee85d71f\u0026quality=large\u0026fallback_host=tc.v14.cache1.c.youtube.com\u0026type=video%2Fx-flv\u0026itag=35,url=http%3A%2F%2Fo-o.preferred.nuq04s10.v24.lscache3.c.youtube.com%2Fvideoplayback%3Fupn%3D_7WL7XeDtjs%26sparams%3Dcp%252Cid%252Cip%252Cipbits%252Citag%252Cratebypass%252Csource%252Cupn%252Cexpire%26fexp%3D904001%252C907342%252C904824%252C910206%252C908620%252C907217%252C907335%252C921602%252C919306%252C922600%252C919316%252C920704%252C912804%252C913542%252C919324%252C912706%26ms%3Dau%26itag%3D43%26ip%3D207.0.0.0%26signature%3D9FABDD8C013AA137B87DF2D154D1B90E6827A2A3.880FECDEC066236D85FCF223CF472B62B8F9B3A4%26sver%3D3%26mt%3D1339721111%26ratebypass%3Dyes%26source%3Dyoutube%26expire%3D1339743583%26key%3Dyt1%26ipbits%3D8%26cp%3DU0hSTldPUV9NTUNOMl9PSVVGOmdTcVlPRFNNTEdM%26id%3D56ffd0bfee85d71f\u0026quality=medium\u0026fallback_host=tc.v24.cache3.c.youtube.com\u0026type=video%2Fwebm%3B+codecs%3D%22vp8.0%2C+vorbis%22\u0026itag=43,url=http%3A%2F%2Fo-o.preferred.nuq04s10.v3.lscache7.c.youtube.com%2Fvideoplayback%3Fupn%3D_7WL7XeDtjs%26sparams%3Dalgorithm%252Cburst%252Ccp%252Cfactor%252Cid%252Cip%252Cipbits%252Citag%252Csource%252Cupn%252Cexpire%26fexp%3D904001%252C907342%252C904824%252C910206%252C908620%252C907217%252C907335%252C921602%252C919306%252C922600%252C919316%252C920704%252C912804%252C913542%252C919324%252C912706%26mt%3D1339721111%26ms%3Dau%26algorithm%3Dthrottle-factor%26itag%3D34%26ip%3D207.0.0.0%26burst%3D40%26sver%3D3%26signature%3D1BA326B784DAA9F62FD789CBB5C2FABFCD5D351C.C4618E3AB2AB08C61C6A982A36F405DA886B5D5A%26source%3Dyoutube%26expire%3D1339743583%26key%3Dyt1%26ipbits%3D8%26factor%3D1.25%26cp%3DU0hSTldPUV9NTUNOMl9PSVVGOmdTcVlPRFNNTEdM%26id%3D56ffd0bfee85d71f\u0026quality=medium\u0026fallback_host=tc.v3.cache7.c.youtube.com\u0026type=video%2Fx-flv\u0026itag=34,url=http%3A%2F%2Fo-o.preferred.nuq04s10.v14.lscache1.c.youtube.com%2Fvideoplayback%3Fupn%3D_7WL7XeDtjs%26sparams%3Dcp%252Cid%252Cip%252Cipbits%252Citag%252Cratebypass%252Csource%252Cupn%252Cexpire%26fexp%3D904001%252C907342%252C904824%252C910206%252C908620%252C907217%252C907335%252C921602%252C919306%252C922600%252C919316%252C920704%252C912804%252C913542%252C919324%252C912706%26ms%3Dau%26itag%3D18%26ip%3D207.0.0.0%26signature%3D8806EA8FAE16557A2F9732068442133EA0A0760F.D91694A47E6B0BF627965CDA46010F36105A28FE%26sver%3D3%26mt%3D1339721111%26ratebypass%3Dyes%26source%3Dyoutube%26expire%3D1339743583%26key%3Dyt1%26ipbits%3D8%26cp%3DU0hSTldPUV9NTUNOMl9PSVVGOmdTcVlPRFNNTEdM%26id%3D56ffd0bfee85d71f\u0026quality=medium\u0026fallback_host=tc.v14.cache1.c.youtube.com\u0026type=video%2Fmp4%3B+codecs%3D%22avc1.42001E%2C+mp4a.40.2%22\u0026itag=18,url=http%3A%2F%2Fo-o.preferred.nuq04s10.v4.lscache1.c.youtube.com%2Fvideoplayback%3Fupn%3D_7WL7XeDtjs%26sparams%3Dalgorithm%252Cburst%252Ccp%252Cfactor%252Cid%252Cip%252Cipbits%252Citag%252Csource%252Cupn%252Cexpire%26fexp%3D904001%252C907342%252C904824%252C910206%252C908620%252C907217%252C907335%252C921602%252C919306%252C922600%252C919316%252C920704%252C912804%252C913542%252C919324%252C912706%26mt%3D1339721111%26ms%3Dau%26algorithm%3Dthrottle-factor%26itag%3D5%26ip%3D207.0.0.0%26burst%3D40%26sver%3D3%26signature%3D011CB6739AB60ED79D032DE2F62EB016D8A8E462.C2C0ABE42F26DBA18F2BC6E0D074EB99A95C0DF0%26source%3Dyoutube%26expire%3D1339743583%26key%3Dyt1%26ipbits%3D8%26factor%3D1.25%26cp%3DU0hSTldPUV9NTUNOMl9PSVVGOmdTcVlPRFNNTEdM%26id%3D56ffd0bfee85d71f\u0026quality=small\u0026fallback_host=tc.v4.cache1.c.youtube.com\u0026type=video%2Fx-flv\u0026itag=5,url=http%3A%2F%2Fo-o.preferred.nuq04s10.v12.lscache3.c.youtube.com%2Fvideoplayback%3Fupn%3D_7WL7XeDtjs%26sparams%3Dalgorithm%252Cburst%252Ccp%252Cfactor%252Cid%252Cip%252Cipbits%252Citag%252Csource%252Cupn%252Cexpire%26fexp%3D904001%252C907342%252C904824%252C910206%252C908620%252C907217%252C907335%252C921602%252C919306%252C922600%252C919316%252C920704%252C912804%252C913542%252C919324%252C912706%26mt%3D1339721111%26ms%3Dau%26algorithm%3Dthrottle-factor%26itag%3D36%26ip%3D207.0.0.0%26burst%3D40%26sver%3D3%26signature%3D988FDD37CBA8DB74C1148EE17921D8549434297C.A2C1796F2BA0427C9FE370BFB6B3B09BA1D81B07%26source%3Dyoutube%26expire%3D1339743583%26key%3Dyt1%26ipbits%3D8%26factor%3D1.25%26cp%3DU0hSTldPUV9NTUNOMl9PSVVGOmdTcVlPRFNNTEdM%26id%3D56ffd0bfee85d71f\u0026quality=small\u0026fallback_host=tc.v12.cache3.c.youtube.com\u0026type=video%2F3gpp\u0026itag=36&quot;, &quot;allow_embed&quot;: 1, &quot;vq&quot;: &quot;auto&quot;, &quot;account_playback_token&quot;: &quot;&quot;, &quot;allow_ratings&quot;: 1, &quot;keywords&quot;: &quot;Rehearsal,Dance,justin,bieber,believe,as,long,you,love,me,rodney,jerkins,pattie,mallette,jeremy,dad,mom,scooter,braun,island,def,jam,usher,rbmg,making,of,the,album,webisode,june,19th,19,new,amazing,song,big,sean,hit,record,<?php echo htmlspecialchars($_user['username']); ?>,always,still,studio,singing,kuk,harrell,producer,sing,boy,guy,man,smash,single,nick,demoura,dancers,sweat,beliebers,hard,work,tour,band&quot;, &quot;cc3_module&quot;: &quot;http:\/\/s.ytimg.com\/yt\/swfbin\/subtitles3_module-vflu_Qeod.swf&quot;, &quot;track_embed&quot;: 0, &quot;is_purchased&quot;: false, &quot;ps&quot;: &quot;default&quot;, &quot;fmt_list&quot;: &quot;44\/854x480\/99\/0\/0,35\/854x480\/9\/0\/115,43\/640x360\/99\/0\/0,34\/640x360\/9\/0\/115,18\/640x360\/9\/0\/115,5\/320x240\/7\/0\/0,36\/320x240\/99\/0\/0&quot;, &quot;author&quot;: &quot;<?php echo htmlspecialchars($_user['username']); ?>&quot;, &quot;muted&quot;: &quot;0&quot;, &quot;cc_module&quot;: &quot;http:\/\/s.ytimg.com\/yt\/swfbin\/subtitle_module-vflq8KnSi.swf&quot;, &quot;length_seconds&quot;: 82, &quot;feature&quot;: &quot;g-logo-xit&quot;, &quot;enablejsapi&quot;: 1, &quot;rel&quot;: 0, &quot;plid&quot;: &quot;AATCeEL9eg3Ls9t-&quot;, &quot;cc_font&quot;: &quot;Arial Unicode MS, arial, verdana, _sans&quot;, &quot;ftoken&quot;: &quot;&quot;, &quot;sdetail&quot;: &quot;f:g-logo-xit,p:\/&quot;, &quot;status&quot;: &quot;ok&quot;, &quot;cc_asr&quot;: 1, &quot;watermark&quot;: &quot;,http:\/\/s.ytimg.com\/yt\/img\/watermark\/youtube_watermark-vflHX6b6E.png,http:\/\/s.ytimg.com\/yt\/img\/watermark\/youtube_hd_watermark-vflAzLcD6.png&quot;, &quot;sourceid&quot;: &quot;y&quot;, &quot;timestamp&quot;: 1339721682, &quot;has_cc&quot;: true, &quot;view_count&quot;: 2600, &quot;quality_cap&quot;: &quot;highres&quot;, &quot;hl&quot;: &quot;en_US&quot;, &quot;tmi&quot;: &quot;1&quot;, &quot;no_get_video_log&quot;: &quot;1&quot;, &quot;eurl&quot;: &quot;http:\/\/www.youtube.com\/user\/<?php echo htmlspecialchars($_user['username']); ?>&quot;, &quot;iurl&quot;: &quot;http:\/\/i3.ytimg.com\/vi\//watch?v=<?php echo $video['rid']; ?>\/hqdefault.jpg&quot;, &quot;endscreen_module&quot;: &quot;http:\/\/s.ytimg.com\/yt\/swfbin\/endscreen-vflJBKwqC.swf&quot;, &quot;referrer&quot;: &quot;http:\/\/www.youtube.com\/&quot;, &quot;avg_rating&quot;: 4.97805486284, &quot;video_id&quot;: &quot;/watch?v=<?php echo $video['rid']; ?>&quot;, &quot;sendtmp&quot;: &quot;1&quot;, &quot;sk&quot;: &quot;bwv_lGOGF4u1g0p7puy7ERICN8NZ5cVFC&quot;, &quot;is_video_preview&quot;: false, &quot;token&quot;: &quot;vjVQa1PpcFMSYb-unvOiIgSL8pW9tObJUMfrEc1mxfE=&quot;, &quot;thumbnail_url&quot;: &quot;http:\/\/i3.ytimg.com\/vi\//watch?v=<?php echo $video['rid']; ?>\/default.jpg&quot;, &quot;iurlsd&quot;: &quot;http:\/\/i3.ytimg.com\/vi\//watch?v=<?php echo $video['rid']; ?>\/sddefault.jpg&quot;, &quot;autoplay&quot;: &quot;1&quot;}, &quot;url_v9as2&quot;: &quot;http:\/\/s.ytimg.com\/yt\/swfbin\/cps-vflhvG6F4.swf&quot;, &quot;params&quot;: {&quot;allowscriptaccess&quot;: &quot;always&quot;, &quot;allowfullscreen&quot;: &quot;true&quot;, &quot;bgcolor&quot;: &quot;#000000&quot;}, &quot;attrs&quot;: {&quot;width&quot;: &quot;640&quot;, &quot;id&quot;: &quot;movie_player&quot;, &quot;height&quot;: &quot;390&quot;}, &quot;url_v8&quot;: &quot;http:\/\/s.ytimg.com\/yt\/swfbin\/cps-vflhvG6F4.swf&quot;, &quot;html5&quot;: false}" data-video-id="/watch?v=<?php echo $video['rid']; ?>">
@@ -320,7 +320,7 @@  discard block
 block discarded – undo
320 320
 													<div class="playlist-info">
321 321
 														<h2>Uploaded videos</h2>
322 322
 														<div class="yt-horizontal-rule "><span class="first"></span><span class="second"></span><span class="third"></span></div>
323
-														<?php if($_user['videos'] == 0) { ?>
323
+														<?php if ($_user['videos'] == 0) { ?>
324 324
 															<h4>This user has not uploaded a video yet.</h4>
325 325
 														<?php } ?>
326 326
 													</div>
@@ -329,7 +329,7 @@  discard block
 block discarded – undo
329 329
                                                             $stmt = $__db->prepare("SELECT * FROM videos WHERE author = :username ORDER BY id DESC LIMIT 20");
330 330
                                                             $stmt->bindParam(":username", $_user['username']);
331 331
                                                             $stmt->execute();
332
-                                                            while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { 
332
+                                                            while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) { 
333 333
                                                         ?>
334 334
 														<li class="blogger-video">
335 335
 															<div class="video yt-tile-visible">
@@ -411,7 +411,7 @@  discard block
 block discarded – undo
411 411
 														</div>
412 412
 														<hr class="yt-horizontal-rule ">
413 413
 													</div>
414
-													<?php if(!empty($_user['website'])) { ?>
414
+													<?php if (!empty($_user['website'])) { ?>
415 415
 														<div class="user-profile-item">
416 416
 															<div class="yt-c3-profile-custom-url field-container ">
417 417
 																<a href="<?php echo addhttp(htmlspecialchars($_user['website'])); ?>" rel="me nofollow" target="_blank" title="<?php echo htmlspecialchars($_user['website']); ?>" class="yt-uix-redirect-link">
@@ -460,7 +460,7 @@  discard block
 block discarded – undo
460 460
 															<h5>Country</h5>
461 461
 															<span class="value"><?php echo htmlspecialchars($_user['country']); ?></span>
462 462
 														</div>
463
-														<?php if($_user['genre'] != "none") { ?>
463
+														<?php if ($_user['genre'] != "none") { ?>
464 464
 															<div class="user-profile-item ">
465 465
 																<h5>Channel Genre</h5>
466 466
 																<span class="value"><?php echo htmlspecialchars($_user['genre']); ?></span>
@@ -472,13 +472,13 @@  discard block
 block discarded – undo
472 472
 											</div>
473 473
 											<div class="channel-module other-channels yt-uix-c3-module-container other-channels-compact">
474 474
 												<?php $_user['featured_channels'] = explode(",", $_user['featured_channels']); ?>
475
-												<?php if(count($_user['featured_channels']) != 0) { ?>
475
+												<?php if (count($_user['featured_channels']) != 0) { ?>
476 476
 												<div class="module-view other-channels-view">
477 477
 													<h2>Featured Channels</h2>
478 478
 													<ul class="channel-summary-list ">
479 479
 														<?php 
480
-															foreach($_user['featured_channels'] as $user) {
481
-																if($__user_h->user_exists($user)) {
480
+															foreach ($_user['featured_channels'] as $user) {
481
+																if ($__user_h->user_exists($user)) {
482 482
 														?>
483 483
 															<li class="yt-tile-visible yt-uix-tile">
484 484
 																<div class="channel-summary clearfix channel-summary-compact">
@@ -507,13 +507,13 @@  discard block
 block discarded – undo
507 507
 												$stmt->bindParam(":search", $_user['username']);
508 508
 												$stmt->execute();
509 509
 
510
-												if($stmt->rowCount() != 0) {
510
+												if ($stmt->rowCount() != 0) {
511 511
 											?>
512 512
 												<div class="playlists-narrow channel-module yt-uix-c3-module-container">
513 513
 													<div class="module-view gh-featured">
514 514
 														<h2>Featured Playlists</h2>     
515 515
 														<?php
516
-														while($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { 
516
+														while ($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { 
517 517
 															$playlist['videos'] = json_decode($playlist['videos']);
518 518
 														?> 
519 519
 															<div class="playlist yt-tile-visible yt-uix-tile">
Please login to merge, or discard this patch.
Braces   +17 added lines, -12 removed lines patch added patch discarded remove patch
@@ -13,11 +13,13 @@  discard block
 block discarded – undo
13 13
 <?php $__db_h = new db_helper(); ?>
14 14
 <?php $__time_h = new time_helper(); ?>
15 15
 <?php
16
-	if(isset($_SESSION['siteusername']))
17
-	    $_user_hp = $__user_h->fetch_user_username($_SESSION['siteusername']);
16
+	if(isset($_SESSION['siteusername'])) {
17
+		    $_user_hp = $__user_h->fetch_user_username($_SESSION['siteusername']);
18
+	}
18 19
 
19
-    if(!$__user_h->user_exists($_GET['n']))
20
-        header("Location: /?userdoesntexist");
20
+    if(!$__user_h->user_exists($_GET['n'])) {
21
+            header("Location: /?userdoesntexist");
22
+    }
21 23
 
22 24
     $_user = $__user_h->fetch_user_username($_GET['n']);
23 25
 
@@ -40,10 +42,11 @@  discard block
 block discarded – undo
40 42
     
41 43
         if (
42 44
               ctype_xdigit($colorCode) &&
43
-              (strlen($colorCode) == 6 || strlen($colorCode) == 3))
44
-                   return true;
45
-    
46
-        else return false;
45
+              (strlen($colorCode) == 6 || strlen($colorCode) == 3)) {
46
+                           return true;
47
+        } else {
48
+            return false;
49
+        }
47 50
     }
48 51
 
49 52
     $_user['subscribers'] = $__user_h->fetch_subs_count($_user['username']);
@@ -75,8 +78,9 @@  discard block
 block discarded – undo
75 78
     if(!check_valid_colorhex($_user['primary_color_text']) && strlen($_user['primary_color_text']) != 6) { $_user['primary_color_text'] = ""; }
76 79
     if(!check_valid_colorhex($_user['2009_bgcolor']) && strlen($_user['2009_bgcolor']) != 6) { $_user['2009_bgcolor'] = ""; }
77 80
 
78
-	if(isset($_SESSION['siteusername']))
79
-    	$__user_i->check_view_channel($_user['username'], @$_SESSION['siteusername']);
81
+	if(isset($_SESSION['siteusername'])) {
82
+	    	$__user_i->check_view_channel($_user['username'], @$_SESSION['siteusername']);
83
+	}
80 84
 
81 85
     if($_SERVER['REQUEST_METHOD'] == 'POST') {
82 86
         $error = array();
@@ -146,8 +150,9 @@  discard block
 block discarded – undo
146 150
 					<div class="channel_customization"><?php require($_SERVER['DOCUMENT_ROOT'] . "/s/mod/channel_customization.php"); ?></div>
147 151
 				<?php } ?>
148 152
 				<?php
149
-					if(empty(trim($_user['bio'])))
150
-						$_user['bio'] = "This user has no description.";
153
+					if(empty(trim($_user['bio']))) {
154
+											$_user['bio'] = "This user has no description.";
155
+					}
151 156
 				?>
152 157
 				<div id="content">
153 158
 					<div class="subscription-menu-expandable subscription-menu-expandable-channels3 yt-rounded ytg-wide hid">
Please login to merge, or discard this patch.
Indentation   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -12,8 +12,8 @@  discard block
 block discarded – undo
12 12
 <?php $__db_h = new db_helper(); ?>
13 13
 <?php $__time_h = new time_helper(); ?>
14 14
 <?php
15
-	if(isset($_SESSION['siteusername']))
16
-	    $_user_hp = $__user_h->fetch_user_username($_SESSION['siteusername']);
15
+    if(isset($_SESSION['siteusername']))
16
+        $_user_hp = $__user_h->fetch_user_username($_SESSION['siteusername']);
17 17
 
18 18
     if(!$__user_h->user_exists($_GET['n']))
19 19
         header("Location: /?userdoesntexist");
@@ -26,21 +26,21 @@  discard block
 block discarded – undo
26 26
         return preg_replace('/[^A-Za-z0-9\-]/', '', $string); // Removes special chars.
27 27
     }
28 28
 
29
-	function addhttp($url) {
30
-		if (!preg_match("~^(?:f|ht)tps?://~i", $url)) {
31
-			$url = "http://" . $url;
32
-		}
33
-		return $url;
34
-	}
29
+    function addhttp($url) {
30
+        if (!preg_match("~^(?:f|ht)tps?://~i", $url)) {
31
+            $url = "http://" . $url;
32
+        }
33
+        return $url;
34
+    }
35 35
 
36 36
     function check_valid_colorhex($colorCode) {
37 37
         // If user accidentally passed along the # sign, strip it off
38 38
         $colorCode = ltrim($colorCode, '#');
39 39
     
40 40
         if (
41
-              ctype_xdigit($colorCode) &&
41
+                ctype_xdigit($colorCode) &&
42 42
               (strlen($colorCode) == 6 || strlen($colorCode) == 3))
43
-                   return true;
43
+                    return true;
44 44
     
45 45
         else return false;
46 46
     }
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
     $_user['2009_bgcolor'] = substr($_user['2009_bgcolor'], 0, 7);
66 66
 
67 67
     $_user['genre'] = strtolower($_user['genre']);
68
-	$_user['subscribed'] = $__user_h->if_subscribed(@$_SESSION['siteusername'], $_user['username']);
68
+    $_user['subscribed'] = $__user_h->if_subscribed(@$_SESSION['siteusername'], $_user['username']);
69 69
 
70 70
     if(!check_valid_colorhex($_user['primary_color']) && strlen($_user['primary_color']) != 6) { $_user['primary_color'] = ""; }
71 71
     if(!check_valid_colorhex($_user['secondary_color']) && strlen($_user['secondary_color']) != 6) { $_user['secondary_color'] = ""; }
@@ -74,8 +74,8 @@  discard block
 block discarded – undo
74 74
     if(!check_valid_colorhex($_user['primary_color_text']) && strlen($_user['primary_color_text']) != 6) { $_user['primary_color_text'] = ""; }
75 75
     if(!check_valid_colorhex($_user['2009_bgcolor']) && strlen($_user['2009_bgcolor']) != 6) { $_user['2009_bgcolor'] = ""; }
76 76
 
77
-	if(isset($_SESSION['siteusername']))
78
-    	$__user_i->check_view_channel($_user['username'], @$_SESSION['siteusername']);
77
+    if(isset($_SESSION['siteusername']))
78
+        $__user_i->check_view_channel($_user['username'], @$_SESSION['siteusername']);
79 79
 
80 80
     if($_SERVER['REQUEST_METHOD'] == 'POST') {
81 81
         $error = array();
@@ -89,11 +89,11 @@  discard block
 block discarded – undo
89 89
         //if(ifBlocked(@$_SESSION['siteusername'], $user['username'], $__db)) { $error = "This user has blocked you!"; $error['status'] = true; } 
90 90
 
91 91
         if(!isset($error['message'])) {
92
-			$text = $_POST['comment'];
92
+            $text = $_POST['comment'];
93 93
             $stmt = $__db->prepare("INSERT INTO profile_comments (toid, author, comment) VALUES (:id, :username, :comment)");
94
-			$stmt->bindParam(":id", $_user['username']);
95
-			$stmt->bindParam(":username", $_SESSION['siteusername']);
96
-			$stmt->bindParam(":comment", $text);
94
+            $stmt->bindParam(":id", $_user['username']);
95
+            $stmt->bindParam(":username", $_SESSION['siteusername']);
96
+            $stmt->bindParam(":comment", $text);
97 97
             $stmt->execute();
98 98
 
99 99
             $_user_update_utils->update_comment_cooldown_time($_SESSION['siteusername']);
@@ -105,10 +105,10 @@  discard block
 block discarded – undo
105 105
     }
106 106
 ?>
107 107
 <?php
108
-	$__server->page_embeds->page_title = "SubRocks - " . htmlspecialchars($_user['username']);
109
-	$__server->page_embeds->page_description = htmlspecialchars($_user['bio']);
110
-	$__server->page_embeds->page_image = "/dynamic/pfp/" . htmlspecialchars($_user['pfp']);
111
-	$__server->page_embeds->page_url = "https://subrock.rocks/";
108
+    $__server->page_embeds->page_title = "SubRocks - " . htmlspecialchars($_user['username']);
109
+    $__server->page_embeds->page_description = htmlspecialchars($_user['bio']);
110
+    $__server->page_embeds->page_image = "/dynamic/pfp/" . htmlspecialchars($_user['pfp']);
111
+    $__server->page_embeds->page_url = "https://subrock.rocks/";
112 112
 ?>
113 113
 <!DOCTYPE html>
114 114
 <html dir="ltr" xmlns:og="http://opengraphprotocol.org/schema/" lang="en">
@@ -151,9 +151,9 @@  discard block
 block discarded – undo
151 151
 					<div class="channel_customization"><?php require($_SERVER['DOCUMENT_ROOT'] . "/s/mod/channel_customization.php"); ?></div>
152 152
 				<?php } ?>
153 153
 				<?php
154
-					if(empty(trim($_user['bio'])))
155
-						$_user['bio'] = "This user has no description.";
156
-				?>
154
+                    if(empty(trim($_user['bio'])))
155
+                        $_user['bio'] = "This user has no description.";
156
+                ?>
157 157
 				<div id="content">
158 158
 					<div class="subscription-menu-expandable subscription-menu-expandable-channels3 yt-rounded ytg-wide hid">
159 159
 						<div class="content" id="recommended-channels-list"></div>
@@ -482,9 +482,9 @@  discard block
 block discarded – undo
482 482
 													<h2>Featured Channels</h2>
483 483
 													<ul class="channel-summary-list ">
484 484
 														<?php 
485
-															foreach($_user['featured_channels'] as $user) {
486
-																if($__user_h->user_exists($user)) {
487
-														?>
485
+                                                            foreach($_user['featured_channels'] as $user) {
486
+                                                                if($__user_h->user_exists($user)) {
487
+                                                        ?>
488 488
 															<li class="yt-tile-visible yt-uix-tile">
489 489
 																<div class="channel-summary clearfix channel-summary-compact">
490 490
 																	<div class="channel-summary-thumb">
@@ -508,19 +508,19 @@  discard block
 block discarded – undo
508 508
 											</div>
509 509
 
510 510
 											<?php 
511
-												$stmt = $__db->prepare("SELECT * FROM playlists WHERE author = :search ORDER BY id DESC LIMIT 10");
512
-												$stmt->bindParam(":search", $_user['username']);
513
-												$stmt->execute();
511
+                                                $stmt = $__db->prepare("SELECT * FROM playlists WHERE author = :search ORDER BY id DESC LIMIT 10");
512
+                                                $stmt->bindParam(":search", $_user['username']);
513
+                                                $stmt->execute();
514 514
 
515
-												if($stmt->rowCount() != 0) {
516
-											?>
515
+                                                if($stmt->rowCount() != 0) {
516
+                                            ?>
517 517
 												<div class="playlists-narrow channel-module yt-uix-c3-module-container">
518 518
 													<div class="module-view gh-featured">
519 519
 														<h2>Featured Playlists</h2>     
520 520
 														<?php
521
-														while($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { 
522
-															$playlist['videos'] = json_decode($playlist['videos']);
523
-														?> 
521
+                                                        while($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { 
522
+                                                            $playlist['videos'] = json_decode($playlist['videos']);
523
+                                                        ?> 
524 524
 															<div class="playlist yt-tile-visible yt-uix-tile">
525 525
 																<a href="/view_playlist?v=<?php echo $playlist['rid']; ?>">
526 526
 																<span class="playlist-thumb-strip playlist-thumb-strip-252"><span class="videos videos-4 horizontal-cutoff"><span class="clip"><span class="centering-offset"><span class="centering">
Please login to merge, or discard this patch.
web/public/d/signup.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
 <?php $__db_h = new db_helper(); ?>
10 10
 <?php $__time_h = new time_helper(); ?>
11 11
 <?php
12
-    if($_SERVER['REQUEST_METHOD'] == 'POST' && $_POST['password'] && $_POST['username']) {
12
+    if ($_SERVER['REQUEST_METHOD'] == 'POST' && $_POST['password'] && $_POST['username']) {
13 13
         $request = (object) [
14 14
             "username" => $_POST['username'],
15 15
             "password" => $_POST['password'],
@@ -23,25 +23,25 @@  discard block
 block discarded – undo
23 23
         ]; 
24 24
 
25 25
         if (!filter_var($request->email, FILTER_VALIDATE_EMAIL)) 
26
-            { $request->error->message = "Your email is invalid!"; $request->error->status = "";  }
27
-        if(strlen($request->username) > 21) 
26
+            { $request->error->message = "Your email is invalid!"; $request->error->status = ""; }
27
+        if (strlen($request->username) > 21) 
28 28
             { $request->error->message = "Your username must be shorter than 21 characters."; $request->error->status = ""; }
29
-        if(strlen($request->password) < 8) 
29
+        if (strlen($request->password) < 8) 
30 30
             { $request->error->message = "Your password must at least be 8 characters long."; $request->error->status = ""; }
31
-        if(!preg_match('/[A-Za-z].*[0-9]|[0-9].*[A-Za-z]/', $request->password)) 
31
+        if (!preg_match('/[A-Za-z].*[0-9]|[0-9].*[A-Za-z]/', $request->password)) 
32 32
             { $request->error->message = "Include numbers and letters in your password!"; $request->error->status = ""; }
33
-        if(!preg_match('/^\S+\w\S{1,}/', $request->username)) 
33
+        if (!preg_match('/^\S+\w\S{1,}/', $request->username)) 
34 34
             { $request->error->message = "Your username cannot contain any special characters!"; $request->error->status = ""; }
35
-        if(empty(trim($request->username))) 
35
+        if (empty(trim($request->username))) 
36 36
             { $request->error->message = "Your username cannot be empty!"; $request->error->status = ""; }
37 37
         
38 38
         $stmt = $__db->prepare("SELECT username FROM users WHERE username = :username");
39 39
         $stmt->bindParam(":username", $request->username);
40 40
         $stmt->execute();
41
-        if($stmt->rowCount()) 
41
+        if ($stmt->rowCount()) 
42 42
             { $request->error->message = "There's already a user with that same username!"; $request->error->status = ""; }
43 43
         
44
-        if($request->error->status == "OK") {
44
+        if ($request->error->status == "OK") {
45 45
             $stmt = $__db->prepare("INSERT INTO users (username, email, password) VALUES (:username, :email, :password)");
46 46
             $stmt->bindParam(":username", $request->username);
47 47
             $stmt->bindParam(":email", $request->email);
Please login to merge, or discard this patch.