Test Failed
Push — main ( 00747d...5f665f )
by chief
03:00
created
web/public/s/mod/sidebar_about.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -34,8 +34,8 @@
 block discarded – undo
34 34
 
35 35
 <div id="browse-side-column" class="ytg-2col ytg-last">
36 36
     <ol class="navigation-menu">
37
-        <?php foreach($__tabs as $_tab) { 
38
-            if($_SERVER['REQUEST_URI'] != $_tab->url)
37
+        <?php foreach ($__tabs as $_tab) { 
38
+            if ($_SERVER['REQUEST_URI'] != $_tab->url)
39 39
                 $_tab->selected = true;
40 40
             ?>
41 41
             <li class="menu-item">
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,8 +40,9 @@
 block discarded – undo
40 40
 <div id="browse-side-column" class="ytg-2col ytg-last">
41 41
     <ol class="navigation-menu">
42 42
         <?php foreach($__tabs as $_tab) { 
43
-            if($_SERVER['REQUEST_URI'] != $_tab->url)
44
-                $_tab->selected = true;
43
+            if($_SERVER['REQUEST_URI'] != $_tab->url) {
44
+                            $_tab->selected = true;
45
+            }
45 46
             ?>
46 47
             <li class="menu-item">
47 48
                 <a class="<?php echo $_tab->selected ? true : "selected"; ?>" href="<?php echo $_tab->url; ?>">
Please login to merge, or discard this patch.
web/public/t/partners.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -10,10 +10,10 @@
 block discarded – undo
10 10
 <?php $__db_h = new db_helper(); ?>
11 11
 <?php $__time_h = new time_helper(); ?>
12 12
 <?php
13
-	$__server->page_embeds->page_title = "SubRocks - Terms & Conditions";
14
-	$__server->page_embeds->page_description = "SubRocks is a site dedicated to bring back the 2012 layout of YouTube.";
15
-	$__server->page_embeds->page_image = "/yt/imgbin/full-size-logo.png";
16
-	$__server->page_embeds->page_url = "https://subrock.rocks/";
13
+    $__server->page_embeds->page_title = "SubRocks - Terms & Conditions";
14
+    $__server->page_embeds->page_description = "SubRocks is a site dedicated to bring back the 2012 layout of YouTube.";
15
+    $__server->page_embeds->page_image = "/yt/imgbin/full-size-logo.png";
16
+    $__server->page_embeds->page_url = "https://subrock.rocks/";
17 17
 ?>
18 18
 <!DOCTYPE html>
19 19
 <html dir="ltr">
Please login to merge, or discard this patch.
web/public/2013/index.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -8,10 +8,10 @@
 block discarded – undo
8 8
 <?php $__db_h = new db_helper(); ?>
9 9
 <?php $__time_h = new time_helper(); ?>
10 10
 <?php
11
-	$__server->page_embeds->page_title = "SubRocks";
12
-	$__server->page_embeds->page_description = "Share your videos with friends, family, and the world";
13
-	$__server->page_embeds->page_image = "/yt/imgbin/full-size-logo.png";
14
-	$__server->page_embeds->page_url = "https://subrock.rocks/";
11
+    $__server->page_embeds->page_title = "SubRocks";
12
+    $__server->page_embeds->page_description = "Share your videos with friends, family, and the world";
13
+    $__server->page_embeds->page_image = "/yt/imgbin/full-size-logo.png";
14
+    $__server->page_embeds->page_url = "https://subrock.rocks/";
15 15
 ?>
16 16
 <html lang="en">
17 17
 	<head>
Please login to merge, or discard this patch.
Spacing   +40 added lines, -40 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
                                                     <?php
64 64
                                                         $stmt = $__db->prepare("SELECT * FROM videos WHERE featured = 'v' ORDER BY id DESC LIMIT 1");
65 65
                                                         $stmt->execute();
66
-                                                        while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
66
+                                                        while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
67 67
                                                             $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
68 68
                                                             $video['duration'] = $__time_h->timestamp($video['duration']);
69 69
                                                             $video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -71,20 +71,20 @@  discard block
 block discarded – undo
71 71
                                                             $video['title'] = htmlspecialchars($video['title']);
72 72
                                                             $video['description'] = $__video_h->shorten_description($video['description'], 50);
73 73
                                                     ?>
74
-                                                        <div class="context-data-item" data-context-item-id="<?php echo $video['rid'];  ?>" data-context-item-type="video" data-context-item-title="<?php echo $video['title'];  ?>" data-context-item-views="<?php echo $video['views'];  ?> views" data-context-item-user="<?php echo $video['author'];  ?>" data-context-item-time="6:58">
75
-                                                            <a href="/watch?v=<?php echo $video['rid'];  ?>" class="ux-thumb-wrap yt-uix-sessionlink yt-uix-contextlink contains-addto " data-sessionlink="ved=CAMQ0x4oAA&amp;ei=7pFAUZzAG52shAGGr4DACw&amp;feature=g-logo"><span class="video-thumb ux-thumb yt-thumb-default-370 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="/dynamic/thumbs/<?php echo $video['thumbnail']; ?>" alt="Thumbnail" width="370"><span class="vertical-align"></span></span></span></span><span class="video-time">6:58</span>
76
-                                                            <button onclick=";return false;" type="button" class="addto-button video-actions spf-nolink addto-watch-later-button-sign-in yt-uix-button yt-uix-button-default yt-uix-button-short yt-uix-tooltip" title="Watch Later" data-button-menu-id="shared-addto-watch-later-login" data-video-ids="<?php echo $video['rid'];  ?>" role="button"><span class="yt-uix-button-content">  <img src="//s.ytimg.com/yts/img/pixel-vfl3z5WfW.gif" alt="Watch Later">
74
+                                                        <div class="context-data-item" data-context-item-id="<?php echo $video['rid']; ?>" data-context-item-type="video" data-context-item-title="<?php echo $video['title']; ?>" data-context-item-views="<?php echo $video['views']; ?> views" data-context-item-user="<?php echo $video['author']; ?>" data-context-item-time="6:58">
75
+                                                            <a href="/watch?v=<?php echo $video['rid']; ?>" class="ux-thumb-wrap yt-uix-sessionlink yt-uix-contextlink contains-addto " data-sessionlink="ved=CAMQ0x4oAA&amp;ei=7pFAUZzAG52shAGGr4DACw&amp;feature=g-logo"><span class="video-thumb ux-thumb yt-thumb-default-370 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="/dynamic/thumbs/<?php echo $video['thumbnail']; ?>" alt="Thumbnail" width="370"><span class="vertical-align"></span></span></span></span><span class="video-time">6:58</span>
76
+                                                            <button onclick=";return false;" type="button" class="addto-button video-actions spf-nolink addto-watch-later-button-sign-in yt-uix-button yt-uix-button-default yt-uix-button-short yt-uix-tooltip" title="Watch Later" data-button-menu-id="shared-addto-watch-later-login" data-video-ids="<?php echo $video['rid']; ?>" role="button"><span class="yt-uix-button-content">  <img src="//s.ytimg.com/yts/img/pixel-vfl3z5WfW.gif" alt="Watch Later">
77 77
                                                             </span>  <img class="yt-uix-button-arrow" src="//s.ytimg.com/yts/img/pixel-vfl3z5WfW.gif" alt="" title="">
78 78
                                                             </button>
79 79
                                                             </a>
80
-                                                            <a class="lohp-video-link max-line-2 yt-uix-sessionlink" data-sessionlink="ved=CAMQ0x4oAA&amp;ei=7pFAUZzAG52shAGGr4DACw&amp;feature=g-logo" href="/watch?v=<?php echo $video['rid'];  ?>" title="<?php echo $video['title'];  ?>"><?php echo $video['title'];  ?></a>
80
+                                                            <a class="lohp-video-link max-line-2 yt-uix-sessionlink" data-sessionlink="ved=CAMQ0x4oAA&amp;ei=7pFAUZzAG52shAGGr4DACw&amp;feature=g-logo" href="/watch?v=<?php echo $video['rid']; ?>" title="<?php echo $video['title']; ?>"><?php echo $video['title']; ?></a>
81 81
                                                             <div class="lohp-video-metadata attached">
82 82
                                                                 <span class="content-uploader">
83
-                                                                <span class="username-prepend">by</span> <a href="/user/<?php echo $video['author'];  ?>" class="yt-uix-sessionlink yt-user-name " data-sessionlink="ei=7pFAUZzAG52shAGGr4DACw" dir="ltr"><?php echo $video['author'];  ?></a>
83
+                                                                <span class="username-prepend">by</span> <a href="/user/<?php echo $video['author']; ?>" class="yt-uix-sessionlink yt-user-name " data-sessionlink="ei=7pFAUZzAG52shAGGr4DACw" dir="ltr"><?php echo $video['author']; ?></a>
84 84
                                                                 </span>
85 85
                                                             </div>
86
-                                                            <p title="<?php echo $video['description'];  ?>" class="lohp-blog-headline">
87
-                                                                <?php echo $video['description'];  ?>
86
+                                                            <p title="<?php echo $video['description']; ?>" class="lohp-blog-headline">
87
+                                                                <?php echo $video['description']; ?>
88 88
                                                             </p>
89 89
                                                             <a title="Trending" href="#" class="lohp-blog-attribution">
90 90
                                                             <img src="//s.ytimg.com/yts/img/pixel-vfl3z5WfW.gif" alt="" class="lohp-blog-decoration">Trending & Featured: SubRocks
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
                                                     <?php
97 97
                                                         $stmt = $__db->prepare("SELECT * FROM videos WHERE featured = 'v' ORDER BY id DESC LIMIT 1, 3");
98 98
                                                         $stmt->execute();
99
-                                                        while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
99
+                                                        while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
100 100
                                                             $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
101 101
                                                             $video['duration'] = $__time_h->timestamp($video['duration']);
102 102
                                                             $video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -104,23 +104,23 @@  discard block
 block discarded – undo
104 104
                                                             $video['title'] = htmlspecialchars($video['title']);
105 105
                                                             $video['description'] = $__video_h->shorten_description($video['description'], 50);
106 106
                                                     ?>
107
-													<div class="lohp-medium-shelf context-data-item" data-context-item-id="<?php echo $video['rid'];  ?>" data-context-item-type="video" data-context-item-title="<?php echo $video['title'];  ?>" data-context-item-views="5,761,446 views" data-context-item-user="<?php echo $video['author'];  ?>" data-context-item-time="<?php echo $video['duration'];  ?>">
107
+													<div class="lohp-medium-shelf context-data-item" data-context-item-id="<?php echo $video['rid']; ?>" data-context-item-type="video" data-context-item-title="<?php echo $video['title']; ?>" data-context-item-views="5,761,446 views" data-context-item-user="<?php echo $video['author']; ?>" data-context-item-time="<?php echo $video['duration']; ?>">
108 108
 														<div class="lohp-media-object">
109
-															<a href="/watch?v=<?php echo $video['rid'];  ?>" class="ux-thumb-wrap yt-uix-sessionlink yt-uix-contextlink contains-addto " data-sessionlink="ved=CAQQ0x4oAQ&amp;ei=7pFAUZzAG52shAGGr4DACw&amp;feature=g-logo"><span class="video-thumb ux-thumb yt-thumb-default-128 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="/dynamic/thumbs/<?php echo $video['thumbnail'];  ?>" alt="Thumbnail" width="128"><span class="vertical-align"></span></span></span></span><span class="video-time"><?php echo $video['duration'];  ?></span>
110
-															<button onclick=";return false;" type="button" class="addto-button video-actions spf-nolink addto-watch-later-button-sign-in yt-uix-button yt-uix-button-default yt-uix-button-short yt-uix-tooltip" title="Watch Later" data-button-menu-id="shared-addto-watch-later-login" data-video-ids="<?php echo $video['rid'];  ?>" role="button"><span class="yt-uix-button-content">  <img src="//s.ytimg.com/yts/img/pixel-vfl3z5WfW.gif" alt="Watch Later">
109
+															<a href="/watch?v=<?php echo $video['rid']; ?>" class="ux-thumb-wrap yt-uix-sessionlink yt-uix-contextlink contains-addto " data-sessionlink="ved=CAQQ0x4oAQ&amp;ei=7pFAUZzAG52shAGGr4DACw&amp;feature=g-logo"><span class="video-thumb ux-thumb yt-thumb-default-128 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="/dynamic/thumbs/<?php echo $video['thumbnail']; ?>" alt="Thumbnail" width="128"><span class="vertical-align"></span></span></span></span><span class="video-time"><?php echo $video['duration']; ?></span>
110
+															<button onclick=";return false;" type="button" class="addto-button video-actions spf-nolink addto-watch-later-button-sign-in yt-uix-button yt-uix-button-default yt-uix-button-short yt-uix-tooltip" title="Watch Later" data-button-menu-id="shared-addto-watch-later-login" data-video-ids="<?php echo $video['rid']; ?>" role="button"><span class="yt-uix-button-content">  <img src="//s.ytimg.com/yts/img/pixel-vfl3z5WfW.gif" alt="Watch Later">
111 111
 															</span>  <img class="yt-uix-button-arrow" src="//s.ytimg.com/yts/img/pixel-vfl3z5WfW.gif" alt="" title="">
112 112
 															</button>
113 113
 															</a>
114 114
 														</div>
115 115
 														<div class="lohp-media-object-content lohp-medium-shelf-content">
116
-															<a class="lohp-video-link max-line-1 yt-uix-sessionlink" data-sessionlink="ved=CAQQ0x4oAQ&amp;ei=7pFAUZzAG52shAGGr4DACw&amp;feature=g-logo" href="/watch?v=<?php echo $video['rid'];  ?>" title="<?php echo $video['title'];  ?>"><?php echo $video['title'];  ?></a>
116
+															<a class="lohp-video-link max-line-1 yt-uix-sessionlink" data-sessionlink="ved=CAQQ0x4oAQ&amp;ei=7pFAUZzAG52shAGGr4DACw&amp;feature=g-logo" href="/watch?v=<?php echo $video['rid']; ?>" title="<?php echo $video['title']; ?>"><?php echo $video['title']; ?></a>
117 117
 															<div class="lohp-video-metadata attached">
118 118
 																<span class="content-uploader">
119
-																<span class="username-prepend">by</span> <a href="/user/<?php echo $video['author'];  ?>" class="yt-uix-sessionlink yt-user-name " data-sessionlink="ei=7pFAUZzAG52shAGGr4DACw" dir="ltr"><?php echo $video['author'];  ?></a>
119
+																<span class="username-prepend">by</span> <a href="/user/<?php echo $video['author']; ?>" class="yt-uix-sessionlink yt-user-name " data-sessionlink="ei=7pFAUZzAG52shAGGr4DACw" dir="ltr"><?php echo $video['author']; ?></a>
120 120
 																</span>
121 121
 															</div>
122
-															<p title="<?php echo $video['title'];  ?>" class="lohp-blog-headline">
123
-																<?php echo $video['title'];  ?>
122
+															<p title="<?php echo $video['title']; ?>" class="lohp-blog-headline">
123
+																<?php echo $video['title']; ?>
124 124
 															</p>
125 125
 														</div>
126 126
 													</div>
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
                                                             <?php
140 140
                                                                 $stmt = $__db->prepare("SELECT * FROM videos ORDER BY id DESC LIMIT 6");
141 141
                                                                 $stmt->execute();
142
-                                                                while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
142
+                                                                while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
143 143
                                                                     $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
144 144
                                                                     $video['duration'] = $__time_h->timestamp($video['duration']);
145 145
                                                                     $video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
 															<?php
179 179
                                                                 $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Entertainment' ORDER BY rand() LIMIT 3");
180 180
                                                                 $stmt->execute();
181
-                                                                while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
181
+                                                                while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
182 182
                                                                     $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
183 183
                                                                     $video['duration'] = $__time_h->timestamp($video['duration']);
184 184
                                                                     $video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
 															<?php
218 218
                                                                 $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Sports' ORDER BY rand() LIMIT 3");
219 219
                                                                 $stmt->execute();
220
-                                                                while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
220
+                                                                while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
221 221
                                                                     $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
222 222
                                                                     $video['duration'] = $__time_h->timestamp($video['duration']);
223 223
                                                                     $video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
                                                             <?php
257 257
                                                                 $stmt = $__db->prepare("SELECT * FROM videos WHERE author = 'bhief' ORDER BY rand() LIMIT 1");
258 258
                                                                 $stmt->execute();
259
-                                                                while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
259
+                                                                while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
260 260
                                                                     $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
261 261
                                                                     $video['duration'] = $__time_h->timestamp($video['duration']);
262 262
                                                                     $video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -293,7 +293,7 @@  discard block
 block discarded – undo
293 293
 															<?php
294 294
                                                                 $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Music' ORDER BY rand() LIMIT 2");
295 295
                                                                 $stmt->execute();
296
-                                                                while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
296
+                                                                while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
297 297
                                                                     $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
298 298
                                                                     $video['duration'] = $__time_h->timestamp($video['duration']);
299 299
                                                                     $video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -332,7 +332,7 @@  discard block
 block discarded – undo
332 332
                                                             <?php
333 333
                                                                 $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Gaming' ORDER BY rand() LIMIT 3");
334 334
                                                                 $stmt->execute();
335
-                                                                while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
335
+                                                                while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
336 336
                                                                     $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
337 337
                                                                     $video['duration'] = $__time_h->timestamp($video['duration']);
338 338
                                                                     $video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -371,7 +371,7 @@  discard block
 block discarded – undo
371 371
                                                     <?php
372 372
                                                         $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Gaming' ORDER BY rand() LIMIT 2");
373 373
                                                         $stmt->execute();
374
-                                                        while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
374
+                                                        while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
375 375
                                                             $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
376 376
                                                             $video['duration'] = $__time_h->timestamp($video['duration']);
377 377
                                                             $video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -379,19 +379,19 @@  discard block
 block discarded – undo
379 379
                                                             $video['title'] = htmlspecialchars($video['title']);
380 380
                                                             $video['description'] = $__video_h->shorten_description($video['description'], 50);
381 381
                                                     ?>	
382
-													<div class="lohp-vertical-shelf-item context-data-item" data-context-item-id="<?php echo $video['rid'];  ?>" data-context-item-type="video" data-context-item-title="<?php echo $video['title'];  ?>" data-context-item-views="303 views" data-context-item-user="<?php echo $video['author'];  ?>" data-context-item-time="<?php echo $video['duration'];  ?>">
382
+													<div class="lohp-vertical-shelf-item context-data-item" data-context-item-id="<?php echo $video['rid']; ?>" data-context-item-type="video" data-context-item-title="<?php echo $video['title']; ?>" data-context-item-views="303 views" data-context-item-user="<?php echo $video['author']; ?>" data-context-item-time="<?php echo $video['duration']; ?>">
383 383
                                                         <div class="lohp-media-object">
384
-															<a href="/watch?v=<?php echo $video['rid'];  ?>" class="ux-thumb-wrap yt-uix-sessionlink yt-uix-contextlink contains-addto " data-sessionlink="ved=CCsQzx4oAA&amp;ei=7pFAUZzAG52shAGGr4DACw&amp;feature=g-logo"><span class="video-thumb ux-thumb yt-thumb-default-64 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="http://s.ytimg.com/yts/img/pixel-vfl3z5WfW.gif" alt="Thumbnail" data-thumb="/dynamic/thumbs/<?php echo $video['thumbnail']; ?>" width="64"><span class="vertical-align"></span></span></span></span><span class="video-time"><?php echo $video['duration'];  ?></span>
385
-															<button onclick=";return false;" type="button" class="addto-button video-actions spf-nolink addto-watch-later-button-sign-in yt-uix-button yt-uix-button-default yt-uix-button-short yt-uix-tooltip" title="Watch Later" data-button-menu-id="shared-addto-watch-later-login" data-video-ids="<?php echo $video['rid'];  ?>" role="button"><span class="yt-uix-button-content">  <img src="//s.ytimg.com/yts/img/pixel-vfl3z5WfW.gif" alt="Watch Later">
384
+															<a href="/watch?v=<?php echo $video['rid']; ?>" class="ux-thumb-wrap yt-uix-sessionlink yt-uix-contextlink contains-addto " data-sessionlink="ved=CCsQzx4oAA&amp;ei=7pFAUZzAG52shAGGr4DACw&amp;feature=g-logo"><span class="video-thumb ux-thumb yt-thumb-default-64 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="http://s.ytimg.com/yts/img/pixel-vfl3z5WfW.gif" alt="Thumbnail" data-thumb="/dynamic/thumbs/<?php echo $video['thumbnail']; ?>" width="64"><span class="vertical-align"></span></span></span></span><span class="video-time"><?php echo $video['duration']; ?></span>
385
+															<button onclick=";return false;" type="button" class="addto-button video-actions spf-nolink addto-watch-later-button-sign-in yt-uix-button yt-uix-button-default yt-uix-button-short yt-uix-tooltip" title="Watch Later" data-button-menu-id="shared-addto-watch-later-login" data-video-ids="<?php echo $video['rid']; ?>" role="button"><span class="yt-uix-button-content">  <img src="//s.ytimg.com/yts/img/pixel-vfl3z5WfW.gif" alt="Watch Later">
386 386
 															</span>  <img class="yt-uix-button-arrow" src="//s.ytimg.com/yts/img/pixel-vfl3z5WfW.gif" alt="" title="">
387 387
 															</button>
388 388
 															</a>
389 389
 														</div>
390 390
 														<div class="lohp-vertical-shelf-item-content lohp-media-object-content">
391
-															<a class="lohp-video-link max-line-3 yt-uix-sessionlink" data-sessionlink="ved=CCsQzx4oAA&amp;ei=7pFAUZzAG52shAGGr4DACw&amp;feature=g-logo" href="/watch?v=<?php echo $video['rid'];  ?>" title="<?php echo $video['title'];  ?>"><?php echo $video['title'];  ?></a>
391
+															<a class="lohp-video-link max-line-3 yt-uix-sessionlink" data-sessionlink="ved=CCsQzx4oAA&amp;ei=7pFAUZzAG52shAGGr4DACw&amp;feature=g-logo" href="/watch?v=<?php echo $video['rid']; ?>" title="<?php echo $video['title']; ?>"><?php echo $video['title']; ?></a>
392 392
 															<div class="lohp-video-metadata attached">
393 393
 																<span class="content-uploader">
394
-																<span class="username-prepend">by</span> <a href="/user/<?php echo $video['author'];  ?>" class="yt-uix-sessionlink yt-user-name " data-sessionlink="ei=7pFAUZzAG52shAGGr4DACw" dir="ltr"><?php echo $video['author'];  ?></a>
394
+																<span class="username-prepend">by</span> <a href="/user/<?php echo $video['author']; ?>" class="yt-uix-sessionlink yt-user-name " data-sessionlink="ei=7pFAUZzAG52shAGGr4DACw" dir="ltr"><?php echo $video['author']; ?></a>
395 395
 																</span>
396 396
 															</div>
397 397
 														</div>
@@ -407,7 +407,7 @@  discard block
 block discarded – undo
407 407
                                                     <?php
408 408
                                                         $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Music' ORDER BY rand() LIMIT 4");
409 409
                                                         $stmt->execute();
410
-                                                        while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
410
+                                                        while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
411 411
                                                             $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
412 412
                                                             $video['duration'] = $__time_h->timestamp($video['duration']);
413 413
                                                             $video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -415,19 +415,19 @@  discard block
 block discarded – undo
415 415
                                                             $video['title'] = htmlspecialchars($video['title']);
416 416
                                                             $video['description'] = $__video_h->shorten_description($video['description'], 50);
417 417
                                                     ?>	
418
-													<div class="lohp-vertical-shelf-item context-data-item" data-context-item-id="<?php echo $video['rid'];  ?>" data-context-item-type="video" data-context-item-title="<?php echo $video['title'];  ?>" data-context-item-views="303 views" data-context-item-user="<?php echo $video['author'];  ?>" data-context-item-time="<?php echo $video['duration'];  ?>">
418
+													<div class="lohp-vertical-shelf-item context-data-item" data-context-item-id="<?php echo $video['rid']; ?>" data-context-item-type="video" data-context-item-title="<?php echo $video['title']; ?>" data-context-item-views="303 views" data-context-item-user="<?php echo $video['author']; ?>" data-context-item-time="<?php echo $video['duration']; ?>">
419 419
                                                         <div class="lohp-media-object">
420
-															<a href="/watch?v=<?php echo $video['rid'];  ?>" class="ux-thumb-wrap yt-uix-sessionlink yt-uix-contextlink contains-addto " data-sessionlink="ved=CCsQzx4oAA&amp;ei=7pFAUZzAG52shAGGr4DACw&amp;feature=g-logo"><span class="video-thumb ux-thumb yt-thumb-default-64 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="http://s.ytimg.com/yts/img/pixel-vfl3z5WfW.gif" alt="Thumbnail" data-thumb="/dynamic/thumbs/<?php echo $video['thumbnail']; ?>" width="64"><span class="vertical-align"></span></span></span></span><span class="video-time"><?php echo $video['duration'];  ?></span>
421
-															<button onclick=";return false;" type="button" class="addto-button video-actions spf-nolink addto-watch-later-button-sign-in yt-uix-button yt-uix-button-default yt-uix-button-short yt-uix-tooltip" title="Watch Later" data-button-menu-id="shared-addto-watch-later-login" data-video-ids="<?php echo $video['rid'];  ?>" role="button"><span class="yt-uix-button-content">  <img src="//s.ytimg.com/yts/img/pixel-vfl3z5WfW.gif" alt="Watch Later">
420
+															<a href="/watch?v=<?php echo $video['rid']; ?>" class="ux-thumb-wrap yt-uix-sessionlink yt-uix-contextlink contains-addto " data-sessionlink="ved=CCsQzx4oAA&amp;ei=7pFAUZzAG52shAGGr4DACw&amp;feature=g-logo"><span class="video-thumb ux-thumb yt-thumb-default-64 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="http://s.ytimg.com/yts/img/pixel-vfl3z5WfW.gif" alt="Thumbnail" data-thumb="/dynamic/thumbs/<?php echo $video['thumbnail']; ?>" width="64"><span class="vertical-align"></span></span></span></span><span class="video-time"><?php echo $video['duration']; ?></span>
421
+															<button onclick=";return false;" type="button" class="addto-button video-actions spf-nolink addto-watch-later-button-sign-in yt-uix-button yt-uix-button-default yt-uix-button-short yt-uix-tooltip" title="Watch Later" data-button-menu-id="shared-addto-watch-later-login" data-video-ids="<?php echo $video['rid']; ?>" role="button"><span class="yt-uix-button-content">  <img src="//s.ytimg.com/yts/img/pixel-vfl3z5WfW.gif" alt="Watch Later">
422 422
 															</span>  <img class="yt-uix-button-arrow" src="//s.ytimg.com/yts/img/pixel-vfl3z5WfW.gif" alt="" title="">
423 423
 															</button>
424 424
 															</a>
425 425
 														</div>
426 426
 														<div class="lohp-vertical-shelf-item-content lohp-media-object-content">
427
-															<a class="lohp-video-link max-line-3 yt-uix-sessionlink" data-sessionlink="ved=CCsQzx4oAA&amp;ei=7pFAUZzAG52shAGGr4DACw&amp;feature=g-logo" href="/watch?v=<?php echo $video['rid'];  ?>" title="<?php echo $video['title'];  ?>"><?php echo $video['title'];  ?></a>
427
+															<a class="lohp-video-link max-line-3 yt-uix-sessionlink" data-sessionlink="ved=CCsQzx4oAA&amp;ei=7pFAUZzAG52shAGGr4DACw&amp;feature=g-logo" href="/watch?v=<?php echo $video['rid']; ?>" title="<?php echo $video['title']; ?>"><?php echo $video['title']; ?></a>
428 428
 															<div class="lohp-video-metadata attached">
429 429
 																<span class="content-uploader">
430
-																<span class="username-prepend">by</span> <a href="/user/<?php echo $video['author'];  ?>" class="yt-uix-sessionlink yt-user-name " data-sessionlink="ei=7pFAUZzAG52shAGGr4DACw" dir="ltr"><?php echo $video['author'];  ?></a>
430
+																<span class="username-prepend">by</span> <a href="/user/<?php echo $video['author']; ?>" class="yt-uix-sessionlink yt-user-name " data-sessionlink="ei=7pFAUZzAG52shAGGr4DACw" dir="ltr"><?php echo $video['author']; ?></a>
431 431
 																</span>
432 432
 															</div>
433 433
 														</div>
@@ -443,7 +443,7 @@  discard block
 block discarded – undo
443 443
                                                     <?php
444 444
                                                         $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Trending' ORDER BY rand() LIMIT 4");
445 445
                                                         $stmt->execute();
446
-                                                        while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
446
+                                                        while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
447 447
                                                             $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
448 448
                                                             $video['duration'] = $__time_h->timestamp($video['duration']);
449 449
                                                             $video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -451,19 +451,19 @@  discard block
 block discarded – undo
451 451
                                                             $video['title'] = htmlspecialchars($video['title']);
452 452
                                                             $video['description'] = $__video_h->shorten_description($video['description'], 50);
453 453
                                                     ?>	
454
-													<div class="lohp-vertical-shelf-item context-data-item" data-context-item-id="<?php echo $video['rid'];  ?>" data-context-item-type="video" data-context-item-title="<?php echo $video['title'];  ?>" data-context-item-views="303 views" data-context-item-user="<?php echo $video['author'];  ?>" data-context-item-time="<?php echo $video['duration'];  ?>">
454
+													<div class="lohp-vertical-shelf-item context-data-item" data-context-item-id="<?php echo $video['rid']; ?>" data-context-item-type="video" data-context-item-title="<?php echo $video['title']; ?>" data-context-item-views="303 views" data-context-item-user="<?php echo $video['author']; ?>" data-context-item-time="<?php echo $video['duration']; ?>">
455 455
                                                         <div class="lohp-media-object">
456
-															<a href="/watch?v=<?php echo $video['rid'];  ?>" class="ux-thumb-wrap yt-uix-sessionlink yt-uix-contextlink contains-addto " data-sessionlink="ved=CCsQzx4oAA&amp;ei=7pFAUZzAG52shAGGr4DACw&amp;feature=g-logo"><span class="video-thumb ux-thumb yt-thumb-default-64 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="http://s.ytimg.com/yts/img/pixel-vfl3z5WfW.gif" alt="Thumbnail" data-thumb="/dynamic/thumbs/<?php echo $video['thumbnail']; ?>" width="64"><span class="vertical-align"></span></span></span></span><span class="video-time"><?php echo $video['duration'];  ?></span>
457
-															<button onclick=";return false;" type="button" class="addto-button video-actions spf-nolink addto-watch-later-button-sign-in yt-uix-button yt-uix-button-default yt-uix-button-short yt-uix-tooltip" title="Watch Later" data-button-menu-id="shared-addto-watch-later-login" data-video-ids="<?php echo $video['rid'];  ?>" role="button"><span class="yt-uix-button-content">  <img src="//s.ytimg.com/yts/img/pixel-vfl3z5WfW.gif" alt="Watch Later">
456
+															<a href="/watch?v=<?php echo $video['rid']; ?>" class="ux-thumb-wrap yt-uix-sessionlink yt-uix-contextlink contains-addto " data-sessionlink="ved=CCsQzx4oAA&amp;ei=7pFAUZzAG52shAGGr4DACw&amp;feature=g-logo"><span class="video-thumb ux-thumb yt-thumb-default-64 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="http://s.ytimg.com/yts/img/pixel-vfl3z5WfW.gif" alt="Thumbnail" data-thumb="/dynamic/thumbs/<?php echo $video['thumbnail']; ?>" width="64"><span class="vertical-align"></span></span></span></span><span class="video-time"><?php echo $video['duration']; ?></span>
457
+															<button onclick=";return false;" type="button" class="addto-button video-actions spf-nolink addto-watch-later-button-sign-in yt-uix-button yt-uix-button-default yt-uix-button-short yt-uix-tooltip" title="Watch Later" data-button-menu-id="shared-addto-watch-later-login" data-video-ids="<?php echo $video['rid']; ?>" role="button"><span class="yt-uix-button-content">  <img src="//s.ytimg.com/yts/img/pixel-vfl3z5WfW.gif" alt="Watch Later">
458 458
 															</span>  <img class="yt-uix-button-arrow" src="//s.ytimg.com/yts/img/pixel-vfl3z5WfW.gif" alt="" title="">
459 459
 															</button>
460 460
 															</a>
461 461
 														</div>
462 462
 														<div class="lohp-vertical-shelf-item-content lohp-media-object-content">
463
-															<a class="lohp-video-link max-line-3 yt-uix-sessionlink" data-sessionlink="ved=CCsQzx4oAA&amp;ei=7pFAUZzAG52shAGGr4DACw&amp;feature=g-logo" href="/watch?v=<?php echo $video['rid'];  ?>" title="<?php echo $video['title'];  ?>"><?php echo $video['title'];  ?></a>
463
+															<a class="lohp-video-link max-line-3 yt-uix-sessionlink" data-sessionlink="ved=CCsQzx4oAA&amp;ei=7pFAUZzAG52shAGGr4DACw&amp;feature=g-logo" href="/watch?v=<?php echo $video['rid']; ?>" title="<?php echo $video['title']; ?>"><?php echo $video['title']; ?></a>
464 464
 															<div class="lohp-video-metadata attached">
465 465
 																<span class="content-uploader">
466
-																<span class="username-prepend">by</span> <a href="/user/<?php echo $video['author'];  ?>" class="yt-uix-sessionlink yt-user-name " data-sessionlink="ei=7pFAUZzAG52shAGGr4DACw" dir="ltr"><?php echo $video['author'];  ?></a>
466
+																<span class="username-prepend">by</span> <a href="/user/<?php echo $video['author']; ?>" class="yt-uix-sessionlink yt-user-name " data-sessionlink="ei=7pFAUZzAG52shAGGr4DACw" dir="ltr"><?php echo $video['author']; ?></a>
467 467
 																</span>
468 468
 															</div>
469 469
 														</div>
Please login to merge, or discard this patch.
web/public/s/mod/2013_guide.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -103,8 +103,8 @@  discard block
 block discarded – undo
103 103
                     <div class="guide-recommendations-list">
104 104
                         <div class="guide-channels-content">
105 105
                             <ul class="guide-channels-list guide-item-container yt-uix-scroller filter-has-matches">
106
-                            <?php if(!isset($_SESSION['siteusername'])) { ?>
107
-                                    <?php foreach($__server->featured_channels as $channel) { ?>
106
+                            <?php if (!isset($_SESSION['siteusername'])) { ?>
107
+                                    <?php foreach ($__server->featured_channels as $channel) { ?>
108 108
                                         <li class="guide-channel">
109 109
                                             <a class="guide-item yt-uix-sessionlink  narrow-item" href="/feed/UCF1cWZk-kVBrN9AM_ey7qdQ" title="<?php echo htmlspecialchars($channel); ?>" data-channel-id="UCF1cWZk-kVBrN9AM_ey7qdQ" data-featured="1" data-sessionlink="ei=7pFAUZzAG52shAGGr4DACw&amp;feature=g-featured">
110 110
                                             <span class="thumb"><span class="video-thumb ux-thumb yt-thumb-square-18 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="http://s.ytimg.com/yts/img/pixel-vfl3z5WfW.gif" alt="Thumbnail" data-thumb-manual="1" data-thumb="/dynamic/pfp/<?php echo $__user_h->fetch_pfp($channel); ?>" data-group-key="guide-channel-thumbs" width="18"><span class="vertical-align"></span></span></span></span></span>
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
                                         $stmt = $__db->prepare("SELECT * FROM subscribers WHERE sender = :username ORDER BY id DESC LIMIT 20");
119 119
                                         $stmt->bindParam(":username", $_SESSION['siteusername']);
120 120
                                         $stmt->execute();
121
-                                        while($channel = $stmt->fetch(PDO::FETCH_ASSOC)) { $channel = $channel['reciever']; ?>
121
+                                        while ($channel = $stmt->fetch(PDO::FETCH_ASSOC)) { $channel = $channel['reciever']; ?>
122 122
                                         <li class="guide-channel">
123 123
                                             <a class="guide-item yt-uix-sessionlink  narrow-item" href="/feed/UCF1cWZk-kVBrN9AM_ey7qdQ" title="<?php echo htmlspecialchars($channel); ?>" data-channel-id="UCF1cWZk-kVBrN9AM_ey7qdQ" data-featured="1" data-sessionlink="ei=7pFAUZzAG52shAGGr4DACw&amp;feature=g-featured">
124 124
                                             <span class="thumb"><span class="video-thumb ux-thumb yt-thumb-square-18 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="http://s.ytimg.com/yts/img/pixel-vfl3z5WfW.gif" alt="Thumbnail" data-thumb-manual="1" data-thumb="/dynamic/pfp/<?php echo $__user_h->fetch_pfp($channel); ?>" data-group-key="guide-channel-thumbs" width="18"><span class="vertical-align"></span></span></span></span></span>
Please login to merge, or discard this patch.
web/public/get/feature_video.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,8 +11,8 @@
 block discarded – undo
11 11
 <?php $__db_h = new db_helper(); ?>
12 12
 <?php $__time_h = new time_helper(); ?>
13 13
 <?php
14
-    if(!isset($_SESSION['siteusername'])) { die(); }
15
-    if(!$__user_h->if_admin($_SESSION['siteusername'])) { die(); }
14
+    if (!isset($_SESSION['siteusername'])) { die(); }
15
+    if (!$__user_h->if_admin($_SESSION['siteusername'])) { die(); }
16 16
 
17 17
     $request = (object) [
18 18
         "video" => $_GET['v'],
Please login to merge, or discard this patch.
web/public/inbox_ajax.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -16,29 +16,29 @@  discard block
 block discarded – undo
16 16
 
17 17
     $results_per_page = 12;
18 18
     $number_of_result = $stmt->rowCount();
19
-    $number_of_page = ceil ($number_of_result / $results_per_page);  
19
+    $number_of_page = ceil($number_of_result/$results_per_page);  
20 20
 
21
-    if (!isset ($_GET['page']) ) {  
21
+    if (!isset ($_GET['page'])) {  
22 22
         $page = 1;  
23 23
     } else {  
24
-        $page = (int)$_GET['page'];  
24
+        $page = (int) $_GET['page'];  
25 25
     }  
26 26
 
27
-    $page_first_result = ($page - 1) * $results_per_page;  
27
+    $page_first_result = ($page - 1)*$results_per_page;  
28 28
 
29
-    if($_GET['filter'] == "notification") {
29
+    if ($_GET['filter'] == "notification") {
30 30
         $stmt6 = $__db->prepare("SELECT * FROM pms WHERE touser = :search AND type = 'nt' AND readed = 'y' ORDER BY id DESC LIMIT :pfirst, :pper");
31 31
         $stmt6->bindParam(":search", $search);
32 32
         $stmt6->bindParam(":pfirst", $page_first_result);
33 33
         $stmt6->bindParam(":pper", $results_per_page);
34 34
         $stmt6->execute();
35
-    } else if($_GET['filter'] == "sent") {
35
+    } else if ($_GET['filter'] == "sent") {
36 36
         $stmt6 = $__db->prepare("SELECT * FROM pms WHERE owner = :search AND readed = 'y' ORDER BY id DESC LIMIT :pfirst, :pper");
37 37
         $stmt6->bindParam(":search", $search);
38 38
         $stmt6->bindParam(":pfirst", $page_first_result);
39 39
         $stmt6->bindParam(":pper", $results_per_page);
40 40
         $stmt6->execute(); 
41
-    } else if($_GET['filter'] == "pm") {
41
+    } else if ($_GET['filter'] == "pm") {
42 42
         $stmt6 = $__db->prepare("SELECT * FROM pms WHERE touser = :search AND type = 'nm' AND readed = 'y' ORDER BY id DESC LIMIT :pfirst, :pper");
43 43
         $stmt6->bindParam(":search", $search);
44 44
         $stmt6->bindParam(":pfirst", $page_first_result);
@@ -67,8 +67,8 @@  discard block
 block discarded – undo
67 67
     </tr>
68 68
     
69 69
     <?php
70
-        while($inbox = $stmt6->fetch(PDO::FETCH_ASSOC)) { 
71
-            if($__video_h->video_exists($inbox['video_attribute'])) {
70
+        while ($inbox = $stmt6->fetch(PDO::FETCH_ASSOC)) { 
71
+            if ($__video_h->video_exists($inbox['video_attribute'])) {
72 72
                 $inbox['video'] = $__video_h->fetch_video_rid($inbox['video_attribute']);
73 73
                 $inbox['video_attr_exists'] = true;
74 74
 
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
     ?> 
83 83
     <tr style="margin-top: 5px;" id="videoslist">
84 84
             <!--
85
-            <?php if($inbox['readed'] == "n") { ?>
85
+            <?php if ($inbox['readed'] == "n") { ?>
86 86
                 <a style="position:relative;top:7px;color: white;text-decoration: none;background-color: #d54343;padding: 7px;padding-left: 10px;margin-right: 12px;display: inline;" href="/inbox/">
87 87
                 NEW
88 88
                 </a>
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
             <p style="width:475px;">
114 114
             <?php echo $__video_h->shorten_description($inbox['message'], 300, true); ?>
115 115
             </p>
116
-            <?php if($inbox['video_attr_exists']) { ?>
116
+            <?php if ($inbox['video_attr_exists']) { ?>
117 117
                 <hr>
118 118
                 <ul>
119 119
                     <li class="video-list-item "><a href="/watch?v=<?php echo $inbox['video']['rid']; ?>" class="video-list-item-link yt-uix-sessionlink" data-sessionlink="ei=CNLr3rbS3rICFSwSIQodSW397Q%3D%3D&amp;feature=g-sptl%26cid%3Dinp-hs-ytg"><span class="ux-thumb-wrap contains-addto "><span class="video-thumb ux-thumb yt-thumb-default-120 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="http://s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="<?php echo $inbox['video']['title']; ?>" data-thumb="/dynamic/thumbs/<?php echo $inbox['video']['thumbnail']; ?>" width="120"><span class="vertical-align"></span></span></span></span><span class="video-time"><?php echo $inbox['video']['duration']; ?></span>
Please login to merge, or discard this patch.
web/public/inbox/markasread.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
 <?php $__db_h = new db_helper(); ?>
12 12
 <?php $__time_h = new time_helper(); ?>
13 13
 <?php
14
-    if(!isset($_SESSION['siteusername'])) { die(); }
14
+    if (!isset($_SESSION['siteusername'])) { die(); }
15 15
     $request = (object) [
16 16
         "username" => $_SESSION['siteusername'],
17 17
 
Please login to merge, or discard this patch.
web/public/inbox/delete_message.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
 <?php $__db_h = new db_helper(); ?>
12 12
 <?php $__time_h = new time_helper(); ?>
13 13
 <?php
14
-    if(!isset($_SESSION['siteusername'])) { die(); }
14
+    if (!isset($_SESSION['siteusername'])) { die(); }
15 15
 
16 16
     $request = (object) [
17 17
         "id" => $_GET['id'],
Please login to merge, or discard this patch.
web/public/channel_discussion.php 3 patches
Indentation   +50 added lines, -50 removed lines patch added patch discarded remove patch
@@ -12,21 +12,21 @@  discard block
 block discarded – undo
12 12
 <?php $__db_h = new db_helper(); ?>
13 13
 <?php $__time_h = new time_helper(); ?>
14 14
 <?php
15
-	if(isset($_SESSION['siteusername']))
16
-	    $_user_hp = $__user_h->fetch_user_username($_SESSION['siteusername']);
15
+    if(isset($_SESSION['siteusername']))
16
+        $_user_hp = $__user_h->fetch_user_username($_SESSION['siteusername']);
17 17
 
18 18
     if(!$__user_h->user_exists($_GET['n']))
19 19
         header("Location: /?userdoesntexist");
20 20
 
21 21
     $_user = $__user_h->fetch_user_username($_GET['n']);
22 22
 
23
-	$stmt = $__db->prepare("SELECT * FROM bans WHERE username = :username ORDER BY id DESC");
24
-	$stmt->bindParam(":username", $_user['username']);
25
-	$stmt->execute();
23
+    $stmt = $__db->prepare("SELECT * FROM bans WHERE username = :username ORDER BY id DESC");
24
+    $stmt->bindParam(":username", $_user['username']);
25
+    $stmt->execute();
26 26
 
27
-	while($ban = $stmt->fetch(PDO::FETCH_ASSOC)) { 
28
-		header("Location: /?error=This user has been terminated for violating SubRock's Community Guidelines.");
29
-	}
27
+    while($ban = $stmt->fetch(PDO::FETCH_ASSOC)) { 
28
+        header("Location: /?error=This user has been terminated for violating SubRock's Community Guidelines.");
29
+    }
30 30
 
31 31
     function clean($string) {
32 32
         $string = str_replace(' ', '-', $string); // Replaces all spaces with hyphens.
@@ -34,21 +34,21 @@  discard block
 block discarded – undo
34 34
         return preg_replace('/[^A-Za-z0-9\-]/', '', $string); // Removes special chars.
35 35
     }
36 36
 
37
-	function addhttp($url) {
38
-		if (!preg_match("~^(?:f|ht)tps?://~i", $url)) {
39
-			$url = "http://" . $url;
40
-		}
41
-		return $url;
42
-	}
37
+    function addhttp($url) {
38
+        if (!preg_match("~^(?:f|ht)tps?://~i", $url)) {
39
+            $url = "http://" . $url;
40
+        }
41
+        return $url;
42
+    }
43 43
 
44 44
     function check_valid_colorhex($colorCode) {
45 45
         // If user accidentally passed along the # sign, strip it off
46 46
         $colorCode = ltrim($colorCode, '#');
47 47
     
48 48
         if (
49
-              ctype_xdigit($colorCode) &&
49
+                ctype_xdigit($colorCode) &&
50 50
               (strlen($colorCode) == 6 || strlen($colorCode) == 3))
51
-                   return true;
51
+                    return true;
52 52
     
53 53
         else return false;
54 54
     }
@@ -83,8 +83,8 @@  discard block
 block discarded – undo
83 83
     if(!check_valid_colorhex($_user['primary_color_text']) && strlen($_user['primary_color_text']) != 6) { $_user['primary_color_text'] = ""; }
84 84
     if(!check_valid_colorhex($_user['2009_bgcolor']) && strlen($_user['2009_bgcolor']) != 6) { $_user['2009_bgcolor'] = ""; }
85 85
 
86
-	if(isset($_SESSION['siteusername']))
87
-    	$__user_i->check_view_channel($_user['username'], @$_SESSION['siteusername']);
86
+    if(isset($_SESSION['siteusername']))
87
+        $__user_i->check_view_channel($_user['username'], @$_SESSION['siteusername']);
88 88
 
89 89
     if($_SERVER['REQUEST_METHOD'] == 'POST') {
90 90
         $error = array();
@@ -98,11 +98,11 @@  discard block
 block discarded – undo
98 98
         //if(ifBlocked(@$_SESSION['siteusername'], $user['username'], $__db)) { $error = "This user has blocked you!"; $error['status'] = true; } 
99 99
 
100 100
         if(!isset($error['message'])) {
101
-			$text = $_POST['comment'];
101
+            $text = $_POST['comment'];
102 102
             $stmt = $__db->prepare("INSERT INTO profile_comments (toid, author, comment) VALUES (:id, :username, :comment)");
103
-			$stmt->bindParam(":id", $_user['username']);
104
-			$stmt->bindParam(":username", $_SESSION['siteusername']);
105
-			$stmt->bindParam(":comment", $text);
103
+            $stmt->bindParam(":id", $_user['username']);
104
+            $stmt->bindParam(":username", $_SESSION['siteusername']);
105
+            $stmt->bindParam(":comment", $text);
106 106
             $stmt->execute();
107 107
 
108 108
             $_user_update_utils->update_comment_cooldown_time($_SESSION['siteusername']);
@@ -114,10 +114,10 @@  discard block
 block discarded – undo
114 114
     }
115 115
 ?>
116 116
 <?php
117
-	$__server->page_embeds->page_title = "SubRocks - " . htmlspecialchars($_user['username']);
118
-	$__server->page_embeds->page_description = htmlspecialchars($_user['bio']);
119
-	$__server->page_embeds->page_image = "/dynamic/pfp/" . htmlspecialchars($_user['pfp']);
120
-	$__server->page_embeds->page_url = "https://subrock.rocks/";
117
+    $__server->page_embeds->page_title = "SubRocks - " . htmlspecialchars($_user['username']);
118
+    $__server->page_embeds->page_description = htmlspecialchars($_user['bio']);
119
+    $__server->page_embeds->page_image = "/dynamic/pfp/" . htmlspecialchars($_user['pfp']);
120
+    $__server->page_embeds->page_url = "https://subrock.rocks/";
121 121
 ?>
122 122
 <!DOCTYPE html>
123 123
 <html dir="ltr" xmlns:og="http://opengraphprotocol.org/schema/" lang="en">
@@ -145,27 +145,27 @@  discard block
 block discarded – undo
145 145
 				background-image: url(/dynamic/banners/<?php echo $_user['2012_bg']; ?>);
146 146
 				background-repeat: repeat;
147 147
 				<?php
148
-					switch($_user['2012_bgoption']) {
149
-						case "stretch":
150
-						echo "background-size: cover;";
151
-						break;
152
-						case "solid":
153
-						echo "";
154
-						break;
155
-						case "norepeat":
156
-						echo "background-repeat: no-repeat !important;";
157
-						break;
158
-						case "repeatxy":
159
-						echo "background-repeat: repeat;";
160
-						break;
161
-						case "repeaty":
162
-						echo "background-repeat: repeat-y;";
163
-						break;
164
-						case "repeatx":
165
-						echo "background-repeat: repeat-x;";
166
-						break;
167
-					}
168
-				?>
148
+                    switch($_user['2012_bgoption']) {
149
+                        case "stretch":
150
+                        echo "background-size: cover;";
151
+                        break;
152
+                        case "solid":
153
+                        echo "";
154
+                        break;
155
+                        case "norepeat":
156
+                        echo "background-repeat: no-repeat !important;";
157
+                        break;
158
+                        case "repeatxy":
159
+                        echo "background-repeat: repeat;";
160
+                        break;
161
+                        case "repeaty":
162
+                        echo "background-repeat: repeat-y;";
163
+                        break;
164
+                        case "repeatx":
165
+                        echo "background-repeat: repeat-x;";
166
+                        break;
167
+                    }
168
+                ?>
169 169
 			}
170 170
    		</style>
171 171
 	</head>
@@ -182,9 +182,9 @@  discard block
 block discarded – undo
182 182
 					<div class="channel_customization"><?php require($_SERVER['DOCUMENT_ROOT'] . "/s/mod/channel_customization.php"); ?></div>
183 183
 				<?php } ?> 
184 184
 				<?php
185
-					if(empty(trim($_user['bio'])))
186
-						$_user['bio'] = "This user has no description.";
187
-				?>
185
+                    if(empty(trim($_user['bio'])))
186
+                        $_user['bio'] = "This user has no description.";
187
+                ?>
188 188
 				<div id="content">
189 189
 					<div class="subscription-menu-expandable subscription-menu-expandable-channels3 yt-rounded ytg-wide hid">
190 190
 						<div class="content" id="recommended-channels-list"></div>
Please login to merge, or discard this patch.
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -12,10 +12,10 @@  discard block
 block discarded – undo
12 12
 <?php $__db_h = new db_helper(); ?>
13 13
 <?php $__time_h = new time_helper(); ?>
14 14
 <?php
15
-	if(isset($_SESSION['siteusername']))
15
+	if (isset($_SESSION['siteusername']))
16 16
 	    $_user_hp = $__user_h->fetch_user_username($_SESSION['siteusername']);
17 17
 
18
-    if(!$__user_h->user_exists($_GET['n']))
18
+    if (!$__user_h->user_exists($_GET['n']))
19 19
         header("Location: /?userdoesntexist");
20 20
 
21 21
     $_user = $__user_h->fetch_user_username($_GET['n']);
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 	$stmt->bindParam(":username", $_user['username']);
25 25
 	$stmt->execute();
26 26
 
27
-	while($ban = $stmt->fetch(PDO::FETCH_ASSOC)) { 
27
+	while ($ban = $stmt->fetch(PDO::FETCH_ASSOC)) { 
28 28
 		header("Location: /?error=This user has been terminated for violating SubRock's Community Guidelines.");
29 29
 	}
30 30
 
@@ -76,28 +76,28 @@  discard block
 block discarded – undo
76 76
     $_user['genre'] = strtolower($_user['genre']);
77 77
     $_user['subscribed'] = $__user_h->if_subscribed(@$_SESSION['siteusername'], $_user['username']);
78 78
 
79
-    if(!check_valid_colorhex($_user['primary_color']) && strlen($_user['primary_color']) != 6) { $_user['primary_color'] = ""; }
80
-    if(!check_valid_colorhex($_user['secondary_color']) && strlen($_user['secondary_color']) != 6) { $_user['secondary_color'] = ""; }
81
-    if(!check_valid_colorhex($_user['third_color']) && strlen($_user['third_color']) != 6) { $_user['third_color'] = ""; }
82
-    if(!check_valid_colorhex($_user['text_color']) && strlen($_user['text_color']) != 6) { $_user['text_color'] = ""; }
83
-    if(!check_valid_colorhex($_user['primary_color_text']) && strlen($_user['primary_color_text']) != 6) { $_user['primary_color_text'] = ""; }
84
-    if(!check_valid_colorhex($_user['2009_bgcolor']) && strlen($_user['2009_bgcolor']) != 6) { $_user['2009_bgcolor'] = ""; }
79
+    if (!check_valid_colorhex($_user['primary_color']) && strlen($_user['primary_color']) != 6) { $_user['primary_color'] = ""; }
80
+    if (!check_valid_colorhex($_user['secondary_color']) && strlen($_user['secondary_color']) != 6) { $_user['secondary_color'] = ""; }
81
+    if (!check_valid_colorhex($_user['third_color']) && strlen($_user['third_color']) != 6) { $_user['third_color'] = ""; }
82
+    if (!check_valid_colorhex($_user['text_color']) && strlen($_user['text_color']) != 6) { $_user['text_color'] = ""; }
83
+    if (!check_valid_colorhex($_user['primary_color_text']) && strlen($_user['primary_color_text']) != 6) { $_user['primary_color_text'] = ""; }
84
+    if (!check_valid_colorhex($_user['2009_bgcolor']) && strlen($_user['2009_bgcolor']) != 6) { $_user['2009_bgcolor'] = ""; }
85 85
 
86
-	if(isset($_SESSION['siteusername']))
86
+	if (isset($_SESSION['siteusername']))
87 87
     	$__user_i->check_view_channel($_user['username'], @$_SESSION['siteusername']);
88 88
 
89
-    if($_SERVER['REQUEST_METHOD'] == 'POST') {
89
+    if ($_SERVER['REQUEST_METHOD'] == 'POST') {
90 90
         $error = array();
91 91
 
92
-        if(!isset($_SESSION['siteusername'])){ $error['message'] = "you are not logged in"; $error['status'] = true; }
93
-        if(!$_POST['comment']){ $error['message'] = "your comment cannot be blank"; $error['status'] = true; }
94
-        if(strlen($_POST['comment']) > 1000){ $error['message'] = "your comment must be shorter than 1000 characters"; $error['status'] = true; }
92
+        if (!isset($_SESSION['siteusername'])) { $error['message'] = "you are not logged in"; $error['status'] = true; }
93
+        if (!$_POST['comment']) { $error['message'] = "your comment cannot be blank"; $error['status'] = true; }
94
+        if (strlen($_POST['comment']) > 1000) { $error['message'] = "your comment must be shorter than 1000 characters"; $error['status'] = true; }
95 95
         //if(!isset($_POST['g-recaptcha-response'])){ $error['message'] = "captcha validation failed"; $error['status'] = true; }
96 96
         //if(!$_user_insert_utils->validateCaptcha($config['recaptcha_secret'], $_POST['g-recaptcha-response'])) { $error['message'] = "captcha validation failed"; $error['status'] = true; }
97
-        if($__user_h->if_cooldown($_SESSION['siteusername'])) { $error['message'] = "You are on a cooldown! Wait for a minute before posting another comment."; $error['status'] = true; }
97
+        if ($__user_h->if_cooldown($_SESSION['siteusername'])) { $error['message'] = "You are on a cooldown! Wait for a minute before posting another comment."; $error['status'] = true; }
98 98
         //if(ifBlocked(@$_SESSION['siteusername'], $user['username'], $__db)) { $error = "This user has blocked you!"; $error['status'] = true; } 
99 99
 
100
-        if(!isset($error['message'])) {
100
+        if (!isset($error['message'])) {
101 101
 			$text = $_POST['comment'];
102 102
             $stmt = $__db->prepare("INSERT INTO profile_comments (toid, author, comment) VALUES (:id, :username, :comment)");
103 103
 			$stmt->bindParam(":id", $_user['username']);
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 
108 108
             $_user_update_utils->update_comment_cooldown_time($_SESSION['siteusername']);
109 109
 
110
-            if(@$_SESSION['siteusername'] != $_user['username']) { 
110
+            if (@$_SESSION['siteusername'] != $_user['username']) { 
111 111
                 $_user_insert_utils->send_message($_user['username'], "New comment", 'I commented "' . $_POST['comment'] . '" on your profile!', $_SESSION['siteusername']);
112 112
             }
113 113
         }
@@ -141,11 +141,11 @@  discard block
 block discarded – undo
141 141
 		<link rel="stylesheet" href="/yt/cssbin/www-extra.css">
142 142
 		<style>
143 143
 			#content-container {
144
-				background-color: <?php echo $_user['primary_color'];  ?>;
144
+				background-color: <?php echo $_user['primary_color']; ?>;
145 145
 				background-image: url(/dynamic/banners/<?php echo $_user['2012_bg']; ?>);
146 146
 				background-repeat: repeat;
147 147
 				<?php
148
-					switch($_user['2012_bgoption']) {
148
+					switch ($_user['2012_bgoption']) {
149 149
 						case "stretch":
150 150
 						echo "background-size: cover;";
151 151
 						break;
@@ -178,11 +178,11 @@  discard block
 block discarded – undo
178 178
 			<div id="masthead-container"><?php require($_SERVER['DOCUMENT_ROOT'] . "/s/mod/header.php"); ?></div>
179 179
 			<div id="content-container">
180 180
 				<!-- begin content -->
181
-				<?php if(isset($_SESSION['siteusername']) && $_user['username'] == $_SESSION['siteusername']) { ?>
181
+				<?php if (isset($_SESSION['siteusername']) && $_user['username'] == $_SESSION['siteusername']) { ?>
182 182
 					<div class="channel_customization"><?php require($_SERVER['DOCUMENT_ROOT'] . "/s/mod/channel_customization.php"); ?></div>
183 183
 				<?php } ?> 
184 184
 				<?php
185
-					if(empty(trim($_user['bio'])))
185
+					if (empty(trim($_user['bio'])))
186 186
 						$_user['bio'] = "This user has no description.";
187 187
 				?>
188 188
 				<div id="content">
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
 												<h1><?php echo htmlspecialchars($_user['username']); ?></h1>
238 238
 											</div>
239 239
 											<div class="upper-left-section enable-fancy-subscribe-button">
240
-											<?php if($_user['username'] != @$_SESSION['siteusername']) { ?>
240
+											<?php if ($_user['username'] != @$_SESSION['siteusername']) { ?>
241 241
 													<div class="yt-subscription-button-hovercard yt-uix-hovercard">
242 242
 														<button 
243 243
 															href="#" 
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
 															title="" 
246 246
 															id="subscribe-button"
247 247
 															type="button" 
248
-															class="yt-subscription-button <?php if($_user['subscribed']) { echo "subscribed "; } ?>  yt-uix-button yt-uix-button-subscription yt-uix-tooltip" 
248
+															class="yt-subscription-button <?php if ($_user['subscribed']) { echo "subscribed "; } ?>  yt-uix-button yt-uix-button-subscription yt-uix-tooltip" 
249 249
 															role="button"><span class="yt-uix-button-icon-wrapper"><img class="yt-uix-button-icon yt-uix-button-icon-subscribe" 
250 250
 															src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt=""></span><span class="yt-uix-button-content">  <span class="subscribe-label">Subscribe</span>
251 251
 														<span class="subscribed-label">Subscribed</span>
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
 												<?php } else { ?>
262 262
 
263 263
 												<?php } ?>
264
-												<?php if($__user_h->if_partner($_user['username'])) { ?>
264
+												<?php if ($__user_h->if_partner($_user['username'])) { ?>
265 265
 													<img style="width: 29px;vertical-align: middle;margin-left: 10px;" title="This user is a SubRocks partner" src="/yt/imgbin/RenderedImage.png">
266 266
 												<?php } ?>
267 267
 											</div>
@@ -319,7 +319,7 @@  discard block
 block discarded – undo
319 319
 									</div>
320 320
 								</div>
321 321
 							</div>
322
-                            <?php if($_user['featured'] != "None") { $video = $__video_h->fetch_video_rid($_user['featured']); } else { $_user['featured'] = false; } ?>
322
+                            <?php if ($_user['featured'] != "None") { $video = $__video_h->fetch_video_rid($_user['featured']); } else { $_user['featured'] = false; } ?>
323 323
 							<div id="branded-page-body">
324 324
 								<div class="channel-tab-content channel-layout-two-column selected blogger-template"><?php require($_SERVER['DOCUMENT_ROOT'] . "/s/mod/channel_discussion.php"); ?></div>
325 325
 							</div>
Please login to merge, or discard this patch.
Braces   +17 added lines, -12 removed lines patch added patch discarded remove patch
@@ -13,11 +13,13 @@  discard block
 block discarded – undo
13 13
 <?php $__db_h = new db_helper(); ?>
14 14
 <?php $__time_h = new time_helper(); ?>
15 15
 <?php
16
-	if(isset($_SESSION['siteusername']))
17
-	    $_user_hp = $__user_h->fetch_user_username($_SESSION['siteusername']);
16
+	if(isset($_SESSION['siteusername'])) {
17
+		    $_user_hp = $__user_h->fetch_user_username($_SESSION['siteusername']);
18
+	}
18 19
 
19
-    if(!$__user_h->user_exists($_GET['n']))
20
-        header("Location: /?userdoesntexist");
20
+    if(!$__user_h->user_exists($_GET['n'])) {
21
+            header("Location: /?userdoesntexist");
22
+    }
21 23
 
22 24
     $_user = $__user_h->fetch_user_username($_GET['n']);
23 25
 
@@ -40,10 +42,11 @@  discard block
 block discarded – undo
40 42
     
41 43
         if (
42 44
               ctype_xdigit($colorCode) &&
43
-              (strlen($colorCode) == 6 || strlen($colorCode) == 3))
44
-                   return true;
45
-    
46
-        else return false;
45
+              (strlen($colorCode) == 6 || strlen($colorCode) == 3)) {
46
+                           return true;
47
+        } else {
48
+            return false;
49
+        }
47 50
     }
48 51
 
49 52
     $_user['subscribed'] = $__user_h->if_subscribed(@$_SESSION['siteusername'], $_user['username']);
@@ -76,8 +79,9 @@  discard block
 block discarded – undo
76 79
     if(!check_valid_colorhex($_user['primary_color_text']) && strlen($_user['primary_color_text']) != 6) { $_user['primary_color_text'] = ""; }
77 80
     if(!check_valid_colorhex($_user['2009_bgcolor']) && strlen($_user['2009_bgcolor']) != 6) { $_user['2009_bgcolor'] = ""; }
78 81
 
79
-	if(isset($_SESSION['siteusername']))
80
-    	$__user_i->check_view_channel($_user['username'], @$_SESSION['siteusername']);
82
+	if(isset($_SESSION['siteusername'])) {
83
+	    	$__user_i->check_view_channel($_user['username'], @$_SESSION['siteusername']);
84
+	}
81 85
 
82 86
     if($_SERVER['REQUEST_METHOD'] == 'POST') {
83 87
         $error = array();
@@ -146,8 +150,9 @@  discard block
 block discarded – undo
146 150
 					<div class="channel_customization"><?php require($_SERVER['DOCUMENT_ROOT'] . "/s/mod/channel_customization.php"); ?></div>
147 151
 				<?php } ?> 
148 152
 				<?php
149
-					if(empty(trim($_user['bio'])))
150
-						$_user['bio'] = "This user has no description.";
153
+					if(empty(trim($_user['bio']))) {
154
+											$_user['bio'] = "This user has no description.";
155
+					}
151 156
 				?>
152 157
 				<div id="content">
153 158
 					<div class="subscription-menu-expandable subscription-menu-expandable-channels3 yt-rounded ytg-wide hid">
Please login to merge, or discard this patch.