Test Failed
Push — main ( 00747d...5f665f )
by chief
03:00
created
web/public/upload_video.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -10,10 +10,10 @@
 block discarded – undo
10 10
 <?php $__time_h = new time_helper(); ?>
11 11
 <?php if(!isset($_SESSION['siteusername'])) { header("Location: /sign_in"); } ?>
12 12
 <?php
13
-	$__server->page_embeds->page_title = "SubRocks - Upload Video";
14
-	$__server->page_embeds->page_description = "SubRocks is a site dedicated to bring back the 2012 layout of YouTube.";
15
-	$__server->page_embeds->page_image = "/yt/imgbin/full-size-logo.png";
16
-	$__server->page_embeds->page_url = "https://subrock.rocks/";
13
+    $__server->page_embeds->page_title = "SubRocks - Upload Video";
14
+    $__server->page_embeds->page_description = "SubRocks is a site dedicated to bring back the 2012 layout of YouTube.";
15
+    $__server->page_embeds->page_image = "/yt/imgbin/full-size-logo.png";
16
+    $__server->page_embeds->page_url = "https://subrock.rocks/";
17 17
 ?>
18 18
 <!DOCTYPE html>
19 19
 <html>
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
 <?php $__user_h = new user_helper($__db); ?>
9 9
 <?php $__db_h = new db_helper(); ?>
10 10
 <?php $__time_h = new time_helper(); ?>
11
-<?php if(!isset($_SESSION['siteusername'])) { header("Location: /sign_in"); } ?>
11
+<?php if (!isset($_SESSION['siteusername'])) { header("Location: /sign_in"); } ?>
12 12
 <?php
13 13
 	$__server->page_embeds->page_title = "SubRocks - Upload Video";
14 14
 	$__server->page_embeds->page_description = "SubRocks is a site dedicated to bring back the 2012 layout of YouTube.";
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 			<div id="content-container">
45 45
 				<!-- begin content -->
46 46
 				<div id="content">
47
-					<?php if($__user_h->if_upload_cooldown($_SESSION['siteusername'])) { ?>
47
+					<?php if ($__user_h->if_upload_cooldown($_SESSION['siteusername'])) { ?>
48 48
 						<div id="masthead_child_div"><div class="yt-alert yt-alert-default yt-alert-error ">  <div class="yt-alert-icon">
49 49
 							<img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" class="icon master-sprite" alt="Alert icon">
50 50
 						</div>
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
                                 <b>Category</b> <br>
108 108
                                 <select style="margin-top:5px;" name="category" class="yt-uix-button yt-uix-button-default">
109 109
                                     <?php $categories = ["None", "Film & Animation", "Autos & Vehicles", "Music", "Pets & Animals", "Sports", "Travel & Events", "Gaming", "People & Blogs", "Comedy", "Entertainment", "News & Politics", "Howto & Style", "Education", "Science & Technology", "Nonprofits & Activism"]; ?>
110
-                                    <?php foreach($categories as $categoryTag) { ?>
110
+                                    <?php foreach ($categories as $categoryTag) { ?>
111 111
                                         <option value="<?php echo $categoryTag; ?>"><?php echo $categoryTag; ?></option>
112 112
                                     <?php } ?>
113 113
                                 </select><br><br>
Please login to merge, or discard this patch.
web/public/subscriptions.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -9,10 +9,10 @@
 block discarded – undo
9 9
 <?php $__time_h = new time_helper(); ?>
10 10
 <?php if(!isset($_SESSION['siteusername'])) { header("Location: /sign_in"); } ?>
11 11
 <?php
12
-	$__server->page_embeds->page_title = "SubRocks - Subscriptions";
13
-	$__server->page_embeds->page_description = "SubRocks is a site dedicated to bring back the 2012 layout of YouTube.";
14
-	$__server->page_embeds->page_image = "/yt/imgbin/full-size-logo.png";
15
-	$__server->page_embeds->page_url = "https://subrock.rocks/";
12
+    $__server->page_embeds->page_title = "SubRocks - Subscriptions";
13
+    $__server->page_embeds->page_description = "SubRocks is a site dedicated to bring back the 2012 layout of YouTube.";
14
+    $__server->page_embeds->page_image = "/yt/imgbin/full-size-logo.png";
15
+    $__server->page_embeds->page_url = "https://subrock.rocks/";
16 16
 ?>
17 17
 <!DOCTYPE html>
18 18
 <html dir="ltr">
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
 <?php $__user_h = new user_helper($__db); ?>
8 8
 <?php $__db_h = new db_helper(); ?>
9 9
 <?php $__time_h = new time_helper(); ?>
10
-<?php if(!isset($_SESSION['siteusername'])) { header("Location: /sign_in"); } ?>
10
+<?php if (!isset($_SESSION['siteusername'])) { header("Location: /sign_in"); } ?>
11 11
 <?php
12 12
 	$__server->page_embeds->page_title = "SubRocks - Subscriptions";
13 13
 	$__server->page_embeds->page_description = "SubRocks is a site dedicated to bring back the 2012 layout of YouTube.";
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
 								<hr><br>
167 167
                                 
168 168
                                 <div class="my_videos_ajax">                                  
169
-                                    <?php while($user = $stmt->fetch(PDO::FETCH_ASSOC)) {  ?> 
169
+                                    <?php while ($user = $stmt->fetch(PDO::FETCH_ASSOC)) {  ?> 
170 170
                                         <div style="width: 33%;display: inline-block;">
171 171
                                             <img style="width: 50px;height:50px;" src="/dynamic/pfp/<?php echo $__user_h->fetch_pfp($user['reciever']); ?>">
172 172
                                             <span style="display: inline-block; vertical-align:top;width: 100px;font-size: 11px;">
Please login to merge, or discard this patch.
web/public/edit_video.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -8,10 +8,10 @@
 block discarded – undo
8 8
 <?php $__db_h = new db_helper(); ?>
9 9
 <?php $__time_h = new time_helper(); ?>
10 10
 <?php
11
-	$__server->page_embeds->page_title = "SubRocks - Edit Video";
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 - Edit Video";
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
 <?php if(!isset($_SESSION['siteusername'])) { header("Location: /sign_in"); } ?>
17 17
 <?php $_video = $__video_h->fetch_video_rid($_GET['id']); ?>
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 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 $_video = $__video_h->fetch_video_rid($_GET['id']); ?>
18 18
 <!DOCTYPE html>
19 19
 <html dir="ltr">
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
                                         <b>Category</b> <br>
178 178
                                         <select style="margin-top:5px;" name="category" class="yt-uix-button yt-uix-button-default">
179 179
                                             <?php $categories = ["None", "Film & Animation", "Autos & Vehicles", "Music", "Pets & Animals", "Sports", "Travel & Events", "Gaming", "People & Blogs", "Comedy", "Entertainment", "News & Politics", "Howto & Style", "Education", "Science & Technology", "Nonprofits & Activism"]; ?>
180
-                                            <?php foreach($categories as $categoryTag) { ?>
180
+                                            <?php foreach ($categories as $categoryTag) { ?>
181 181
                                                 <option value="<?php echo $categoryTag; ?>"><?php echo $categoryTag; ?></option>
182 182
                                             <?php } ?>
183 183
                                         </select><br><br>
Please login to merge, or discard this patch.
web/public/s/mod/channel_customization.php 2 patches
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.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
                             Choose image. Non-square images wil be cropped.<br>
250 250
                             Suggested dimensions: 800x800 pixels. Max size: 1MB.
251 251
                         </p>
252
-                        <?php if($_user['pfp'] != "default.png") { ?>
252
+                        <?php if ($_user['pfp'] != "default.png") { ?>
253 253
                             <a style="font-size: 11px;" href="/get/remove_profile_pic">Remove Profile Picture</a><br>
254 254
                         <?php } ?>
255 255
                         <br>
@@ -339,7 +339,7 @@  discard block
 block discarded – undo
339 339
                                 <input type="file" name="backgroundbgset" id="background-upload">
340 340
                                 <!--<button class="yt-uix-button yt-uix-button-default" id="av-uplod">Select File</button>-->
341 341
                             </div><br>
342
-                            <?php if($__user_h->if_partner($_user['username'])) { ?>
342
+                            <?php if ($__user_h->if_partner($_user['username'])) { ?>
343 343
                                 <h2>Watch Page Subscribe Button</h2>
344 344
                                 <span style="font-size: 11px;color:grey;" class="grey-text">Choose Image (Max file size: 10MB)</span><br>
345 345
                                 <div id="watchsub" method="post" action="/d/channel_update?n=watchsub" enctype="multipart/form-data">
@@ -465,7 +465,7 @@  discard block
 block discarded – undo
465 465
                     <td class="left-side-customization" style="width: 247px;">
466 466
                         <h2>Channel information & Settings</h2>
467 467
                         <span style="font-size: 10px;color: grey;">Featured Video</span><br>
468
-                        <input class="yt-uix-form-input-text" style="width: 225px;" id="biomd" placeholder="Video ID" value="<?php echo htmlspecialchars($_user['featured']);?>" name="videoid"><br><br>
468
+                        <input class="yt-uix-form-input-text" style="width: 225px;" id="biomd" placeholder="Video ID" value="<?php echo htmlspecialchars($_user['featured']); ?>" name="videoid"><br><br>
469 469
                         <span style="font-size: 10px;color: grey;">Description</span><br>
470 470
                         <div id="bio" action="/d/channel_update" enctype="multipart/form-data">
471 471
                             <textarea class="yt-uix-form-input-text" style="resize:none;height: 55px;width: 225px;background-color:white;border: 1px solid #d3d3d3;" id="readthisbio" placeholder="Bio" name="bio"><?php echo htmlspecialchars($_user['bio']); ?></textarea><br>
@@ -478,12 +478,12 @@  discard block
 block discarded – undo
478 478
                         <h2>Advanced</h2>
479 479
                         <span style="font-size: 10px;color: grey;">Website URL</span><br>
480 480
                         <div id="featuredvid" action="/d/channel_update" enctype="multipart/form-data">
481
-                        <input class="yt-uix-form-input-text" style="width: 225px;" id="websiteurlinp" placeholder="Website URL" value="<?php echo htmlspecialchars($_user['website']);?>" name="website">
481
+                        <input class="yt-uix-form-input-text" style="width: 225px;" id="websiteurlinp" placeholder="Website URL" value="<?php echo htmlspecialchars($_user['website']); ?>" name="website">
482 482
                         </div><br>
483 483
                         <div>
484 484
                             <span style="font-size: 10px;color: grey;">Featured Channels</span>
485 485
                             <div id="featuredvid" action="/d/channel_update" enctype="multipart/form-data">
486
-                            <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">
486
+                            <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">
487 487
                             </div>
488 488
                         </div><br>
489 489
 
@@ -491,11 +491,11 @@  discard block
 block discarded – undo
491 491
                         <div id="countryselect" action="/d/channel_update" enctype="multipart/form-data">
492 492
                             <select style="width: 246px;" class="yt-uix-button yt-uix-button-default" id="country_input" name="country" value="<?php echo $_user['country']?>">
493 493
                             <?php
494
-                            $countries = ["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"];
494
+                            $countries = ["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"];
495 495
 
496 496
                             $countryLength = sizeof($countries);
497 497
                             $i = 0;
498
-                            for($i = 0;$i <= $countryLength; $i++)
498
+                            for ($i = 0; $i <= $countryLength; $i++)
499 499
                             {
500 500
                                 $c = $countries[$i];
501 501
                                 if ($c == $_user['country'])
@@ -508,7 +508,7 @@  discard block
 block discarded – undo
508 508
                                 else
509 509
                                 {
510 510
                                 ?>
511
-                                <option value="<?php echo $c;?>"><?php echo $c; ?></option>
511
+                                <option value="<?php echo $c; ?>"><?php echo $c; ?></option>
512 512
                                 <?php
513 513
                                 }
514 514
                             }
@@ -521,7 +521,7 @@  discard block
 block discarded – undo
521 521
                             <span style="font-size: 10px;color: grey;">Channel Genre</span><br>
522 522
                             <div id="channellayout" action="/d/channel_update" enctype="multipart/form-data">
523 523
                                 <select style="width: 246px;" class="yt-uix-button yt-uix-button-default" name="genre">
524
-                                    <?php foreach($categories as $category) { ?>
524
+                                    <?php foreach ($categories as $category) { ?>
525 525
                                         <option value="<?php echo $category; ?>"><?php echo $category; ?></option>
526 526
                                     <?php } ?>
527 527
                                 </select>
Please login to merge, or discard this patch.
web/public/results.php 3 patches
Indentation   +37 added lines, -37 removed lines patch added patch discarded remove patch
@@ -4,46 +4,46 @@  discard block
 block discarded – undo
4 4
 <?php require_once($_SERVER['DOCUMENT_ROOT'] . "/s/classes/user_helper.php"); ?>
5 5
 <?php require_once($_SERVER['DOCUMENT_ROOT'] . "/s/classes/video_helper.php"); ?>
6 6
 <?php
7
-   $request = (object) [
8
-      "search_term"      => htmlspecialchars($_GET['search_query']),
9
-      "like_search_term" => "%" . htmlspecialchars($_GET['search_query']) . "%",
10
-      "search_amount"    => 0 /* [fallback] */
11
-   ];
7
+    $request = (object) [
8
+        "search_term"      => htmlspecialchars($_GET['search_query']),
9
+        "like_search_term" => "%" . htmlspecialchars($_GET['search_query']) . "%",
10
+        "search_amount"    => 0 /* [fallback] */
11
+    ];
12 12
 
13
-   $stmt = $__db->prepare("SELECT * FROM videos WHERE lower(title) LIKE lower(:search) ");
14
-   $stmt->bindParam(":search", $request->like_search_term);
15
-   $stmt->execute(); 
16
-   $request->search_amount = $stmt->rowCount();
13
+    $stmt = $__db->prepare("SELECT * FROM videos WHERE lower(title) LIKE lower(:search) ");
14
+    $stmt->bindParam(":search", $request->like_search_term);
15
+    $stmt->execute(); 
16
+    $request->search_amount = $stmt->rowCount();
17 17
 
18
-   $results_per_page = 12;
19
-   $number_of_result = $request->search_amount;
20
-   $number_of_page = ceil ($number_of_result / $results_per_page);  
18
+    $results_per_page = 12;
19
+    $number_of_result = $request->search_amount;
20
+    $number_of_page = ceil ($number_of_result / $results_per_page);  
21 21
 
22
-   if (!isset ($_GET['page']) ) {  
23
-       $page = 1;  
24
-   } else {  
25
-       $page = (int)$_GET['page'];  
26
-   }  
22
+    if (!isset ($_GET['page']) ) {  
23
+        $page = 1;  
24
+    } else {  
25
+        $page = (int)$_GET['page'];  
26
+    }  
27 27
 
28
-   $page_first_result = ($page - 1) * $results_per_page;  
28
+    $page_first_result = ($page - 1) * $results_per_page;  
29 29
 
30
-   $stmt6 = $__db->prepare("SELECT * FROM videos WHERE lower(title) LIKE lower(:search) ORDER BY id DESC LIMIT :pfirst, :pper");
31
-   $stmt6->bindParam(":search", $request->like_search_term);
32
-   $stmt6->bindParam(":pfirst", $page_first_result);
33
-   $stmt6->bindParam(":pper", $results_per_page);
34
-   $stmt6->execute();
30
+    $stmt6 = $__db->prepare("SELECT * FROM videos WHERE lower(title) LIKE lower(:search) ORDER BY id DESC LIMIT :pfirst, :pper");
31
+    $stmt6->bindParam(":search", $request->like_search_term);
32
+    $stmt6->bindParam(":pfirst", $page_first_result);
33
+    $stmt6->bindParam(":pper", $results_per_page);
34
+    $stmt6->execute();
35 35
 
36
-   /* TODO :: Easy & Clean Pagination Class PLZ :((( ))) */
36
+    /* TODO :: Easy & Clean Pagination Class PLZ :((( ))) */
37 37
 ?>
38 38
 <?php $__video_h = new video_helper($__db); ?>
39 39
 <?php $__user_h = new user_helper($__db); ?>
40 40
 <?php $__db_h = new db_helper(); ?>
41 41
 <?php $__time_h = new time_helper(); ?>
42 42
 <?php
43
-	$__server->page_embeds->page_title = "SubRocks - Search";
44
-	$__server->page_embeds->page_description = "SubRocks is a site dedicated to bring back the 2012 layout of YouTube.";
45
-	$__server->page_embeds->page_image = "/yt/imgbin/full-size-logo.png";
46
-	$__server->page_embeds->page_url = "https://subrock.rocks/";
43
+    $__server->page_embeds->page_title = "SubRocks - Search";
44
+    $__server->page_embeds->page_description = "SubRocks is a site dedicated to bring back the 2012 layout of YouTube.";
45
+    $__server->page_embeds->page_image = "/yt/imgbin/full-size-logo.png";
46
+    $__server->page_embeds->page_url = "https://subrock.rocks/";
47 47
 ?>
48 48
 <!DOCTYPE html>
49 49
 <html>
@@ -219,14 +219,14 @@  discard block
 block discarded – undo
219 219
                   <div id="results-main-content">
220 220
                      <ol id="search-results">
221 221
                         <?php
222
-                           while($video = $stmt6->fetch(PDO::FETCH_ASSOC)) { 
223
-                              $video['video_responses'] = $__video_h->get_video_responses($video['rid']);
224
-                              $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
225
-                              $video['duration'] = $__time_h->timestamp($video['duration']);
226
-                              $video['views'] = $__video_h->fetch_video_views($video['rid']);
227
-                              $video['author'] = htmlspecialchars($video['author']);		
228
-                              $video['title'] = htmlspecialchars($video['title']);
229
-                              $video['description'] = $__video_h->shorten_description($video['description'], 50, true);
222
+                            while($video = $stmt6->fetch(PDO::FETCH_ASSOC)) { 
223
+                                $video['video_responses'] = $__video_h->get_video_responses($video['rid']);
224
+                                $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
225
+                                $video['duration'] = $__time_h->timestamp($video['duration']);
226
+                                $video['views'] = $__video_h->fetch_video_views($video['rid']);
227
+                                $video['author'] = htmlspecialchars($video['author']);		
228
+                                $video['title'] = htmlspecialchars($video['title']);
229
+                                $video['description'] = $__video_h->shorten_description($video['description'], 50, true);
230 230
                         ?>
231 231
                               <li class="yt-grid-box result-item-video *sr ">
232 232
                                  <div id="" class="yt-uix-tile yt-lockup-list yt-tile-default yt-grid-box ">
@@ -254,7 +254,7 @@  discard block
 block discarded – undo
254 254
                               </li>
255 255
                         <?php } ?>
256 256
                         <?php if($request->search_amount == 0)
257
-                           echo "Your search query has brought no results.<br><br>";
257
+                            echo "Your search query has brought no results.<br><br>";
258 258
                         ?>
259 259
                      </ol>
260 260
                   </div>
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -17,15 +17,15 @@  discard block
 block discarded – undo
17 17
 
18 18
    $results_per_page = 12;
19 19
    $number_of_result = $request->search_amount;
20
-   $number_of_page = ceil ($number_of_result / $results_per_page);  
20
+   $number_of_page = ceil($number_of_result/$results_per_page);  
21 21
 
22
-   if (!isset ($_GET['page']) ) {  
22
+   if (!isset ($_GET['page'])) {  
23 23
        $page = 1;  
24 24
    } else {  
25
-       $page = (int)$_GET['page'];  
25
+       $page = (int) $_GET['page'];  
26 26
    }  
27 27
 
28
-   $page_first_result = ($page - 1) * $results_per_page;  
28
+   $page_first_result = ($page - 1)*$results_per_page;  
29 29
 
30 30
    $stmt6 = $__db->prepare("SELECT * FROM videos WHERE lower(title) LIKE lower(:search) ORDER BY id DESC LIMIT :pfirst, :pper");
31 31
    $stmt6->bindParam(":search", $request->like_search_term);
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
                   <div id="results-main-content">
220 220
                      <ol id="search-results">
221 221
                         <?php
222
-                           while($video = $stmt6->fetch(PDO::FETCH_ASSOC)) { 
222
+                           while ($video = $stmt6->fetch(PDO::FETCH_ASSOC)) { 
223 223
                               $video['video_responses'] = $__video_h->get_video_responses($video['rid']);
224 224
                               $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
225 225
                               $video['duration'] = $__time_h->timestamp($video['duration']);
@@ -253,7 +253,7 @@  discard block
 block discarded – undo
253 253
                                  </div>
254 254
                               </li>
255 255
                         <?php } ?>
256
-                        <?php if($request->search_amount == 0)
256
+                        <?php if ($request->search_amount == 0)
257 257
                            echo "Your search query has brought no results.<br><br>";
258 258
                         ?>
259 259
                      </ol>
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
             </div>
268 268
             <div id="search-footer-box" class="searchFooterBox">
269 269
                <div class="yt-uix-pager" role="navigation">
270
-                  <?php for($page = 1; $page<= $number_of_page; $page++) { ?>
270
+                  <?php for ($page = 1; $page <= $number_of_page; $page++) { ?>
271 271
                      <a href="/results?search_query=<?php echo $request->search_term; ?>&page=<?php echo $page; ?>">
272 272
                         <button class="yt-uix-button yt-uix-button-default"><?php echo $page; ?></button>
273 273
                      </a>
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -253,8 +253,9 @@
 block discarded – undo
253 253
                                  </div>
254 254
                               </li>
255 255
                         <?php } ?>
256
-                        <?php if($request->search_amount == 0)
256
+                        <?php if($request->search_amount == 0) {
257 257
                            echo "Your search query has brought no results.<br><br>";
258
+}
258 259
                         ?>
259 260
                      </ol>
260 261
                   </div>
Please login to merge, or discard this patch.
web/public/comment_voting.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -14,17 +14,17 @@  discard block
 block discarded – undo
14 14
     "action" => "l" /* fallback */
15 15
 ];
16 16
 
17
-if(!isset($_SESSION['siteusername']) || !isset($_GET['id'])) 
17
+if (!isset($_SESSION['siteusername']) || !isset($_GET['id'])) 
18 18
     header('Location: ' . $_SERVER['HTTP_REFERER']); 
19 19
 
20
-if(isset($_GET['a']) && $_GET['a'] == "-1") 
20
+if (isset($_GET['a']) && $_GET['a'] == "-1") 
21 21
     $request->action = "d";
22 22
 
23 23
 $stmt = $__db->prepare("SELECT * FROM comment_likes WHERE sender = :username AND reciever = :reciever AND type = 'l'");
24 24
 $stmt->bindParam(":username", $_SESSION['siteusername']);
25 25
 $stmt->bindParam(":reciever", $request->comment_id);
26 26
 $stmt->execute();
27
-while($comment = $stmt->fetch(PDO::FETCH_ASSOC)) { 
27
+while ($comment = $stmt->fetch(PDO::FETCH_ASSOC)) { 
28 28
     $stmt = $__db->prepare("DELETE FROM comment_likes WHERE sender = :username AND reciever = :reciever");
29 29
     $stmt->execute(array(
30 30
         ':username' => $_SESSION['siteusername'],
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 $stmt->bindParam(":username", $_SESSION['siteusername']);
38 38
 $stmt->bindParam(":reciever", $request->comment_id);
39 39
 $stmt->execute();
40
-while($comment = $stmt->fetch(PDO::FETCH_ASSOC)) { 
40
+while ($comment = $stmt->fetch(PDO::FETCH_ASSOC)) { 
41 41
     $stmt = $__db->prepare("DELETE FROM comment_likes WHERE sender = :username AND reciever = :reciever");
42 42
     $stmt->execute(array(
43 43
         ':username' => $_SESSION['siteusername'],
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
     header('Location: ' . $_SERVER['HTTP_REFERER']);
47 47
 }
48 48
 
49
-if($request->action == "l") {
49
+if ($request->action == "l") {
50 50
     $stmt = $__db->prepare("INSERT INTO comment_likes (sender, reciever, type) VALUES (:sender, :reciever, 'l')");
51 51
     $stmt->bindParam(":sender", $_SESSION['siteusername']);
52 52
     $stmt->bindParam(":reciever", $request->comment_id);
Please login to merge, or discard this patch.
Braces   +5 added lines, -3 removed lines patch added patch discarded remove patch
@@ -14,11 +14,13 @@
 block discarded – undo
14 14
     "action" => "l" /* fallback */
15 15
 ];
16 16
 
17
-if(!isset($_SESSION['siteusername']) || !isset($_GET['id'])) 
18
-    header('Location: ' . $_SERVER['HTTP_REFERER']); 
17
+if(!isset($_SESSION['siteusername']) || !isset($_GET['id'])) {
18
+    header('Location: ' . $_SERVER['HTTP_REFERER']);
19
+}
19 20
 
20
-if(isset($_GET['a']) && $_GET['a'] == "-1") 
21
+if(isset($_GET['a']) && $_GET['a'] == "-1") {
21 22
     $request->action = "d";
23
+}
22 24
 
23 25
 $stmt = $__db->prepare("SELECT * FROM comment_likes WHERE sender = :username AND reciever = :reciever AND type = 'l'");
24 26
 $stmt->bindParam(":username", $_SESSION['siteusername']);
Please login to merge, or discard this patch.
web/public/playlists_ajax.php 2 patches
Indentation   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -8,36 +8,36 @@
 block discarded – undo
8 8
 <?php $__db_h = new db_helper(); ?>
9 9
 <?php $__time_h = new time_helper(); ob_start(); ?>
10 10
 <?php
11
-   $request = (object) [
12
-      "search_term"      => $_SESSION['siteusername'],
13
-      "like_search_term" => "%" . $_SESSION['siteusername'] . "%",
14
-      "search_amount"    => 0 /* [fallback] */
15
-   ];
11
+    $request = (object) [
12
+        "search_term"      => $_SESSION['siteusername'],
13
+        "like_search_term" => "%" . $_SESSION['siteusername'] . "%",
14
+        "search_amount"    => 0 /* [fallback] */
15
+    ];
16 16
 
17
-   $stmt = $__db->prepare("SELECT * FROM playlists WHERE lower(author) LIKE lower(:search) ");
18
-   $stmt->bindParam(":search", $request->like_search_term);
19
-   $stmt->execute(); 
20
-   $request->search_amount = $stmt->rowCount();
17
+    $stmt = $__db->prepare("SELECT * FROM playlists WHERE lower(author) LIKE lower(:search) ");
18
+    $stmt->bindParam(":search", $request->like_search_term);
19
+    $stmt->execute(); 
20
+    $request->search_amount = $stmt->rowCount();
21 21
 
22
-   $results_per_page = 12;
23
-   $number_of_result = $request->search_amount;
24
-   $number_of_page = ceil ($number_of_result / $results_per_page);  
22
+    $results_per_page = 12;
23
+    $number_of_result = $request->search_amount;
24
+    $number_of_page = ceil ($number_of_result / $results_per_page);  
25 25
 
26
-   if (!isset ($_GET['page']) ) {  
27
-       $page = 1;  
28
-   } else {  
29
-       $page = (int)$_GET['page'];  
30
-   }  
26
+    if (!isset ($_GET['page']) ) {  
27
+        $page = 1;  
28
+    } else {  
29
+        $page = (int)$_GET['page'];  
30
+    }  
31 31
 
32
-   $page_first_result = ($page - 1) * $results_per_page;  
32
+    $page_first_result = ($page - 1) * $results_per_page;  
33 33
 
34
-   $stmt6 = $__db->prepare("SELECT * FROM playlists WHERE lower(author) LIKE lower(:search) ORDER BY id DESC LIMIT :pfirst, :pper");
35
-   $stmt6->bindParam(":search", $request->like_search_term);
36
-   $stmt6->bindParam(":pfirst", $page_first_result);
37
-   $stmt6->bindParam(":pper", $results_per_page);
38
-   $stmt6->execute();
34
+    $stmt6 = $__db->prepare("SELECT * FROM playlists WHERE lower(author) LIKE lower(:search) ORDER BY id DESC LIMIT :pfirst, :pper");
35
+    $stmt6->bindParam(":search", $request->like_search_term);
36
+    $stmt6->bindParam(":pfirst", $page_first_result);
37
+    $stmt6->bindParam(":pper", $results_per_page);
38
+    $stmt6->execute();
39 39
 
40
-   /* TODO :: Easy & Clean Pagination Class PLZ :((( ))) */
40
+    /* TODO :: Easy & Clean Pagination Class PLZ :((( ))) */
41 41
 ?>               
42 42
 <table style="width: 100%;">
43 43
     <tr>
Please login to merge, or discard this 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/edit_playlist.php 2 patches
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.
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -8,10 +8,10 @@
 block discarded – undo
8 8
 <?php $__db_h = new db_helper(); ?>
9 9
 <?php $__time_h = new time_helper(); ?>
10 10
 <?php
11
-	$__server->page_embeds->page_title = "SubRocks - Edit Playlist";
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 - Edit Playlist";
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
 <?php if(!isset($_SESSION['siteusername'])) { header("Location: /sign_in"); } ?>
17 17
 <?php $_playlist = $__video_h->fetch_playlist_rid($_GET['id']); ?>
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.