x Sorry, these patches are not available anymore due to data migration. Please run a fresh inspection.
Test Failed
Push — main ( 00747d...5f665f )
by chief
03:00
created
web/public/watch.php 3 patches
Indentation   +121 added lines, -121 removed lines patch added patch discarded remove patch
@@ -15,28 +15,28 @@  discard block
 block discarded – undo
15 15
 <?php $_video = $__video_h->fetch_video_rid($_GET['v']); ?>
16 16
 <?php $_video['comments'] = $__video_h->get_comments_from_video($_video['rid']); ?>
17 17
 <?php
18
-	if($_video['visibility'] == "v" && @$_SESSION['siteusername'] != $_video['author'])
19
-		header("Location: /");
18
+    if($_video['visibility'] == "v" && @$_SESSION['siteusername'] != $_video['author'])
19
+        header("Location: /");
20 20
 
21
-	$__video_h->check_view($_GET['v'], @$_SERVER["HTTP_CF_CONNECTING_IP"]);
21
+    $__video_h->check_view($_GET['v'], @$_SERVER["HTTP_CF_CONNECTING_IP"]);
22 22
 
23
-	$_SESSION['current_video'] = $_video['rid'];
23
+    $_SESSION['current_video'] = $_video['rid'];
24 24
 
25
-	/* 
25
+    /* 
26 26
 	PREPARE EMBEDS CLASS -- function(string $page_title, string $page_description...) 
27 27
 	Returns a list of arrays for compatibility purposes & but downside is ugly for loop codes 
28 28
 	Work on this tomorrow or some shit idk lol
29 29
 	*/
30 30
 
31
-	/* 
31
+    /* 
32 32
 	USE THE GOD DAMN __CONFIG MORE -- idiot
33 33
 	Work on this tomorrow or some shit
34 34
 	*/
35 35
 
36
-	$__server->page_embeds->page_title = htmlspecialchars($_video['title']);
37
-	$__server->page_embeds->page_description = htmlspecialchars($_video['description']);
38
-	$__server->page_embeds->page_image = "/dynamic/thumbs/" . $_video['thumbnail'];
39
-	$__server->page_embeds->page_url = "https://subrock.rocks/watch?v=" . htmlspecialchars($_video['rid']);
36
+    $__server->page_embeds->page_title = htmlspecialchars($_video['title']);
37
+    $__server->page_embeds->page_description = htmlspecialchars($_video['description']);
38
+    $__server->page_embeds->page_image = "/dynamic/thumbs/" . $_video['thumbnail'];
39
+    $__server->page_embeds->page_url = "https://subrock.rocks/watch?v=" . htmlspecialchars($_video['rid']);
40 40
 ?>
41 41
 <!DOCTYPE html>
42 42
 <html>
@@ -66,29 +66,29 @@  discard block
 block discarded – undo
66 66
          if (window.yt.timing) {yt.timing.tick("ct");}    
67 67
       </script>
68 68
 		<?php
69
-			$_video['dislikes'] =  $__video_h->get_video_stars_level($_video['rid'], 1);
70
-			$_video['dislikes'] += $__video_h->get_video_stars_level($_video['rid'], 2);
69
+            $_video['dislikes'] =  $__video_h->get_video_stars_level($_video['rid'], 1);
70
+            $_video['dislikes'] += $__video_h->get_video_stars_level($_video['rid'], 2);
71 71
 
72
-			$_video['likes'] =     $__video_h->get_video_stars_level($_video['rid'], 4);
73
-			$_video['likes'] +=    $__video_h->get_video_stars_level($_video['rid'], 5);
72
+            $_video['likes'] =     $__video_h->get_video_stars_level($_video['rid'], 4);
73
+            $_video['likes'] +=    $__video_h->get_video_stars_level($_video['rid'], 5);
74 74
 
75
-			$_video['dislikes'] += $__video_h->get_video_likes($_video['rid'], false);
76
-			$_video['likes'] += $__video_h->get_video_likes($_video['rid'], true);
75
+            $_video['dislikes'] += $__video_h->get_video_likes($_video['rid'], false);
76
+            $_video['likes'] += $__video_h->get_video_likes($_video['rid'], true);
77 77
 
78
-			if($_video['likes'] == 0 && $_video['dislikes'] == 0) {
79
-				$_video['likeswidth'] = 0;
80
-				$_video['dislikeswidth'] = 0;
81
-			} else {
82
-				$_video['likeswidth'] = $_video['likes'] / ($_video['likes'] + $_video['dislikes']) * 100;
83
-				$_video['dislikeswidth'] = 100 - $_video['likeswidth'];
84
-			}
78
+            if($_video['likes'] == 0 && $_video['dislikes'] == 0) {
79
+                $_video['likeswidth'] = 0;
80
+                $_video['dislikeswidth'] = 0;
81
+            } else {
82
+                $_video['likeswidth'] = $_video['likes'] / ($_video['likes'] + $_video['dislikes']) * 100;
83
+                $_video['dislikeswidth'] = 100 - $_video['likeswidth'];
84
+            }
85 85
 
86
-			$_video['liked'] = $__video_h->if_liked(@$_SESSION['siteusername'], $_video['rid'], true);
87
-			$_video['disliked'] = $__video_h->if_liked(@$_SESSION['siteusername'], $_video['rid'], false);
88
-			$_video['author_videos'] = $__video_h->fetch_user_videos($_video['author']);
89
-			$_video['subscribed'] = $__user_h->if_subscribed(@$_SESSION['siteusername'], $_video['author']);
90
-			$_video['favorited'] = $__video_h->if_favorited(@$_SESSION['siteusername'], $_video['rid']);
91
-		?>
86
+            $_video['liked'] = $__video_h->if_liked(@$_SESSION['siteusername'], $_video['rid'], true);
87
+            $_video['disliked'] = $__video_h->if_liked(@$_SESSION['siteusername'], $_video['rid'], false);
88
+            $_video['author_videos'] = $__video_h->fetch_user_videos($_video['author']);
89
+            $_video['subscribed'] = $__user_h->if_subscribed(@$_SESSION['siteusername'], $_video['author']);
90
+            $_video['favorited'] = $__video_h->if_favorited(@$_SESSION['siteusername'], $_video['rid']);
91
+        ?>
92 92
 	</head>
93 93
 	<body id="" class="date-20120927 en_US ltr   ytg-old-clearfix guide-feed-v2 gecko gecko-15" dir="ltr">
94 94
 		<form name="logoutForm" method="POST" action="/logout">
@@ -156,21 +156,21 @@  discard block
 block discarded – undo
156 156
 
157 157
 									<?php $_user = $__user_h->fetch_user_username($_video['author']); ?>
158 158
 									<?php
159
-										$stmt = $__db->prepare("SELECT ip, username FROM users WHERE ip = :ip");
160
-										$stmt->bindParam(":ip", $_user['ip']);
161
-										$stmt->execute();
162
-										$alts = $stmt->rowCount();
159
+                                        $stmt = $__db->prepare("SELECT ip, username FROM users WHERE ip = :ip");
160
+                                        $stmt->bindParam(":ip", $_user['ip']);
161
+                                        $stmt->execute();
162
+                                        $alts = $stmt->rowCount();
163 163
 
164
-										if($alts != 0) { echo "<span style='font-size:11px;color:grey;'>Alts will pop up below here...</span><br>"; }
164
+                                        if($alts != 0) { echo "<span style='font-size:11px;color:grey;'>Alts will pop up below here...</span><br>"; }
165 165
 
166
-										while($username = $stmt->fetch(PDO::FETCH_ASSOC)) { 
167
-											if($username['username'] != $_video['author'] && $username['ip'] != "0.0.0.0")
168
-												echo "
166
+                                        while($username = $stmt->fetch(PDO::FETCH_ASSOC)) { 
167
+                                            if($username['username'] != $_video['author'] && $username['ip'] != "0.0.0.0")
168
+                                                echo "
169 169
 												  <a style='font-size:10px;' href='/user/" .  htmlspecialchars($username['username']) . "'>" . 
170
-													htmlspecialchars($username['username']) 
171
-												. "</a><br>";
172
-										}
173
-									?>
170
+                                                    htmlspecialchars($username['username']) 
171
+                                                . "</a><br>";
172
+                                        }
173
+                                    ?>
174 174
 									<hr>
175 175
 								<?php } ?>
176 176
 								<h1 id="watch-headline-title">
@@ -384,21 +384,21 @@  discard block
 block discarded – undo
384 384
 													<hr><br>
385 385
 													<h3>Add to a Playlist</h3>
386 386
 													<?php
387
-														$stmt = $__db->prepare("SELECT * FROM playlists WHERE author = :username ORDER BY id DESC LIMIT 20");
388
-														$stmt->bindParam(":username", $_SESSION['siteusername']);
389
-														$stmt->execute();
390
-														while($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { 
391
-															$buffer = json_decode($playlist['videos']);
392
-															@$rid = $buffer[0];
393
-															if(!empty($rid)) {
394
-																@$video = $__video_h->fetch_video_rid($rid);
395
-															} else {
396
-																$video['thumbnail'] = "";
397
-																$video['duration'] = 0;
398
-															}
387
+                                                        $stmt = $__db->prepare("SELECT * FROM playlists WHERE author = :username ORDER BY id DESC LIMIT 20");
388
+                                                        $stmt->bindParam(":username", $_SESSION['siteusername']);
389
+                                                        $stmt->execute();
390
+                                                        while($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { 
391
+                                                            $buffer = json_decode($playlist['videos']);
392
+                                                            @$rid = $buffer[0];
393
+                                                            if(!empty($rid)) {
394
+                                                                @$video = $__video_h->fetch_video_rid($rid);
395
+                                                            } else {
396
+                                                                $video['thumbnail'] = "";
397
+                                                                $video['duration'] = 0;
398
+                                                            }
399 399
 
400
-															$videos = count($buffer);
401
-													?>
400
+                                                            $videos = count($buffer);
401
+                                                    ?>
402 402
 														<a href="/get/add_to_playlist?id=<?php echo $_video['rid']; ?>&playlist=<?php echo $playlist['rid']; ?>">Add to <?php echo htmlspecialchars($playlist['title']); ?></a><br>
403 403
 													<?php } ?>
404 404
 												<?php } ?>
@@ -663,10 +663,10 @@  discard block
 block discarded – undo
663 663
 												</div>
664 664
 											</div>
665 665
 											<?php 
666
-												$stmt = $__db->prepare("SELECT * FROM video_response WHERE toid = :v ORDER BY id DESC LIMIT 4");
667
-												$stmt->bindParam(":v", $_GET['v']);
668
-												$stmt->execute();
669
-											?>
666
+                                                $stmt = $__db->prepare("SELECT * FROM video_response WHERE toid = :v ORDER BY id DESC LIMIT 4");
667
+                                                $stmt->bindParam(":v", $_GET['v']);
668
+                                                $stmt->execute();
669
+                                            ?>
670 670
 
671 671
 											<?php if($stmt->rowCount() != 0) { ?>
672 672
 												<div class="comments-section">
@@ -676,16 +676,16 @@  discard block
 block discarded – undo
676 676
 													<h4>Video Responses</h4>
677 677
 													<ul class="video-list">
678 678
 													<?php 
679
-														while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { 
680
-															if($__video_h->video_exists($video['video'])) { 
681
-																$video = $__video_h->fetch_video_rid($video['video']);
682
-																$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
683
-																$video['duration'] = $__time_h->timestamp($video['duration']);
684
-																$video['views'] = $__video_h->fetch_video_views($video['rid']);
685
-																$video['author'] = htmlspecialchars($video['author']);		
686
-																$video['title'] = htmlspecialchars($video['title']);
687
-																$video['description'] = $__video_h->shorten_description($video['description'], 50);
688
-													?>
679
+                                                        while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { 
680
+                                                            if($__video_h->video_exists($video['video'])) { 
681
+                                                                $video = $__video_h->fetch_video_rid($video['video']);
682
+                                                                $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
683
+                                                                $video['duration'] = $__time_h->timestamp($video['duration']);
684
+                                                                $video['views'] = $__video_h->fetch_video_views($video['rid']);
685
+                                                                $video['author'] = htmlspecialchars($video['author']);		
686
+                                                                $video['title'] = htmlspecialchars($video['title']);
687
+                                                                $video['description'] = $__video_h->shorten_description($video['description'], 50);
688
+                                                    ?>
689 689
 														<li class="video-list-item yt-tile-default">
690 690
 															<a href="/watch?v=<?php echo $video['rid']; ?>" class="related-video yt-uix-contextlink  yt-uix-sessionlink" data-sessionlink="<?php echo htmlspecialchars($_video['author']); ?>&amp;feature=watch_response"><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="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="<?php echo $video['title']; ?>" data-thumb="/dynamic/thumbs/<?php echo $video['thumbnail']; ?>" width="120"><span class="vertical-align"></span></span></span></span><span class="video-time"><?php echo $video['duration']; ?></span>
691 691
 															<button onclick=";return false;" title="Watch Later" type="button" class="addto-button video-actions addto-watch-later-button-sign-in yt-uix-button yt-uix-button-default yt-uix-button-short yt-uix-tooltip" data-button-menu-id="shared-addto-watch-later-login" data-video-ids="cjls0QsHOBE" role="button"><span class="yt-uix-button-content">  <img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Watch Later">
@@ -766,38 +766,38 @@  discard block
 block discarded – undo
766 766
 												</div>
767 767
 												<ul class="comment-list" id="live_comments">
768 768
 														<?php
769
-														$results_per_page = 20;
769
+                                                        $results_per_page = 20;
770 770
 
771
-														$stmt = $__db->prepare("SELECT * FROM comments WHERE toid = :rid ORDER BY id DESC");
772
-														$stmt->bindParam(":rid", $_video['rid']);
773
-														$stmt->execute();
771
+                                                        $stmt = $__db->prepare("SELECT * FROM comments WHERE toid = :rid ORDER BY id DESC");
772
+                                                        $stmt->bindParam(":rid", $_video['rid']);
773
+                                                        $stmt->execute();
774 774
 
775
-														$number_of_result = $stmt->rowCount();
776
-														$number_of_page = ceil ($number_of_result / $results_per_page);  
775
+                                                        $number_of_result = $stmt->rowCount();
776
+                                                        $number_of_page = ceil ($number_of_result / $results_per_page);  
777 777
 
778
-														if (!isset ($_GET['page']) ) {  
779
-															$page = 1;  
780
-														} else {  
781
-															$page = (int)$_GET['page'];  
782
-														}  
778
+                                                        if (!isset ($_GET['page']) ) {  
779
+                                                            $page = 1;  
780
+                                                        } else {  
781
+                                                            $page = (int)$_GET['page'];  
782
+                                                        }  
783 783
 
784
-														$page_first_result = ($page - 1) * $results_per_page;  
784
+                                                        $page_first_result = ($page - 1) * $results_per_page;  
785 785
 
786
-														$stmt = $__db->prepare("SELECT * FROM comments WHERE toid = :rid ORDER BY id DESC LIMIT :pfirst, :pper");
787
-														$stmt->bindParam(":rid", $_video['rid']);
788
-														$stmt->bindParam(":pfirst", $page_first_result);
789
-														$stmt->bindParam(":pper", $results_per_page);
790
-														$stmt->execute();
786
+                                                        $stmt = $__db->prepare("SELECT * FROM comments WHERE toid = :rid ORDER BY id DESC LIMIT :pfirst, :pper");
787
+                                                        $stmt->bindParam(":rid", $_video['rid']);
788
+                                                        $stmt->bindParam(":pfirst", $page_first_result);
789
+                                                        $stmt->bindParam(":pper", $results_per_page);
790
+                                                        $stmt->execute();
791 791
 
792
-														while($comment = $stmt->fetch(PDO::FETCH_ASSOC)) { 
793
-															if($__video_h->if_comment_liked($comment['id'], $_SESSION['siteusername'], true))
794
-																$comment['liked'] = true;
795
-															else if($__video_h->if_comment_liked($comment['id'], $_SESSION['siteusername'], false))
796
-																$comment['disliked'] = true;
792
+                                                        while($comment = $stmt->fetch(PDO::FETCH_ASSOC)) { 
793
+                                                            if($__video_h->if_comment_liked($comment['id'], $_SESSION['siteusername'], true))
794
+                                                                $comment['liked'] = true;
795
+                                                            else if($__video_h->if_comment_liked($comment['id'], $_SESSION['siteusername'], false))
796
+                                                                $comment['disliked'] = true;
797 797
 																
798
-															$comment['likes']  = $__video_h->get_comment_likes($comment['id'], true);
799
-															$comment['likes'] -= $__video_h->get_comment_likes($comment['id'], false);
800
-													?>
798
+                                                            $comment['likes']  = $__video_h->get_comment_likes($comment['id'], true);
799
+                                                            $comment['likes'] -= $__video_h->get_comment_likes($comment['id'], false);
800
+                                                    ?>
801 801
 
802 802
 														<li class="comment yt-tile-default " data-author-viewing="" data-author-id="-uD01K8FQTeOSS5sniRFzQ" data-id="<?php echo $comment['id']; ?>" data-score="0">
803 803
 															<div class="comment-body">
@@ -863,12 +863,12 @@  discard block
 block discarded – undo
863 863
 															</div>
864 864
 														</li>
865 865
 														<?php 
866
-															$stmt2 = $__db->prepare("SELECT * FROM comment_reply WHERE toid = :rid ORDER BY id DESC");
867
-															$stmt2->bindParam(":rid", $comment['id']);
868
-															$stmt2->execute();
866
+                                                            $stmt2 = $__db->prepare("SELECT * FROM comment_reply WHERE toid = :rid ORDER BY id DESC");
867
+                                                            $stmt2->bindParam(":rid", $comment['id']);
868
+                                                            $stmt2->execute();
869 869
 
870
-															while($reply = $stmt2->fetch(PDO::FETCH_ASSOC)) { 
871
-														?>
870
+                                                            while($reply = $stmt2->fetch(PDO::FETCH_ASSOC)) { 
871
+                                                        ?>
872 872
 															<li class="comment yt-tile-default " style="margin-left: 30px;" data-author-viewing="" data-author-id="-uD01K8FQTeOSS5sniRFzQ" data-id="<?php echo $reply['id']; ?>" data-score="0">
873 873
 																<div class="comment-body">
874 874
 																	<div class="content-container">
@@ -948,19 +948,19 @@  discard block
 block discarded – undo
948 948
 										<div id="watch-related-container" class="watch-sidebar-body">
949 949
 											<ul id="watch-related" class="video-list">
950 950
 												<?php
951
-													$stmt = $__db->prepare("SELECT * FROM playlists ORDER BY rand() LIMIT 2");
952
-													$stmt->execute();
953
-													while($_playlist = $stmt->fetch(PDO::FETCH_ASSOC)) {	
954
-														$_playlist['videos'] = json_decode($_playlist['videos']);
955
-														$_playlist['count'] = 1;
951
+                                                    $stmt = $__db->prepare("SELECT * FROM playlists ORDER BY rand() LIMIT 2");
952
+                                                    $stmt->execute();
953
+                                                    while($_playlist = $stmt->fetch(PDO::FETCH_ASSOC)) {	
954
+                                                        $_playlist['videos'] = json_decode($_playlist['videos']);
955
+                                                        $_playlist['count'] = 1;
956 956
 
957
-														if($__video_h->video_exists($_playlist['videos'][0])) {
958
-															$video = $__video_h->fetch_video_rid($_playlist['videos'][0]);
959
-														} else {
960
-															$video = [];
961
-															$video['thumbnail'] = "default.jpg";
962
-														}
963
-												?>
957
+                                                        if($__video_h->video_exists($_playlist['videos'][0])) {
958
+                                                            $video = $__video_h->fetch_video_rid($_playlist['videos'][0]);
959
+                                                        } else {
960
+                                                            $video = [];
961
+                                                            $video['thumbnail'] = "default.jpg";
962
+                                                        }
963
+                                                ?>
964 964
 												<li class="video-list-item">
965 965
 													<a href="/view_playlist?v=<?php echo $_playlist['rid']; ?>" class="related-playlist yt-uix-contextlink  yt-uix-sessionlink" data-sessionlink="ved=CAMQzhooAA%3D%3D&amp;ei=CKf4md_r7rMCFYMfRAodLGlRiA%3D%3D&amp;feature=list_other">
966 966
 														<span class="ux-thumb-wrap">
@@ -1007,16 +1007,16 @@  discard block
 block discarded – undo
1007 1007
 												<?php } ?>
1008 1008
 												<div id="ppv-container" class="hid"></div>
1009 1009
 												<?php
1010
-													$stmt = $__db->prepare("SELECT * FROM videos WHERE visibility = 'n' ORDER BY rand() LIMIT 20");
1011
-													$stmt->execute();
1012
-													while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
1013
-														$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
1014
-														$video['duration'] = $__time_h->timestamp($video['duration']);
1015
-														$video['views'] = $__video_h->fetch_video_views($video['rid']);
1016
-														$video['author'] = htmlspecialchars($video['author']);		
1017
-														$video['title'] = htmlspecialchars($video['title']);
1018
-														$video['description'] = $__video_h->shorten_description($video['description'], 50);
1019
-												?>
1010
+                                                    $stmt = $__db->prepare("SELECT * FROM videos WHERE visibility = 'n' ORDER BY rand() LIMIT 20");
1011
+                                                    $stmt->execute();
1012
+                                                    while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
1013
+                                                        $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
1014
+                                                        $video['duration'] = $__time_h->timestamp($video['duration']);
1015
+                                                        $video['views'] = $__video_h->fetch_video_views($video['rid']);
1016
+                                                        $video['author'] = htmlspecialchars($video['author']);		
1017
+                                                        $video['title'] = htmlspecialchars($video['title']);
1018
+                                                        $video['description'] = $__video_h->shorten_description($video['description'], 50);
1019
+                                                ?>
1020 1020
 												<li class="video-list-item"><a href="/watch?v=<?php echo $video['rid']; ?>" class="related-video yt-uix-contextlink  yt-uix-sessionlink" data-sessionlink="ved=CAIQzRooAA%3D%3D&amp;<?php echo htmlspecialchars($_video['author']); ?>&amp;feature=relmfu"><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="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="<?php echo $video['title']; ?>" onerror=";this.src='/dynamic/thumbs/default.jpg';" data-thumb="/dynamic/thumbs/<?php echo $video['thumbnail']; ?>" width="120"><span class="vertical-align"></span></span></span></span><span class="video-time"><?php echo $video['duration']; ?></span>
1021 1021
 													<button onclick=";return false;" title="Watch Later" type="button" class="addto-button video-actions addto-watch-later-button-sign-in yt-uix-button yt-uix-button-default yt-uix-button-short yt-uix-tooltip" data-button-menu-id="shared-addto-watch-later-login" data-video-ids="gyAaIKF6tSQ" role="button"><span class="yt-uix-button-content">  <img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Watch Later">
1022 1022
 													</span><img class="yt-uix-button-arrow" src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt=""></button>
Please login to merge, or discard this patch.
Braces   +11 added lines, -8 removed lines patch added patch discarded remove patch
@@ -15,8 +15,9 @@  discard block
 block discarded – undo
15 15
 <?php $_video = $__video_h->fetch_video_rid($_GET['v']); ?>
16 16
 <?php $_video['comments'] = $__video_h->get_comments_from_video($_video['rid']); ?>
17 17
 <?php
18
-	if($_video['visibility'] == "v" && @$_SESSION['siteusername'] != $_video['author'])
19
-		header("Location: /");
18
+	if($_video['visibility'] == "v" && @$_SESSION['siteusername'] != $_video['author']) {
19
+			header("Location: /");
20
+	}
20 21
 
21 22
 	$__video_h->check_view($_GET['v'], @$_SERVER["HTTP_CF_CONNECTING_IP"]);
22 23
 
@@ -164,11 +165,12 @@  discard block
 block discarded – undo
164 165
 										if($alts != 0) { echo "<span style='font-size:11px;color:grey;'>Alts will pop up below here...</span><br>"; }
165 166
 
166 167
 										while($username = $stmt->fetch(PDO::FETCH_ASSOC)) { 
167
-											if($username['username'] != $_video['author'] && $username['ip'] != "0.0.0.0")
168
-												echo "
168
+											if($username['username'] != $_video['author'] && $username['ip'] != "0.0.0.0") {
169
+																							echo "
169 170
 												  <a style='font-size:10px;' href='/user/" .  htmlspecialchars($username['username']) . "'>" . 
170 171
 													htmlspecialchars($username['username']) 
171 172
 												. "</a><br>";
173
+											}
172 174
 										}
173 175
 									?>
174 176
 									<hr>
@@ -790,10 +792,11 @@  discard block
 block discarded – undo
790 792
 														$stmt->execute();
791 793
 
792 794
 														while($comment = $stmt->fetch(PDO::FETCH_ASSOC)) { 
793
-															if($__video_h->if_comment_liked($comment['id'], $_SESSION['siteusername'], true))
794
-																$comment['liked'] = true;
795
-															else if($__video_h->if_comment_liked($comment['id'], $_SESSION['siteusername'], false))
796
-																$comment['disliked'] = true;
795
+															if($__video_h->if_comment_liked($comment['id'], $_SESSION['siteusername'], true)) {
796
+																															$comment['liked'] = true;
797
+															} else if($__video_h->if_comment_liked($comment['id'], $_SESSION['siteusername'], false)) {
798
+																															$comment['disliked'] = true;
799
+															}
797 800
 																
798 801
 															$comment['likes']  = $__video_h->get_comment_likes($comment['id'], true);
799 802
 															$comment['likes'] -= $__video_h->get_comment_likes($comment['id'], false);
Please login to merge, or discard this patch.
Spacing   +46 added lines, -46 removed lines patch added patch discarded remove patch
@@ -11,11 +11,11 @@  discard block
 block discarded – undo
11 11
 <?php $__user_u = new user_update($__db); ?>
12 12
 <?php $__db_h = new db_helper(); ?>
13 13
 <?php $__time_h = new time_helper(); ?>
14
-<?php if(!$__video_h->video_exists($_GET['v'])) { header("Location: /?error=This video doesn't exist!"); } ?>
14
+<?php if (!$__video_h->video_exists($_GET['v'])) { header("Location: /?error=This video doesn't exist!"); } ?>
15 15
 <?php $_video = $__video_h->fetch_video_rid($_GET['v']); ?>
16 16
 <?php $_video['comments'] = $__video_h->get_comments_from_video($_video['rid']); ?>
17 17
 <?php
18
-	if($_video['visibility'] == "v" && @$_SESSION['siteusername'] != $_video['author'])
18
+	if ($_video['visibility'] == "v" && @$_SESSION['siteusername'] != $_video['author'])
19 19
 		header("Location: /");
20 20
 
21 21
 	$__video_h->check_view($_GET['v'], @$_SERVER["HTTP_CF_CONNECTING_IP"]);
@@ -66,20 +66,20 @@  discard block
 block discarded – undo
66 66
          if (window.yt.timing) {yt.timing.tick("ct");}    
67 67
       </script>
68 68
 		<?php
69
-			$_video['dislikes'] =  $__video_h->get_video_stars_level($_video['rid'], 1);
69
+			$_video['dislikes'] = $__video_h->get_video_stars_level($_video['rid'], 1);
70 70
 			$_video['dislikes'] += $__video_h->get_video_stars_level($_video['rid'], 2);
71 71
 
72
-			$_video['likes'] =     $__video_h->get_video_stars_level($_video['rid'], 4);
73
-			$_video['likes'] +=    $__video_h->get_video_stars_level($_video['rid'], 5);
72
+			$_video['likes'] = $__video_h->get_video_stars_level($_video['rid'], 4);
73
+			$_video['likes'] += $__video_h->get_video_stars_level($_video['rid'], 5);
74 74
 
75 75
 			$_video['dislikes'] += $__video_h->get_video_likes($_video['rid'], false);
76 76
 			$_video['likes'] += $__video_h->get_video_likes($_video['rid'], true);
77 77
 
78
-			if($_video['likes'] == 0 && $_video['dislikes'] == 0) {
78
+			if ($_video['likes'] == 0 && $_video['dislikes'] == 0) {
79 79
 				$_video['likeswidth'] = 0;
80 80
 				$_video['dislikeswidth'] = 0;
81 81
 			} else {
82
-				$_video['likeswidth'] = $_video['likes'] / ($_video['likes'] + $_video['dislikes']) * 100;
82
+				$_video['likeswidth'] = $_video['likes']/($_video['likes'] + $_video['dislikes'])*100;
83 83
 				$_video['dislikeswidth'] = 100 - $_video['likeswidth'];
84 84
 			}
85 85
 
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
 									</div>
114 114
 									<div id="instream_google_companion_ad_div"></div>
115 115
 								</div>
116
-								<?php if(@$_SESSION['siteusername'] == $_video['author']) { ?>
116
+								<?php if (@$_SESSION['siteusername'] == $_video['author']) { ?>
117 117
 									<div id="watch-owner-container">
118 118
 										<div id="masthead-subnav" class="yt-nav yt-nav-dark ">
119 119
 											<ul class="yt-nav-aside">
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
 										</div>
133 133
 									</div><br>
134 134
 								<?php } ?>
135
-								<?php if($__user_h->if_admin(@$_SESSION['siteusername']) && @$_SESSION['siteusername'] != $_video['author']) { ?>
135
+								<?php if ($__user_h->if_admin(@$_SESSION['siteusername']) && @$_SESSION['siteusername'] != $_video['author']) { ?>
136 136
 									<div id="watch-owner-container">
137 137
 										<div id="masthead-subnav" class="yt-nav yt-nav-dark ">
138 138
 											<ul class="yt-nav-aside">
@@ -161,10 +161,10 @@  discard block
 block discarded – undo
161 161
 										$stmt->execute();
162 162
 										$alts = $stmt->rowCount();
163 163
 
164
-										if($alts != 0) { echo "<span style='font-size:11px;color:grey;'>Alts will pop up below here...</span><br>"; }
164
+										if ($alts != 0) { echo "<span style='font-size:11px;color:grey;'>Alts will pop up below here...</span><br>"; }
165 165
 
166
-										while($username = $stmt->fetch(PDO::FETCH_ASSOC)) { 
167
-											if($username['username'] != $_video['author'] && $username['ip'] != "0.0.0.0")
166
+										while ($username = $stmt->fetch(PDO::FETCH_ASSOC)) { 
167
+											if ($username['username'] != $_video['author'] && $username['ip'] != "0.0.0.0")
168 168
 												echo "
169 169
 												  <a style='font-size:10px;' href='/user/" .  htmlspecialchars($username['username']) . "'>" . 
170 170
 													htmlspecialchars($username['username']) 
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
 											title="" 
190 190
 											id="subscribe-button"
191 191
 											type="button" 
192
-											class="<?php if($_video['subscribed']) { echo "subscribed "; } ?>yt-subscription-button  yt-uix-button yt-uix-button-subscription yt-uix-tooltip" 
192
+											class="<?php if ($_video['subscribed']) { echo "subscribed "; } ?>yt-subscription-button  yt-uix-button yt-uix-button-subscription yt-uix-tooltip" 
193 193
 											role="button">
194 194
 											<span class="yt-uix-button-icon-wrapper">
195 195
 												<img class="yt-uix-button-icon yt-uix-button-icon-subscribe" src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="">
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
 						<div id="watch-main-container">
248 248
 							<div id="watch-main">
249 249
 								<div id="watch-panel">
250
-									<?php if($_video['featured'] == "v") { ?>
250
+									<?php if ($_video['featured'] == "v") { ?>
251 251
 										<div id="masthead_child_div"><div class="yt-alert yt-alert-default yt-alert-warn">  <div class="yt-alert-icon">
252 252
 											<img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" class="icon master-sprite" alt="Alert icon">
253 253
 										</div>
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
 										</div></div></div>
259 259
 									<?php }  ?>
260 260
 
261
-	  								<?php if($_video['visibility'] == "u") { ?>
261
+	  								<?php if ($_video['visibility'] == "u") { ?>
262 262
 										<div id="masthead_child_div"><div class="yt-alert yt-alert-default yt-alert-warn">  <div class="yt-alert-icon">
263 263
 											<img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" class="icon master-sprite" alt="Alert icon">
264 264
 										</div>
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
 												This video is unlisted. Only people who have the link can view this video.
268 268
 											</div>
269 269
 										</div></div></div>
270
-									<?php } else if($_video['visibility'] == "v") { ?>
270
+									<?php } else if ($_video['visibility'] == "v") { ?>
271 271
 										<div id="masthead_child_div"><div class="yt-alert yt-alert-default yt-alert-error">  <div class="yt-alert-icon">
272 272
 											<img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" class="icon master-sprite" alt="Alert icon">
273 273
 										</div>
@@ -301,7 +301,7 @@  discard block
 block discarded – undo
301 301
 											<button onclick=";window.location.href=this.getAttribute('href');return false;" href="/get/like_video?v=<?php echo $_video['rid']; ?>"
302 302
 											title="I like this" 
303 303
 											type="button" 
304
-											class="start <?php if($_video['liked']) { echo "liked "; } ?>yt-uix-tooltip-reverse  yt-uix-button yt-uix-button-default yt-uix-tooltip" 
304
+											class="start <?php if ($_video['liked']) { echo "liked "; } ?>yt-uix-tooltip-reverse  yt-uix-button yt-uix-button-default yt-uix-tooltip" 
305 305
 											id="watch-like"  
306 306
 											href="/get/like_video?v=<?php echo $_video['rid']; ?>"
307 307
 											role="button"><span class="yt-uix-button-icon-wrapper">
@@ -315,7 +315,7 @@  discard block
 block discarded – undo
315 315
 											type="button" 
316 316
 											style="margin-left: -2px;"
317 317
 											href="/get/dislike_video?v=<?php echo $_video['rid']; ?>"
318
-											class="end yt-uix-tooltip-reverse <?php if($_video['disliked']) { echo "unliked "; } ?>  yt-uix-button yt-uix-button-default yt-uix-tooltip yt-uix-button-empty" 
318
+											class="end yt-uix-tooltip-reverse <?php if ($_video['disliked']) { echo "unliked "; } ?>  yt-uix-button yt-uix-button-default yt-uix-tooltip yt-uix-button-empty" 
319 319
 											id="watch-unlike" 
320 320
 											role="button">
321 321
 												<span class="yt-uix-button-icon-wrapper">
@@ -335,7 +335,7 @@  discard block
 block discarded – undo
335 335
 												</div>
336 336
 											</div>
337 337
 											<div id="watch-actions-logged-out" class="watch-actions-panel hid">
338
-												<?php if(!isset($_SESSION['siteusername'])) { ?>
338
+												<?php if (!isset($_SESSION['siteusername'])) { ?>
339 339
 												<div class="yt-alert yt-alert-naked yt-alert-warn  ">
340 340
 													<div class="yt-alert-icon">
341 341
 														<img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" class="icon master-sprite" alt="Alert icon">
@@ -351,7 +351,7 @@  discard block
 block discarded – undo
351 351
 												<?php } else { ?>
352 352
 													<h3>Be friends with the creator</h3>
353 353
 
354
-													<?php if($_SESSION['siteusername'] != $_video['author']) { ?>
354
+													<?php if ($_SESSION['siteusername'] != $_video['author']) { ?>
355 355
 														<img style="width: 50px;height:50px;" src="/dynamic/pfp/<?php echo $__user_h->fetch_pfp($_video['author']); ?>">
356 356
 														<span style="display: inline-block; vertical-align:top;width: 100px;font-size:11px;">
357 357
 															<b><a href="/user/<?php echo htmlspecialchars($_video['author']); ?>"><?php echo htmlspecialchars($_video['author']); ?></a></b><br>
@@ -365,8 +365,8 @@  discard block
 block discarded – undo
365 365
 														</span><br><br>
366 366
 													<?php } ?>
367 367
 
368
-													<?php if($_SESSION['siteusername'] != $_video['author']) { ?>
369
-														<?php if($_video['friended'] == false) { ?>
368
+													<?php if ($_SESSION['siteusername'] != $_video['author']) { ?>
369
+														<?php if ($_video['friended'] == false) { ?>
370 370
 															<a href="/friends">Send a friend request</a>
371 371
 														<?php } else { ?>
372 372
 															Your friend request is pending.
@@ -376,7 +376,7 @@  discard block
 block discarded – undo
376 376
 													<?php } ?>
377 377
 													<hr><br>
378 378
 													<h3>Add to Favorites</h3>
379
-													<?php if($_video['favorited'] == false) { ?>
379
+													<?php if ($_video['favorited'] == false) { ?>
380 380
 														<a href="/get/favorite?v=<?php echo $_video['rid']; ?>">Favorite Video</a>
381 381
 													<?php } else { ?>
382 382
 														<a href="/get/unfavorite?v=<?php echo $_video['rid']; ?>">Unfavorite Video</a>
@@ -387,10 +387,10 @@  discard block
 block discarded – undo
387 387
 														$stmt = $__db->prepare("SELECT * FROM playlists WHERE author = :username ORDER BY id DESC LIMIT 20");
388 388
 														$stmt->bindParam(":username", $_SESSION['siteusername']);
389 389
 														$stmt->execute();
390
-														while($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { 
390
+														while ($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { 
391 391
 															$buffer = json_decode($playlist['videos']);
392 392
 															@$rid = $buffer[0];
393
-															if(!empty($rid)) {
393
+															if (!empty($rid)) {
394 394
 																@$video = $__video_h->fetch_video_rid($rid);
395 395
 															} else {
396 396
 																$video['thumbnail'] = "";
@@ -668,7 +668,7 @@  discard block
 block discarded – undo
668 668
 												$stmt->execute();
669 669
 											?>
670 670
 
671
-											<?php if($stmt->rowCount() != 0) { ?>
671
+											<?php if ($stmt->rowCount() != 0) { ?>
672 672
 												<div class="comments-section">
673 673
 													<a class="comments-section-see-all" href="/video_response_view_all?v=<?php echo htmlspecialchars($_video['rid']); ?>">
674 674
 													see all
@@ -676,8 +676,8 @@  discard block
 block discarded – undo
676 676
 													<h4>Video Responses</h4>
677 677
 													<ul class="video-list">
678 678
 													<?php 
679
-														while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { 
680
-															if($__video_h->video_exists($video['video'])) { 
679
+														while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) { 
680
+															if ($__video_h->video_exists($video['video'])) { 
681 681
 																$video = $__video_h->fetch_video_rid($video['video']);
682 682
 																$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
683 683
 																$video['duration'] = $__time_h->timestamp($video['duration']);
@@ -708,18 +708,18 @@  discard block
 block discarded – undo
708 708
 														</h4>
709 709
 													</div>
710 710
 												</div>
711
-												<?php if(!isset($_SESSION['siteusername'])) { ?>
711
+												<?php if (!isset($_SESSION['siteusername'])) { ?>
712 712
 													<div class="comments-post-container clearfix">
713 713
 														<div class="comments-post-alert">
714 714
 															<a href="/sign_in">Sign In</a> or <a href="/sign_up">Sign Up</a><span class="comments-post-form-rollover-text"> now to post a comment!</span>
715 715
 														</div>
716 716
 													</div>
717
-												<?php } else if($_video['commenting'] == "d") { ?>
717
+												<?php } else if ($_video['commenting'] == "d") { ?>
718 718
 													<div class="comments-disabled-message">
719 719
 														<img src="http://s.ytimg.com/yt/img/icon_comments_disabled-vflxokpZC.png">
720 720
 														<span>Adding comments has been disabled for this video.</span>
721 721
 													</div>
722
-												<?php } else if($__user_h->if_blocked($_video['author'], $_SESSION['siteusername'])) { ?>
722
+												<?php } else if ($__user_h->if_blocked($_video['author'], $_SESSION['siteusername'])) { ?>
723 723
 													<div class="comments-post-container clearfix">
724 724
 														<div class="comments-post-alert">
725 725
 															This user has blocked you!
@@ -773,15 +773,15 @@  discard block
 block discarded – undo
773 773
 														$stmt->execute();
774 774
 
775 775
 														$number_of_result = $stmt->rowCount();
776
-														$number_of_page = ceil ($number_of_result / $results_per_page);  
776
+														$number_of_page = ceil($number_of_result/$results_per_page);  
777 777
 
778
-														if (!isset ($_GET['page']) ) {  
778
+														if (!isset ($_GET['page'])) {  
779 779
 															$page = 1;  
780 780
 														} else {  
781
-															$page = (int)$_GET['page'];  
781
+															$page = (int) $_GET['page'];  
782 782
 														}  
783 783
 
784
-														$page_first_result = ($page - 1) * $results_per_page;  
784
+														$page_first_result = ($page - 1)*$results_per_page;  
785 785
 
786 786
 														$stmt = $__db->prepare("SELECT * FROM comments WHERE toid = :rid ORDER BY id DESC LIMIT :pfirst, :pper");
787 787
 														$stmt->bindParam(":rid", $_video['rid']);
@@ -789,10 +789,10 @@  discard block
 block discarded – undo
789 789
 														$stmt->bindParam(":pper", $results_per_page);
790 790
 														$stmt->execute();
791 791
 
792
-														while($comment = $stmt->fetch(PDO::FETCH_ASSOC)) { 
793
-															if($__video_h->if_comment_liked($comment['id'], $_SESSION['siteusername'], true))
792
+														while ($comment = $stmt->fetch(PDO::FETCH_ASSOC)) { 
793
+															if ($__video_h->if_comment_liked($comment['id'], $_SESSION['siteusername'], true))
794 794
 																$comment['liked'] = true;
795
-															else if($__video_h->if_comment_liked($comment['id'], $_SESSION['siteusername'], false))
795
+															else if ($__video_h->if_comment_liked($comment['id'], $_SESSION['siteusername'], false))
796 796
 																$comment['disliked'] = true;
797 797
 																
798 798
 															$comment['likes']  = $__video_h->get_comment_likes($comment['id'], true);
@@ -814,10 +814,10 @@  discard block
 block discarded – undo
814 814
 																			<span dir="ltr"><?php echo $__time_h->time_elapsed_string($comment['date']); ?><span>
815 815
 																			</span>
816 816
 																			</span></span>
817
-																			<?php if($comment['likes'] != 0) { ?>
818
-																				<?php if($comment['likes'] < 0) { ?>
817
+																			<?php if ($comment['likes'] != 0) { ?>
818
+																				<?php if ($comment['likes'] < 0) { ?>
819 819
 																				<span dir="ltr" class="comments-rating-positive" title="9 up, 1 down" style="color:#c16a6a;">
820
-																					<?php echo abs($comment['likes']);; ?>
820
+																					<?php echo abs($comment['likes']); ; ?>
821 821
 																					<img src="/yt/imgbin/dislike.png">
822 822
 																				</span>
823 823
 																				<?php } else { ?>
@@ -849,7 +849,7 @@  discard block
 block discarded – undo
849 849
 																			</button>
850 850
 																		</span>
851 851
 																	</div>
852
-																<?php if(isset($_SESSION['siteusername'])) { ?> 
852
+																<?php if (isset($_SESSION['siteusername'])) { ?> 
853 853
 																	<li id="reply_to_<?php echo $comment['id']; ?>" style="display: none;" class="comment yt-tile-default  child" data-tag="O" data-author-viewing="" data-id="iRV7EkT9us81mDLFDSB6FAsB156Fdn13HUmTm26C3PE" data-score="34" data-author="<?php echo htmlspecialchars($row['author']); ?>">
854 854
 
855 855
 																	<div class="comment-body">
@@ -874,7 +874,7 @@  discard block
 block discarded – undo
874 874
 															$stmt2->bindParam(":rid", $comment['id']);
875 875
 															$stmt2->execute();
876 876
 
877
-															while($reply = $stmt2->fetch(PDO::FETCH_ASSOC)) { 
877
+															while ($reply = $stmt2->fetch(PDO::FETCH_ASSOC)) { 
878 878
 														?>
879 879
 															<li class="comment yt-tile-default " style="margin-left: 30px;" data-author-viewing="" data-author-id="-uD01K8FQTeOSS5sniRFzQ" data-id="<?php echo $reply['id']; ?>" data-score="0">
880 880
 																<div class="comment-body">
@@ -957,11 +957,11 @@  discard block
 block discarded – undo
957 957
 												<?php
958 958
 													$stmt = $__db->prepare("SELECT * FROM playlists ORDER BY rand() LIMIT 2");
959 959
 													$stmt->execute();
960
-													while($_playlist = $stmt->fetch(PDO::FETCH_ASSOC)) {	
960
+													while ($_playlist = $stmt->fetch(PDO::FETCH_ASSOC)) {	
961 961
 														$_playlist['videos'] = json_decode($_playlist['videos']);
962 962
 														$_playlist['count'] = 1;
963 963
 
964
-														if($__video_h->video_exists($_playlist['videos'][0])) {
964
+														if ($__video_h->video_exists($_playlist['videos'][0])) {
965 965
 															$video = $__video_h->fetch_video_rid($_playlist['videos'][0]);
966 966
 														} else {
967 967
 															$video = [];
@@ -1016,7 +1016,7 @@  discard block
 block discarded – undo
1016 1016
 												<?php
1017 1017
 													$stmt = $__db->prepare("SELECT * FROM videos WHERE visibility = 'n' ORDER BY rand() LIMIT 20");
1018 1018
 													$stmt->execute();
1019
-													while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
1019
+													while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
1020 1020
 														$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
1021 1021
 														$video['duration'] = $__time_h->timestamp($video['duration']);
1022 1022
 														$video['views'] = $__video_h->fetch_video_views($video['rid']);
Please login to merge, or discard this patch.
web/public/d/channel_update.php 2 patches
Spacing   +49 added lines, -49 removed lines patch added patch discarded remove patch
@@ -16,8 +16,8 @@  discard block
 block discarded – undo
16 16
     }
17 17
 
18 18
 
19
-        if($_SERVER['REQUEST_METHOD'] == 'POST' && @$_GET['n']) {
20
-            if(!empty($_GET["n"]) && $_GET['n'] == "pfp") {
19
+        if ($_SERVER['REQUEST_METHOD'] == 'POST' && @$_GET['n']) {
20
+            if (!empty($_GET["n"]) && $_GET['n'] == "pfp") {
21 21
                 $target_dir = "../dynamic/pfp/";
22 22
                 $imageFileType = strtolower(pathinfo($_FILES["file"]["name"], PATHINFO_EXTENSION));
23 23
                 $target_name = md5_file($_FILES["file"]["tmp_name"]) . "." . $imageFileType;
@@ -27,8 +27,8 @@  discard block
 block discarded – undo
27 27
                 $uploadOk = true;
28 28
                 $movedFile = false;
29 29
         
30
-                if($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg"
31
-                    && $imageFileType != "gif" ) {
30
+                if ($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg"
31
+                    && $imageFileType != "gif") {
32 32
                     $fileerror = 'unsupported file type. must be jpg, png, jpeg, or gif';
33 33
                     $uploadOk = false;
34 34
                     goto skip;
@@ -51,8 +51,8 @@  discard block
 block discarded – undo
51 51
                     }
52 52
                 }
53 53
             }
54
-        } else if($_SERVER['REQUEST_METHOD'] == 'POST' && @$_FILES['backgroundbgset']) {
55
-            if(!empty($_FILES["backgroundbgset"]["name"])) {
54
+        } else if ($_SERVER['REQUEST_METHOD'] == 'POST' && @$_FILES['backgroundbgset']) {
55
+            if (!empty($_FILES["backgroundbgset"]["name"])) {
56 56
                 $target_dir = "../dynamic/banners/";
57 57
                 $imageFileType = strtolower(pathinfo($_FILES["backgroundbgset"]["name"], PATHINFO_EXTENSION));
58 58
                 $target_name = md5_file($_FILES["backgroundbgset"]["tmp_name"]) . "." . $imageFileType;
@@ -62,14 +62,14 @@  discard block
 block discarded – undo
62 62
                 $uploadOk = true;
63 63
                 $movedFile = false;
64 64
     
65
-                if($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg"
66
-                    && $imageFileType != "gif" ) {
65
+                if ($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg"
66
+                    && $imageFileType != "gif") {
67 67
                     $fileerror = 'unsupported file type. must be jpg, png, jpeg, or gif';
68 68
                     $uploadOk = false;
69 69
                     goto skip;
70 70
                 }
71 71
     
72
-                if($uploadOk) { 
72
+                if ($uploadOk) { 
73 73
                     if (file_exists($target_file)) {
74 74
                         $movedFile = true;
75 75
                     } else {
@@ -85,9 +85,9 @@  discard block
 block discarded – undo
85 85
                     }
86 86
                 }
87 87
             }
88
-        } else if($_SERVER['REQUEST_METHOD'] == 'POST' && @$_FILES['watchsubset']) {
88
+        } else if ($_SERVER['REQUEST_METHOD'] == 'POST' && @$_FILES['watchsubset']) {
89 89
             echo "asdas";
90
-            if(!empty($_FILES["watchsubset"]["name"])) {
90
+            if (!empty($_FILES["watchsubset"]["name"])) {
91 91
                 echo "asdas";
92 92
 
93 93
                 $target_dir = "../dynamic/banners/";
@@ -99,14 +99,14 @@  discard block
 block discarded – undo
99 99
                 $uploadOk = true;
100 100
                 $movedFile = false;
101 101
     
102
-                if($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg"
103
-                    && $imageFileType != "gif" ) {
102
+                if ($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg"
103
+                    && $imageFileType != "gif") {
104 104
                     $fileerror = 'unsupported file type. must be jpg, png, jpeg, or gif';
105 105
                     $uploadOk = false;
106 106
                     goto skip;
107 107
                 }
108 108
     
109
-                if($uploadOk) { 
109
+                if ($uploadOk) { 
110 110
                     if (file_exists($target_file)) {
111 111
                         $movedFile = true;
112 112
                     } else {
@@ -122,8 +122,8 @@  discard block
 block discarded – undo
122 122
                     }
123 123
                 }
124 124
             }
125
-        } else if($_SERVER['REQUEST_METHOD'] == 'POST' && @$_POST['bannerset']) {
126
-            if(!empty($_FILES["file"]["name"])) {
125
+        } else if ($_SERVER['REQUEST_METHOD'] == 'POST' && @$_POST['bannerset']) {
126
+            if (!empty($_FILES["file"]["name"])) {
127 127
                 $target_dir = "../dynamic/banners/";
128 128
                 $imageFileType = strtolower(pathinfo($_FILES["file"]["name"], PATHINFO_EXTENSION));
129 129
                 $target_name = md5_file($_FILES["file"]["tmp_name"]) . "." . $imageFileType;
@@ -133,14 +133,14 @@  discard block
 block discarded – undo
133 133
                 $uploadOk = true;
134 134
                 $movedFile = false;
135 135
     
136
-                if($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg"
137
-                    && $imageFileType != "gif" ) {
136
+                if ($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg"
137
+                    && $imageFileType != "gif") {
138 138
                     $fileerror = 'unsupported file type. must be jpg, png, jpeg, or gif';
139 139
                     $uploadOk = false;
140 140
                     goto skip;
141 141
                 }
142 142
     
143
-                if($uploadOk) { 
143
+                if ($uploadOk) { 
144 144
                     if (file_exists($target_file)) {
145 145
                         $movedFile = true;
146 146
                     } else {
@@ -156,8 +156,8 @@  discard block
 block discarded – undo
156 156
                     }
157 157
                 } 
158 158
             }
159
-        } else if($_SERVER['REQUEST_METHOD'] == 'POST' && @$_FILES['videopagebanner']) {
160
-            if(!empty($_FILES["videopagebanner"]["name"])) {
159
+        } else if ($_SERVER['REQUEST_METHOD'] == 'POST' && @$_FILES['videopagebanner']) {
160
+            if (!empty($_FILES["videopagebanner"]["name"])) {
161 161
                 $target_dir = "/dynamic/subscribe/";
162 162
                 $imageFileType = strtolower(pathinfo($_FILES["videopagebanner"]["name"], PATHINFO_EXTENSION));
163 163
                 $target_name = md5_file($_FILES["videopagebanner"]["tmp_name"]) . "." . $imageFileType;
@@ -167,14 +167,14 @@  discard block
 block discarded – undo
167 167
                 $uploadOk = true;
168 168
                 $movedFile = false;
169 169
     
170
-                if($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg"
171
-                    && $imageFileType != "gif" ) {
170
+                if ($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg"
171
+                    && $imageFileType != "gif") {
172 172
                     $fileerror = 'unsupported file type. must be jpg, png, jpeg, or gif';
173 173
                     $uploadOk = false;
174 174
                     goto skip;
175 175
                 }
176 176
     
177
-                if($uploadOk) { 
177
+                if ($uploadOk) { 
178 178
                     if (file_exists($target_file)) {
179 179
                         $movedFile = true;
180 180
                     } else {
@@ -192,94 +192,94 @@  discard block
 block discarded – undo
192 192
             }
193 193
         }
194 194
 
195
-        if(!empty($_POST['bio'])) { 
195
+        if (!empty($_POST['bio'])) { 
196 196
             $__user_u->update_row($_SESSION['siteusername'], "bio", $_POST['bio']);
197 197
         }
198 198
 
199
-        if(!empty($_POST['featuredchannels'])) { 
199
+        if (!empty($_POST['featuredchannels'])) { 
200 200
             $__user_u->update_row($_SESSION['siteusername'], "featured_channels", $_POST['featuredchannels']);
201 201
         }
202 202
 
203
-        if(!empty($_POST['custom_label_title'])) { 
203
+        if (!empty($_POST['custom_label_title'])) { 
204 204
             $__user_u->update_row($_SESSION['siteusername'], "uploaded_videos_title", $_POST['custom_label_title']);
205 205
         }
206 206
 
207
-        if(!empty($_POST['custom_label_description'])) { 
207
+        if (!empty($_POST['custom_label_description'])) { 
208 208
             $__user_u->update_row($_SESSION['siteusername'], "uploaded_videos_description", $_POST['custom_label_description']);
209 209
         }
210 210
     
211
-        if(!empty($_POST['css'])) {
211
+        if (!empty($_POST['css'])) {
212 212
             $__user_u->update_row($_SESSION['siteusername'], "css", $_POST['css']);
213 213
         }
214 214
 
215
-        if(!empty($_POST['videoid'])) {
215
+        if (!empty($_POST['videoid'])) {
216 216
             $__user_u->update_row($_SESSION['siteusername'], "featured", $_POST['videoid']);
217 217
         }
218 218
 
219
-        if(!empty($_POST['solidcolor'])) {
219
+        if (!empty($_POST['solidcolor'])) {
220 220
             $__user_u->update_row($_SESSION['siteusername'], "background_option", $_POST['bgoption']);
221 221
 
222
-            if($_POST['bgoption'] == "solid")
222
+            if ($_POST['bgoption'] == "solid")
223 223
                 $__user_u->update_row($_SESSION['siteusername'], "2012_bg", "");
224 224
 
225 225
             $__user_u->update_row($_SESSION['siteusername'], "primary_color", $_POST['solidcolor']);
226 226
         }
227 227
 
228
-        if(!empty($_POST['transparency'])) {
228
+        if (!empty($_POST['transparency'])) {
229 229
             $__user_u->update_row($_SESSION['siteusername'], "transparency", $_POST['transparency']);
230 230
         }
231 231
 
232
-        if(!empty($_POST['genre'])) {
232
+        if (!empty($_POST['genre'])) {
233 233
             $__user_u->update_row($_SESSION['siteusername'], "genre", $_POST['genre']);
234 234
         }
235 235
 
236
-        if(!empty($_POST['bordercolor'])) {
236
+        if (!empty($_POST['bordercolor'])) {
237 237
             $__user_u->update_row($_SESSION['siteusername'], "border_color", $_POST['bordercolor']);
238 238
         }
239 239
 
240
-        if(!empty($_POST['country'])) {
240
+        if (!empty($_POST['country'])) {
241 241
             $__user_u->update_row($_SESSION['siteusername'], "country", $_POST['country']);
242 242
         } // duplicate?
243 243
 
244
-        if(!empty($_POST['header'])) {
244
+        if (!empty($_POST['header'])) {
245 245
             $__user_u->update_row($_SESSION['siteusername'], "custom_header", $_POST['header']);
246 246
         }
247 247
 
248
-        if(!empty($_POST['customtext'])) {
248
+        if (!empty($_POST['customtext'])) {
249 249
             $__user_u->update_row($_SESSION['siteusername'], "custom_text", $_POST['customtext']);
250 250
         }
251 251
 
252
-        if(!empty($_POST['country'])) {
252
+        if (!empty($_POST['country'])) {
253 253
             $__user_u->update_row($_SESSION['siteusername'], "custom_text", $_POST['country']);
254 254
         } // duplicate?
255 255
 
256
-        if(!empty($_POST['website'])) {
256
+        if (!empty($_POST['website'])) {
257 257
             $__user_u->update_row($_SESSION['siteusername'], "website", $_POST['website']);
258 258
         }
259 259
     
260
-        if(!empty($_POST['channelboxcolor'])) {
260
+        if (!empty($_POST['channelboxcolor'])) {
261 261
             $__user_u->update_row($_SESSION['siteusername'], "secondary_color", $_POST['channelboxcolor']);
262 262
         }
263 263
 
264
-        if(!empty($_POST['backgroundcolor'])) {
264
+        if (!empty($_POST['backgroundcolor'])) {
265 265
             $__user_u->update_row($_SESSION['siteusername'], "third_color", $_POST['backgroundcolor']);
266 266
         }
267 267
 
268
-        if(!empty($_POST['textmaincolor'])) {
268
+        if (!empty($_POST['textmaincolor'])) {
269 269
             $__user_u->update_row($_SESSION['siteusername'], "primary_color_text", $_POST['textmaincolor']);
270 270
         }
271 271
 
272
-        if(!empty($_POST['layout_channel'])) {
273
-            if(
274
-                $_POST['layout_channel'] == "feed"      || 
275
-                $_POST['layout_channel'] == "featured"  || 
272
+        if (!empty($_POST['layout_channel'])) {
273
+            if (
274
+                $_POST['layout_channel'] == "feed" || 
275
+                $_POST['layout_channel'] == "featured" || 
276 276
                 $_POST['layout_channel'] == "playlists" || 
277 277
                 $_POST['layout_channel'] == "everything"
278 278
             )
279 279
                 $__user_u->update_row($_SESSION['siteusername'], "layout", $_POST['layout_channel']);
280 280
         }
281 281
 
282
-    if(!empty($_POST['bgoptionset'])) {
282
+    if (!empty($_POST['bgoptionset'])) {
283 283
         $bgoption = $_POST['bgoption'];
284 284
         $bgcolor = $_POST['solidcolor'];
285 285
         $default = "default.png";
@@ -288,7 +288,7 @@  discard block
 block discarded – undo
288 288
         
289 289
         $__user_u->update_row($_SESSION['siteusername'], "2012_bgcolor", $bgcolor);
290 290
 
291
-        if($bgoption == "solid") {
291
+        if ($bgoption == "solid") {
292 292
             $__user_u->update_row($_SESSION['siteusername'], "2012_bg ", $default);
293 293
         }
294 294
     }
Please login to merge, or discard this patch.
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -219,8 +219,9 @@  discard block
 block discarded – undo
219 219
         if(!empty($_POST['solidcolor'])) {
220 220
             $__user_u->update_row($_SESSION['siteusername'], "background_option", $_POST['bgoption']);
221 221
 
222
-            if($_POST['bgoption'] == "solid")
223
-                $__user_u->update_row($_SESSION['siteusername'], "2012_bg", "");
222
+            if($_POST['bgoption'] == "solid") {
223
+                            $__user_u->update_row($_SESSION['siteusername'], "2012_bg", "");
224
+            }
224 225
 
225 226
             $__user_u->update_row($_SESSION['siteusername'], "primary_color", $_POST['solidcolor']);
226 227
         }
@@ -275,8 +276,9 @@  discard block
 block discarded – undo
275 276
                 $_POST['layout_channel'] == "featured"  || 
276 277
                 $_POST['layout_channel'] == "playlists" || 
277 278
                 $_POST['layout_channel'] == "everything"
278
-            )
279
-                $__user_u->update_row($_SESSION['siteusername'], "layout", $_POST['layout_channel']);
279
+            ) {
280
+                            $__user_u->update_row($_SESSION['siteusername'], "layout", $_POST['layout_channel']);
281
+            }
280 282
         }
281 283
 
282 284
     if(!empty($_POST['bgoptionset'])) {
Please login to merge, or discard this patch.
web/public/s/mod/header.php 2 patches
Indentation   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -1,18 +1,18 @@  discard block
 block discarded – undo
1 1
 <?php
2
-	if(isset($_SESSION['siteusername'])) {
2
+    if(isset($_SESSION['siteusername'])) {
3 3
         $stmt = $__db->prepare("UPDATE users SET ip = :ip WHERE username = :username");
4 4
         $stmt->bindParam(":username", $_SESSION['siteusername']);
5
-		$stmt->bindParam(":ip",       $_SERVER["HTTP_CF_CONNECTING_IP"]);
5
+        $stmt->bindParam(":ip",       $_SERVER["HTTP_CF_CONNECTING_IP"]);
6 6
         $stmt->execute();
7 7
 
8
-		$stmt = $__db->prepare("UPDATE users SET lastlogin = now() WHERE username = :username");
8
+        $stmt = $__db->prepare("UPDATE users SET lastlogin = now() WHERE username = :username");
9 9
         $stmt->bindParam(":username", $_SESSION['siteusername']);
10 10
         $stmt->execute();
11
-	}
11
+    }
12 12
 
13
-	if(isset($_SESSION['siteusername']) && !$__user_h->user_exists(@$_SESSION['siteusername'])) {
14
-		die("<a href='/logout'>Your user has been deleted. Logout</a>");
15
-	}
13
+    if(isset($_SESSION['siteusername']) && !$__user_h->user_exists(@$_SESSION['siteusername'])) {
14
+        die("<a href='/logout'>Your user has been deleted. Logout</a>");
15
+    }
16 16
 ?>
17 17
 <!-- begin masthead -->
18 18
 <div id="masthead" class="" dir="ltr">
@@ -109,10 +109,10 @@  discard block
 block discarded – undo
109 109
 <div id="masthead-expanded" class="hid" style="display: none;height: 165px;">
110 110
 	<div id="masthead-expanded-container" style="height: 142px;" class="with-sandbar">
111 111
 	<?php
112
-		$stmt = $__db->prepare("SELECT * FROM videos WHERE author = :username ORDER BY id DESC LIMIT 20");
113
-		$stmt->bindParam(":username", $_SESSION['siteusername']);
114
-		$stmt->execute();
115
-	?>
112
+        $stmt = $__db->prepare("SELECT * FROM videos WHERE author = :username ORDER BY id DESC LIMIT 20");
113
+        $stmt->bindParam(":username", $_SESSION['siteusername']);
114
+        $stmt->execute();
115
+    ?>
116 116
 	<div class="yt-uix-slider yt-rounded" id="watch-channel-discoverbox" data-slider-slide-selected="3" data-slider-slides="<?php echo $stmt->rowCount(); ?>"
117 117
 		style="
118 118
 		width: 580px;
@@ -127,14 +127,14 @@  discard block
 block discarded – undo
127 127
 	<div class="yt-uix-slider-body" style="width: 525px;">
128 128
 		<div class="yt-uix-slider-slides">
129 129
 			<?php 
130
-				while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { 
131
-					$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
132
-					$video['duration'] = $__time_h->timestamp($video['duration']);
133
-					$video['views'] = $__video_h->fetch_video_views($video['rid']);
134
-					$video['author'] = htmlspecialchars($video['author']);		
135
-					$video['title'] = htmlspecialchars($video['title']);
136
-					$video['description'] = $__video_h->shorten_description($video['description'], 50);
137
-			?>
130
+                while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { 
131
+                    $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
132
+                    $video['duration'] = $__time_h->timestamp($video['duration']);
133
+                    $video['views'] = $__video_h->fetch_video_views($video['rid']);
134
+                    $video['author'] = htmlspecialchars($video['author']);		
135
+                    $video['title'] = htmlspecialchars($video['title']);
136
+                    $video['description'] = $__video_h->shorten_description($video['description'], 50);
137
+            ?>
138 138
 			<ul class="yt-uix-slider-slide ">
139 139
 				<li class="yt-uix-slider-slide-item ">
140 140
 					<div class="video-list-item  yt-tile-default ">
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@  discard block
 block discarded – undo
1 1
 <?php
2
-	if(isset($_SESSION['siteusername'])) {
2
+	if (isset($_SESSION['siteusername'])) {
3 3
         $stmt = $__db->prepare("UPDATE users SET ip = :ip WHERE username = :username");
4 4
         $stmt->bindParam(":username", $_SESSION['siteusername']);
5
-		$stmt->bindParam(":ip",       $_SERVER["HTTP_CF_CONNECTING_IP"]);
5
+		$stmt->bindParam(":ip", $_SERVER["HTTP_CF_CONNECTING_IP"]);
6 6
         $stmt->execute();
7 7
 
8 8
 		$stmt = $__db->prepare("UPDATE users SET lastlogin = now() WHERE username = :username");
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
         $stmt->execute();
11 11
 	}
12 12
 
13
-	if(isset($_SESSION['siteusername']) && !$__user_h->user_exists(@$_SESSION['siteusername'])) {
13
+	if (isset($_SESSION['siteusername']) && !$__user_h->user_exists(@$_SESSION['siteusername'])) {
14 14
 		die("<a href='/logout'>Your user has been deleted. Logout</a>");
15 15
 	}
16 16
 ?>
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 	<a id="logo-container" href="/" title="SubRocks home">
20 20
 	<img id="logo" src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="SubRocks home">
21 21
 	</a>
22
-	<?php if(!isset($_SESSION['siteusername'])) { ?>
22
+	<?php if (!isset($_SESSION['siteusername'])) { ?>
23 23
 	<div id="yt-masthead-signin">
24 24
 		<div id="masthead-user-display"><span id="masthead-user-wrapper"><button href="/sign_in" type="button" id="masthead-user-button" onclick=";window.location.href=this.getAttribute('href');return false;" class=" yt-uix-button yt-uix-button-text" role="button"><span class="yt-uix-button-content">  <span id="masthead-user-image">
25 25
 			<span class="clip">
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 			<div id="masthead-user-bar">
38 38
 				<div id="masthead-user">
39 39
 					<span id="masthead-gaia-user-expander" class="masthead-user-menu-expander masthead-expander" onclick="yt.www.masthead.toggleExpandedMasthead()"><span id="masthead-gaia-user-wrapper" class="yt-rounded" tabindex="0"><?php echo htmlspecialchars($_SESSION['siteusername']); ?></span></span>
40
-							<?php if($__user_h->fetch_unread_pms($_SESSION['siteusername']) != 0) { ?>
40
+							<?php if ($__user_h->fetch_unread_pms($_SESSION['siteusername']) != 0) { ?>
41 41
 							<button type="button" onclick=";window.location.href=this.getAttribute('href');return false;" href="/inbox/" class="sb-button sb-notif-on yt-uix-button" id="sb-button-notify" role="button"><span class="yt-uix-button-content"><?php echo $__user_h->fetch_unread_pms($_SESSION['siteusername']); ?></span></button>
42 42
 					<?php } else { ?>
43 43
 							<button type="button" onclick=";window.location.href=this.getAttribute('href');return false;" href="/inbox/" class="sb-button sb-notif-off yt-uix-button" id="sb-button-notify" role="button"><span class="yt-uix-button-content"><?php echo $__user_h->fetch_unread_pms($_SESSION['siteusername']); ?></span></button>
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 	<div class="alerts-2012">
60 60
 	
61 61
 	</div>
62
-	<?php if(isset($error['status'])) { ?>
62
+	<?php if (isset($error['status'])) { ?>
63 63
 		<div id="masthead_child_div" style="width: 970px;margin: auto;"><div class="yt-alert yt-alert-default yt-alert-error  yt-alert-player">  <div class="yt-alert-icon">
64 64
 			<img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" class="icon master-sprite" alt="Alert icon">
65 65
 		</div>
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 			</div>
70 70
 		</div></div></div>
71 71
 	<?php } ?>
72
-	<?php if(isset($_GET['error'])) { ?>
72
+	<?php if (isset($_GET['error'])) { ?>
73 73
 		<div id="masthead_child_div" style="width: 970px;margin: auto;"><div class="yt-alert yt-alert-default yt-alert-error ">  <div class="yt-alert-icon">
74 74
 			<img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" class="icon master-sprite" alt="Alert icon">
75 75
 		</div>
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 			</div>
80 80
 		</div></div></div>
81 81
 	<?php } ?>
82
-	<?php if(isset($_GET['success'])) { ?>
82
+	<?php if (isset($_GET['success'])) { ?>
83 83
 		<div id="masthead_child_div" style="width: 970px;margin: auto;"><div class="yt-alert yt-alert-default yt-alert-success ">  <div class="yt-alert-icon">
84 84
 			<img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" class="icon master-sprite" alt="Alert icon">
85 85
 		</div>
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
 			</div>
90 90
 		</div></div></div>
91 91
 	<?php } ?>
92
-	<?php if(isset($_SESSION['error'])) { ?>
92
+	<?php if (isset($_SESSION['error'])) { ?>
93 93
 		<div id="masthead_child_div" style="width: 970px;margin: auto;"><div class="yt-alert yt-alert-default yt-alert-error">  <div class="yt-alert-icon">
94 94
 			<img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" class="icon master-sprite" alt="Alert icon">
95 95
 		</div>
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
 		<b>New minor update: <pre style="display:inline-block;">1fe1fa4</pre></b> <pre style="display:inline-block;font-size:10px;margin-left:35px;">This is a part of the Communications update. The inbox has been updated with a cleaner look.</pre>
106 106
 	</div></div></div></div><br>
107 107
 	-->
108
-<?php if(isset($_SESSION['siteusername'])) { ?>
108
+<?php if (isset($_SESSION['siteusername'])) { ?>
109 109
 <div id="masthead-expanded" class="hid" style="display: none;height: 165px;">
110 110
 	<div id="masthead-expanded-container" style="height: 142px;" class="with-sandbar">
111 111
 	<?php
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
 	<div class="yt-uix-slider-body" style="width: 525px;">
128 128
 		<div class="yt-uix-slider-slides">
129 129
 			<?php 
130
-				while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { 
130
+				while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) { 
131 131
 					$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
132 132
 					$video['duration'] = $__time_h->timestamp($video['duration']);
133 133
 					$video['views'] = $__video_h->fetch_video_views($video['rid']);
Please login to merge, or discard this patch.
web/public/s/mod/channel_discussion.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
                                                     <div class="activity-feed">
26 26
                                                         <div class="feed-list-container">
27 27
                                                             <div class="feed-item-list">
28
-                                                            <?php if(isset($_SESSION['siteusername'])) { ?>
28
+                                                            <?php if (isset($_SESSION['siteusername'])) { ?>
29 29
                                                             <form method="post" action="/d/comment_profile?u=<?php echo htmlspecialchars($_user['username']); ?>">
30 30
                                                                 <img style="width: 50px;" src="">
31 31
                                                                 <textarea style="resize:none;padding:5px;border-radius:5px;background-color:white;border: 1px solid #d3d3d3; width: 577px; resize: none;"cols="32" id="com" placeholder="Share your thoughts" name="comment"></textarea><br>
@@ -41,15 +41,15 @@  discard block
 block discarded – undo
41 41
                                                                 $stmt->execute();
42 42
 
43 43
                                                                 $number_of_result = $stmt->rowCount();
44
-                                                                $number_of_page = ceil ($number_of_result / $results_per_page);  
44
+                                                                $number_of_page = ceil($number_of_result/$results_per_page);  
45 45
 
46
-                                                                if (!isset ($_GET['page']) ) {  
46
+                                                                if (!isset ($_GET['page'])) {  
47 47
                                                                     $page = 1;  
48 48
                                                                 } else {  
49
-                                                                    $page = (int)$_GET['page'];  
49
+                                                                    $page = (int) $_GET['page'];  
50 50
                                                                 }  
51 51
 
52
-                                                                $page_first_result = ($page - 1) * $results_per_page;  
52
+                                                                $page_first_result = ($page - 1)*$results_per_page;  
53 53
 
54 54
                                                                 $stmt = $__db->prepare("SELECT * FROM profile_comments WHERE toid = :rid ORDER BY id DESC LIMIT :pfirst, :pper");
55 55
                                                                 $stmt->bindParam(":rid", $_user['username']);
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
                                                                 $stmt->bindParam(":pper", $results_per_page);
58 58
                                                                 $stmt->execute();
59 59
 
60
-                                                                while($comment = $stmt->fetch(PDO::FETCH_ASSOC)) { 
60
+                                                                while ($comment = $stmt->fetch(PDO::FETCH_ASSOC)) { 
61 61
 
62 62
                                                             ?>
63 63
 
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
                                                                                     <span dir="ltr"><?php echo $__time_h->time_elapsed_string($comment['date']); ?><span>
77 77
                                                                                     </span>
78 78
                                                                                     </span></span>
79
-                                                                                    <?php if($comment['likes'] != 0) { ?>
79
+                                                                                    <?php if ($comment['likes'] != 0) { ?>
80 80
                                                                                     <span dir="ltr" class="comments-rating-positive" title="9 up, 1 down">
81 81
                                                                                         <?php echo $comment['likes']; ?>
82 82
                                                                                         <img class="comments-rating-thumbs-up" src="//s.ytimg.com/yts/img/pixel-vfl3z5WfW.gif">
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
                                                                                     </button>
105 105
                                                                                 </span>
106 106
                                                                             </div>
107
-                                                                        <?php if(isset($_SESSION['siteusername'])) { ?> 
107
+                                                                        <?php if (isset($_SESSION['siteusername'])) { ?> 
108 108
                                                                             <li id="reply_to_<?php echo $comment['id']; ?>" style="display: none;" class="comment yt-tile-default  child" data-tag="O" data-author-viewing="" data-id="iRV7EkT9us81mDLFDSB6FAsB156Fdn13HUmTm26C3PE" data-score="34" data-author="<?php echo htmlspecialchars($row['author']); ?>">
109 109
 
110 110
                                                                             <div class="comment-body">
Please login to merge, or discard this patch.
web/public/s/mod/channel_everything.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@  discard block
 block discarded – undo
2 2
 								<div class="channel-tab-content channel-layout-two-column selected blogger-template">
3 3
 									<div class="tab-content-body">
4 4
 										<div class="primary-pane">
5
-                                            <?php if($_user['featured'] != false && $__video_h->video_exists($_user['featured'])) { ?>
5
+                                            <?php if ($_user['featured'] != false && $__video_h->video_exists($_user['featured'])) { ?>
6 6
 											<div class="channels-featured-video channel-module yt-uix-c3-module-container has-visible-edge">
7 7
 												<div class="module-view featured-video-view-module">
8 8
 												<div id="watch-video" >
@@ -56,12 +56,12 @@  discard block
 block discarded – undo
56 56
                                                         ?>
57 57
                                                         <div class="playlist-info">
58 58
                                                             <h2><?php echo htmlspecialchars($_user['username']); ?>'s playlists</h2>
59
-                                                            <?php if($stmt->rowCount() == 0) { echo "<span style='font-size:11px;color:grey;'>This user has no playlists available currently.</span><br><br>"; } ?>
59
+                                                            <?php if ($stmt->rowCount() == 0) { echo "<span style='font-size:11px;color:grey;'>This user has no playlists available currently.</span><br><br>"; } ?>
60 60
                                                             <div class="yt-horizontal-rule "><span class="first"></span><span class="second"></span><span class="third"></span></div>
61 61
                                                         </div>
62 62
                                                         <?php 
63
-                                                            if($stmt->rowCount() != 0) {
64
-                                                                while($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { 
63
+                                                            if ($stmt->rowCount() != 0) {
64
+                                                                while ($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { 
65 65
                                                                     $playlist['videos'] = json_decode($playlist['videos']);
66 66
                                                         ?>
67 67
                                                         <div class="playlist yt-tile-visible yt-uix-tile">
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 													<div class="playlist-info">
100 100
 														<h2>Uploaded videos</h2>
101 101
 														<div class="yt-horizontal-rule "><span class="first"></span><span class="second"></span><span class="third"></span></div>
102
-														<?php if($_user['videos'] == 0) { ?>
102
+														<?php if ($_user['videos'] == 0) { ?>
103 103
 															<h4>This user has not uploaded a video yet.</h4>
104 104
 														<?php } ?>
105 105
 													</div>
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
                                                             $stmt = $__db->prepare("SELECT * FROM videos WHERE author = :username ORDER BY id DESC LIMIT 20");
109 109
                                                             $stmt->bindParam(":username", $_user['username']);
110 110
                                                             $stmt->execute();
111
-                                                            while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { 
111
+                                                            while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) { 
112 112
                                                         ?>
113 113
 														<li class="blogger-video">
114 114
 															<div class="video yt-tile-visible">
Please login to merge, or discard this patch.
web/public/s/mod/secondary_pane.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
             </div>
31 31
             <hr class="yt-horizontal-rule ">
32 32
         </div>
33
-        <?php if(!empty($_user['website'])) { ?>
33
+        <?php if (!empty($_user['website'])) { ?>
34 34
             <div class="user-profile-item">
35 35
                 <div class="yt-c3-profile-custom-url field-container ">
36 36
                     <a href="<?php echo addhttp(htmlspecialchars($_user['website'])); ?>" rel="me nofollow" target="_blank" title="<?php echo htmlspecialchars($_user['website']); ?>" class="yt-uix-redirect-link">
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
                 <h5>Country</h5>
80 80
                 <span class="value" id="country_change"><?php echo htmlspecialchars($_user['country']); ?></span>
81 81
             </div>
82
-            <?php if($_user['genre'] != "none") { ?>
82
+            <?php if ($_user['genre'] != "none") { ?>
83 83
                 <div class="user-profile-item ">
84 84
                     <h5>Channel Genre</h5>
85 85
                     <span class="value"><?php echo htmlspecialchars(ucfirst($_user['genre'])); ?></span>
@@ -100,10 +100,10 @@  discard block
 block discarded – undo
100 100
         }
101 101
     </style>
102 102
     <?php $_user['featured_channels'] = explode(",", $_user['featured_channels']); ?>
103
-    <?php if(count($_user['featured_channels']) != 0) { ?>
103
+    <?php if (count($_user['featured_channels']) != 0) { ?>
104 104
     <div class="module-view other-channels-view">
105
-        <h2 <?php if(@$_SESSION['siteusername'] == $_user['username']) { ?>style="display: inline-block;position: relative;bottom: 10px;"<?php } ?>>Featured Channels</h2> 
106
-        <?php if(@$_SESSION['siteusername'] == $_user['username']) { 
105
+        <h2 <?php if (@$_SESSION['siteusername'] == $_user['username']) { ?>style="display: inline-block;position: relative;bottom: 10px;"<?php } ?>>Featured Channels</h2> 
106
+        <?php if (@$_SESSION['siteusername'] == $_user['username']) { 
107 107
             echo "<a href='#' style='float:right;font-size:11px;color:black;' onclick=';open_featured_channels();return false;'>edit</a>"; 
108 108
         } ?>
109 109
         <div class="box-gray" style="display:none;" id="edit_featured_channels" style="margin-bottom: 8px;">
@@ -121,8 +121,8 @@  discard block
 block discarded – undo
121 121
                     <input id="doocaca" class="yt-uix-form-input-text" type="text" style="width: 92%;margin-bottom:3px;" placeholder="Channel name">
122 122
                 </li>
123 123
                 <?php 
124
-                    foreach($_user['featured_channels'] as $user) {
125
-                        if($__user_h->user_exists($user)) { ?>
124
+                    foreach ($_user['featured_channels'] as $user) {
125
+                        if ($__user_h->user_exists($user)) { ?>
126 126
                     <li>
127 127
                         <input id="doocaca" class="yt-uix-form-input-text" type="text" style="width: 92%;margin-bottom:3px;" value="<?php echo htmlspecialchars($user); ?>" placeholder="Channel name">
128 128
                     </li>
@@ -138,8 +138,8 @@  discard block
 block discarded – undo
138 138
 
139 139
         <ul class="channel-summary-list">
140 140
             <?php 
141
-                foreach($_user['featured_channels'] as $user) {
142
-                    if($__user_h->user_exists($user)) {
141
+                foreach ($_user['featured_channels'] as $user) {
142
+                    if ($__user_h->user_exists($user)) {
143 143
             ?>
144 144
                 <li class="yt-tile-visible yt-uix-tile">
145 145
                     <div class="channel-summary clearfix channel-summary-compact">
@@ -214,13 +214,13 @@  discard block
 block discarded – undo
214 214
     $stmt->bindParam(":search", $_user['username']);
215 215
     $stmt->execute();
216 216
 
217
-    if($stmt->rowCount() != 0) {
217
+    if ($stmt->rowCount() != 0) {
218 218
 ?>
219 219
     <div class="playlists-narrow channel-module yt-uix-c3-module-container">
220 220
         <div class="module-view gh-featured">
221 221
             <h2>Featured Playlists</h2>     
222 222
             <?php
223
-            while($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { 
223
+            while ($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { 
224 224
                 $playlist['videos'] = json_decode($playlist['videos']);
225 225
             ?> 
226 226
                 <div class="playlist yt-tile-visible yt-uix-tile">
Please login to merge, or discard this patch.
web/public/s/mod/channel_feed.php 2 patches
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -51,20 +51,20 @@  discard block
 block discarded – undo
51 51
 																	  ORDER BY 
52 52
 																		`date` DESC LIMIT 10;");
53 53
                                                                         $stmt->bindParam(":comment_username", $_user['username']);
54
-																		$stmt->bindParam(":videos_username", $_user['username']);
54
+                                                                        $stmt->bindParam(":videos_username", $_user['username']);
55 55
                                                                         $stmt->execute();
56
-																		if($stmt->rowCount() == 0) { echo "<br><span style='color:grey;font-size:11px;'>This user has not done anything yet.</span>"; }
56
+                                                                        if($stmt->rowCount() == 0) { echo "<br><span style='color:grey;font-size:11px;'>This user has not done anything yet.</span>"; }
57 57
                                                                         while($content = $stmt->fetch(PDO::FETCH_ASSOC)) { 
58
-																			if((int)$content['id']) {
59
-																				$content = $__video_h->fetch_comment_id($content['id']);
60
-																				$content['video'] = $__video_h->fetch_video_rid($content['toid']);
61
-																				$content['type'] = "comment";
62
-																			} else {
63
-																				$content = $__video_h->fetch_video_rid($content['id']);
64
-																				$content['type'] = "video";
65
-																			}
58
+                                                                            if((int)$content['id']) {
59
+                                                                                $content = $__video_h->fetch_comment_id($content['id']);
60
+                                                                                $content['video'] = $__video_h->fetch_video_rid($content['toid']);
61
+                                                                                $content['type'] = "comment";
62
+                                                                            } else {
63
+                                                                                $content = $__video_h->fetch_video_rid($content['id']);
64
+                                                                                $content['type'] = "video";
65
+                                                                            }
66 66
 
67
-																			if($content['type'] == "video") {
67
+                                                                            if($content['type'] == "video") {
68 68
                                                                     ?>
69 69
                                                                     <div class="feed-item-container" data-channel-key="UCc6W7efUSkd9YYoxOnctlFg">
70 70
                                                                         <a href="/user/<?php echo htmlspecialchars($content['author']); ?>?feature=plcp" class="feed-author-bubble " title="<?php echo htmlspecialchars($content['author']); ?>">  <span class="feed-item-author">
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
                                                                         </div>
137 137
                                                                     </div>
138 138
                                                                     <?php } else { 
139
-																		if($__video_h->video_exists($content['video']['rid'])) { ?>
139
+                                                                        if($__video_h->video_exists($content['video']['rid'])) { ?>
140 140
 																	<div class="feed-item-container" data-channel-key="UCXf1X2u5gsmuqcuTQlpOGhw">
141 141
 																		<a href="/user/<?php echo htmlspecialchars($content['author']); ?>?feature=plcp" class="feed-author-bubble " title="<?php echo htmlspecialchars($content['author']); ?>">  <span class="feed-item-author">
142 142
 																		<span class="video-thumb ux-thumb yt-thumb-square-28 "><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 htmlspecialchars($content['author']); ?>" data-thumb="/dynamic/pfp/<?php echo $__user_h->fetch_pfp($content['author']); ?>" width="28"><span class="vertical-align"></span></span></span></span>
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -53,9 +53,9 @@  discard block
 block discarded – undo
53 53
                                                                         $stmt->bindParam(":comment_username", $_user['username']);
54 54
 																		$stmt->bindParam(":videos_username", $_user['username']);
55 55
                                                                         $stmt->execute();
56
-																		if($stmt->rowCount() == 0) { echo "<br><span style='color:grey;font-size:11px;'>This user has not done anything yet.</span>"; }
57
-                                                                        while($content = $stmt->fetch(PDO::FETCH_ASSOC)) { 
58
-																			if((int)$content['id']) {
56
+																		if ($stmt->rowCount() == 0) { echo "<br><span style='color:grey;font-size:11px;'>This user has not done anything yet.</span>"; }
57
+                                                                        while ($content = $stmt->fetch(PDO::FETCH_ASSOC)) { 
58
+																			if ((int) $content['id']) {
59 59
 																				$content = $__video_h->fetch_comment_id($content['id']);
60 60
 																				$content['video'] = $__video_h->fetch_video_rid($content['toid']);
61 61
 																				$content['type'] = "comment";
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 																				$content['type'] = "video";
65 65
 																			}
66 66
 
67
-																			if($content['type'] == "video") {
67
+																			if ($content['type'] == "video") {
68 68
                                                                     ?>
69 69
                                                                     <div class="feed-item-container" data-channel-key="UCc6W7efUSkd9YYoxOnctlFg">
70 70
                                                                         <a href="/user/<?php echo htmlspecialchars($content['author']); ?>?feature=plcp" class="feed-author-bubble " title="<?php echo htmlspecialchars($content['author']); ?>">  <span class="feed-item-author">
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
                                                                         </div>
137 137
                                                                     </div>
138 138
                                                                     <?php } else { 
139
-																		if($__video_h->video_exists($content['video']['rid'])) { ?>
139
+																		if ($__video_h->video_exists($content['video']['rid'])) { ?>
140 140
 																	<div class="feed-item-container" data-channel-key="UCXf1X2u5gsmuqcuTQlpOGhw">
141 141
 																		<a href="/user/<?php echo htmlspecialchars($content['author']); ?>?feature=plcp" class="feed-author-bubble " title="<?php echo htmlspecialchars($content['author']); ?>">  <span class="feed-item-author">
142 142
 																		<span class="video-thumb ux-thumb yt-thumb-square-28 "><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 htmlspecialchars($content['author']); ?>" data-thumb="/dynamic/pfp/<?php echo $__user_h->fetch_pfp($content['author']); ?>" width="28"><span class="vertical-align"></span></span></span></span>
Please login to merge, or discard this patch.
web/public/s/mod/channel_playlists.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@
 block discarded – undo
52 52
                                                         $stmt = $__db->prepare("SELECT * FROM playlists WHERE author = :search ORDER BY id DESC LIMIT 10");
53 53
                                                         $stmt->bindParam(":search", $_user['username']);
54 54
                                                         $stmt->execute();
55
-													?>
55
+                                                    ?>
56 56
 													<div class="playlist-info">
57 57
 														<h2><?php echo htmlspecialchars($_user['username']); ?>'s playlists</h2>
58 58
 														<?php if($stmt->rowCount() == 0) { echo "<span style='font-size:11px;color:grey;'>This user has no playlists available currently.</span><br><br>"; } ?>
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@  discard block
 block discarded – undo
2 2
 								<div class="channel-tab-content channel-layout-two-column selected blogger-template">
3 3
 									<div class="tab-content-body">
4 4
 										<div class="primary-pane">
5
-                                            <?php if($_user['featured'] != false && $__video_h->video_exists($_user['featured'])) { ?>
5
+                                            <?php if ($_user['featured'] != false && $__video_h->video_exists($_user['featured'])) { ?>
6 6
 											<div class="channels-featured-video channel-module yt-uix-c3-module-container has-visible-edge">
7 7
 												<div class="module-view featured-video-view-module">
8 8
 												<div id="watch-video" >
@@ -55,12 +55,12 @@  discard block
 block discarded – undo
55 55
 													?>
56 56
 													<div class="playlist-info">
57 57
 														<h2><?php echo htmlspecialchars($_user['username']); ?>'s playlists</h2>
58
-														<?php if($stmt->rowCount() == 0) { echo "<span style='font-size:11px;color:grey;'>This user has no playlists available currently.</span><br><br>"; } ?>
58
+														<?php if ($stmt->rowCount() == 0) { echo "<span style='font-size:11px;color:grey;'>This user has no playlists available currently.</span><br><br>"; } ?>
59 59
 														<div class="yt-horizontal-rule "><span class="first"></span><span class="second"></span><span class="third"></span></div>
60 60
 													</div>
61 61
                                                     <?php 
62
-                                                        if($stmt->rowCount() != 0) {
63
-                                                            while($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { 
62
+                                                        if ($stmt->rowCount() != 0) {
63
+                                                            while ($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { 
64 64
                                                                 $playlist['videos'] = json_decode($playlist['videos']);
65 65
                                                     ?>
66 66
                                                     <div class="playlist yt-tile-visible yt-uix-tile">
Please login to merge, or discard this patch.
web/public/s/mod/channel_featured.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -57,10 +57,10 @@
 block discarded – undo
57 57
                                                         -->
58 58
 													</div>
59 59
 													<?php 
60
-														$stmt = $__db->prepare("SELECT * FROM videos WHERE author = :username ORDER BY id DESC LIMIT 20");
61
-														$stmt->bindParam(":username", $_user['username']);
62
-														$stmt->execute();
63
-													?>
60
+                                                        $stmt = $__db->prepare("SELECT * FROM videos WHERE author = :username ORDER BY id DESC LIMIT 20");
61
+                                                        $stmt->bindParam(":username", $_user['username']);
62
+                                                        $stmt->execute();
63
+                                                    ?>
64 64
 													<style>
65 65
 														.box-gray {
66 66
 															position: relative;
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@  discard block
 block discarded – undo
2 2
 								<div class="channel-tab-content channel-layout-two-column selected blogger-template">
3 3
 									<div class="tab-content-body">
4 4
 										<div class="primary-pane">
5
-                                            <?php if($_user['featured'] != false && $__video_h->video_exists($_user['featured'])) { ?>
5
+                                            <?php if ($_user['featured'] != false && $__video_h->video_exists($_user['featured'])) { ?>
6 6
 											<div class="channels-featured-video channel-module yt-uix-c3-module-container has-visible-edge">
7 7
 												<div class="module-view featured-video-view-module">
8 8
 												<div id="watch-video" >
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 														}
72 72
 													</style>
73 73
 													<div class="playlist-info">
74
-	  													<?php if(@$_SESSION['siteusername'] == $_user['username']) { ?>
74
+	  													<?php if (@$_SESSION['siteusername'] == $_user['username']) { ?>
75 75
 															<div class="box-gray" style="display:none;height: 130px;" id="custom_labels" style="margin-bottom: 8px;">
76 76
 																<h2>Edit custom labels</h2>
77 77
 																<input type="text" id="custom_title" style="margin-bottom:3px;width: 96.6%;" placeholder="Uploaded Videos Custom Text" value="<?php echo htmlspecialchars($_user['uploaded_videos_title']); ?>" class="yt-uix-form-input-text" name="custom_uploaded_videos_title"><br>
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 														<span class="blogger-video-count">1-10 of <?php echo $stmt->rowCount(); ?></span>
85 85
 														<p id="custom_label_description_change" class="playlist-description"><?php echo htmlspecialchars($_user['uploaded_videos_description']); ?></p>
86 86
 														<div class="yt-horizontal-rule "><span class="first"></span><span class="second"></span><span class="third"></span></div>
87
-														<?php if($_user['videos'] == 0) { ?>
87
+														<?php if ($_user['videos'] == 0) { ?>
88 88
 															<span style="font-size:11px;color:grey;">This user has not uploaded a video yet.</span>
89 89
 														<?php } ?>
90 90
 														<script>
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
 													</div>
126 126
 													<ul class="gh-single-playlist">
127 127
                                                         <?php 
128
-                                                            while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { 
128
+                                                            while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) { 
129 129
                                                         ?>
130 130
 														<li class="blogger-video">
131 131
 															<div class="video yt-tile-visible">
Please login to merge, or discard this patch.