Test Failed
Push — main ( 2f6890...e57cdf )
by chief
02:56
created
web/public/report.php 2 patches
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
 <?php $__db_h = new db_helper(); ?>
9 9
 <?php $__time_h = new time_helper(); ?>
10 10
 <?php
11
-if(!isset($_SESSION['siteusername']))
11
+if (!isset($_SESSION['siteusername']))
12 12
     header('Location: ' . $_SERVER['HTTP_REFERER'] . '&error=You have to be logged in to report videos.');
13 13
 
14 14
 $_video = $__video_h->fetch_video_rid($_GET['v']);
@@ -21,17 +21,17 @@  discard block
 block discarded – undo
21 21
     "username" => str_replace("@", "", $_SESSION['siteusername']),
22 22
     // "avatar_url" => "https://subrock.rocks/dynamic/pfp/",
23 23
     "tts" => false,
24
-], JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE );
24
+], JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
25 25
 
26
-$ch = curl_init( $webhookurl );
27
-curl_setopt( $ch, CURLOPT_HTTPHEADER, array('Content-type: application/json'));
28
-curl_setopt( $ch, CURLOPT_POST, 1);
29
-curl_setopt( $ch, CURLOPT_POSTFIELDS, $json_data);
30
-curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, 1);
31
-curl_setopt( $ch, CURLOPT_HEADER, 0);
32
-curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1);
26
+$ch = curl_init($webhookurl);
27
+curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-type: application/json'));
28
+curl_setopt($ch, CURLOPT_POST, 1);
29
+curl_setopt($ch, CURLOPT_POSTFIELDS, $json_data);
30
+curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
31
+curl_setopt($ch, CURLOPT_HEADER, 0);
32
+curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
33 33
 
34
-$response = curl_exec( $ch );
35
-curl_close( $ch );
34
+$response = curl_exec($ch);
35
+curl_close($ch);
36 36
 header('Location: ' . $_SERVER['HTTP_REFERER'] . '&success=Successfully reported this video.');
37 37
 ?>
38 38
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,8 +8,9 @@
 block discarded – undo
8 8
 <?php $__db_h = new db_helper(); ?>
9 9
 <?php $__time_h = new time_helper(); ?>
10 10
 <?php
11
-if(!isset($_SESSION['siteusername']))
11
+if(!isset($_SESSION['siteusername'])) {
12 12
     header('Location: ' . $_SERVER['HTTP_REFERER'] . '&error=You have to be logged in to report videos.');
13
+}
13 14
 
14 15
 $_video = $__video_h->fetch_video_rid($_GET['v']);
15 16
 $webhookurl = $__server->discord_webhook;
Please login to merge, or discard this patch.
web/public/index.php 2 patches
Indentation   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -8,10 +8,10 @@  discard block
 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 - Homepage";
12
-	$__server->page_embeds->page_description = "SubRocks is a site dedicated to bring back the 2012 layout of YouTube.";
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 - Homepage";
12
+    $__server->page_embeds->page_description = "SubRocks is a site dedicated to bring back the 2012 layout of YouTube.";
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
 <!DOCTYPE html>
17 17
 <html>
@@ -61,8 +61,8 @@  discard block
 block discarded – undo
61 61
 							</div>
62 62
 							<div class="guide">
63 63
 							<?php 
64
-								if(isset($_SESSION['siteusername'])) {
65
-								?>
64
+                                if(isset($_SESSION['siteusername'])) {
65
+                                ?>
66 66
 								<div style="/*! margin-top: 0px; *//*! margin-left: 10px; *//*! margin-bottom: 13px; */height: 99px;" class="guide-section feed-header channel first"><img alt="" src="/dynamic/pfp/<?php echo $__user_h->fetch_pfp($_SESSION['siteusername']); ?>" style="height: 88px;position: relative;top: 4px;left: 4px;" class="feed-header-thumb channel-thumb" width="88px"><div id="links" style="/*! margin-left: 5px; */position: relative;left: 13px;top: 7px;"><div style="font-size: 11px;margin-bottom: 6px;" class="metadata">
67 67
 								<a href="/user/<?php echo htmlspecialchars($_SESSION['siteusername']); ?>" style="color: inherit;">My channel
68 68
 								<img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" class="see-more-arrow" alt=""></a>        
@@ -225,16 +225,16 @@  discard block
 block discarded – undo
225 225
 							</p>
226 226
 							<ul>
227 227
 								<?php
228
-									$stmt = $__db->prepare("SELECT * FROM videos WHERE visibility = 'n' ORDER BY rand() LIMIT 4");
229
-									$stmt->execute();
230
-									while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
231
-										$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
232
-										$video['duration'] = $__time_h->timestamp($video['duration']);
233
-										$video['views'] = $__video_h->fetch_video_views($video['rid']);
234
-										$video['author'] = htmlspecialchars($video['author']);		
235
-										$video['title'] = htmlspecialchars($video['title']);
236
-										$video['description'] = $__video_h->shorten_description($video['description'], 50);
237
-								?>
228
+                                    $stmt = $__db->prepare("SELECT * FROM videos WHERE visibility = 'n' ORDER BY rand() LIMIT 4");
229
+                                    $stmt->execute();
230
+                                    while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
231
+                                        $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
232
+                                        $video['duration'] = $__time_h->timestamp($video['duration']);
233
+                                        $video['views'] = $__video_h->fetch_video_views($video['rid']);
234
+                                        $video['author'] = htmlspecialchars($video['author']);		
235
+                                        $video['title'] = htmlspecialchars($video['title']);
236
+                                        $video['description'] = $__video_h->shorten_description($video['description'], 50);
237
+                                ?>
238 238
 								<li class="video-list-item "><a href="/watch?v=<?php echo $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 $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>
239 239
 									<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="yuTBQ86r8o0" role="button"><span class="yt-uix-button-content">  <img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Watch Later">
240 240
 									</span><img class="yt-uix-button-arrow" src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt=""></button>
@@ -248,16 +248,16 @@  discard block
 block discarded – undo
248 248
 							</h3>
249 249
 							<ul>
250 250
 								<?php
251
-									$stmt = $__db->prepare("SELECT * FROM videos WHERE featured = 'v' AND visibility = 'n' ORDER BY id DESC LIMIT 4");
252
-									$stmt->execute();
253
-									while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
254
-										$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
255
-										$video['duration'] = $__time_h->timestamp($video['duration']);
256
-										$video['views'] = $__video_h->fetch_video_views($video['rid']);
257
-										$video['author'] = htmlspecialchars($video['author']);		
258
-										$video['title'] = htmlspecialchars($video['title']);
259
-										$video['description'] = $__video_h->shorten_description($video['description'], 50);
260
-								?>
251
+                                    $stmt = $__db->prepare("SELECT * FROM videos WHERE featured = 'v' AND visibility = 'n' ORDER BY id DESC LIMIT 4");
252
+                                    $stmt->execute();
253
+                                    while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
254
+                                        $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
255
+                                        $video['duration'] = $__time_h->timestamp($video['duration']);
256
+                                        $video['views'] = $__video_h->fetch_video_views($video['rid']);
257
+                                        $video['author'] = htmlspecialchars($video['author']);		
258
+                                        $video['title'] = htmlspecialchars($video['title']);
259
+                                        $video['description'] = $__video_h->shorten_description($video['description'], 50);
260
+                                ?>
261 261
 								<li class="video-list-item "><a href="/watch?v=<?php echo $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 $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>
262 262
 									<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="yuTBQ86r8o0" role="button"><span class="yt-uix-button-content">  <img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Watch Later">
263 263
 									</span><img class="yt-uix-button-arrow" src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt=""></button>
@@ -281,16 +281,16 @@  discard block
 block discarded – undo
281 281
 									<div class="feed-page">
282 282
 										<ul>
283 283
 											<?php
284
-												$stmt = $__db->prepare("SELECT * FROM videos WHERE visibility = 'n' ORDER BY id DESC LIMIT 20");
285
-												$stmt->execute();
286
-												while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
287
-													$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
288
-													$video['duration'] = $__time_h->timestamp($video['duration']);
289
-													$video['views'] = $__video_h->fetch_video_views($video['rid']);
290
-													$video['author'] = htmlspecialchars($video['author']);		
291
-													$video['title'] = htmlspecialchars($video['title']);
292
-													$video['description'] = $__video_h->shorten_description($video['description'], 50);
293
-											?>
284
+                                                $stmt = $__db->prepare("SELECT * FROM videos WHERE visibility = 'n' ORDER BY id DESC LIMIT 20");
285
+                                                $stmt->execute();
286
+                                                while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
287
+                                                    $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
288
+                                                    $video['duration'] = $__time_h->timestamp($video['duration']);
289
+                                                    $video['views'] = $__video_h->fetch_video_views($video['rid']);
290
+                                                    $video['author'] = htmlspecialchars($video['author']);		
291
+                                                    $video['title'] = htmlspecialchars($video['title']);
292
+                                                    $video['description'] = $__video_h->shorten_description($video['description'], 50);
293
+                                            ?>
294 294
 											<li>
295 295
 												<div class="feed-item-container first " data-channel-key="UCR2A9ZNliJfgC66IvIpe-Zw">
296 296
 													<div class="feed-author-bubble-container">
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 				<div id="content">
43 43
 					<div class="guide-layout-container enable-fancy-subscribe-button">
44 44
 						<div class="guide-container">
45
-						<?php if(!isset($_SESSION['siteusername'])) { ?>
45
+						<?php if (!isset($_SESSION['siteusername'])) { ?>
46 46
 									<div id="guide-builder-promo">
47 47
 								<h2>
48 48
 							Sign in to add channels to your homepage
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 							</div>
62 62
 							<div class="guide">
63 63
 							<?php 
64
-								if(isset($_SESSION['siteusername'])) {
64
+								if (isset($_SESSION['siteusername'])) {
65 65
 								?>
66 66
 								<div style="/*! margin-top: 0px; *//*! margin-left: 10px; *//*! margin-bottom: 13px; */height: 99px;" class="guide-section feed-header channel first"><img alt="" src="/dynamic/pfp/<?php echo $__user_h->fetch_pfp($_SESSION['siteusername']); ?>" style="height: 88px;position: relative;top: 4px;left: 4px;" class="feed-header-thumb channel-thumb" width="88px"><div id="links" style="/*! margin-left: 5px; */position: relative;left: 13px;top: 7px;"><div style="font-size: 11px;margin-bottom: 6px;" class="metadata">
67 67
 								<a href="/user/<?php echo htmlspecialchars($_SESSION['siteusername']); ?>" style="color: inherit;">My channel
@@ -172,8 +172,8 @@  discard block
 block discarded – undo
172 172
 											</span>
173 173
 											</a>
174 174
 										</li>
175
-                                        <?php if(!isset($_SESSION['siteusername'])) { ?>
176
-                                            <?php foreach($__server->featured_channels as $channel) { ?>
175
+                                        <?php if (!isset($_SESSION['siteusername'])) { ?>
176
+                                            <?php foreach ($__server->featured_channels as $channel) { ?>
177 177
                                                 <li class="guide-item-container ">
178 178
                                                     <a class="guide-item" data-external-id="<?php echo htmlspecialchars($channel); ?>" data-feed-name="<?php echo htmlspecialchars($channel); ?>" data-feed-type="user">
179 179
                                                     <span class="thumb">  <span class="video-thumb ux-thumb yt-thumb-square-28 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="http://s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Thumbnail" onerror="this.onerror=null;this.src='/dynamic/thumbs/default.jpg';" data-thumb="/dynamic/pfp/<?php echo $__user_h->fetch_pfp($channel); ?>" width="28"><span class="vertical-align"></span></span></span></span>
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
                                                 $stmt = $__db->prepare("SELECT * FROM subscribers WHERE sender = :username ORDER BY id DESC LIMIT 20");
189 189
                                                 $stmt->bindParam(":username", $_SESSION['siteusername']);
190 190
                                                 $stmt->execute();
191
-                                                while($channel = $stmt->fetch(PDO::FETCH_ASSOC)) { $channel = $channel['reciever']; ?>
191
+                                                while ($channel = $stmt->fetch(PDO::FETCH_ASSOC)) { $channel = $channel['reciever']; ?>
192 192
                                                 <li class="guide-item-container ">
193 193
                                                     <a class="guide-item" data-external-id="<?php echo htmlspecialchars($channel); ?>" data-feed-name="<?php echo htmlspecialchars($channel); ?>" data-feed-type="user">
194 194
                                                     <span class="thumb">  <span class="video-thumb ux-thumb yt-thumb-square-28 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="http://s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Thumbnail" onerror="this.onerror=null;this.src='/dynamic/thumbs/default.jpg';" data-thumb="/dynamic/pfp/<?php echo $__user_h->fetch_pfp($channel); ?>" width="28"><span class="vertical-align"></span></span></span></span>
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
 								<?php
228 228
 									$stmt = $__db->prepare("SELECT * FROM videos WHERE visibility = 'n' ORDER BY rand() LIMIT 4");
229 229
 									$stmt->execute();
230
-									while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
230
+									while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
231 231
 										$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
232 232
 										$video['duration'] = $__time_h->timestamp($video['duration']);
233 233
 										$video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
 								<?php
251 251
 									$stmt = $__db->prepare("SELECT * FROM videos WHERE featured = 'v' AND visibility = 'n' ORDER BY id DESC LIMIT 4");
252 252
 									$stmt->execute();
253
-									while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
253
+									while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
254 254
 										$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
255 255
 										$video['duration'] = $__time_h->timestamp($video['duration']);
256 256
 										$video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
 											<?php
284 284
 												$stmt = $__db->prepare("SELECT * FROM videos WHERE visibility = 'n' ORDER BY id DESC LIMIT 20");
285 285
 												$stmt->execute();
286
-												while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
286
+												while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
287 287
 													$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
288 288
 													$video['duration'] = $__time_h->timestamp($video['duration']);
289 289
 													$video['views'] = $__video_h->fetch_video_views($video['rid']);
Please login to merge, or discard this patch.
web/public/s/mod/old_channel_customization.php 2 patches
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -286,7 +286,7 @@  discard block
 block discarded – undo
286 286
                             </script>
287 287
                             <!--<button class="yt-uix-button yt-uix-button-default" id="av-uplod">Select File</button>-->
288 288
                         <img src="/dynamic/pfp/<?php echo $_user['pfp']; ?>" style="width:100px;height:100px;"><br>
289
-                        <?php if($_user['pfp'] != "default.png") { ?>
289
+                        <?php if ($_user['pfp'] != "default.png") { ?>
290 290
                             <a href="/get/remove_profile_pic">Remove Profile Picture</a><br>
291 291
                         <?php } ?>
292 292
                         <br><hr class="thin-line-darker" style="width:unset;">
@@ -296,7 +296,7 @@  discard block
 block discarded – undo
296 296
                             <input style="width: 169px;position: relative;top: 10px;" type="file" name="videopagebanner" id="avatar-upload">
297 297
                             <button class="yt-uix-button yt-uix-button-default" id="av-uplod">Select File</button>
298 298
                         </div><br>                   
299
-                        <?php if(!empty($_user['subbutton'])) { ?>
299
+                        <?php if (!empty($_user['subbutton'])) { ?>
300 300
                             <a href="/get/remove_watch_banner">Remove Watch Page Banner</a><br>
301 301
                         <?php } ?><br><hr class="thin-line-darker" style="width:unset;">
302 302
                         
@@ -322,19 +322,19 @@  discard block
 block discarded – undo
322 322
 
323 323
                         <b>Featured Video</b>
324 324
                         <div class="customization-module" id="featuredvid" action="/d/channel_update" enctype="multipart/form-data" style="display: inline-block;float:right;position: relative;bottom: 6px;">
325
-                        <input class="yt-uix-form-input-text" style="width: 291px;"  id="biomd" placeholder="Video ID" value="<?php echo htmlspecialchars($_user['featured']);?>" name="videoid">
325
+                        <input class="yt-uix-form-input-text" style="width: 291px;"  id="biomd" placeholder="Video ID" value="<?php echo htmlspecialchars($_user['featured']); ?>" name="videoid">
326 326
                         </div><br><br><hr class="thin-line-darker" style="width:unset;">
327 327
 
328 328
                         <div style="position: relative;top: 7px;">
329 329
                             <b>Featured Channels</b>
330 330
                             <div class="customization-module" id="featuredvid" action="/d/channel_update" enctype="multipart/form-data" style="display: inline-block;float:right;position: relative;bottom: 6px;">
331
-                            <input class="yt-uix-form-input-text" style="width: 291px;"  id="biomd" placeholder="Seperate by commas!" value="<?php echo htmlspecialchars($_user['featured_channels']);?>" name="featuredchannels">
331
+                            <input class="yt-uix-form-input-text" style="width: 291px;"  id="biomd" placeholder="Seperate by commas!" value="<?php echo htmlspecialchars($_user['featured_channels']); ?>" name="featuredchannels">
332 332
                             </div>
333 333
                         </div><br><br><hr class="thin-line-darker" style="margin-top: 0px;width:unset;"><br>
334 334
 
335 335
                         <b>Website</b>
336 336
                         <div class="customization-module" id="featuredvid" action="/d/channel_update" enctype="multipart/form-data" style="float: right;position: relative;top: -7px;">
337
-                        <input class="yt-uix-form-input-text" style="width: 291px;"  id="biomd" placeholder="Website URL" value="<?php echo htmlspecialchars($_user['website']);?>" name="website">
337
+                        <input class="yt-uix-form-input-text" style="width: 291px;"  id="biomd" placeholder="Website URL" value="<?php echo htmlspecialchars($_user['website']); ?>" name="website">
338 338
                             
339 339
                         </div><br><br><hr class="thin-line-darker" style="width:unset;">
340 340
 
@@ -344,7 +344,7 @@  discard block
 block discarded – undo
344 344
                             <span style="font-size: 11px;" class="grey-text">This will show what type of channel you are to other users.</span>
345 345
                             <div class="customization-module" id="channellayout" action="/d/channel_update" enctype="multipart/form-data" style="float: right;position: relative;top: -19px;">
346 346
                                 <select class="yt-uix-button yt-uix-button-default" style="position:relative;top:6px;"   name="genre">
347
-                                    <?php foreach($categories as $category) { ?>
347
+                                    <?php foreach ($categories as $category) { ?>
348 348
                                         <option value="<?php echo $category; ?>"><?php echo $category; ?></option>
349 349
                                     <?php } ?>
350 350
                                 </select>
@@ -358,7 +358,7 @@  discard block
 block discarded – undo
358 358
                                 <select class="yt-uix-button yt-uix-button-default" style="position:relative;top:6px;"   name="transparency">
359 359
                                 <?php
360 360
                                 $trans = array(
361
-                                    "1.1","1.0","0.9","0.8","0.7","0.6","0.5","0.4","0.3","0.2","0.1",
361
+                                    "1.1", "1.0", "0.9", "0.8", "0.7", "0.6", "0.5", "0.4", "0.3", "0.2", "0.1",
362 362
                                 );
363 363
                                 ?>
364 364
                                     <option value="1.0">100% (Visible)</option>
@@ -381,12 +381,12 @@  discard block
 block discarded – undo
381 381
                             <select class="yt-uix-button yt-uix-button-default" style="position:relative;top:6px;"  id="country" name="country" value="<?php echo $_user['country']?>">
382 382
                             <?php
383 383
                             $countries = array(
384
-                                "Select country","Afghanistan", "Albania", "Algeria", "American Samoa", "Andorra", "Angola", "Anguilla", "Antarctica", "Antigua and Barbuda", "Argentina", "Armenia", "Aruba", "Australia", "Austria", "Azerbaijan", "Bahamas", "Bahrain", "Bangladesh", "Barbados", "Belarus", "Belgium", "Belize", "Benin", "Bermuda", "Bhutan", "Bolivia", "Bosnia and Herzegowina", "Botswana", "Bouvet Island", "Brazil", "British Indian Ocean Territory", "Brunei Darussalam", "Bulgaria", "Burkina Faso", "Burundi", "Cambodia", "Cameroon", "Canada", "Cape Verde", "Cayman Islands", "Central African Republic", "Chad", "Chile", "China", "Christmas Island", "Cocos (Keeling) Islands", "Colombia", "Comoros", "Congo", "Congo, the Democratic Republic of the", "Cook Islands", "Costa Rica", "Cote d'Ivoire", "Croatia (Hrvatska)", "Cuba", "Cyprus", "Czech Republic", "Denmark", "Djibouti", "Dominica", "Dominican Republic", "East Timor", "Ecuador", "Egypt", "El Salvador", "Equatorial Guinea", "Eritrea", "Estonia", "Ethiopia", "Falkland Islands (Malvinas)", "Faroe Islands", "Fiji", "Finland", "France", "France Metropolitan", "French Guiana", "French Polynesia", "French Southern Territories", "Gabon", "Gambia", "Georgia", "Germany", "Ghana", "Gibraltar", "Greece", "Greenland", "Grenada", "Guadeloupe", "Guam", "Guatemala", "Guinea", "Guinea-Bissau", "Guyana", "Haiti", "Heard and Mc Donald Islands", "Holy See (Vatican City State)", "Honduras", "Hong Kong", "Hungary", "Iceland", "India", "Indonesia", "Iran (Islamic Republic of)", "Iraq", "Ireland", "Israel", "Italy", "Jamaica", "Japan", "Jordan", "Kazakhstan", "Kenya", "Kiribati", "Korea, Democratic People's Republic of", "Korea, Republic of", "Kuwait", "Kyrgyzstan", "Lao, People's Democratic Republic", "Latvia", "Lebanon", "Lesotho", "Liberia", "Libyan Arab Jamahiriya", "Liechtenstein", "Lithuania", "Luxembourg", "Macau", "Macedonia, The Former Yugoslav Republic of", "Madagascar", "Malawi", "Malaysia", "Maldives", "Mali", "Malta", "Marshall Islands", "Martinique", "Mauritania", "Mauritius", "Mayotte", "Mexico", "Micronesia, Federated States of", "Moldova, Republic of", "Monaco", "Mongolia", "Montserrat", "Morocco", "Mozambique", "Myanmar", "Namibia", "Nauru", "Nepal", "Netherlands", "Netherlands Antilles", "New Caledonia", "New Zealand", "Nicaragua", "Niger", "Nigeria", "Niue", "Norfolk Island", "Northern Mariana Islands", "Norway", "Oman", "Pakistan", "Palau", "Panama", "Papua New Guinea", "Paraguay", "Peru", "Philippines", "Pitcairn", "Poland", "Portugal", "Puerto Rico", "Qatar", "Reunion", "Romania", "Russian Federation", "Rwanda", "Saint Kitts and Nevis", "Saint Lucia", "Saint Vincent and the Grenadines", "Samoa", "San Marino", "Sao Tome and Principe", "Saudi Arabia", "Senegal", "Seychelles", "Sierra Leone", "Singapore", "Slovakia (Slovak Republic)", "Slovenia", "Solomon Islands", "Somalia", "South Africa", "South Georgia and the South Sandwich Islands", "Spain", "Sri Lanka", "St. Helena", "St. Pierre and Miquelon", "Sudan", "Suriname", "Svalbard and Jan Mayen Islands", "Swaziland", "Sweden", "Switzerland", "Syrian Arab Republic", "Taiwan, Province of China", "Tajikistan", "Tanzania, United Republic of", "Thailand", "Togo", "Tokelau", "Tonga", "Trinidad and Tobago", "Tunisia", "Turkey", "Turkmenistan", "Turks and Caicos Islands", "Tuvalu", "Uganda", "Ukraine", "United Arab Emirates", "United Kingdom", "United States", "United States Minor Outlying Islands", "Uruguay", "Uzbekistan", "Vanuatu", "Venezuela", "Vietnam", "Virgin Islands (British)", "Virgin Islands (U.S.)", "Wallis and Futuna Islands", "Western Sahara", "Yemen", "Yugoslavia", "Zambia", "Zimbabwe"
384
+                                "Select country", "Afghanistan", "Albania", "Algeria", "American Samoa", "Andorra", "Angola", "Anguilla", "Antarctica", "Antigua and Barbuda", "Argentina", "Armenia", "Aruba", "Australia", "Austria", "Azerbaijan", "Bahamas", "Bahrain", "Bangladesh", "Barbados", "Belarus", "Belgium", "Belize", "Benin", "Bermuda", "Bhutan", "Bolivia", "Bosnia and Herzegowina", "Botswana", "Bouvet Island", "Brazil", "British Indian Ocean Territory", "Brunei Darussalam", "Bulgaria", "Burkina Faso", "Burundi", "Cambodia", "Cameroon", "Canada", "Cape Verde", "Cayman Islands", "Central African Republic", "Chad", "Chile", "China", "Christmas Island", "Cocos (Keeling) Islands", "Colombia", "Comoros", "Congo", "Congo, the Democratic Republic of the", "Cook Islands", "Costa Rica", "Cote d'Ivoire", "Croatia (Hrvatska)", "Cuba", "Cyprus", "Czech Republic", "Denmark", "Djibouti", "Dominica", "Dominican Republic", "East Timor", "Ecuador", "Egypt", "El Salvador", "Equatorial Guinea", "Eritrea", "Estonia", "Ethiopia", "Falkland Islands (Malvinas)", "Faroe Islands", "Fiji", "Finland", "France", "France Metropolitan", "French Guiana", "French Polynesia", "French Southern Territories", "Gabon", "Gambia", "Georgia", "Germany", "Ghana", "Gibraltar", "Greece", "Greenland", "Grenada", "Guadeloupe", "Guam", "Guatemala", "Guinea", "Guinea-Bissau", "Guyana", "Haiti", "Heard and Mc Donald Islands", "Holy See (Vatican City State)", "Honduras", "Hong Kong", "Hungary", "Iceland", "India", "Indonesia", "Iran (Islamic Republic of)", "Iraq", "Ireland", "Israel", "Italy", "Jamaica", "Japan", "Jordan", "Kazakhstan", "Kenya", "Kiribati", "Korea, Democratic People's Republic of", "Korea, Republic of", "Kuwait", "Kyrgyzstan", "Lao, People's Democratic Republic", "Latvia", "Lebanon", "Lesotho", "Liberia", "Libyan Arab Jamahiriya", "Liechtenstein", "Lithuania", "Luxembourg", "Macau", "Macedonia, The Former Yugoslav Republic of", "Madagascar", "Malawi", "Malaysia", "Maldives", "Mali", "Malta", "Marshall Islands", "Martinique", "Mauritania", "Mauritius", "Mayotte", "Mexico", "Micronesia, Federated States of", "Moldova, Republic of", "Monaco", "Mongolia", "Montserrat", "Morocco", "Mozambique", "Myanmar", "Namibia", "Nauru", "Nepal", "Netherlands", "Netherlands Antilles", "New Caledonia", "New Zealand", "Nicaragua", "Niger", "Nigeria", "Niue", "Norfolk Island", "Northern Mariana Islands", "Norway", "Oman", "Pakistan", "Palau", "Panama", "Papua New Guinea", "Paraguay", "Peru", "Philippines", "Pitcairn", "Poland", "Portugal", "Puerto Rico", "Qatar", "Reunion", "Romania", "Russian Federation", "Rwanda", "Saint Kitts and Nevis", "Saint Lucia", "Saint Vincent and the Grenadines", "Samoa", "San Marino", "Sao Tome and Principe", "Saudi Arabia", "Senegal", "Seychelles", "Sierra Leone", "Singapore", "Slovakia (Slovak Republic)", "Slovenia", "Solomon Islands", "Somalia", "South Africa", "South Georgia and the South Sandwich Islands", "Spain", "Sri Lanka", "St. Helena", "St. Pierre and Miquelon", "Sudan", "Suriname", "Svalbard and Jan Mayen Islands", "Swaziland", "Sweden", "Switzerland", "Syrian Arab Republic", "Taiwan, Province of China", "Tajikistan", "Tanzania, United Republic of", "Thailand", "Togo", "Tokelau", "Tonga", "Trinidad and Tobago", "Tunisia", "Turkey", "Turkmenistan", "Turks and Caicos Islands", "Tuvalu", "Uganda", "Ukraine", "United Arab Emirates", "United Kingdom", "United States", "United States Minor Outlying Islands", "Uruguay", "Uzbekistan", "Vanuatu", "Venezuela", "Vietnam", "Virgin Islands (British)", "Virgin Islands (U.S.)", "Wallis and Futuna Islands", "Western Sahara", "Yemen", "Yugoslavia", "Zambia", "Zimbabwe"
385 385
                             );
386 386
 
387 387
                             $countryLength = sizeof($countries);
388 388
                             $i = 0;
389
-                            for($i = 0;$i <= $countryLength; $i++)
389
+                            for ($i = 0; $i <= $countryLength; $i++)
390 390
                             {
391 391
                                 $c = $countries[$i];
392 392
                                 if ($c == $_user['country'])
@@ -399,7 +399,7 @@  discard block
 block discarded – undo
399 399
                                 else
400 400
                                 {
401 401
                                 ?>
402
-                                <option value="<?php echo $c;?>"><?php echo $c; ?></option>
402
+                                <option value="<?php echo $c; ?>"><?php echo $c; ?></option>
403 403
                                 <?php
404 404
                                 }
405 405
                             }
Please login to merge, or discard this patch.
Braces   +6 added lines, -5 removed lines patch added patch discarded remove patch
@@ -313,14 +313,15 @@
 block discarded – undo
313 313
                             for($i = 0;$i <= $countryLength; $i++)
314 314
                             {
315 315
                                 $c = $countries[$i];
316
-                                if ($c == $_user['country'])
317
-                                //country is the same as in database
316
+                                if ($c == $_user['country']) {
317
+                                                                //country is the same as in database
318 318
                                 {
319 319
                                 ?>
320
-                                <option value="<?php echo $c; ?>" selected="selected"><?php echo $c; ?></option>
321
-                                <?php
320
+                                <option value="<?php echo $c;
322 321
                                 }
323
-                                else
322
+                                ?>" selected="selected"><?php echo $c; ?></option>
323
+                                <?php
324
+                                } else
324 325
                                 {
325 326
                                 ?>
326 327
                                 <option value="<?php echo $c;?>"><?php echo $c; ?></option>
Please login to merge, or discard this patch.
web/public/channel.php 3 patches
Braces   +18 added lines, -13 removed lines patch added patch discarded remove patch
@@ -12,11 +12,13 @@  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
-        header("Location: /?userdoesntexist");
19
+    if(!$__user_h->user_exists($_GET['n'])) {
20
+            header("Location: /?userdoesntexist");
21
+    }
20 22
 
21 23
     $_user = $__user_h->fetch_user_username($_GET['n']);
22 24
 
@@ -39,10 +41,11 @@  discard block
 block discarded – undo
39 41
     
40 42
         if (
41 43
               ctype_xdigit($colorCode) &&
42
-              (strlen($colorCode) == 6 || strlen($colorCode) == 3))
43
-                   return true;
44
-    
45
-        else return false;
44
+              (strlen($colorCode) == 6 || strlen($colorCode) == 3)) {
45
+                           return true;
46
+        } else {
47
+            return false;
48
+        }
46 49
     }
47 50
 
48 51
     $_user['subscribers'] = $__user_h->fetch_subs_count($_user['username']);
@@ -74,8 +77,9 @@  discard block
 block discarded – undo
74 77
     if(!check_valid_colorhex($_user['primary_color_text']) && strlen($_user['primary_color_text']) != 6) { $_user['primary_color_text'] = ""; }
75 78
     if(!check_valid_colorhex($_user['2012_bgcolor']) && strlen($_user['2012_bgcolor']) != 6) { $_user['2012_bgcolor'] = ""; }
76 79
 
77
-	if(isset($_SESSION['siteusername']))
78
-    	$__user_i->check_view_channel($_user['username'], @$_SESSION['siteusername']);
80
+	if(isset($_SESSION['siteusername'])) {
81
+	    	$__user_i->check_view_channel($_user['username'], @$_SESSION['siteusername']);
82
+	}
79 83
 
80 84
     if($_SERVER['REQUEST_METHOD'] == 'POST') {
81 85
         $error = array();
@@ -188,8 +192,9 @@  discard block
 block discarded – undo
188 192
 					<div class="channel_customization"><?php require($_SERVER['DOCUMENT_ROOT'] . "/s/mod/channel_customization.php"); ?></div>
189 193
 				<?php } ?>
190 194
 				<?php
191
-					if(empty(trim($_user['bio'])))
192
-						$_user['bio'] = "This user has no description.";
195
+					if(empty(trim($_user['bio']))) {
196
+											$_user['bio'] = "This user has no description.";
197
+					}
193 198
 				?>
194 199
 				<div id="content">
195 200
 					<div class="subscription-menu-expandable subscription-menu-expandable-channels3 yt-rounded ytg-wide hid">
@@ -272,7 +277,7 @@  discard block
 block discarded – undo
272 277
 												<div class="header-stats">
273 278
 													<div class="stat-entry">
274 279
 														<span class="stat-value"><?php echo $_user['subscribers']; ?></span>
275
-														<span class="stat-name"><?php if($_user['subscribers'] == 1){ ?>subscriber<?php }else{ ?>subscribers<?php } ?></span>
280
+														<span class="stat-name"><?php if($_user['subscribers'] == 1){ ?>subscriber<?php } else{ ?>subscribers<?php } ?></span>
276 281
 													</div>
277 282
 													<div class="stat-entry">
278 283
 														<span class="stat-value"><?php echo $_user['views']; ?></span>
Please login to merge, or discard this patch.
Indentation   +50 added lines, -50 removed lines patch added patch discarded remove patch
@@ -12,8 +12,8 @@  discard block
 block discarded – undo
12 12
 <?php $__db_h = new db_helper(); ?>
13 13
 <?php $__time_h = new time_helper(); ?>
14 14
 <?php
15
-	if(isset($_SESSION['siteusername']))
16
-	    $_user_hp = $__user_h->fetch_user_username($_SESSION['siteusername']);
15
+    if(isset($_SESSION['siteusername']))
16
+        $_user_hp = $__user_h->fetch_user_username($_SESSION['siteusername']);
17 17
 
18 18
     if(!$__user_h->user_exists($_GET['n']))
19 19
         header("Location: /?userdoesntexist");
@@ -21,12 +21,12 @@  discard block
 block discarded – undo
21 21
     $_user = $__user_h->fetch_user_username($_GET['n']);
22 22
 
23 23
     $stmt = $__db->prepare("SELECT * FROM bans WHERE username = :username ORDER BY id DESC");
24
-	$stmt->bindParam(":username", $_user['username']);
25
-	$stmt->execute();
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
     }
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
     $_user['2012_bgcolor'] = substr($_user['2012_bgcolor'], 0, 7);
74 74
 
75 75
     $_user['genre'] = strtolower($_user['genre']);
76
-	$_user['subscribed'] = $__user_h->if_subscribed(@$_SESSION['siteusername'], $_user['username']);
76
+    $_user['subscribed'] = $__user_h->if_subscribed(@$_SESSION['siteusername'], $_user['username']);
77 77
 
78 78
     if(!check_valid_colorhex($_user['primary_color']) && strlen($_user['primary_color']) != 6) { $_user['primary_color'] = ""; }
79 79
     if(!check_valid_colorhex($_user['secondary_color']) && strlen($_user['secondary_color']) != 6) { $_user['secondary_color'] = ""; }
@@ -82,8 +82,8 @@  discard block
 block discarded – undo
82 82
     if(!check_valid_colorhex($_user['primary_color_text']) && strlen($_user['primary_color_text']) != 6) { $_user['primary_color_text'] = ""; }
83 83
     if(!check_valid_colorhex($_user['2012_bgcolor']) && strlen($_user['2012_bgcolor']) != 6) { $_user['2012_bgcolor'] = ""; }
84 84
 
85
-	if(isset($_SESSION['siteusername']))
86
-    	$__user_i->check_view_channel($_user['username'], @$_SESSION['siteusername']);
85
+    if(isset($_SESSION['siteusername']))
86
+        $__user_i->check_view_channel($_user['username'], @$_SESSION['siteusername']);
87 87
 
88 88
     if($_SERVER['REQUEST_METHOD'] == 'POST') {
89 89
         $error = array();
@@ -97,11 +97,11 @@  discard block
 block discarded – undo
97 97
         //if(ifBlocked(@$_SESSION['siteusername'], $user['username'], $__db)) { $error = "This user has blocked you!"; $error['status'] = true; } 
98 98
 
99 99
         if(!isset($error['message'])) {
100
-			$text = $_POST['comment'];
100
+            $text = $_POST['comment'];
101 101
             $stmt = $__db->prepare("INSERT INTO profile_comments (toid, author, comment) VALUES (:id, :username, :comment)");
102
-			$stmt->bindParam(":id", $_user['username']);
103
-			$stmt->bindParam(":username", $_SESSION['siteusername']);
104
-			$stmt->bindParam(":comment", $text);
102
+            $stmt->bindParam(":id", $_user['username']);
103
+            $stmt->bindParam(":username", $_SESSION['siteusername']);
104
+            $stmt->bindParam(":comment", $text);
105 105
             $stmt->execute();
106 106
 
107 107
             $_user_update_utils->update_comment_cooldown_time($_SESSION['siteusername']);
@@ -113,10 +113,10 @@  discard block
 block discarded – undo
113 113
     }
114 114
 ?>
115 115
 <?php
116
-	$__server->page_embeds->page_title = "SubRocks - " . htmlspecialchars($_user['username']);
117
-	$__server->page_embeds->page_description = htmlspecialchars($_user['bio']);
118
-	$__server->page_embeds->page_image = "/dynamic/pfp/" . htmlspecialchars($_user['pfp']);
119
-	$__server->page_embeds->page_url = "https://subrock.rocks/";
116
+    $__server->page_embeds->page_title = "SubRocks - " . htmlspecialchars($_user['username']);
117
+    $__server->page_embeds->page_description = htmlspecialchars($_user['bio']);
118
+    $__server->page_embeds->page_image = "/dynamic/pfp/" . htmlspecialchars($_user['pfp']);
119
+    $__server->page_embeds->page_url = "https://subrock.rocks/";
120 120
 ?>
121 121
 <!DOCTYPE html>
122 122
 <html dir="ltr" xmlns:og="http://opengraphprotocol.org/schema/" lang="en">
@@ -148,27 +148,27 @@  discard block
 block discarded – undo
148 148
 				background-image: url(/dynamic/banners/<?php echo $_user['2012_bg']; ?>);
149 149
 				background-repeat: repeat;
150 150
 				<?php
151
-					switch($_user['2012_bgoption']) {
152
-						case "stretch":
153
-						echo "background-size: cover;";
154
-						break;
155
-						case "solid":
156
-						echo "";
157
-						break;
158
-						case "norepeat":
159
-						echo "background-repeat: no-repeat !important;";
160
-						break;
161
-						case "repeatxy":
162
-						echo "background-repeat: repeat;";
163
-						break;
164
-						case "repeaty":
165
-						echo "background-repeat: repeat-y;";
166
-						break;
167
-						case "repeatx":
168
-						echo "background-repeat: repeat-x;";
169
-						break;
170
-					}
171
-				?>
151
+                    switch($_user['2012_bgoption']) {
152
+                        case "stretch":
153
+                        echo "background-size: cover;";
154
+                        break;
155
+                        case "solid":
156
+                        echo "";
157
+                        break;
158
+                        case "norepeat":
159
+                        echo "background-repeat: no-repeat !important;";
160
+                        break;
161
+                        case "repeatxy":
162
+                        echo "background-repeat: repeat;";
163
+                        break;
164
+                        case "repeaty":
165
+                        echo "background-repeat: repeat-y;";
166
+                        break;
167
+                        case "repeatx":
168
+                        echo "background-repeat: repeat-x;";
169
+                        break;
170
+                    }
171
+                ?>
172 172
 			}
173 173
    		</style>
174 174
 		   <script>
@@ -196,9 +196,9 @@  discard block
 block discarded – undo
196 196
 					<div class="channel_customization"><?php require($_SERVER['DOCUMENT_ROOT'] . "/s/mod/channel_customization.php"); ?></div>
197 197
 				<?php } ?>
198 198
 				<?php
199
-					if(empty(trim($_user['bio'])))
200
-						$_user['bio'] = "This user has no description.";
201
-				?>
199
+                    if(empty(trim($_user['bio'])))
200
+                        $_user['bio'] = "This user has no description.";
201
+                ?>
202 202
 				<div id="content">
203 203
 					<div class="subscription-menu-expandable subscription-menu-expandable-channels3 yt-rounded ytg-wide hid">
204 204
 						<div class="content" id="recommended-channels-list"></div>
Please login to merge, or discard this patch.
Spacing   +26 added lines, -26 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
 
@@ -75,28 +75,28 @@  discard block
 block discarded – undo
75 75
     $_user['genre'] = strtolower($_user['genre']);
76 76
 	$_user['subscribed'] = $__user_h->if_subscribed(@$_SESSION['siteusername'], $_user['username']);
77 77
 
78
-    if(!check_valid_colorhex($_user['primary_color']) && strlen($_user['primary_color']) != 6) { $_user['primary_color'] = ""; }
79
-    if(!check_valid_colorhex($_user['secondary_color']) && strlen($_user['secondary_color']) != 6) { $_user['secondary_color'] = ""; }
80
-    if(!check_valid_colorhex($_user['third_color']) && strlen($_user['third_color']) != 6) { $_user['third_color'] = ""; }
81
-    if(!check_valid_colorhex($_user['text_color']) && strlen($_user['text_color']) != 6) { $_user['text_color'] = ""; }
82
-    if(!check_valid_colorhex($_user['primary_color_text']) && strlen($_user['primary_color_text']) != 6) { $_user['primary_color_text'] = ""; }
83
-    if(!check_valid_colorhex($_user['2012_bgcolor']) && strlen($_user['2012_bgcolor']) != 6) { $_user['2012_bgcolor'] = ""; }
78
+    if (!check_valid_colorhex($_user['primary_color']) && strlen($_user['primary_color']) != 6) { $_user['primary_color'] = ""; }
79
+    if (!check_valid_colorhex($_user['secondary_color']) && strlen($_user['secondary_color']) != 6) { $_user['secondary_color'] = ""; }
80
+    if (!check_valid_colorhex($_user['third_color']) && strlen($_user['third_color']) != 6) { $_user['third_color'] = ""; }
81
+    if (!check_valid_colorhex($_user['text_color']) && strlen($_user['text_color']) != 6) { $_user['text_color'] = ""; }
82
+    if (!check_valid_colorhex($_user['primary_color_text']) && strlen($_user['primary_color_text']) != 6) { $_user['primary_color_text'] = ""; }
83
+    if (!check_valid_colorhex($_user['2012_bgcolor']) && strlen($_user['2012_bgcolor']) != 6) { $_user['2012_bgcolor'] = ""; }
84 84
 
85
-	if(isset($_SESSION['siteusername']))
85
+	if (isset($_SESSION['siteusername']))
86 86
     	$__user_i->check_view_channel($_user['username'], @$_SESSION['siteusername']);
87 87
 
88
-    if($_SERVER['REQUEST_METHOD'] == 'POST') {
88
+    if ($_SERVER['REQUEST_METHOD'] == 'POST') {
89 89
         $error = array();
90 90
 
91
-        if(!isset($_SESSION['siteusername'])){ $error['message'] = "you are not logged in"; $error['status'] = true; }
92
-        if(!$_POST['comment']){ $error['message'] = "your comment cannot be blank"; $error['status'] = true; }
93
-        if(strlen($_POST['comment']) > 1000){ $error['message'] = "your comment must be shorter than 1000 characters"; $error['status'] = true; }
91
+        if (!isset($_SESSION['siteusername'])) { $error['message'] = "you are not logged in"; $error['status'] = true; }
92
+        if (!$_POST['comment']) { $error['message'] = "your comment cannot be blank"; $error['status'] = true; }
93
+        if (strlen($_POST['comment']) > 1000) { $error['message'] = "your comment must be shorter than 1000 characters"; $error['status'] = true; }
94 94
         //if(!isset($_POST['g-recaptcha-response'])){ $error['message'] = "captcha validation failed"; $error['status'] = true; }
95 95
         //if(!$_user_insert_utils->validateCaptcha($config['recaptcha_secret'], $_POST['g-recaptcha-response'])) { $error['message'] = "captcha validation failed"; $error['status'] = true; }
96
-        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; }
96
+        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 97
         //if(ifBlocked(@$_SESSION['siteusername'], $user['username'], $__db)) { $error = "This user has blocked you!"; $error['status'] = true; } 
98 98
 
99
-        if(!isset($error['message'])) {
99
+        if (!isset($error['message'])) {
100 100
 			$text = $_POST['comment'];
101 101
             $stmt = $__db->prepare("INSERT INTO profile_comments (toid, author, comment) VALUES (:id, :username, :comment)");
102 102
 			$stmt->bindParam(":id", $_user['username']);
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 
107 107
             $_user_update_utils->update_comment_cooldown_time($_SESSION['siteusername']);
108 108
 
109
-            if(@$_SESSION['siteusername'] != $_user['username']) { 
109
+            if (@$_SESSION['siteusername'] != $_user['username']) { 
110 110
                 $_user_insert_utils->send_message($_user['username'], "New comment", 'I commented "' . $_POST['comment'] . '" on your profile!', $_SESSION['siteusername']);
111 111
             }
112 112
         }
@@ -144,11 +144,11 @@  discard block
 block discarded – undo
144 144
 		<link rel="stylesheet" href="/yt/cssbin/www-extra.css">
145 145
 		<style>
146 146
 			#content-container {
147
-				background-color: <?php echo $_user['primary_color'];  ?>;
147
+				background-color: <?php echo $_user['primary_color']; ?>;
148 148
 				background-image: url(/dynamic/banners/<?php echo $_user['2012_bg']; ?>);
149 149
 				background-repeat: repeat;
150 150
 				<?php
151
-					switch($_user['2012_bgoption']) {
151
+					switch ($_user['2012_bgoption']) {
152 152
 						case "stretch":
153 153
 						echo "background-size: cover;";
154 154
 						break;
@@ -192,11 +192,11 @@  discard block
 block discarded – undo
192 192
 			<div id="masthead-container"><?php require($_SERVER['DOCUMENT_ROOT'] . "/s/mod/header.php"); ?></div>
193 193
 			<div id="content-container">
194 194
 				<!-- begin content -->
195
-				<?php if(isset($_SESSION['siteusername']) && $_user['username'] == $_SESSION['siteusername']) { ?>
195
+				<?php if (isset($_SESSION['siteusername']) && $_user['username'] == $_SESSION['siteusername']) { ?>
196 196
 					<div class="channel_customization"><?php require($_SERVER['DOCUMENT_ROOT'] . "/s/mod/channel_customization.php"); ?></div>
197 197
 				<?php } ?>
198 198
 				<?php
199
-					if(empty(trim($_user['bio'])))
199
+					if (empty(trim($_user['bio'])))
200 200
 						$_user['bio'] = "This user has no description.";
201 201
 				?>
202 202
 				<div id="content">
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
 												<h1><?php echo htmlspecialchars($_user['username']); ?></h1>
252 252
 											</div>
253 253
 											<div class="upper-left-section enable-fancy-subscribe-button">
254
-												<?php if($_user['username'] != @$_SESSION['siteusername']) { ?>
254
+												<?php if ($_user['username'] != @$_SESSION['siteusername']) { ?>
255 255
 													<div class="yt-subscription-button-hovercard yt-uix-hovercard">
256 256
 														<button 
257 257
 															href="#" 
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
 															title="" 
260 260
 															id="subscribe-button"
261 261
 															type="button" 
262
-															class="yt-subscription-button <?php if($_user['subscribed']) { echo "subscribed "; } ?>  yt-uix-button yt-uix-button-subscription yt-uix-tooltip" 
262
+															class="yt-subscription-button <?php if ($_user['subscribed']) { echo "subscribed "; } ?>  yt-uix-button yt-uix-button-subscription yt-uix-tooltip" 
263 263
 															role="button"><span class="yt-uix-button-icon-wrapper"><img class="yt-uix-button-icon yt-uix-button-icon-subscribe" 
264 264
 															src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt=""></span><span class="yt-uix-button-content">  <span class="subscribe-label">Subscribe</span>
265 265
 														<span class="subscribed-label">Subscribed</span>
@@ -275,7 +275,7 @@  discard block
 block discarded – undo
275 275
 												<?php } else { ?>
276 276
 
277 277
 												<?php } ?>
278
-												<?php if($__user_h->if_partner($_user['username'])) { ?>
278
+												<?php if ($__user_h->if_partner($_user['username'])) { ?>
279 279
 													<img style="width: 29px;vertical-align: middle;margin-left: 10px;" title="This user is a SubRocks partner" src="/yt/imgbin/RenderedImage.png">
280 280
 												<?php } ?>
281 281
 											</div>
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
 												<div class="header-stats">
284 284
 													<div class="stat-entry">
285 285
 														<span class="stat-value"><?php echo $_user['subscribers']; ?></span>
286
-														<span class="stat-name"><?php if($_user['subscribers'] == 1){ ?>subscriber<?php }else{ ?>subscribers<?php } ?></span>
286
+														<span class="stat-name"><?php if ($_user['subscribers'] == 1) { ?>subscriber<?php } else { ?>subscribers<?php } ?></span>
287 287
 													</div>
288 288
 													<div class="stat-entry">
289 289
 														<span class="stat-value"><?php echo $_user['views']; ?></span>
@@ -328,7 +328,7 @@  discard block
 block discarded – undo
328 328
 									</div>
329 329
 								</div>
330 330
 							</div>
331
-                            <?php if($_user['featured'] != "None") { $video = $__video_h->fetch_video_rid($_user['featured']); } else { $_user['featured'] = false; } ?>
331
+                            <?php if ($_user['featured'] != "None") { $video = $__video_h->fetch_video_rid($_user['featured']); } else { $_user['featured'] = false; } ?>
332 332
 							<div id="branded-page-body">
333 333
 								<?php require($_SERVER['DOCUMENT_ROOT'] . "/s/mod/channel_" . $_user['layout'] . ".php"); ?>
334 334
 							</div>
Please login to merge, or discard this patch.
web/public/s/mod/sidebar_admin.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,8 +39,8 @@
 block discarded – undo
39 39
 ?>
40 40
 <div id="browse-side-column" class="ytg-2col ytg-last">
41 41
     <ol class="navigation-menu">
42
-        <?php foreach($__tabs as $_tab) { 
43
-            if($_SERVER['REQUEST_URI'] != $_tab->url)
42
+        <?php foreach ($__tabs as $_tab) { 
43
+            if ($_SERVER['REQUEST_URI'] != $_tab->url)
44 44
                 $_tab->selected = true;
45 45
             ?>
46 46
             <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/d/channel_update.php 2 patches
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -174,8 +174,9 @@  discard block
 block discarded – undo
174 174
         if(!empty($_POST['solidcolor'])) {
175 175
             $__user_u->update_row($_SESSION['siteusername'], "2012_bgoption", $_POST['bgoption']);
176 176
 
177
-            if($_POST['bgoption'] == "solid")
178
-                $__user_u->update_row($_SESSION['siteusername'], "2012_bg", "");
177
+            if($_POST['bgoption'] == "solid") {
178
+                            $__user_u->update_row($_SESSION['siteusername'], "2012_bg", "");
179
+            }
179 180
 
180 181
             $__user_u->update_row($_SESSION['siteusername'], "primary_color", $_POST['solidcolor']);
181 182
         }
@@ -225,8 +226,9 @@  discard block
 block discarded – undo
225 226
         }
226 227
 
227 228
         if(!empty($_POST['layout_channel'])) {
228
-            if($_POST['layout_channel'] == "feed" || $_POST['layout_channel'] == "featured" || $_POST['layout_channel'] == "playlists")
229
-                $__user_u->update_row($_SESSION['siteusername'], "layout", $_POST['layout_channel']);
229
+            if($_POST['layout_channel'] == "feed" || $_POST['layout_channel'] == "featured" || $_POST['layout_channel'] == "playlists") {
230
+                            $__user_u->update_row($_SESSION['siteusername'], "layout", $_POST['layout_channel']);
231
+            }
230 232
         }
231 233
 
232 234
     if(!empty($_POST['bgoptionset'])) {
Please login to merge, or discard this patch.
Spacing   +45 added lines, -45 removed lines patch added patch discarded remove patch
@@ -16,8 +16,8 @@  discard block
 block discarded – undo
16 16
     }
17 17
 
18 18
 
19
-        if($_SERVER['REQUEST_METHOD'] == 'POST' && @$_GET['n']) {
20
-            if(!empty($_GET["n"]) && $_GET['n'] == "pfp") {
19
+        if ($_SERVER['REQUEST_METHOD'] == 'POST' && @$_GET['n']) {
20
+            if (!empty($_GET["n"]) && $_GET['n'] == "pfp") {
21 21
                 $target_dir = "../dynamic/pfp/";
22 22
                 $imageFileType = strtolower(pathinfo($_FILES["file"]["name"], PATHINFO_EXTENSION));
23 23
                 $target_name = md5_file($_FILES["file"]["tmp_name"]) . "." . $imageFileType;
@@ -27,8 +27,8 @@  discard block
 block discarded – undo
27 27
                 $uploadOk = true;
28 28
                 $movedFile = false;
29 29
         
30
-                if($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg"
31
-                    && $imageFileType != "gif" ) {
30
+                if ($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg"
31
+                    && $imageFileType != "gif") {
32 32
                     $fileerror = 'unsupported file type. must be jpg, png, jpeg, or gif';
33 33
                     $uploadOk = false;
34 34
                     goto skip;
@@ -51,8 +51,8 @@  discard block
 block discarded – undo
51 51
                     }
52 52
                 }
53 53
             }
54
-        } else if($_SERVER['REQUEST_METHOD'] == 'POST' && @$_FILES['backgroundbgset']) {
55
-            if(!empty($_FILES["backgroundbgset"]["name"])) {
54
+        } else if ($_SERVER['REQUEST_METHOD'] == 'POST' && @$_FILES['backgroundbgset']) {
55
+            if (!empty($_FILES["backgroundbgset"]["name"])) {
56 56
                 $target_dir = "../dynamic/banners/";
57 57
                 $imageFileType = strtolower(pathinfo($_FILES["backgroundbgset"]["name"], PATHINFO_EXTENSION));
58 58
                 $target_name = md5_file($_FILES["backgroundbgset"]["tmp_name"]) . "." . $imageFileType;
@@ -62,14 +62,14 @@  discard block
 block discarded – undo
62 62
                 $uploadOk = true;
63 63
                 $movedFile = false;
64 64
     
65
-                if($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg"
66
-                    && $imageFileType != "gif" ) {
65
+                if ($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg"
66
+                    && $imageFileType != "gif") {
67 67
                     $fileerror = 'unsupported file type. must be jpg, png, jpeg, or gif';
68 68
                     $uploadOk = false;
69 69
                     goto skip;
70 70
                 }
71 71
     
72
-                if($uploadOk) { 
72
+                if ($uploadOk) { 
73 73
                     if (file_exists($target_file)) {
74 74
                         $movedFile = true;
75 75
                     } else {
@@ -85,9 +85,9 @@  discard block
 block discarded – undo
85 85
                     }
86 86
                 }
87 87
             }
88
-        } else if($_SERVER['REQUEST_METHOD'] == 'POST' && @$_FILES['watchsubset']) {
88
+        } else if ($_SERVER['REQUEST_METHOD'] == 'POST' && @$_FILES['watchsubset']) {
89 89
             echo "asdas";
90
-            if(!empty($_FILES["watchsubset"]["name"])) {
90
+            if (!empty($_FILES["watchsubset"]["name"])) {
91 91
                 echo "asdas";
92 92
 
93 93
                 $target_dir = "../dynamic/banners/";
@@ -99,14 +99,14 @@  discard block
 block discarded – undo
99 99
                 $uploadOk = true;
100 100
                 $movedFile = false;
101 101
     
102
-                if($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg"
103
-                    && $imageFileType != "gif" ) {
102
+                if ($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg"
103
+                    && $imageFileType != "gif") {
104 104
                     $fileerror = 'unsupported file type. must be jpg, png, jpeg, or gif';
105 105
                     $uploadOk = false;
106 106
                     goto skip;
107 107
                 }
108 108
     
109
-                if($uploadOk) { 
109
+                if ($uploadOk) { 
110 110
                     if (file_exists($target_file)) {
111 111
                         $movedFile = true;
112 112
                     } else {
@@ -122,8 +122,8 @@  discard block
 block discarded – undo
122 122
                     }
123 123
                 }
124 124
             }
125
-        } else if($_SERVER['REQUEST_METHOD'] == 'POST' && @$_POST['bannerset']) {
126
-            if(!empty($_FILES["file"]["name"])) {
125
+        } else if ($_SERVER['REQUEST_METHOD'] == 'POST' && @$_POST['bannerset']) {
126
+            if (!empty($_FILES["file"]["name"])) {
127 127
                 $target_dir = "../dynamic/banners/";
128 128
                 $imageFileType = strtolower(pathinfo($_FILES["file"]["name"], PATHINFO_EXTENSION));
129 129
                 $target_name = md5_file($_FILES["file"]["tmp_name"]) . "." . $imageFileType;
@@ -133,14 +133,14 @@  discard block
 block discarded – undo
133 133
                 $uploadOk = true;
134 134
                 $movedFile = false;
135 135
     
136
-                if($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg"
137
-                    && $imageFileType != "gif" ) {
136
+                if ($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg"
137
+                    && $imageFileType != "gif") {
138 138
                     $fileerror = 'unsupported file type. must be jpg, png, jpeg, or gif';
139 139
                     $uploadOk = false;
140 140
                     goto skip;
141 141
                 }
142 142
     
143
-                if($uploadOk) { 
143
+                if ($uploadOk) { 
144 144
                     if (file_exists($target_file)) {
145 145
                         $movedFile = true;
146 146
                     } else {
@@ -156,8 +156,8 @@  discard block
 block discarded – undo
156 156
                     }
157 157
                 } 
158 158
             }
159
-        } else if($_SERVER['REQUEST_METHOD'] == 'POST' && @$_FILES['videopagebanner']) {
160
-            if(!empty($_FILES["videopagebanner"]["name"])) {
159
+        } else if ($_SERVER['REQUEST_METHOD'] == 'POST' && @$_FILES['videopagebanner']) {
160
+            if (!empty($_FILES["videopagebanner"]["name"])) {
161 161
                 $target_dir = "/dynamic/subscribe/";
162 162
                 $imageFileType = strtolower(pathinfo($_FILES["videopagebanner"]["name"], PATHINFO_EXTENSION));
163 163
                 $target_name = md5_file($_FILES["videopagebanner"]["tmp_name"]) . "." . $imageFileType;
@@ -167,14 +167,14 @@  discard block
 block discarded – undo
167 167
                 $uploadOk = true;
168 168
                 $movedFile = false;
169 169
     
170
-                if($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg"
171
-                    && $imageFileType != "gif" ) {
170
+                if ($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg"
171
+                    && $imageFileType != "gif") {
172 172
                     $fileerror = 'unsupported file type. must be jpg, png, jpeg, or gif';
173 173
                     $uploadOk = false;
174 174
                     goto skip;
175 175
                 }
176 176
     
177
-                if($uploadOk) { 
177
+                if ($uploadOk) { 
178 178
                     if (file_exists($target_file)) {
179 179
                         $movedFile = true;
180 180
                     } else {
@@ -192,81 +192,81 @@  discard block
 block discarded – undo
192 192
             }
193 193
         }
194 194
 
195
-        if(!empty($_POST['bio'])) { 
195
+        if (!empty($_POST['bio'])) { 
196 196
             $__user_u->update_row($_SESSION['siteusername'], "bio", $_POST['bio']);
197 197
         }
198 198
 
199
-        if(!empty($_POST['featuredchannels'])) { 
199
+        if (!empty($_POST['featuredchannels'])) { 
200 200
             $__user_u->update_row($_SESSION['siteusername'], "featured_channels", $_POST['featuredchannels']);
201 201
         }
202 202
     
203
-        if(!empty($_POST['css'])) {
203
+        if (!empty($_POST['css'])) {
204 204
             $__user_u->update_row($_SESSION['siteusername'], "css", $_POST['css']);
205 205
         }
206 206
 
207
-        if(!empty($_POST['videoid'])) {
207
+        if (!empty($_POST['videoid'])) {
208 208
             $__user_u->update_row($_SESSION['siteusername'], "featured", $_POST['videoid']);
209 209
         }
210 210
 
211
-        if(!empty($_POST['solidcolor'])) {
211
+        if (!empty($_POST['solidcolor'])) {
212 212
             $__user_u->update_row($_SESSION['siteusername'], "2012_bgoption", $_POST['bgoption']);
213 213
 
214
-            if($_POST['bgoption'] == "solid")
214
+            if ($_POST['bgoption'] == "solid")
215 215
                 $__user_u->update_row($_SESSION['siteusername'], "2012_bg", "");
216 216
 
217 217
             $__user_u->update_row($_SESSION['siteusername'], "primary_color", $_POST['solidcolor']);
218 218
         }
219 219
 
220
-        if(!empty($_POST['transparency'])) {
220
+        if (!empty($_POST['transparency'])) {
221 221
             $__user_u->update_row($_SESSION['siteusername'], "transparency", $_POST['transparency']);
222 222
         }
223 223
 
224
-        if(!empty($_POST['genre'])) {
224
+        if (!empty($_POST['genre'])) {
225 225
             $__user_u->update_row($_SESSION['siteusername'], "genre", $_POST['genre']);
226 226
         }
227 227
 
228
-        if(!empty($_POST['bordercolor'])) {
228
+        if (!empty($_POST['bordercolor'])) {
229 229
             $__user_u->update_row($_SESSION['siteusername'], "border_color", $_POST['bordercolor']);
230 230
         }
231 231
 
232
-        if(!empty($_POST['country'])) {
232
+        if (!empty($_POST['country'])) {
233 233
             $__user_u->update_row($_SESSION['siteusername'], "country", $_POST['country']);
234 234
         } // duplicate?
235 235
 
236
-        if(!empty($_POST['header'])) {
236
+        if (!empty($_POST['header'])) {
237 237
             $__user_u->update_row($_SESSION['siteusername'], "custom_header", $_POST['header']);
238 238
         }
239 239
 
240
-        if(!empty($_POST['customtext'])) {
240
+        if (!empty($_POST['customtext'])) {
241 241
             $__user_u->update_row($_SESSION['siteusername'], "custom_text", $_POST['customtext']);
242 242
         }
243 243
 
244
-        if(!empty($_POST['country'])) {
244
+        if (!empty($_POST['country'])) {
245 245
             $__user_u->update_row($_SESSION['siteusername'], "custom_text", $_POST['country']);
246 246
         } // duplicate?
247 247
 
248
-        if(!empty($_POST['website'])) {
248
+        if (!empty($_POST['website'])) {
249 249
             $__user_u->update_row($_SESSION['siteusername'], "website", $_POST['website']);
250 250
         }
251 251
     
252
-        if(!empty($_POST['channelboxcolor'])) {
252
+        if (!empty($_POST['channelboxcolor'])) {
253 253
             $__user_u->update_row($_SESSION['siteusername'], "secondary_color", $_POST['channelboxcolor']);
254 254
         }
255 255
 
256
-        if(!empty($_POST['backgroundcolor'])) {
256
+        if (!empty($_POST['backgroundcolor'])) {
257 257
             $__user_u->update_row($_SESSION['siteusername'], "third_color", $_POST['backgroundcolor']);
258 258
         }
259 259
 
260
-        if(!empty($_POST['textmaincolor'])) {
260
+        if (!empty($_POST['textmaincolor'])) {
261 261
             $__user_u->update_row($_SESSION['siteusername'], "primary_color_text", $_POST['textmaincolor']);
262 262
         }
263 263
 
264
-        if(!empty($_POST['layout_channel'])) {
265
-            if($_POST['layout_channel'] == "feed" || $_POST['layout_channel'] == "featured" || $_POST['layout_channel'] == "playlists")
264
+        if (!empty($_POST['layout_channel'])) {
265
+            if ($_POST['layout_channel'] == "feed" || $_POST['layout_channel'] == "featured" || $_POST['layout_channel'] == "playlists")
266 266
                 $__user_u->update_row($_SESSION['siteusername'], "layout", $_POST['layout_channel']);
267 267
         }
268 268
 
269
-    if(!empty($_POST['bgoptionset'])) {
269
+    if (!empty($_POST['bgoptionset'])) {
270 270
         $bgoption = $_POST['bgoption'];
271 271
         $bgcolor = $_POST['solidcolor'];
272 272
         $default = "default.png";
@@ -275,7 +275,7 @@  discard block
 block discarded – undo
275 275
         
276 276
         $__user_u->update_row($_SESSION['siteusername'], "2012_bgcolor", $bgcolor);
277 277
 
278
-        if($bgoption == "solid") {
278
+        if ($bgoption == "solid") {
279 279
             $__user_u->update_row($_SESSION['siteusername'], "2012_bg ", $default);
280 280
         }
281 281
     }
Please login to merge, or discard this patch.
web/public/s/mod/channel_featured.php 2 patches
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.
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@  discard block
 block discarded – undo
2 2
 								<div class="channel-tab-content channel-layout-two-column selected blogger-template">
3 3
 									<div class="tab-content-body">
4 4
 										<div class="primary-pane">
5
-                                            <?php if($_user['featured'] != false && $__video_h->video_exists($_user['featured'])) { ?>
5
+                                            <?php if ($_user['featured'] != false && $__video_h->video_exists($_user['featured'])) { ?>
6 6
 											<div class="channels-featured-video channel-module yt-uix-c3-module-container has-visible-edge">
7 7
 												<div class="module-view featured-video-view-module">
8 8
 												<div id="watch-video" >
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 													<div class="playlist-info">
60 60
 														<h2>Uploaded videos</h2>
61 61
 														<div class="yt-horizontal-rule "><span class="first"></span><span class="second"></span><span class="third"></span></div>
62
-														<?php if($_user['videos'] == 0) { ?>
62
+														<?php if ($_user['videos'] == 0) { ?>
63 63
 															<h4>This user has not uploaded a video yet.</h4>
64 64
 														<?php } ?>
65 65
 													</div>
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
                                                             $stmt = $__db->prepare("SELECT * FROM videos WHERE author = :username ORDER BY id DESC LIMIT 20");
69 69
                                                             $stmt->bindParam(":username", $_user['username']);
70 70
                                                             $stmt->execute();
71
-                                                            while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { 
71
+                                                            while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) { 
72 72
                                                         ?>
73 73
 														<li class="blogger-video">
74 74
 															<div class="video yt-tile-visible">
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
 														</div>
151 151
 														<hr class="yt-horizontal-rule ">
152 152
 													</div>
153
-													<?php if(!empty($_user['website'])) { ?>
153
+													<?php if (!empty($_user['website'])) { ?>
154 154
 														<div class="user-profile-item">
155 155
 															<div class="yt-c3-profile-custom-url field-container ">
156 156
 																<a href="<?php echo addhttp(htmlspecialchars($_user['website'])); ?>" rel="me nofollow" target="_blank" title="<?php echo htmlspecialchars($_user['website']); ?>" class="yt-uix-redirect-link">
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
 															<h5>Country</h5>
200 200
 															<span class="value"><?php echo htmlspecialchars($_user['country']); ?></span>
201 201
 														</div>
202
-														<?php if($_user['genre'] != "none") { ?>
202
+														<?php if ($_user['genre'] != "none") { ?>
203 203
 															<div class="user-profile-item ">
204 204
 																<h5>Channel Genre</h5>
205 205
 																<span class="value"><?php echo htmlspecialchars(ucfirst($_user['genre'])); ?></span>
@@ -211,16 +211,16 @@  discard block
 block discarded – undo
211 211
 											</div>
212 212
 											<div class="channel-module other-channels yt-uix-c3-module-container other-channels-compact">
213 213
 												<?php $_user['featured_channels'] = explode(",", $_user['featured_channels']); ?>
214
-												<?php if(count($_user['featured_channels']) != 0) { ?>
214
+												<?php if (count($_user['featured_channels']) != 0) { ?>
215 215
 												<div class="module-view other-channels-view">
216
-													<h2 <?php if(@$_SESSION['siteusername'] == $_user['username']) { ?>style="display: inline-block;position: relative;bottom: 10px;"<?php } ?>>Featured Channels</h2> 
217
-													<?php if(@$_SESSION['siteusername'] == $_user['username']) { 
216
+													<h2 <?php if (@$_SESSION['siteusername'] == $_user['username']) { ?>style="display: inline-block;position: relative;bottom: 10px;"<?php } ?>>Featured Channels</h2> 
217
+													<?php if (@$_SESSION['siteusername'] == $_user['username']) { 
218 218
 														echo "<a href='#' style='float:right;font-size:11px;color:black;' onclick=';open_featured_channels();return false;'>edit</a>"; 
219 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)) {
222
+															foreach ($_user['featured_channels'] as $user) {
223
+																if ($__user_h->user_exists($user)) {
224 224
 														?>
225 225
 															<li class="yt-tile-visible yt-uix-tile">
226 226
 																<div class="channel-summary clearfix channel-summary-compact">
@@ -249,13 +249,13 @@  discard block
 block discarded – undo
249 249
 												$stmt->bindParam(":search", $_user['username']);
250 250
 												$stmt->execute();
251 251
 
252
-												if($stmt->rowCount() != 0) {
252
+												if ($stmt->rowCount() != 0) {
253 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)) { 
258
+														while ($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { 
259 259
 															$playlist['videos'] = json_decode($playlist['videos']);
260 260
 														?> 
261 261
 															<div class="playlist yt-tile-visible yt-uix-tile">
Please login to merge, or discard this patch.
web/public/s/mod/channel_playlists.php 2 patches
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@  discard block
 block discarded – undo
2 2
 								<div class="channel-tab-content channel-layout-two-column selected blogger-template">
3 3
 									<div class="tab-content-body">
4 4
 										<div class="primary-pane">
5
-                                            <?php if($_user['featured'] != false && $__video_h->video_exists($_user['featured'])) { ?>
5
+                                            <?php if ($_user['featured'] != false && $__video_h->video_exists($_user['featured'])) { ?>
6 6
 											<div class="channels-featured-video channel-module yt-uix-c3-module-container has-visible-edge">
7 7
 												<div class="module-view featured-video-view-module">
8 8
 												<div id="watch-video" >
@@ -54,8 +54,8 @@  discard block
 block discarded – undo
54 54
                                                         $stmt->bindParam(":search", $_user['username']);
55 55
                                                         $stmt->execute();
56 56
 
57
-                                                        if($stmt->rowCount() != 0) {
58
-                                                            while($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { 
57
+                                                        if ($stmt->rowCount() != 0) {
58
+                                                            while ($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { 
59 59
                                                                 $playlist['videos'] = json_decode($playlist['videos']);
60 60
                                                     ?>
61 61
                                                     <div class="playlist yt-tile-visible yt-uix-tile">
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
 														</div>
127 127
 														<hr class="yt-horizontal-rule ">
128 128
 													</div>
129
-													<?php if(!empty($_user['website'])) { ?>
129
+													<?php if (!empty($_user['website'])) { ?>
130 130
 														<div class="user-profile-item">
131 131
 															<div class="yt-c3-profile-custom-url field-container ">
132 132
 																<a href="<?php echo addhttp(htmlspecialchars($_user['website'])); ?>" rel="me nofollow" target="_blank" title="<?php echo htmlspecialchars($_user['website']); ?>" class="yt-uix-redirect-link">
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
 															<h5>Country</h5>
176 176
 															<span class="value"><?php echo htmlspecialchars($_user['country']); ?></span>
177 177
 														</div>
178
-														<?php if($_user['genre'] != "none") { ?>
178
+														<?php if ($_user['genre'] != "none") { ?>
179 179
 															<div class="user-profile-item ">
180 180
 																<h5>Channel Genre</h5>
181 181
 																<span class="value"><?php echo htmlspecialchars(ucfirst($_user['genre'])); ?></span>
@@ -187,16 +187,16 @@  discard block
 block discarded – undo
187 187
 											</div>
188 188
 											<div class="channel-module other-channels yt-uix-c3-module-container other-channels-compact">
189 189
 												<?php $_user['featured_channels'] = explode(",", $_user['featured_channels']); ?>
190
-												<?php if(count($_user['featured_channels']) != 0) { ?>
190
+												<?php if (count($_user['featured_channels']) != 0) { ?>
191 191
 												<div class="module-view other-channels-view">
192
-													<h2 <?php if(@$_SESSION['siteusername'] == $_user['username']) { ?>style="display: inline-block;position: relative;bottom: 10px;"<?php } ?>>Featured Channels</h2> 
193
-													<?php if(@$_SESSION['siteusername'] == $_user['username']) { 
192
+													<h2 <?php if (@$_SESSION['siteusername'] == $_user['username']) { ?>style="display: inline-block;position: relative;bottom: 10px;"<?php } ?>>Featured Channels</h2> 
193
+													<?php if (@$_SESSION['siteusername'] == $_user['username']) { 
194 194
 														echo "<a href='#' style='float:right;font-size:11px;color:black;' onclick=';open_featured_channels();return false;'>edit</a>"; 
195 195
 													} ?>
196 196
 													<ul class="channel-summary-list ">
197 197
 														<?php 
198
-															foreach($_user['featured_channels'] as $user) {
199
-																if($__user_h->user_exists($user)) {
198
+															foreach ($_user['featured_channels'] as $user) {
199
+																if ($__user_h->user_exists($user)) {
200 200
 														?>
201 201
 															<li class="yt-tile-visible yt-uix-tile">
202 202
 																<div class="channel-summary clearfix channel-summary-compact">
@@ -225,13 +225,13 @@  discard block
 block discarded – undo
225 225
 												$stmt->bindParam(":search", $_user['username']);
226 226
 												$stmt->execute();
227 227
 
228
-												if($stmt->rowCount() != 0) {
228
+												if ($stmt->rowCount() != 0) {
229 229
 											?>
230 230
 												<div class="playlists-narrow channel-module yt-uix-c3-module-container">
231 231
 													<div class="module-view gh-featured">
232 232
 														<h2>Featured Playlists</h2>     
233 233
 														<?php
234
-														while($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { 
234
+														while ($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { 
235 235
 															$playlist['videos'] = json_decode($playlist['videos']);
236 236
 														?> 
237 237
 															<div class="playlist yt-tile-visible yt-uix-tile">
Please login to merge, or discard this 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/das_captcha.php 2 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -9,8 +9,7 @@
 block discarded – undo
9 9
 if (isset($_GET['next']))
10 10
 {
11 11
     $next = $_GET['next'];
12
-}
13
-else
12
+} else
14 13
 {
15 14
     $next = "/";
16 15
 }
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
         <div id="page" class="">
50 50
         <!-- begin pagetop -->
51 51
   
52
-        <div id="masthead-container"><?php require($_SERVER['DOCUMENT_ROOT'] . "/s/mod/header.php");?> </div>
52
+        <div id="masthead-container"><?php require($_SERVER['DOCUMENT_ROOT'] . "/s/mod/header.php"); ?> </div>
53 53
   <!-- end pagetop -->
54 54
   <!-- begin pagemiddle -->
55 55
   <div id="content-container">
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
       
59 59
   <p class="largeText">Sorry for the interruption. We have been receiving a large volume of requests from your network. To continue with your SubRocks experience, please enter the verification code below.</p>
60 60
 
61
-<form method="post" action="/das_captcha?next=<?php echo $next;?>">
61
+<form method="post" action="/das_captcha?next=<?php echo $next; ?>">
62 62
 <script type="text/javascript" src="/s/js/captcha.js"></script>
63 63
 <noscript>
64 64
 You need JavaScript to pass the captcha!
Please login to merge, or discard this patch.