Test Failed
Push — main ( f33069...16470f )
by chief
03:10
created
web/public/channel_feed.php 1 patch
Spacing   +33 added lines, -33 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']);
@@ -68,28 +68,28 @@  discard block
 block discarded – undo
68 68
     $_user['genre'] = strtolower($_user['genre']);
69 69
     $_user['subscribed'] = $__user_h->if_subscribed(@$_SESSION['siteusername'], $_user['username']);
70 70
 
71
-    if(!check_valid_colorhex($_user['primary_color']) && strlen($_user['primary_color']) != 6) { $_user['primary_color'] = ""; }
72
-    if(!check_valid_colorhex($_user['secondary_color']) && strlen($_user['secondary_color']) != 6) { $_user['secondary_color'] = ""; }
73
-    if(!check_valid_colorhex($_user['third_color']) && strlen($_user['third_color']) != 6) { $_user['third_color'] = ""; }
74
-    if(!check_valid_colorhex($_user['text_color']) && strlen($_user['text_color']) != 6) { $_user['text_color'] = ""; }
75
-    if(!check_valid_colorhex($_user['primary_color_text']) && strlen($_user['primary_color_text']) != 6) { $_user['primary_color_text'] = ""; }
76
-    if(!check_valid_colorhex($_user['2009_bgcolor']) && strlen($_user['2009_bgcolor']) != 6) { $_user['2009_bgcolor'] = ""; }
71
+    if (!check_valid_colorhex($_user['primary_color']) && strlen($_user['primary_color']) != 6) { $_user['primary_color'] = ""; }
72
+    if (!check_valid_colorhex($_user['secondary_color']) && strlen($_user['secondary_color']) != 6) { $_user['secondary_color'] = ""; }
73
+    if (!check_valid_colorhex($_user['third_color']) && strlen($_user['third_color']) != 6) { $_user['third_color'] = ""; }
74
+    if (!check_valid_colorhex($_user['text_color']) && strlen($_user['text_color']) != 6) { $_user['text_color'] = ""; }
75
+    if (!check_valid_colorhex($_user['primary_color_text']) && strlen($_user['primary_color_text']) != 6) { $_user['primary_color_text'] = ""; }
76
+    if (!check_valid_colorhex($_user['2009_bgcolor']) && strlen($_user['2009_bgcolor']) != 6) { $_user['2009_bgcolor'] = ""; }
77 77
 
78
-	if(isset($_SESSION['siteusername']))
78
+	if (isset($_SESSION['siteusername']))
79 79
     	$__user_i->check_view_channel($_user['username'], @$_SESSION['siteusername']);
80 80
 
81
-    if($_SERVER['REQUEST_METHOD'] == 'POST') {
81
+    if ($_SERVER['REQUEST_METHOD'] == 'POST') {
82 82
         $error = array();
83 83
 
84
-        if(!isset($_SESSION['siteusername'])){ $error['message'] = "you are not logged in"; $error['status'] = true; }
85
-        if(!$_POST['comment']){ $error['message'] = "your comment cannot be blank"; $error['status'] = true; }
86
-        if(strlen($_POST['comment']) > 1000){ $error['message'] = "your comment must be shorter than 1000 characters"; $error['status'] = true; }
84
+        if (!isset($_SESSION['siteusername'])) { $error['message'] = "you are not logged in"; $error['status'] = true; }
85
+        if (!$_POST['comment']) { $error['message'] = "your comment cannot be blank"; $error['status'] = true; }
86
+        if (strlen($_POST['comment']) > 1000) { $error['message'] = "your comment must be shorter than 1000 characters"; $error['status'] = true; }
87 87
         //if(!isset($_POST['g-recaptcha-response'])){ $error['message'] = "captcha validation failed"; $error['status'] = true; }
88 88
         //if(!$_user_insert_utils->validateCaptcha($config['recaptcha_secret'], $_POST['g-recaptcha-response'])) { $error['message'] = "captcha validation failed"; $error['status'] = true; }
89
-        if($__user_h->if_cooldown($_SESSION['siteusername'])) { $error['message'] = "You are on a cooldown! Wait for a minute before posting another comment."; $error['status'] = true; }
89
+        if ($__user_h->if_cooldown($_SESSION['siteusername'])) { $error['message'] = "You are on a cooldown! Wait for a minute before posting another comment."; $error['status'] = true; }
90 90
         //if(ifBlocked(@$_SESSION['siteusername'], $user['username'], $__db)) { $error = "This user has blocked you!"; $error['status'] = true; } 
91 91
 
92
-        if(!isset($error['message'])) {
92
+        if (!isset($error['message'])) {
93 93
 			$text = $_POST['comment'];
94 94
             $stmt = $__db->prepare("INSERT INTO profile_comments (toid, author, comment) VALUES (:id, :username, :comment)");
95 95
 			$stmt->bindParam(":id", $_user['username']);
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 
100 100
             $_user_update_utils->update_comment_cooldown_time($_SESSION['siteusername']);
101 101
 
102
-            if(@$_SESSION['siteusername'] != $_user['username']) { 
102
+            if (@$_SESSION['siteusername'] != $_user['username']) { 
103 103
                 $_user_insert_utils->send_message($_user['username'], "New comment", 'I commented "' . $_POST['comment'] . '" on your profile!', $_SESSION['siteusername']);
104 104
             }
105 105
         }
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
 		<link rel="stylesheet" href="/yt/cssbin/www-extra.css">
134 134
 		<style>
135 135
 			#content-container {
136
-				background-color: <?php echo $_user['primary_color'];  ?>;
136
+				background-color: <?php echo $_user['primary_color']; ?>;
137 137
 				background-image: url(/dynamic/banners/<?php echo $_user['2009_bg']; ?>);
138 138
 				background-repeat: repeat;
139 139
 				background-position: center top;
@@ -149,11 +149,11 @@  discard block
 block discarded – undo
149 149
 			<div id="masthead-container"><?php require($_SERVER['DOCUMENT_ROOT'] . "/s/mod/header.php"); ?></div>
150 150
 			<div id="content-container">
151 151
 				<!-- begin content -->
152
-				<?php if(isset($_SESSION['siteusername']) && $_user['username'] == $_SESSION['siteusername']) { ?>
152
+				<?php if (isset($_SESSION['siteusername']) && $_user['username'] == $_SESSION['siteusername']) { ?>
153 153
 					<div class="channel_customization"><?php require($_SERVER['DOCUMENT_ROOT'] . "/s/mod/channel_customization.php"); ?></div>
154 154
 				<?php } ?> 
155 155
 				<?php
156
-					if(empty(trim($_user['bio'])))
156
+					if (empty(trim($_user['bio'])))
157 157
 						$_user['bio'] = "This user has no description.";
158 158
 				?>
159 159
 				<div id="content">
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
 												<h1><?php echo htmlspecialchars($_user['username']); ?></h1>
209 209
 											</div>
210 210
 											<div class="upper-left-section enable-fancy-subscribe-button">
211
-											<?php if($_user['username'] != @$_SESSION['siteusername']) { ?>
211
+											<?php if ($_user['username'] != @$_SESSION['siteusername']) { ?>
212 212
 													<div class="yt-subscription-button-hovercard yt-uix-hovercard">
213 213
 														<button 
214 214
 															href="#" 
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
 															title="" 
217 217
 															id="subscribe-button"
218 218
 															type="button" 
219
-															class="yt-subscription-button <?php if($_user['subscribed']) { echo "subscribed "; } ?>  yt-uix-button yt-uix-button-subscription yt-uix-tooltip" 
219
+															class="yt-subscription-button <?php if ($_user['subscribed']) { echo "subscribed "; } ?>  yt-uix-button yt-uix-button-subscription yt-uix-tooltip" 
220 220
 															role="button"><span class="yt-uix-button-icon-wrapper"><img class="yt-uix-button-icon yt-uix-button-icon-subscribe" 
221 221
 															src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt=""></span><span class="yt-uix-button-content">  <span class="subscribe-label">Subscribe</span>
222 222
 														<span class="subscribed-label">Subscribed</span>
@@ -282,7 +282,7 @@  discard block
 block discarded – undo
282 282
 									</div>
283 283
 								</div>
284 284
 							</div>
285
-                            <?php if($_user['featured'] != "None") { $video = $__video_h->fetch_video_rid($_user['featured']); } else { $_user['featured'] = false; } ?>
285
+                            <?php if ($_user['featured'] != "None") { $video = $__video_h->fetch_video_rid($_user['featured']); } else { $_user['featured'] = false; } ?>
286 286
 							<div id="branded-page-body">
287 287
 								<div class="channel-tab-content channel-layout-two-column selected blogger-template">
288 288
 									<div class="tab-content-body">
@@ -337,8 +337,8 @@  discard block
 block discarded – undo
337 337
                                                                         $stmt->bindParam(":comment_username", $_user['username']);
338 338
 																		$stmt->bindParam(":videos_username", $_user['username']);
339 339
                                                                         $stmt->execute();
340
-                                                                        while($content = $stmt->fetch(PDO::FETCH_ASSOC)) { 
341
-																			if((int)$content['id']) {
340
+                                                                        while ($content = $stmt->fetch(PDO::FETCH_ASSOC)) { 
341
+																			if ((int) $content['id']) {
342 342
 																				$content = $__video_h->fetch_comment_id($content['id']);
343 343
 																				$content['video'] = $__video_h->fetch_video_rid($content['toid']);
344 344
 																				$content['type'] = "comment";
@@ -347,7 +347,7 @@  discard block
 block discarded – undo
347 347
 																				$content['type'] = "video";
348 348
 																			}
349 349
 
350
-																			if($content['type'] == "video") {
350
+																			if ($content['type'] == "video") {
351 351
                                                                     ?>
352 352
                                                                     <div class="feed-item-container" data-channel-key="UCc6W7efUSkd9YYoxOnctlFg">
353 353
                                                                         <a href="/user/<?php echo htmlspecialchars($content['author']); ?>?feature=plcp" class="feed-author-bubble " title="<?php echo htmlspecialchars($content['author']); ?>">  <span class="feed-item-author">
@@ -419,7 +419,7 @@  discard block
 block discarded – undo
419 419
                                                                         </div>
420 420
                                                                     </div>
421 421
                                                                     <?php } else { 
422
-																		if($__video_h->video_exists($content['video']['rid'])) { ?>
422
+																		if ($__video_h->video_exists($content['video']['rid'])) { ?>
423 423
 																	<div class="feed-item-container" data-channel-key="UCXf1X2u5gsmuqcuTQlpOGhw">
424 424
 																		<a href="/user/<?php echo htmlspecialchars($content['author']); ?>?feature=plcp" class="feed-author-bubble " title="<?php echo htmlspecialchars($content['author']); ?>">  <span class="feed-item-author">
425 425
 																		<span class="video-thumb ux-thumb yt-thumb-square-28 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="http://s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="<?php echo htmlspecialchars($content['author']); ?>" data-thumb="/dynamic/pfp/<?php echo $__user_h->fetch_pfp($content['author']); ?>" width="28"><span class="vertical-align"></span></span></span></span>
@@ -525,7 +525,7 @@  discard block
 block discarded – undo
525 525
 														</div>
526 526
 														<hr class="yt-horizontal-rule ">
527 527
 													</div>
528
-													<?php if(!empty($_user['website'])) { ?>
528
+													<?php if (!empty($_user['website'])) { ?>
529 529
 														<div class="user-profile-item">
530 530
 															<div class="yt-c3-profile-custom-url field-container ">
531 531
 																<a href="<?php echo addhttp(htmlspecialchars($_user['website'])); ?>" rel="me nofollow" target="_blank" title="<?php echo htmlspecialchars($_user['website']); ?>" class="yt-uix-redirect-link">
@@ -574,7 +574,7 @@  discard block
 block discarded – undo
574 574
 															<h5>Country</h5>
575 575
 															<span class="value"><?php echo htmlspecialchars($_user['country']); ?></span>
576 576
 														</div>
577
-														<?php if($_user['genre'] != "none") { ?>
577
+														<?php if ($_user['genre'] != "none") { ?>
578 578
 															<div class="user-profile-item ">
579 579
 																<h5>Channel Genre</h5>
580 580
 																<span class="value"><?php echo htmlspecialchars($_user['genre']); ?></span>
@@ -586,13 +586,13 @@  discard block
 block discarded – undo
586 586
 											</div>
587 587
 											<div class="channel-module other-channels yt-uix-c3-module-container other-channels-compact">
588 588
 												<?php $_user['featured_channels'] = explode(",", $_user['featured_channels']); ?>
589
-												<?php if(count($_user['featured_channels']) != 0) { ?>
589
+												<?php if (count($_user['featured_channels']) != 0) { ?>
590 590
 												<div class="module-view other-channels-view">
591 591
 													<h2>Featured Channels</h2>
592 592
 													<ul class="channel-summary-list ">
593 593
 														<?php 
594
-															foreach($_user['featured_channels'] as $user) {
595
-																if($__user_h->user_exists($user)) {
594
+															foreach ($_user['featured_channels'] as $user) {
595
+																if ($__user_h->user_exists($user)) {
596 596
 														?>
597 597
 															<li class="yt-tile-visible yt-uix-tile">
598 598
 																<div class="channel-summary clearfix channel-summary-compact">
@@ -621,13 +621,13 @@  discard block
 block discarded – undo
621 621
 												$stmt->bindParam(":search", $_user['username']);
622 622
 												$stmt->execute();
623 623
 
624
-												if($stmt->rowCount() != 0) {
624
+												if ($stmt->rowCount() != 0) {
625 625
 											?>
626 626
 												<div class="playlists-narrow channel-module yt-uix-c3-module-container">
627 627
 													<div class="module-view gh-featured">
628 628
 														<h2>Featured Playlists</h2>     
629 629
 														<?php
630
-														while($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { 
630
+														while ($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { 
631 631
 															$playlist['videos'] = json_decode($playlist['videos']);
632 632
 														?> 
633 633
 															<div class="playlist yt-tile-visible yt-uix-tile">
Please login to merge, or discard this patch.
web/public/playlists_ajax.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -21,15 +21,15 @@  discard block
 block discarded – undo
21 21
 
22 22
    $results_per_page = 12;
23 23
    $number_of_result = $request->search_amount;
24
-   $number_of_page = ceil ($number_of_result / $results_per_page);  
24
+   $number_of_page = ceil($number_of_result/$results_per_page);  
25 25
 
26
-   if (!isset ($_GET['page']) ) {  
26
+   if (!isset ($_GET['page'])) {  
27 27
        $page = 1;  
28 28
    } else {  
29
-       $page = (int)$_GET['page'];  
29
+       $page = (int) $_GET['page'];  
30 30
    }  
31 31
 
32
-   $page_first_result = ($page - 1) * $results_per_page;  
32
+   $page_first_result = ($page - 1)*$results_per_page;  
33 33
 
34 34
    $stmt6 = $__db->prepare("SELECT * FROM playlists WHERE lower(author) LIKE lower(:search) ORDER BY id DESC LIMIT :pfirst, :pper");
35 35
    $stmt6->bindParam(":search", $request->like_search_term);
@@ -50,10 +50,10 @@  discard block
 block discarded – undo
50 50
     </tr>
51 51
     
52 52
     <?php
53
-        while($playlist = $stmt6->fetch(PDO::FETCH_ASSOC)) { 
53
+        while ($playlist = $stmt6->fetch(PDO::FETCH_ASSOC)) { 
54 54
             $playlist['videos'] = json_decode($playlist['videos']);
55
-            if($__video_h->video_exists(@$playlist['videos'][0])) {
56
-                if(count($playlist['videos']) != 0) {
55
+            if ($__video_h->video_exists(@$playlist['videos'][0])) {
56
+                if (count($playlist['videos']) != 0) {
57 57
                     $video = $__video_h->fetch_video_rid($playlist['videos'][0]);
58 58
                     $video['video_responses'] = $__video_h->get_video_responses($video['rid']);
59 59
                     $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
Please login to merge, or discard this patch.
web/public/s/mod/channel_customization.php 1 patch
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.
web/public/channel.php 1 patch
Spacing   +34 added lines, -34 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']);
@@ -67,28 +67,28 @@  discard block
 block discarded – undo
67 67
     $_user['genre'] = strtolower($_user['genre']);
68 68
 	$_user['subscribed'] = $__user_h->if_subscribed(@$_SESSION['siteusername'], $_user['username']);
69 69
 
70
-    if(!check_valid_colorhex($_user['primary_color']) && strlen($_user['primary_color']) != 6) { $_user['primary_color'] = ""; }
71
-    if(!check_valid_colorhex($_user['secondary_color']) && strlen($_user['secondary_color']) != 6) { $_user['secondary_color'] = ""; }
72
-    if(!check_valid_colorhex($_user['third_color']) && strlen($_user['third_color']) != 6) { $_user['third_color'] = ""; }
73
-    if(!check_valid_colorhex($_user['text_color']) && strlen($_user['text_color']) != 6) { $_user['text_color'] = ""; }
74
-    if(!check_valid_colorhex($_user['primary_color_text']) && strlen($_user['primary_color_text']) != 6) { $_user['primary_color_text'] = ""; }
75
-    if(!check_valid_colorhex($_user['2009_bgcolor']) && strlen($_user['2009_bgcolor']) != 6) { $_user['2009_bgcolor'] = ""; }
70
+    if (!check_valid_colorhex($_user['primary_color']) && strlen($_user['primary_color']) != 6) { $_user['primary_color'] = ""; }
71
+    if (!check_valid_colorhex($_user['secondary_color']) && strlen($_user['secondary_color']) != 6) { $_user['secondary_color'] = ""; }
72
+    if (!check_valid_colorhex($_user['third_color']) && strlen($_user['third_color']) != 6) { $_user['third_color'] = ""; }
73
+    if (!check_valid_colorhex($_user['text_color']) && strlen($_user['text_color']) != 6) { $_user['text_color'] = ""; }
74
+    if (!check_valid_colorhex($_user['primary_color_text']) && strlen($_user['primary_color_text']) != 6) { $_user['primary_color_text'] = ""; }
75
+    if (!check_valid_colorhex($_user['2009_bgcolor']) && strlen($_user['2009_bgcolor']) != 6) { $_user['2009_bgcolor'] = ""; }
76 76
 
77
-	if(isset($_SESSION['siteusername']))
77
+	if (isset($_SESSION['siteusername']))
78 78
     	$__user_i->check_view_channel($_user['username'], @$_SESSION['siteusername']);
79 79
 
80
-    if($_SERVER['REQUEST_METHOD'] == 'POST') {
80
+    if ($_SERVER['REQUEST_METHOD'] == 'POST') {
81 81
         $error = array();
82 82
 
83
-        if(!isset($_SESSION['siteusername'])){ $error['message'] = "you are not logged in"; $error['status'] = true; }
84
-        if(!$_POST['comment']){ $error['message'] = "your comment cannot be blank"; $error['status'] = true; }
85
-        if(strlen($_POST['comment']) > 1000){ $error['message'] = "your comment must be shorter than 1000 characters"; $error['status'] = true; }
83
+        if (!isset($_SESSION['siteusername'])) { $error['message'] = "you are not logged in"; $error['status'] = true; }
84
+        if (!$_POST['comment']) { $error['message'] = "your comment cannot be blank"; $error['status'] = true; }
85
+        if (strlen($_POST['comment']) > 1000) { $error['message'] = "your comment must be shorter than 1000 characters"; $error['status'] = true; }
86 86
         //if(!isset($_POST['g-recaptcha-response'])){ $error['message'] = "captcha validation failed"; $error['status'] = true; }
87 87
         //if(!$_user_insert_utils->validateCaptcha($config['recaptcha_secret'], $_POST['g-recaptcha-response'])) { $error['message'] = "captcha validation failed"; $error['status'] = true; }
88
-        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; }
88
+        if ($__user_h->if_cooldown($_SESSION['siteusername'])) { $error['message'] = "You are on a cooldown! Wait for a minute before posting another comment."; $error['status'] = true; }
89 89
         //if(ifBlocked(@$_SESSION['siteusername'], $user['username'], $__db)) { $error = "This user has blocked you!"; $error['status'] = true; } 
90 90
 
91
-        if(!isset($error['message'])) {
91
+        if (!isset($error['message'])) {
92 92
 			$text = $_POST['comment'];
93 93
             $stmt = $__db->prepare("INSERT INTO profile_comments (toid, author, comment) VALUES (:id, :username, :comment)");
94 94
 			$stmt->bindParam(":id", $_user['username']);
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 
99 99
             $_user_update_utils->update_comment_cooldown_time($_SESSION['siteusername']);
100 100
 
101
-            if(@$_SESSION['siteusername'] != $_user['username']) { 
101
+            if (@$_SESSION['siteusername'] != $_user['username']) { 
102 102
                 $_user_insert_utils->send_message($_user['username'], "New comment", 'I commented "' . $_POST['comment'] . '" on your profile!', $_SESSION['siteusername']);
103 103
             }
104 104
         }
@@ -136,11 +136,11 @@  discard block
 block discarded – undo
136 136
 		<link rel="stylesheet" href="/yt/cssbin/www-extra.css">
137 137
 		<style>
138 138
 			#content-container {
139
-				background-color: <?php echo $_user['primary_color'];  ?>;
139
+				background-color: <?php echo $_user['primary_color']; ?>;
140 140
 				background-image: url(/dynamic/banners/<?php echo $_user['2009_bg']; ?>);
141 141
 				background-repeat: repeat;
142 142
 				<?php
143
-					switch($_user['2012_bgoption']) {
143
+					switch ($_user['2012_bgoption']) {
144 144
 						case "stretch":
145 145
 						echo "background-size: cover;";
146 146
 						break;
@@ -184,11 +184,11 @@  discard block
 block discarded – undo
184 184
 			<div id="masthead-container"><?php require($_SERVER['DOCUMENT_ROOT'] . "/s/mod/header.php"); ?></div>
185 185
 			<div id="content-container">
186 186
 				<!-- begin content -->
187
-				<?php if(isset($_SESSION['siteusername']) && $_user['username'] == $_SESSION['siteusername']) { ?>
187
+				<?php if (isset($_SESSION['siteusername']) && $_user['username'] == $_SESSION['siteusername']) { ?>
188 188
 					<div class="channel_customization"><?php require($_SERVER['DOCUMENT_ROOT'] . "/s/mod/channel_customization.php"); ?></div>
189 189
 				<?php } ?>
190 190
 				<?php
191
-					if(empty(trim($_user['bio'])))
191
+					if (empty(trim($_user['bio'])))
192 192
 						$_user['bio'] = "This user has no description.";
193 193
 				?>
194 194
 				<div id="content">
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
 												<h1><?php echo htmlspecialchars($_user['username']); ?></h1>
244 244
 											</div>
245 245
 											<div class="upper-left-section enable-fancy-subscribe-button">
246
-												<?php if($_user['username'] != @$_SESSION['siteusername']) { ?>
246
+												<?php if ($_user['username'] != @$_SESSION['siteusername']) { ?>
247 247
 													<div class="yt-subscription-button-hovercard yt-uix-hovercard">
248 248
 														<button 
249 249
 															href="#" 
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
 															title="" 
252 252
 															id="subscribe-button"
253 253
 															type="button" 
254
-															class="yt-subscription-button <?php if($_user['subscribed']) { echo "subscribed "; } ?>  yt-uix-button yt-uix-button-subscription yt-uix-tooltip" 
254
+															class="yt-subscription-button <?php if ($_user['subscribed']) { echo "subscribed "; } ?>  yt-uix-button yt-uix-button-subscription yt-uix-tooltip" 
255 255
 															role="button"><span class="yt-uix-button-icon-wrapper"><img class="yt-uix-button-icon yt-uix-button-icon-subscribe" 
256 256
 															src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt=""></span><span class="yt-uix-button-content">  <span class="subscribe-label">Subscribe</span>
257 257
 														<span class="subscribed-label">Subscribed</span>
@@ -272,7 +272,7 @@  discard block
 block discarded – undo
272 272
 												<div class="header-stats">
273 273
 													<div class="stat-entry">
274 274
 														<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>
275
+														<span class="stat-name"><?php if ($_user['subscribers'] == 1) { ?>subscriber<?php } else { ?>subscribers<?php } ?></span>
276 276
 													</div>
277 277
 													<div class="stat-entry">
278 278
 														<span class="stat-value"><?php echo $_user['views']; ?></span>
@@ -317,12 +317,12 @@  discard block
 block discarded – undo
317 317
 									</div>
318 318
 								</div>
319 319
 							</div>
320
-                            <?php if($_user['featured'] != "None") { $video = $__video_h->fetch_video_rid($_user['featured']); } else { $_user['featured'] = false; } ?>
320
+                            <?php if ($_user['featured'] != "None") { $video = $__video_h->fetch_video_rid($_user['featured']); } else { $_user['featured'] = false; } ?>
321 321
 							<div id="branded-page-body">
322 322
 								<div class="channel-tab-content channel-layout-two-column selected blogger-template">
323 323
 									<div class="tab-content-body">
324 324
 										<div class="primary-pane">
325
-                                            <?php if($_user['featured'] != false && $__video_h->video_exists($_user['featured'])) { ?>
325
+                                            <?php if ($_user['featured'] != false && $__video_h->video_exists($_user['featured'])) { ?>
326 326
 											<div class="channels-featured-video channel-module yt-uix-c3-module-container has-visible-edge">
327 327
 												<div class="module-view featured-video-view-module">
328 328
 												<div id="watch-video" >
@@ -379,7 +379,7 @@  discard block
 block discarded – undo
379 379
 													<div class="playlist-info">
380 380
 														<h2>Uploaded videos</h2>
381 381
 														<div class="yt-horizontal-rule "><span class="first"></span><span class="second"></span><span class="third"></span></div>
382
-														<?php if($_user['videos'] == 0) { ?>
382
+														<?php if ($_user['videos'] == 0) { ?>
383 383
 															<h4>This user has not uploaded a video yet.</h4>
384 384
 														<?php } ?>
385 385
 													</div>
@@ -388,7 +388,7 @@  discard block
 block discarded – undo
388 388
                                                             $stmt = $__db->prepare("SELECT * FROM videos WHERE author = :username ORDER BY id DESC LIMIT 20");
389 389
                                                             $stmt->bindParam(":username", $_user['username']);
390 390
                                                             $stmt->execute();
391
-                                                            while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { 
391
+                                                            while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) { 
392 392
                                                         ?>
393 393
 														<li class="blogger-video">
394 394
 															<div class="video yt-tile-visible">
@@ -470,7 +470,7 @@  discard block
 block discarded – undo
470 470
 														</div>
471 471
 														<hr class="yt-horizontal-rule ">
472 472
 													</div>
473
-													<?php if(!empty($_user['website'])) { ?>
473
+													<?php if (!empty($_user['website'])) { ?>
474 474
 														<div class="user-profile-item">
475 475
 															<div class="yt-c3-profile-custom-url field-container ">
476 476
 																<a href="<?php echo addhttp(htmlspecialchars($_user['website'])); ?>" rel="me nofollow" target="_blank" title="<?php echo htmlspecialchars($_user['website']); ?>" class="yt-uix-redirect-link">
@@ -519,7 +519,7 @@  discard block
 block discarded – undo
519 519
 															<h5>Country</h5>
520 520
 															<span class="value"><?php echo htmlspecialchars($_user['country']); ?></span>
521 521
 														</div>
522
-														<?php if($_user['genre'] != "none") { ?>
522
+														<?php if ($_user['genre'] != "none") { ?>
523 523
 															<div class="user-profile-item ">
524 524
 																<h5>Channel Genre</h5>
525 525
 																<span class="value"><?php echo htmlspecialchars($_user['genre']); ?></span>
@@ -531,13 +531,13 @@  discard block
 block discarded – undo
531 531
 											</div>
532 532
 											<div class="channel-module other-channels yt-uix-c3-module-container other-channels-compact">
533 533
 												<?php $_user['featured_channels'] = explode(",", $_user['featured_channels']); ?>
534
-												<?php if(count($_user['featured_channels']) != 0) { ?>
534
+												<?php if (count($_user['featured_channels']) != 0) { ?>
535 535
 												<div class="module-view other-channels-view">
536 536
 													<h2>Featured Channels</h2>
537 537
 													<ul class="channel-summary-list ">
538 538
 														<?php 
539
-															foreach($_user['featured_channels'] as $user) {
540
-																if($__user_h->user_exists($user)) {
539
+															foreach ($_user['featured_channels'] as $user) {
540
+																if ($__user_h->user_exists($user)) {
541 541
 														?>
542 542
 															<li class="yt-tile-visible yt-uix-tile">
543 543
 																<div class="channel-summary clearfix channel-summary-compact">
@@ -566,13 +566,13 @@  discard block
 block discarded – undo
566 566
 												$stmt->bindParam(":search", $_user['username']);
567 567
 												$stmt->execute();
568 568
 
569
-												if($stmt->rowCount() != 0) {
569
+												if ($stmt->rowCount() != 0) {
570 570
 											?>
571 571
 												<div class="playlists-narrow channel-module yt-uix-c3-module-container">
572 572
 													<div class="module-view gh-featured">
573 573
 														<h2>Featured Playlists</h2>     
574 574
 														<?php
575
-														while($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { 
575
+														while ($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { 
576 576
 															$playlist['videos'] = json_decode($playlist['videos']);
577 577
 														?> 
578 578
 															<div class="playlist yt-tile-visible yt-uix-tile">
Please login to merge, or discard this patch.
web/public/d/channel_update.php 1 patch
Spacing   +41 added lines, -41 removed lines patch added patch discarded remove patch
@@ -15,14 +15,14 @@  discard block
 block discarded – undo
15 15
         return preg_replace('/[^A-Za-z0-9\-]/', '', $string); // Removes special chars.
16 16
     }
17 17
 
18
-        if(isset($_POST['layout'])) { 
18
+        if (isset($_POST['layout'])) { 
19 19
             $stmt = $__db->prepare("UPDATE users SET layout = :layout WHERE username = :username");
20 20
             $stmt->bindParam(":layout", $_POST['layout']);
21 21
             $stmt->bindParam(":username", $_SESSION['siteusername']);
22 22
             $stmt->execute();
23 23
         }
24 24
 
25
-        if(isset($_POST['left'])) {
25
+        if (isset($_POST['left'])) {
26 26
             $clean = $_POST['left'];
27 27
             $stmt = $__db->prepare("UPDATE users SET 2009_user_left = :clean WHERE username = :username");
28 28
             $stmt->bindParam(":clean", $clean);
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
             $stmt->execute();
31 31
         }
32 32
 
33
-        if(isset($_POST['right'])) {
33
+        if (isset($_POST['right'])) {
34 34
             $clean = $_POST['right'];
35 35
             $stmt = $__db->prepare("UPDATE users SET 2009_user_right = :clean WHERE username = :username");
36 36
             $stmt->bindParam(":clean", $clean);
@@ -39,8 +39,8 @@  discard block
 block discarded – undo
39 39
         }
40 40
 
41 41
 
42
-        if($_SERVER['REQUEST_METHOD'] == 'POST' && @$_GET['n']) {
43
-            if(!empty($_GET["n"]) && $_GET['n'] == "pfp") {
42
+        if ($_SERVER['REQUEST_METHOD'] == 'POST' && @$_GET['n']) {
43
+            if (!empty($_GET["n"]) && $_GET['n'] == "pfp") {
44 44
                 $target_dir = "../dynamic/pfp/";
45 45
                 $imageFileType = strtolower(pathinfo($_FILES["file"]["name"], PATHINFO_EXTENSION));
46 46
                 $target_name = md5_file($_FILES["file"]["tmp_name"]) . "." . $imageFileType;
@@ -50,8 +50,8 @@  discard block
 block discarded – undo
50 50
                 $uploadOk = true;
51 51
                 $movedFile = false;
52 52
         
53
-                if($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg"
54
-                    && $imageFileType != "gif" ) {
53
+                if ($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg"
54
+                    && $imageFileType != "gif") {
55 55
                     $fileerror = 'unsupported file type. must be jpg, png, jpeg, or gif';
56 56
                     $uploadOk = false;
57 57
                     goto skip;
@@ -74,8 +74,8 @@  discard block
 block discarded – undo
74 74
                     }
75 75
                 }
76 76
             }
77
-        } else if($_SERVER['REQUEST_METHOD'] == 'POST' && @$_FILES['backgroundbgset']) {
78
-            if(!empty($_FILES["backgroundbgset"]["name"])) {
77
+        } else if ($_SERVER['REQUEST_METHOD'] == 'POST' && @$_FILES['backgroundbgset']) {
78
+            if (!empty($_FILES["backgroundbgset"]["name"])) {
79 79
                 $target_dir = "../dynamic/banners/";
80 80
                 $imageFileType = strtolower(pathinfo($_FILES["backgroundbgset"]["name"], PATHINFO_EXTENSION));
81 81
                 $target_name = md5_file($_FILES["backgroundbgset"]["tmp_name"]) . "." . $imageFileType;
@@ -85,14 +85,14 @@  discard block
 block discarded – undo
85 85
                 $uploadOk = true;
86 86
                 $movedFile = false;
87 87
     
88
-                if($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg"
89
-                    && $imageFileType != "gif" ) {
88
+                if ($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg"
89
+                    && $imageFileType != "gif") {
90 90
                     $fileerror = 'unsupported file type. must be jpg, png, jpeg, or gif';
91 91
                     $uploadOk = false;
92 92
                     goto skip;
93 93
                 }
94 94
     
95
-                if($uploadOk) { 
95
+                if ($uploadOk) { 
96 96
                     if (file_exists($target_file)) {
97 97
                         $movedFile = true;
98 98
                     } else {
@@ -108,8 +108,8 @@  discard block
 block discarded – undo
108 108
                     }
109 109
                 }
110 110
             }
111
-        } else if($_SERVER['REQUEST_METHOD'] == 'POST' && @$_POST['bannerset']) {
112
-            if(!empty($_FILES["file"]["name"])) {
111
+        } else if ($_SERVER['REQUEST_METHOD'] == 'POST' && @$_POST['bannerset']) {
112
+            if (!empty($_FILES["file"]["name"])) {
113 113
                 $target_dir = "../dynamic/banners/";
114 114
                 $imageFileType = strtolower(pathinfo($_FILES["file"]["name"], PATHINFO_EXTENSION));
115 115
                 $target_name = md5_file($_FILES["file"]["tmp_name"]) . "." . $imageFileType;
@@ -119,14 +119,14 @@  discard block
 block discarded – undo
119 119
                 $uploadOk = true;
120 120
                 $movedFile = false;
121 121
     
122
-                if($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg"
123
-                    && $imageFileType != "gif" ) {
122
+                if ($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg"
123
+                    && $imageFileType != "gif") {
124 124
                     $fileerror = 'unsupported file type. must be jpg, png, jpeg, or gif';
125 125
                     $uploadOk = false;
126 126
                     goto skip;
127 127
                 }
128 128
     
129
-                if($uploadOk) { 
129
+                if ($uploadOk) { 
130 130
                     if (file_exists($target_file)) {
131 131
                         $movedFile = true;
132 132
                     } else {
@@ -142,8 +142,8 @@  discard block
 block discarded – undo
142 142
                     }
143 143
                 } 
144 144
             }
145
-        } else if($_SERVER['REQUEST_METHOD'] == 'POST' && @$_FILES['videopagebanner']) {
146
-            if(!empty($_FILES["videopagebanner"]["name"])) {
145
+        } else if ($_SERVER['REQUEST_METHOD'] == 'POST' && @$_FILES['videopagebanner']) {
146
+            if (!empty($_FILES["videopagebanner"]["name"])) {
147 147
                 $target_dir = "/dynamic/subscribe/";
148 148
                 $imageFileType = strtolower(pathinfo($_FILES["videopagebanner"]["name"], PATHINFO_EXTENSION));
149 149
                 $target_name = md5_file($_FILES["videopagebanner"]["tmp_name"]) . "." . $imageFileType;
@@ -153,14 +153,14 @@  discard block
 block discarded – undo
153 153
                 $uploadOk = true;
154 154
                 $movedFile = false;
155 155
     
156
-                if($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg"
157
-                    && $imageFileType != "gif" ) {
156
+                if ($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg"
157
+                    && $imageFileType != "gif") {
158 158
                     $fileerror = 'unsupported file type. must be jpg, png, jpeg, or gif';
159 159
                     $uploadOk = false;
160 160
                     goto skip;
161 161
                 }
162 162
     
163
-                if($uploadOk) { 
163
+                if ($uploadOk) { 
164 164
                     if (file_exists($target_file)) {
165 165
                         $movedFile = true;
166 166
                     } else {
@@ -178,76 +178,76 @@  discard block
 block discarded – undo
178 178
             }
179 179
         }
180 180
 
181
-        if(!empty($_POST['bio'])) { 
181
+        if (!empty($_POST['bio'])) { 
182 182
             $__user_u->update_row($_SESSION['siteusername'], "bio", $_POST['bio']);
183 183
         }
184 184
 
185
-        if(!empty($_POST['featuredchannels'])) { 
185
+        if (!empty($_POST['featuredchannels'])) { 
186 186
             $__user_u->update_row($_SESSION['siteusername'], "featured_channels", $_POST['featuredchannels']);
187 187
         }
188 188
     
189
-        if(!empty($_POST['css'])) {
189
+        if (!empty($_POST['css'])) {
190 190
             $__user_u->update_row($_SESSION['siteusername'], "css", $_POST['css']);
191 191
         }
192 192
 
193
-        if(!empty($_POST['videoid'])) {
193
+        if (!empty($_POST['videoid'])) {
194 194
             $__user_u->update_row($_SESSION['siteusername'], "featured", $_POST['videoid']);
195 195
         }
196 196
 
197
-        if(!empty($_POST['solidcolor'])) {
197
+        if (!empty($_POST['solidcolor'])) {
198 198
             $__user_u->update_row($_SESSION['siteusername'], "2012_bgoption", $_POST['bgoption']);
199 199
 
200
-            if($_POST['bgoption'] == "solid")
200
+            if ($_POST['bgoption'] == "solid")
201 201
                 $__user_u->update_row($_SESSION['siteusername'], "2009_bg", "");
202 202
 
203 203
             $__user_u->update_row($_SESSION['siteusername'], "primary_color", $_POST['solidcolor']);
204 204
         }
205 205
 
206
-        if(!empty($_POST['transparency'])) {
206
+        if (!empty($_POST['transparency'])) {
207 207
             $__user_u->update_row($_SESSION['siteusername'], "transparency", $_POST['transparency']);
208 208
         }
209 209
 
210
-        if(!empty($_POST['genre'])) {
210
+        if (!empty($_POST['genre'])) {
211 211
             $__user_u->update_row($_SESSION['siteusername'], "genre", $_POST['genre']);
212 212
         }
213 213
 
214
-        if(!empty($_POST['bordercolor'])) {
214
+        if (!empty($_POST['bordercolor'])) {
215 215
             $__user_u->update_row($_SESSION['siteusername'], "border_color", $_POST['bordercolor']);
216 216
         }
217 217
 
218
-        if(!empty($_POST['country'])) {
218
+        if (!empty($_POST['country'])) {
219 219
             $__user_u->update_row($_SESSION['siteusername'], "country", $_POST['country']);
220 220
         } // duplicate?
221 221
 
222
-        if(!empty($_POST['header'])) {
222
+        if (!empty($_POST['header'])) {
223 223
             $__user_u->update_row($_SESSION['siteusername'], "custom_header", $_POST['header']);
224 224
         }
225 225
 
226
-        if(!empty($_POST['customtext'])) {
226
+        if (!empty($_POST['customtext'])) {
227 227
             $__user_u->update_row($_SESSION['siteusername'], "custom_text", $_POST['customtext']);
228 228
         }
229 229
 
230
-        if(!empty($_POST['country'])) {
230
+        if (!empty($_POST['country'])) {
231 231
             $__user_u->update_row($_SESSION['siteusername'], "custom_text", $_POST['country']);
232 232
         } // duplicate?
233 233
 
234
-        if(!empty($_POST['website'])) {
234
+        if (!empty($_POST['website'])) {
235 235
             $__user_u->update_row($_SESSION['siteusername'], "website", $_POST['website']);
236 236
         }
237 237
     
238
-        if(!empty($_POST['channelboxcolor'])) {
238
+        if (!empty($_POST['channelboxcolor'])) {
239 239
             $__user_u->update_row($_SESSION['siteusername'], "secondary_color", $_POST['channelboxcolor']);
240 240
         }
241 241
 
242
-        if(!empty($_POST['backgroundcolor'])) {
242
+        if (!empty($_POST['backgroundcolor'])) {
243 243
             $__user_u->update_row($_SESSION['siteusername'], "third_color", $_POST['backgroundcolor']);
244 244
         }
245 245
 
246
-        if(!empty($_POST['textmaincolor'])) {
246
+        if (!empty($_POST['textmaincolor'])) {
247 247
             $__user_u->update_row($_SESSION['siteusername'], "primary_color_text", $_POST['textmaincolor']);
248 248
         }
249 249
 
250
-    if(!empty($_POST['bgoptionset'])) {
250
+    if (!empty($_POST['bgoptionset'])) {
251 251
         $bgoption = $_POST['bgoption'];
252 252
         $bgcolor = $_POST['solidcolor'];
253 253
         $default = "default.png";
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
         
257 257
         $__user_u->update_row($_SESSION['siteusername'], "2009_bgcolor", $bgcolor);
258 258
 
259
-        if($bgoption == "solid") {
259
+        if ($bgoption == "solid") {
260 260
             $__user_u->update_row($_SESSION['siteusername'], "2009_bg", $default);
261 261
         }
262 262
     }
Please login to merge, or discard this patch.
web/public/edit_playlist.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
 	$__server->page_embeds->page_image = "/yt/imgbin/full-size-logo.png";
14 14
 	$__server->page_embeds->page_url = "https://subrock.rocks/";
15 15
 ?>
16
-<?php if(!isset($_SESSION['siteusername'])) { header("Location: /sign_in"); } ?>
16
+<?php if (!isset($_SESSION['siteusername'])) { header("Location: /sign_in"); } ?>
17 17
 <?php $_playlist = $__video_h->fetch_playlist_rid($_GET['id']); ?>
18 18
 <!DOCTYPE html>
19 19
 <html dir="ltr">
Please login to merge, or discard this patch.
web/public/get/toggle_comment.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,8 +13,8 @@
 block discarded – undo
13 13
 <?php
14 14
 $video = $__video_h->fetch_video_rid($_GET['id']);
15 15
 
16
-if($video['author'] == $_SESSION['siteusername']) {
17
-    if($video['commenting'] == "a") {
16
+if ($video['author'] == $_SESSION['siteusername']) {
17
+    if ($video['commenting'] == "a") {
18 18
         $__video_u->update_row($_GET['id'], "commenting", "d");
19 19
     } else {
20 20
         $__video_u->update_row($_GET['id'], "commenting", "a");
Please login to merge, or discard this patch.
web/public/get/delete_video.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
 <?php $video = $__video_h->fetch_video_rid($_GET['id']); ?>
12 12
 <?php
13 13
 
14
-if($video['author'] == $_SESSION['siteusername']) {
14
+if ($video['author'] == $_SESSION['siteusername']) {
15 15
   $stmt = $__db->prepare("DELETE FROM videos WHERE rid=:rid AND author=:author");
16 16
   $stmt->execute(array(
17 17
     ':author' => $video['author'],
Please login to merge, or discard this patch.
web/public/d/edit_playlist.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
 <?php $__time_h = new time_helper(); ?>
13 13
 <?php
14 14
     $_playlist = $__video_h->fetch_playlist_rid($_GET['v']);
15
-    if($_playlist['author'] != @$_SESSION['siteusername']) {
15
+    if ($_playlist['author'] != @$_SESSION['siteusername']) {
16 16
         die();
17 17
     }
18 18
 
Please login to merge, or discard this patch.