Test Failed
Push — main ( d41f84...e8e3a0 )
by chief
03:50 queued 13s
created
web/public/s/mod/channel_discussion.php 1 patch
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -215,13 +215,13 @@  discard block
 block discarded – undo
215 215
 												<div class="module-view other-channels-view">
216 216
 													<h2 <?php if(@$_SESSION['siteusername'] == $_user['username']) { ?>style="display: inline-block;position: relative;bottom: 10px;"<?php } ?>>Featured Channels</h2> 
217 217
 													<?php if(@$_SESSION['siteusername'] == $_user['username']) { 
218
-														echo "<a href='#' style='float:right;font-size:11px;color:black;' onclick=';open_featured_channels();return false;'>edit</a>"; 
219
-													} ?>
218
+                                                        echo "<a href='#' style='float:right;font-size:11px;color:black;' onclick=';open_featured_channels();return false;'>edit</a>"; 
219
+                                                    } ?>
220 220
 													<ul class="channel-summary-list ">
221 221
 														<?php 
222
-															foreach($_user['featured_channels'] as $user) {
223
-																if($__user_h->user_exists($user)) {
224
-														?>
222
+                                                            foreach($_user['featured_channels'] as $user) {
223
+                                                                if($__user_h->user_exists($user)) {
224
+                                                        ?>
225 225
 															<li class="yt-tile-visible yt-uix-tile">
226 226
 																<div class="channel-summary clearfix channel-summary-compact">
227 227
 																	<div class="channel-summary-thumb">
@@ -245,19 +245,19 @@  discard block
 block discarded – undo
245 245
 											</div>
246 246
 
247 247
 											<?php 
248
-												$stmt = $__db->prepare("SELECT * FROM playlists WHERE author = :search ORDER BY id DESC LIMIT 10");
249
-												$stmt->bindParam(":search", $_user['username']);
250
-												$stmt->execute();
248
+                                                $stmt = $__db->prepare("SELECT * FROM playlists WHERE author = :search ORDER BY id DESC LIMIT 10");
249
+                                                $stmt->bindParam(":search", $_user['username']);
250
+                                                $stmt->execute();
251 251
 
252
-												if($stmt->rowCount() != 0) {
253
-											?>
252
+                                                if($stmt->rowCount() != 0) {
253
+                                            ?>
254 254
 												<div class="playlists-narrow channel-module yt-uix-c3-module-container">
255 255
 													<div class="module-view gh-featured">
256 256
 														<h2>Featured Playlists</h2>     
257 257
 														<?php
258
-														while($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { 
259
-															$playlist['videos'] = json_decode($playlist['videos']);
260
-														?> 
258
+                                                        while($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { 
259
+                                                            $playlist['videos'] = json_decode($playlist['videos']);
260
+                                                        ?> 
261 261
 															<div class="playlist yt-tile-visible yt-uix-tile">
262 262
 																<a href="/view_playlist?v=<?php echo $playlist['rid']; ?>">
263 263
 																<span class="playlist-thumb-strip playlist-thumb-strip-252"><span class="videos videos-4 horizontal-cutoff"><span class="clip"><span class="centering-offset"><span class="centering">
Please login to merge, or discard this patch.
web/public/watch.php 1 patch
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.
web/public/s/mod/header.php 1 patch
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -1,14 +1,14 @@  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
 
9
-	if(isset($_SESSION['siteusername']) && !$__user_h->user_exists(@$_SESSION['siteusername'])) {
10
-		die("<a href='/logout'>Your user has been deleted. Logout</a>");
11
-	}
9
+    if(isset($_SESSION['siteusername']) && !$__user_h->user_exists(@$_SESSION['siteusername'])) {
10
+        die("<a href='/logout'>Your user has been deleted. Logout</a>");
11
+    }
12 12
 ?>
13 13
 <!-- begin masthead -->
14 14
 <div id="masthead" class="" dir="ltr">
@@ -105,10 +105,10 @@  discard block
 block discarded – undo
105 105
 <div id="masthead-expanded" class="hid" style="display: none;height: 165px;">
106 106
 	<div id="masthead-expanded-container" style="height: 142px;" class="with-sandbar">
107 107
 	<?php
108
-		$stmt = $__db->prepare("SELECT * FROM videos WHERE author = :username ORDER BY id DESC LIMIT 20");
109
-		$stmt->bindParam(":username", $_SESSION['siteusername']);
110
-		$stmt->execute();
111
-	?>
108
+        $stmt = $__db->prepare("SELECT * FROM videos WHERE author = :username ORDER BY id DESC LIMIT 20");
109
+        $stmt->bindParam(":username", $_SESSION['siteusername']);
110
+        $stmt->execute();
111
+    ?>
112 112
 	<div class="yt-uix-slider yt-rounded" id="watch-channel-discoverbox" data-slider-slide-selected="3" data-slider-slides="<?php echo $stmt->rowCount(); ?>"
113 113
 		style="
114 114
 		width: 580px;
@@ -123,14 +123,14 @@  discard block
 block discarded – undo
123 123
 	<div class="yt-uix-slider-body" style="width: 525px;">
124 124
 		<div class="yt-uix-slider-slides">
125 125
 			<?php 
126
-				while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { 
127
-					$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
128
-					$video['duration'] = $__time_h->timestamp($video['duration']);
129
-					$video['views'] = $__video_h->fetch_video_views($video['rid']);
130
-					$video['author'] = htmlspecialchars($video['author']);		
131
-					$video['title'] = htmlspecialchars($video['title']);
132
-					$video['description'] = $__video_h->shorten_description($video['description'], 50);
133
-			?>
126
+                while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { 
127
+                    $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
128
+                    $video['duration'] = $__time_h->timestamp($video['duration']);
129
+                    $video['views'] = $__video_h->fetch_video_views($video['rid']);
130
+                    $video['author'] = htmlspecialchars($video['author']);		
131
+                    $video['title'] = htmlspecialchars($video['title']);
132
+                    $video['description'] = $__video_h->shorten_description($video['description'], 50);
133
+            ?>
134 134
 			<ul class="yt-uix-slider-slide ">
135 135
 				<li class="yt-uix-slider-slide-item ">
136 136
 					<div class="video-list-item  yt-tile-default ">
Please login to merge, or discard this patch.
web/public/s/mod/channel_everything.php 1 patch
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -215,13 +215,13 @@  discard block
 block discarded – undo
215 215
 												<div class="module-view other-channels-view">
216 216
 													<h2 <?php if(@$_SESSION['siteusername'] == $_user['username']) { ?>style="display: inline-block;position: relative;bottom: 10px;"<?php } ?>>Featured Channels</h2> 
217 217
 													<?php if(@$_SESSION['siteusername'] == $_user['username']) { 
218
-														echo "<a href='#' style='float:right;font-size:11px;color:black;' onclick=';open_featured_channels();return false;'>edit</a>"; 
219
-													} ?>
218
+                                                        echo "<a href='#' style='float:right;font-size:11px;color:black;' onclick=';open_featured_channels();return false;'>edit</a>"; 
219
+                                                    } ?>
220 220
 													<ul class="channel-summary-list ">
221 221
 														<?php 
222
-															foreach($_user['featured_channels'] as $user) {
223
-																if($__user_h->user_exists($user)) {
224
-														?>
222
+                                                            foreach($_user['featured_channels'] as $user) {
223
+                                                                if($__user_h->user_exists($user)) {
224
+                                                        ?>
225 225
 															<li class="yt-tile-visible yt-uix-tile">
226 226
 																<div class="channel-summary clearfix channel-summary-compact">
227 227
 																	<div class="channel-summary-thumb">
@@ -245,19 +245,19 @@  discard block
 block discarded – undo
245 245
 											</div>
246 246
 
247 247
 											<?php 
248
-												$stmt = $__db->prepare("SELECT * FROM playlists WHERE author = :search ORDER BY id DESC LIMIT 10");
249
-												$stmt->bindParam(":search", $_user['username']);
250
-												$stmt->execute();
248
+                                                $stmt = $__db->prepare("SELECT * FROM playlists WHERE author = :search ORDER BY id DESC LIMIT 10");
249
+                                                $stmt->bindParam(":search", $_user['username']);
250
+                                                $stmt->execute();
251 251
 
252
-												if($stmt->rowCount() != 0) {
253
-											?>
252
+                                                if($stmt->rowCount() != 0) {
253
+                                            ?>
254 254
 												<div class="playlists-narrow channel-module yt-uix-c3-module-container">
255 255
 													<div class="module-view gh-featured">
256 256
 														<h2>Featured Playlists</h2>     
257 257
 														<?php
258
-														while($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { 
259
-															$playlist['videos'] = json_decode($playlist['videos']);
260
-														?> 
258
+                                                        while($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { 
259
+                                                            $playlist['videos'] = json_decode($playlist['videos']);
260
+                                                        ?> 
261 261
 															<div class="playlist yt-tile-visible yt-uix-tile">
262 262
 																<a href="/view_playlist?v=<?php echo $playlist['rid']; ?>">
263 263
 																<span class="playlist-thumb-strip playlist-thumb-strip-252"><span class="videos videos-4 horizontal-cutoff"><span class="clip"><span class="centering-offset"><span class="centering">
Please login to merge, or discard this patch.
web/public/s/mod/channel_playlists.php 1 patch
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 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>"; } ?>
@@ -196,13 +196,13 @@  discard block
 block discarded – undo
196 196
 												<div class="module-view other-channels-view">
197 197
 													<h2 <?php if(@$_SESSION['siteusername'] == $_user['username']) { ?>style="display: inline-block;position: relative;bottom: 10px;"<?php } ?>>Featured Channels</h2> 
198 198
 													<?php if(@$_SESSION['siteusername'] == $_user['username']) { 
199
-														echo "<a href='#' style='float:right;font-size:11px;color:black;' onclick=';open_featured_channels();return false;'>edit</a>"; 
200
-													} ?>
199
+                                                        echo "<a href='#' style='float:right;font-size:11px;color:black;' onclick=';open_featured_channels();return false;'>edit</a>"; 
200
+                                                    } ?>
201 201
 													<ul class="channel-summary-list ">
202 202
 														<?php 
203
-															foreach($_user['featured_channels'] as $user) {
204
-																if($__user_h->user_exists($user)) {
205
-														?>
203
+                                                            foreach($_user['featured_channels'] as $user) {
204
+                                                                if($__user_h->user_exists($user)) {
205
+                                                        ?>
206 206
 															<li class="yt-tile-visible yt-uix-tile">
207 207
 																<div class="channel-summary clearfix channel-summary-compact">
208 208
 																	<div class="channel-summary-thumb">
@@ -226,19 +226,19 @@  discard block
 block discarded – undo
226 226
 											</div>
227 227
 
228 228
 											<?php 
229
-												$stmt = $__db->prepare("SELECT * FROM playlists WHERE author = :search ORDER BY id DESC LIMIT 10");
230
-												$stmt->bindParam(":search", $_user['username']);
231
-												$stmt->execute();
229
+                                                $stmt = $__db->prepare("SELECT * FROM playlists WHERE author = :search ORDER BY id DESC LIMIT 10");
230
+                                                $stmt->bindParam(":search", $_user['username']);
231
+                                                $stmt->execute();
232 232
 
233
-												if($stmt->rowCount() != 0) {
234
-											?>
233
+                                                if($stmt->rowCount() != 0) {
234
+                                            ?>
235 235
 												<div class="playlists-narrow channel-module yt-uix-c3-module-container">
236 236
 													<div class="module-view gh-featured">
237 237
 														<h2>Featured Playlists</h2>     
238 238
 														<?php
239
-														while($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { 
240
-															$playlist['videos'] = json_decode($playlist['videos']);
241
-														?> 
239
+                                                        while($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { 
240
+                                                            $playlist['videos'] = json_decode($playlist['videos']);
241
+                                                        ?> 
242 242
 															<div class="playlist yt-tile-visible yt-uix-tile">
243 243
 																<a href="/view_playlist?v=<?php echo $playlist['rid']; ?>">
244 244
 																<span class="playlist-thumb-strip playlist-thumb-strip-252"><span class="videos videos-4 horizontal-cutoff"><span class="clip"><span class="centering-offset"><span class="centering">
Please login to merge, or discard this patch.