Test Failed
Push — main ( d41f84...e8e3a0 )
by chief
03:50 queued 13s
created
web/public/my_videos.php 1 patch
Spacing   +13 added lines, -13 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
 <!DOCTYPE html>
18 18
 <html dir="ltr">
19 19
 	<head>
@@ -166,15 +166,15 @@  discard block
 block discarded – undo
166 166
                                     $stmt->execute();
167 167
 
168 168
                                     $number_of_result = $stmt->rowCount();
169
-                                    $number_of_page = ceil ($number_of_result / $results_per_page);  
169
+                                    $number_of_page = ceil($number_of_result/$results_per_page);  
170 170
 
171
-                                    if (!isset ($_GET['page']) ) {  
171
+                                    if (!isset ($_GET['page'])) {  
172 172
                                         $page = 1;  
173 173
                                     } else {  
174
-                                        $page = (int)$_GET['page'];  
174
+                                        $page = (int) $_GET['page'];  
175 175
                                     }  
176 176
 
177
-                                    $page_first_result = ($page - 1) * $results_per_page;  
177
+                                    $page_first_result = ($page - 1)*$results_per_page;  
178 178
                                 ?>
179 179
                                 <?php 
180 180
                                     $stmt6 = $__db->prepare("SELECT * FROM videos WHERE author = :search ORDER BY id DESC LIMIT :pfirst, :pper");
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
                                     </tr>
200 200
                                     
201 201
                                     <?php
202
-                                        while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { 
202
+                                        while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) { 
203 203
                                             $video['video_responses'] = $__video_h->get_video_responses($video['rid']);
204 204
                                             $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
205 205
                                             $video['duration'] = $__time_h->timestamp($video['duration']);
@@ -208,19 +208,19 @@  discard block
 block discarded – undo
208 208
                                             $video['title'] = htmlspecialchars($video['title']);
209 209
                                             $video['description'] = $__video_h->shorten_description($video['description'], 50);
210 210
 
211
-                                            if($video['thumbnail'] == ".png" && $video['filename'] == ".mp4") {
211
+                                            if ($video['thumbnail'] == ".png" && $video['filename'] == ".mp4") {
212 212
                                                 $status = "Corrupted";
213
-                                            } else if($video['visibility'] == "v") {
213
+                                            } else if ($video['visibility'] == "v") {
214 214
                                                 $status = "Approved";
215
-                                            } else if($video['visibility'] == "n") {
215
+                                            } else if ($video['visibility'] == "n") {
216 216
                                                 $status = "Approved";
217
-                                            } else if($video['visibility'] == "o") {
217
+                                            } else if ($video['visibility'] == "o") {
218 218
                                                 $status = "Disapproved";
219 219
                                             } else {
220 220
                                                 $status = "Unknown";
221 221
                                             }                      
222 222
                                             
223
-                                            if($video['commenting'] == "a") 
223
+                                            if ($video['commenting'] == "a") 
224 224
                                                 $video['commentstatus'] = "Commenting allowed";
225 225
                                             else 
226 226
                                                 $video['commentstatus'] = "Commenting disallowed";
@@ -284,7 +284,7 @@  discard block
 block discarded – undo
284 284
                                     </div>
285 285
                                 </center>
286 286
 
287
-                                <?php for($page = 1; $page<= $number_of_page; $page++) { ?>
287
+                                <?php for ($page = 1; $page <= $number_of_page; $page++) { ?>
288 288
                                     <button class="yt-uix-button yt-uix-button-default" onclick="ajax_fetch_videomanager(<?php echo $page; ?>)"><?php echo $page; ?></button>
289 289
                                 <?php } ?>   
290 290
 
@@ -330,7 +330,7 @@  discard block
 block discarded – undo
330 330
                                 </script>
331 331
 
332 332
                                 <?php 
333
-                                    if($stmt6->rowCount() == 0) { echo "
333
+                                    if ($stmt6->rowCount() == 0) { echo "
334 334
                                         <br>Welcome to your Video Manager! You can manage your uploaded videos here.<br>
335 335
                                         <a href=\"upload_video\">
336 336
                                             <button type=\"button\" class=\" yt-uix-button yt-uix-button-default\" role=\"button\">
Please login to merge, or discard this patch.
web/public/favorite_videos.php 1 patch
Spacing   +14 added lines, -14 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(); error_reporting(E_ERROR | E_PARSE); ?>
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 - Favorite Videos";
13 13
 	$__server->page_embeds->page_description = "SubRocks is a site dedicated to bring back the 2012 layout of YouTube.";
@@ -166,15 +166,15 @@  discard block
 block discarded – undo
166 166
                                     $stmt->execute();
167 167
 
168 168
                                     $number_of_result = $stmt->rowCount();
169
-                                    $number_of_page = ceil ($number_of_result / $results_per_page);  
169
+                                    $number_of_page = ceil($number_of_result/$results_per_page);  
170 170
 
171
-                                    if (!isset ($_GET['page']) ) {  
171
+                                    if (!isset ($_GET['page'])) {  
172 172
                                         $page = 1;  
173 173
                                     } else {  
174
-                                        $page = (int)$_GET['page'];  
174
+                                        $page = (int) $_GET['page'];  
175 175
                                     }  
176 176
 
177
-                                    $page_first_result = ($page - 1) * $results_per_page;  
177
+                                    $page_first_result = ($page - 1)*$results_per_page;  
178 178
                                 ?>
179 179
                                 <?php 
180 180
                                     $stmt6 = $__db->prepare("SELECT * FROM favorite_video WHERE sender = :search ORDER BY id DESC LIMIT :pfirst, :pper");
@@ -194,8 +194,8 @@  discard block
 block discarded – undo
194 194
                                     </tr>
195 195
                                     
196 196
                                     <?php
197
-                                        while($video = $stmt6->fetch(PDO::FETCH_ASSOC)) { 
198
-											if($__video_h->video_exists($video['reciever'])) {
197
+                                        while ($video = $stmt6->fetch(PDO::FETCH_ASSOC)) { 
198
+											if ($__video_h->video_exists($video['reciever'])) {
199 199
 												$_video = $__video_h->fetch_video_rid($video['reciever']);
200 200
 												$_video['video_responses'] = $__video_h->get_video_responses($_video['rid']);
201 201
 												$_video['age'] = $__time_h->time_elapsed_string($_video['publish']);		
@@ -205,19 +205,19 @@  discard block
 block discarded – undo
205 205
 												$_video['title'] = htmlspecialchars($_video['title']);
206 206
 												$_video['description'] = $__video_h->shorten_description($_video['description'], 50);
207 207
 
208
-												if($_video['thumbnail'] == ".png" && $_video['filename'] == ".mp4") {
208
+												if ($_video['thumbnail'] == ".png" && $_video['filename'] == ".mp4") {
209 209
 													$status = "Corrupted";
210
-												} else if($_video['visibility'] == "v") {
210
+												} else if ($_video['visibility'] == "v") {
211 211
 													$status = "Approved";
212
-												} else if($_video['visibility'] == "n") {
212
+												} else if ($_video['visibility'] == "n") {
213 213
 													$status = "Approved";
214
-												} else if($_video['visibility'] == "o") {
214
+												} else if ($_video['visibility'] == "o") {
215 215
 													$status = "Disapproved";
216 216
 												} else {
217 217
 													$status = "Unknown";
218 218
 												}                      
219 219
 												
220
-												if($_video['commenting'] == "a") 
220
+												if ($_video['commenting'] == "a") 
221 221
 													$_video['commentstatus'] = "Commenting allowed";
222 222
 												else 
223 223
 													$_video['commentstatus'] = "Commenting disallowed";
@@ -263,7 +263,7 @@  discard block
 block discarded – undo
263 263
                                     </div>
264 264
                                 </center>
265 265
 
266
-                                <?php for($page = 1; $page<= $number_of_page; $page++) { ?>
266
+                                <?php for ($page = 1; $page <= $number_of_page; $page++) { ?>
267 267
                                     <button class="yt-uix-button yt-uix-button-default" onclick="ajax_fetch_videomanager(<?php echo $page; ?>)"><?php echo $page; ?></button>
268 268
                                 <?php } ?>   
269 269
 
@@ -309,7 +309,7 @@  discard block
 block discarded – undo
309 309
                                 </script>
310 310
 
311 311
                                 <?php 
312
-                                    if($stmt6->rowCount() == 0) { echo "
312
+                                    if ($stmt6->rowCount() == 0) { echo "
313 313
                                         <br>Welcome to your favorite videos page.<br>
314 314
 										You can add videos that you like and the video will be added here!
315 315
                                     "; 
Please login to merge, or discard this patch.
web/public/inbox/compose.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
 <?php $__user_u = new user_update($__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 - Compose";
14 14
 	$__server->page_embeds->page_description = "SubRocks is a site dedicated to bring back the 2012 layout of YouTube.";
@@ -16,16 +16,16 @@  discard block
 block discarded – undo
16 16
 	$__server->page_embeds->page_url = "https://subrock.rocks/";
17 17
 ?>
18 18
 <?php
19
-    if($_SERVER['REQUEST_METHOD'] == 'POST') {
19
+    if ($_SERVER['REQUEST_METHOD'] == 'POST') {
20 20
         $error = array();
21 21
 
22
-        if(!isset($_SESSION['siteusername'])){ $error['message'] = "You are not logged in"; $error['status'] = true; }
23
-        if(!$_POST['contents']){ $error['message'] = "Your description cannot be blank"; $error['status'] = true; }
24
-        if(empty(trim($_POST['subject']))){ $error['message'] = "Your subject cannot be blank"; $error['status'] = true; }
25
-        if(strlen($_POST['contents']) > 1000){ $error['message'] = "Your description must be shorter than 1000 characters"; $error['status'] = true; }
26
-        if($__user_h->if_cooldown($_SESSION['siteusername'])) { $error['message'] = "You are on a cooldown! Wait for a minute before sending a private message."; $error['status'] = true; }
22
+        if (!isset($_SESSION['siteusername'])) { $error['message'] = "You are not logged in"; $error['status'] = true; }
23
+        if (!$_POST['contents']) { $error['message'] = "Your description cannot be blank"; $error['status'] = true; }
24
+        if (empty(trim($_POST['subject']))) { $error['message'] = "Your subject cannot be blank"; $error['status'] = true; }
25
+        if (strlen($_POST['contents']) > 1000) { $error['message'] = "Your description must be shorter than 1000 characters"; $error['status'] = true; }
26
+        if ($__user_h->if_cooldown($_SESSION['siteusername'])) { $error['message'] = "You are on a cooldown! Wait for a minute before sending a private message."; $error['status'] = true; }
27 27
 
28
-        if(!isset($error['message'])) {
28
+        if (!isset($error['message'])) {
29 29
             $stmt = $__db->prepare("INSERT INTO pms (touser, subject, message, owner) VALUES (:touser, :subject, :message, :owner)");
30 30
             $stmt->bindParam(":subject", $_POST['subject']);
31 31
             $stmt->bindParam(":message", $_POST['contents']);
Please login to merge, or discard this patch.
web/public/report.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
 <?php $__db_h = new db_helper(); ?>
9 9
 <?php $__time_h = new time_helper(); ?>
10 10
 <?php
11
-if(!isset($_SESSION['siteusername']))
11
+if (!isset($_SESSION['siteusername']))
12 12
     header('Location: ' . $_SERVER['HTTP_REFERER'] . '&error=You have to be logged in to report videos.');
13 13
 
14 14
 $_video = $__video_h->fetch_video_rid($_GET['v']);
@@ -21,17 +21,17 @@  discard block
 block discarded – undo
21 21
     "username" => str_replace("@", "", $_SESSION['siteusername']),
22 22
     // "avatar_url" => "https://subrock.rocks/dynamic/pfp/",
23 23
     "tts" => false,
24
-], JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE );
24
+], JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
25 25
 
26
-$ch = curl_init( $webhookurl );
27
-curl_setopt( $ch, CURLOPT_HTTPHEADER, array('Content-type: application/json'));
28
-curl_setopt( $ch, CURLOPT_POST, 1);
29
-curl_setopt( $ch, CURLOPT_POSTFIELDS, $json_data);
30
-curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, 1);
31
-curl_setopt( $ch, CURLOPT_HEADER, 0);
32
-curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1);
26
+$ch = curl_init($webhookurl);
27
+curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-type: application/json'));
28
+curl_setopt($ch, CURLOPT_POST, 1);
29
+curl_setopt($ch, CURLOPT_POSTFIELDS, $json_data);
30
+curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
31
+curl_setopt($ch, CURLOPT_HEADER, 0);
32
+curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
33 33
 
34
-$response = curl_exec( $ch );
35
-curl_close( $ch );
34
+$response = curl_exec($ch);
35
+curl_close($ch);
36 36
 header('Location: ' . $_SERVER['HTTP_REFERER'] . '&success=Successfully reported this video.');
37 37
 ?>
38 38
\ No newline at end of file
Please login to merge, or discard this patch.
web/public/index.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 				<div id="content">
43 43
 					<div class="guide-layout-container enable-fancy-subscribe-button">
44 44
 						<div class="guide-container">
45
-						<?php if(!isset($_SESSION['siteusername'])) { ?>
45
+						<?php if (!isset($_SESSION['siteusername'])) { ?>
46 46
 									<div id="guide-builder-promo">
47 47
 								<h2>
48 48
 							Sign in to add channels to your homepage
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 							</div>
62 62
 							<div class="guide">
63 63
 							<?php 
64
-								if(isset($_SESSION['siteusername'])) {
64
+								if (isset($_SESSION['siteusername'])) {
65 65
 								?>
66 66
 								<div style="/*! margin-top: 0px; *//*! margin-left: 10px; *//*! margin-bottom: 13px; */height: 99px;" class="guide-section feed-header channel first"><img alt="" src="/dynamic/pfp/<?php echo $__user_h->fetch_pfp($_SESSION['siteusername']); ?>" style="height: 88px;position: relative;top: 4px;left: 4px;" class="feed-header-thumb channel-thumb" width="88px"><div id="links" style="/*! margin-left: 5px; */position: relative;left: 13px;top: 7px;"><div style="font-size: 11px;margin-bottom: 6px;" class="metadata">
67 67
 								<a href="/user/<?php echo htmlspecialchars($_SESSION['siteusername']); ?>" style="color: inherit;">My channel
@@ -172,8 +172,8 @@  discard block
 block discarded – undo
172 172
 											</span>
173 173
 											</a>
174 174
 										</li>
175
-                                        <?php if(!isset($_SESSION['siteusername'])) { ?>
176
-                                            <?php foreach($__server->featured_channels as $channel) { ?>
175
+                                        <?php if (!isset($_SESSION['siteusername'])) { ?>
176
+                                            <?php foreach ($__server->featured_channels as $channel) { ?>
177 177
                                                 <li class="guide-item-container ">
178 178
                                                     <a class="guide-item" data-external-id="<?php echo htmlspecialchars($channel); ?>" data-feed-name="<?php echo htmlspecialchars($channel); ?>" data-feed-type="user">
179 179
                                                     <span class="thumb">  <span class="video-thumb ux-thumb yt-thumb-square-28 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="http://s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Thumbnail" onerror="this.onerror=null;this.src='/dynamic/thumbs/default.jpg';" data-thumb="/dynamic/pfp/<?php echo $__user_h->fetch_pfp($channel); ?>" width="28"><span class="vertical-align"></span></span></span></span>
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
                                                 $stmt = $__db->prepare("SELECT * FROM subscribers WHERE sender = :username ORDER BY id DESC LIMIT 20");
189 189
                                                 $stmt->bindParam(":username", $_SESSION['siteusername']);
190 190
                                                 $stmt->execute();
191
-                                                while($channel = $stmt->fetch(PDO::FETCH_ASSOC)) { $channel = $channel['reciever']; ?>
191
+                                                while ($channel = $stmt->fetch(PDO::FETCH_ASSOC)) { $channel = $channel['reciever']; ?>
192 192
                                                 <li class="guide-item-container ">
193 193
                                                     <a class="guide-item" data-external-id="<?php echo htmlspecialchars($channel); ?>" data-feed-name="<?php echo htmlspecialchars($channel); ?>" data-feed-type="user">
194 194
                                                     <span class="thumb">  <span class="video-thumb ux-thumb yt-thumb-square-28 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="http://s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Thumbnail" onerror="this.onerror=null;this.src='/dynamic/thumbs/default.jpg';" data-thumb="/dynamic/pfp/<?php echo $__user_h->fetch_pfp($channel); ?>" width="28"><span class="vertical-align"></span></span></span></span>
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
 								<?php
228 228
 									$stmt = $__db->prepare("SELECT * FROM videos WHERE visibility = 'n' ORDER BY rand() LIMIT 4");
229 229
 									$stmt->execute();
230
-									while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
230
+									while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
231 231
 										$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
232 232
 										$video['duration'] = $__time_h->timestamp($video['duration']);
233 233
 										$video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
 								<?php
251 251
 									$stmt = $__db->prepare("SELECT * FROM videos WHERE featured = 'v' AND visibility = 'n' ORDER BY id DESC LIMIT 4");
252 252
 									$stmt->execute();
253
-									while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
253
+									while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
254 254
 										$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
255 255
 										$video['duration'] = $__time_h->timestamp($video['duration']);
256 256
 										$video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
 											<?php
284 284
 												$stmt = $__db->prepare("SELECT * FROM videos WHERE visibility = 'n' ORDER BY id DESC LIMIT 20");
285 285
 												$stmt->execute();
286
-												while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
286
+												while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
287 287
 													$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
288 288
 													$video['duration'] = $__time_h->timestamp($video['duration']);
289 289
 													$video['views'] = $__video_h->fetch_video_views($video['rid']);
Please login to merge, or discard this patch.
web/public/s/mod/old_channel_customization.php 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/s/mod/sidebar_admin.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,8 +39,8 @@
 block discarded – undo
39 39
 ?>
40 40
 <div id="browse-side-column" class="ytg-2col ytg-last">
41 41
     <ol class="navigation-menu">
42
-        <?php foreach($__tabs as $_tab) { 
43
-            if($_SERVER['REQUEST_URI'] != $_tab->url)
42
+        <?php foreach ($__tabs as $_tab) { 
43
+            if ($_SERVER['REQUEST_URI'] != $_tab->url)
44 44
                 $_tab->selected = true;
45 45
             ?>
46 46
             <li class="menu-item">
Please login to merge, or discard this patch.
web/public/s/mod/channel_featured.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@  discard block
 block discarded – undo
2 2
 								<div class="channel-tab-content channel-layout-two-column selected blogger-template">
3 3
 									<div class="tab-content-body">
4 4
 										<div class="primary-pane">
5
-                                            <?php if($_user['featured'] != false && $__video_h->video_exists($_user['featured'])) { ?>
5
+                                            <?php if ($_user['featured'] != false && $__video_h->video_exists($_user['featured'])) { ?>
6 6
 											<div class="channels-featured-video channel-module yt-uix-c3-module-container has-visible-edge">
7 7
 												<div class="module-view featured-video-view-module">
8 8
 												<div id="watch-video" >
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 													<div class="playlist-info">
60 60
 														<h2>Uploaded videos</h2>
61 61
 														<div class="yt-horizontal-rule "><span class="first"></span><span class="second"></span><span class="third"></span></div>
62
-														<?php if($_user['videos'] == 0) { ?>
62
+														<?php if ($_user['videos'] == 0) { ?>
63 63
 															<h4>This user has not uploaded a video yet.</h4>
64 64
 														<?php } ?>
65 65
 													</div>
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
                                                             $stmt = $__db->prepare("SELECT * FROM videos WHERE author = :username ORDER BY id DESC LIMIT 20");
69 69
                                                             $stmt->bindParam(":username", $_user['username']);
70 70
                                                             $stmt->execute();
71
-                                                            while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { 
71
+                                                            while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) { 
72 72
                                                         ?>
73 73
 														<li class="blogger-video">
74 74
 															<div class="video yt-tile-visible">
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
 														</div>
151 151
 														<hr class="yt-horizontal-rule ">
152 152
 													</div>
153
-													<?php if(!empty($_user['website'])) { ?>
153
+													<?php if (!empty($_user['website'])) { ?>
154 154
 														<div class="user-profile-item">
155 155
 															<div class="yt-c3-profile-custom-url field-container ">
156 156
 																<a href="<?php echo addhttp(htmlspecialchars($_user['website'])); ?>" rel="me nofollow" target="_blank" title="<?php echo htmlspecialchars($_user['website']); ?>" class="yt-uix-redirect-link">
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
 															<h5>Country</h5>
200 200
 															<span class="value"><?php echo htmlspecialchars($_user['country']); ?></span>
201 201
 														</div>
202
-														<?php if($_user['genre'] != "none") { ?>
202
+														<?php if ($_user['genre'] != "none") { ?>
203 203
 															<div class="user-profile-item ">
204 204
 																<h5>Channel Genre</h5>
205 205
 																<span class="value"><?php echo htmlspecialchars(ucfirst($_user['genre'])); ?></span>
@@ -211,16 +211,16 @@  discard block
 block discarded – undo
211 211
 											</div>
212 212
 											<div class="channel-module other-channels yt-uix-c3-module-container other-channels-compact">
213 213
 												<?php $_user['featured_channels'] = explode(",", $_user['featured_channels']); ?>
214
-												<?php if(count($_user['featured_channels']) != 0) { ?>
214
+												<?php if (count($_user['featured_channels']) != 0) { ?>
215 215
 												<div class="module-view other-channels-view">
216
-													<h2 <?php if(@$_SESSION['siteusername'] == $_user['username']) { ?>style="display: inline-block;position: relative;bottom: 10px;"<?php } ?>>Featured Channels</h2> 
217
-													<?php if(@$_SESSION['siteusername'] == $_user['username']) { 
216
+													<h2 <?php if (@$_SESSION['siteusername'] == $_user['username']) { ?>style="display: inline-block;position: relative;bottom: 10px;"<?php } ?>>Featured Channels</h2> 
217
+													<?php if (@$_SESSION['siteusername'] == $_user['username']) { 
218 218
 														echo "<a href='#' style='float:right;font-size:11px;color:black;' onclick=';open_featured_channels();return false;'>edit</a>"; 
219 219
 													} ?>
220 220
 													<ul class="channel-summary-list ">
221 221
 														<?php 
222
-															foreach($_user['featured_channels'] as $user) {
223
-																if($__user_h->user_exists($user)) {
222
+															foreach ($_user['featured_channels'] as $user) {
223
+																if ($__user_h->user_exists($user)) {
224 224
 														?>
225 225
 															<li class="yt-tile-visible yt-uix-tile">
226 226
 																<div class="channel-summary clearfix channel-summary-compact">
@@ -249,13 +249,13 @@  discard block
 block discarded – undo
249 249
 												$stmt->bindParam(":search", $_user['username']);
250 250
 												$stmt->execute();
251 251
 
252
-												if($stmt->rowCount() != 0) {
252
+												if ($stmt->rowCount() != 0) {
253 253
 											?>
254 254
 												<div class="playlists-narrow channel-module yt-uix-c3-module-container">
255 255
 													<div class="module-view gh-featured">
256 256
 														<h2>Featured Playlists</h2>     
257 257
 														<?php
258
-														while($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { 
258
+														while ($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { 
259 259
 															$playlist['videos'] = json_decode($playlist['videos']);
260 260
 														?> 
261 261
 															<div class="playlist yt-tile-visible yt-uix-tile">
Please login to merge, or discard this patch.
web/public/admin/bans.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -9,8 +9,8 @@
 block discarded – undo
9 9
 <?php $__user_u = new user_update($__db); ?>
10 10
 <?php $__db_h = new db_helper(); ?>
11 11
 <?php $__time_h = new time_helper(); ?>
12
-<?php if(!isset($_SESSION['siteusername'])) { header("Location: /sign_in"); } ?>
13
-<?php if(!$__user_h->if_admin($_SESSION['siteusername'])) { header("Location: /"); } ?>
12
+<?php if (!isset($_SESSION['siteusername'])) { header("Location: /sign_in"); } ?>
13
+<?php if (!$__user_h->if_admin($_SESSION['siteusername'])) { header("Location: /"); } ?>
14 14
 <?php
15 15
 	$__server->page_embeds->page_title = "SubRocks - Ban User";
16 16
 	$__server->page_embeds->page_description = "SubRocks is a site dedicated to bring back the 2012 layout of YouTube.";
Please login to merge, or discard this patch.