Test Failed
Push — main ( 0c12e7...ee73bc )
by chief
04:22
created
web/public/channel.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']);
@@ -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,7 +136,7 @@  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
 				background-position: center top;
@@ -163,11 +163,11 @@  discard block
 block discarded – undo
163 163
 			<div id="masthead-container"><?php require($_SERVER['DOCUMENT_ROOT'] . "/s/mod/header.php"); ?></div>
164 164
 			<div id="content-container">
165 165
 				<!-- begin content -->
166
-				<?php if(isset($_SESSION['siteusername']) && $_user['username'] == $_SESSION['siteusername']) { ?>
166
+				<?php if (isset($_SESSION['siteusername']) && $_user['username'] == $_SESSION['siteusername']) { ?>
167 167
 					<div class="channel_customization"><?php require($_SERVER['DOCUMENT_ROOT'] . "/s/mod/channel_customization.php"); ?></div>
168 168
 				<?php } ?>
169 169
 				<?php
170
-					if(empty(trim($_user['bio'])))
170
+					if (empty(trim($_user['bio'])))
171 171
 						$_user['bio'] = "This user has no description.";
172 172
 				?>
173 173
 				<div id="content">
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
 												<h1><?php echo htmlspecialchars($_user['username']); ?></h1>
223 223
 											</div>
224 224
 											<div class="upper-left-section enable-fancy-subscribe-button">
225
-												<?php if($_user['username'] != @$_SESSION['siteusername']) { ?>
225
+												<?php if ($_user['username'] != @$_SESSION['siteusername']) { ?>
226 226
 													<div class="yt-subscription-button-hovercard yt-uix-hovercard">
227 227
 														<button 
228 228
 															href="#" 
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
 															title="" 
231 231
 															id="subscribe-button"
232 232
 															type="button" 
233
-															class="yt-subscription-button <?php if($_user['subscribed']) { echo "subscribed "; } ?>  yt-uix-button yt-uix-button-subscription yt-uix-tooltip" 
233
+															class="yt-subscription-button <?php if ($_user['subscribed']) { echo "subscribed "; } ?>  yt-uix-button yt-uix-button-subscription yt-uix-tooltip" 
234 234
 															role="button"><span class="yt-uix-button-icon-wrapper"><img class="yt-uix-button-icon yt-uix-button-icon-subscribe" 
235 235
 															src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt=""></span><span class="yt-uix-button-content">  <span class="subscribe-label">Subscribe</span>
236 236
 														<span class="subscribed-label">Subscribed</span>
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
 												<div class="header-stats">
252 252
 													<div class="stat-entry">
253 253
 														<span class="stat-value"><?php echo $_user['subscribers']; ?></span>
254
-														<span class="stat-name"><?php if($_user['subscribers'] == 1){ ?>subscriber<?php }else{ ?>subscribers<?php } ?></span>
254
+														<span class="stat-name"><?php if ($_user['subscribers'] == 1) { ?>subscriber<?php } else { ?>subscribers<?php } ?></span>
255 255
 													</div>
256 256
 													<div class="stat-entry">
257 257
 														<span class="stat-value"><?php echo $_user['views']; ?></span>
@@ -296,12 +296,12 @@  discard block
 block discarded – undo
296 296
 									</div>
297 297
 								</div>
298 298
 							</div>
299
-                            <?php if($_user['featured'] != "None") { $video = $__video_h->fetch_video_rid($_user['featured']); } else { $_user['featured'] = false; } ?>
299
+                            <?php if ($_user['featured'] != "None") { $video = $__video_h->fetch_video_rid($_user['featured']); } else { $_user['featured'] = false; } ?>
300 300
 							<div id="branded-page-body">
301 301
 								<div class="channel-tab-content channel-layout-two-column selected blogger-template">
302 302
 									<div class="tab-content-body">
303 303
 										<div class="primary-pane">
304
-                                            <?php if($_user['featured'] != false && $__video_h->video_exists($_user['featured'])) { ?>
304
+                                            <?php if ($_user['featured'] != false && $__video_h->video_exists($_user['featured'])) { ?>
305 305
 											<div class="channels-featured-video channel-module yt-uix-c3-module-container has-visible-edge">
306 306
 												<div class="module-view featured-video-view-module">
307 307
 												<div id="watch-video" >
@@ -358,7 +358,7 @@  discard block
 block discarded – undo
358 358
 													<div class="playlist-info">
359 359
 														<h2>Uploaded videos</h2>
360 360
 														<div class="yt-horizontal-rule "><span class="first"></span><span class="second"></span><span class="third"></span></div>
361
-														<?php if($_user['videos'] == 0) { ?>
361
+														<?php if ($_user['videos'] == 0) { ?>
362 362
 															<h4>This user has not uploaded a video yet.</h4>
363 363
 														<?php } ?>
364 364
 													</div>
@@ -367,7 +367,7 @@  discard block
 block discarded – undo
367 367
                                                             $stmt = $__db->prepare("SELECT * FROM videos WHERE author = :username ORDER BY id DESC LIMIT 20");
368 368
                                                             $stmt->bindParam(":username", $_user['username']);
369 369
                                                             $stmt->execute();
370
-                                                            while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { 
370
+                                                            while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) { 
371 371
                                                         ?>
372 372
 														<li class="blogger-video">
373 373
 															<div class="video yt-tile-visible">
@@ -449,7 +449,7 @@  discard block
 block discarded – undo
449 449
 														</div>
450 450
 														<hr class="yt-horizontal-rule ">
451 451
 													</div>
452
-													<?php if(!empty($_user['website'])) { ?>
452
+													<?php if (!empty($_user['website'])) { ?>
453 453
 														<div class="user-profile-item">
454 454
 															<div class="yt-c3-profile-custom-url field-container ">
455 455
 																<a href="<?php echo addhttp(htmlspecialchars($_user['website'])); ?>" rel="me nofollow" target="_blank" title="<?php echo htmlspecialchars($_user['website']); ?>" class="yt-uix-redirect-link">
@@ -498,7 +498,7 @@  discard block
 block discarded – undo
498 498
 															<h5>Country</h5>
499 499
 															<span class="value"><?php echo htmlspecialchars($_user['country']); ?></span>
500 500
 														</div>
501
-														<?php if($_user['genre'] != "none") { ?>
501
+														<?php if ($_user['genre'] != "none") { ?>
502 502
 															<div class="user-profile-item ">
503 503
 																<h5>Channel Genre</h5>
504 504
 																<span class="value"><?php echo htmlspecialchars($_user['genre']); ?></span>
@@ -510,13 +510,13 @@  discard block
 block discarded – undo
510 510
 											</div>
511 511
 											<div class="channel-module other-channels yt-uix-c3-module-container other-channels-compact">
512 512
 												<?php $_user['featured_channels'] = explode(",", $_user['featured_channels']); ?>
513
-												<?php if(count($_user['featured_channels']) != 0) { ?>
513
+												<?php if (count($_user['featured_channels']) != 0) { ?>
514 514
 												<div class="module-view other-channels-view">
515 515
 													<h2>Featured Channels</h2>
516 516
 													<ul class="channel-summary-list ">
517 517
 														<?php 
518
-															foreach($_user['featured_channels'] as $user) {
519
-																if($__user_h->user_exists($user)) {
518
+															foreach ($_user['featured_channels'] as $user) {
519
+																if ($__user_h->user_exists($user)) {
520 520
 														?>
521 521
 															<li class="yt-tile-visible yt-uix-tile">
522 522
 																<div class="channel-summary clearfix channel-summary-compact">
@@ -545,13 +545,13 @@  discard block
 block discarded – undo
545 545
 												$stmt->bindParam(":search", $_user['username']);
546 546
 												$stmt->execute();
547 547
 
548
-												if($stmt->rowCount() != 0) {
548
+												if ($stmt->rowCount() != 0) {
549 549
 											?>
550 550
 												<div class="playlists-narrow channel-module yt-uix-c3-module-container">
551 551
 													<div class="module-view gh-featured">
552 552
 														<h2>Featured Playlists</h2>     
553 553
 														<?php
554
-														while($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { 
554
+														while ($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { 
555 555
 															$playlist['videos'] = json_decode($playlist['videos']);
556 556
 														?> 
557 557
 															<div class="playlist yt-tile-visible yt-uix-tile">
Please login to merge, or discard this patch.
web/public/s/classes/video_helper.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -12,14 +12,14 @@  discard block
 block discarded – undo
12 12
 
13 13
     public function sh_exec(string $cmd, string $outputfile = "", string $pidfile = "", bool $mergestderror = true, bool $bg = false) {
14 14
         $fullcmd = $cmd;
15
-        if(strlen($outputfile) > 0) $fullcmd .= " >> " . $outputfile;
16
-        if($mergestderror) $fullcmd .= " 2>&1";
15
+        if (strlen($outputfile) > 0) $fullcmd .= " >> " . $outputfile;
16
+        if ($mergestderror) $fullcmd .= " 2>&1";
17 17
         
18
-        if($bg) {
18
+        if ($bg) {
19 19
             $fullcmd = "nohup " . $fullcmd . " &";
20
-            if(strlen($pidfile)) $fullcmd .= " echo $! > " . $pidfile;
20
+            if (strlen($pidfile)) $fullcmd .= " echo $! > " . $pidfile;
21 21
         } else {
22
-            if(strlen($pidfile) > 0) $fullcmd .= "; echo $$ > " . $pidfile;
22
+            if (strlen($pidfile) > 0) $fullcmd .= "; echo $$ > " . $pidfile;
23 23
         }
24 24
         shell_exec($fullcmd);
25 25
     }
@@ -29,21 +29,21 @@  discard block
 block discarded – undo
29 29
             $handle = fopen($file, "r");
30 30
             $i = 0;
31 31
             while (!feof($handle)) {
32
-                call_user_func_array($callback,array(fread($handle,$chunk_size),&$handle,$i));
32
+                call_user_func_array($callback, array(fread($handle, $chunk_size), &$handle, $i));
33 33
                 $i++;
34 34
             }
35 35
     
36 36
             fclose($handle);
37 37
         }
38
-        catch(Exception $e) {
39
-            trigger_error("file_get_contents_chunked::" . $e->getMessage(),E_USER_NOTICE);
38
+        catch (Exception $e) {
39
+            trigger_error("file_get_contents_chunked::" . $e->getMessage(), E_USER_NOTICE);
40 40
             return false;
41 41
         }
42 42
 
43 43
         return true;
44 44
     }
45 45
 
46
-	public function __construct($conn){
46
+	public function __construct($conn) {
47 47
         $this->__db = $conn;
48 48
 	}
49 49
 
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
         $stmt->execute();
62 62
         
63 63
         $views = 0;
64
-        while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { 
64
+        while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) { 
65 65
             $views = $views + $this->fetch_video_views($video['rid']);
66 66
         }
67 67
         return $views;
@@ -78,12 +78,12 @@  discard block
 block discarded – undo
78 78
 
79 79
     function shorten_description(string $description, int $limit, bool $newlines = false) {
80 80
         $description = trim($description);
81
-        if(strlen($description) >= $limit) {
81
+        if (strlen($description) >= $limit) {
82 82
             $description = substr($description, 0, $limit) . "...";
83 83
         } 
84 84
 
85 85
         $description = htmlspecialchars($description);
86
-        if($newlines) { $description = str_replace(PHP_EOL, "<br>", $description); }
86
+        if ($newlines) { $description = str_replace(PHP_EOL, "<br>", $description); }
87 87
         return $description;
88 88
     }
89 89
 
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
     }
97 97
 
98 98
     function get_video_likes($reciever, $liked) {
99
-        if($liked) {
99
+        if ($liked) {
100 100
             $stmt = $this->__db->prepare("SELECT `sender` FROM likes WHERE reciever = :reciever AND type = 'l'");
101 101
             $stmt->bindParam(":reciever", $reciever);
102 102
             $stmt->execute();
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
     }
113 113
 
114 114
     function if_liked($user, $reciever, $liked) {
115
-        if($liked) {
115
+        if ($liked) {
116 116
             $stmt = $this->__db->prepare("SELECT `sender` FROM likes WHERE sender = :sender AND reciever = :reciever AND type = 'l'");
117 117
             $stmt->bindParam(":sender", $user);
118 118
             $stmt->bindParam(":reciever", $reciever);
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
     }
131 131
 
132 132
     function if_comment_liked($user, $reciever, $liked) {
133
-        if($liked) {
133
+        if ($liked) {
134 134
             $stmt = $this->__db->prepare("SELECT `sender` FROM comment_likes WHERE sender = :sender AND reciever = :reciever AND type = 'l'");
135 135
             $stmt->bindParam(":sender", $user);
136 136
             $stmt->bindParam(":reciever", $reciever);
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/view_playlist.php 1 patch
Spacing   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 <?php
15 15
     $_playlist = $__video_h->fetch_playlist_rid($_GET['v']);
16 16
 
17
-    if(!$__user_h->user_exists($_playlist['author']))
17
+    if (!$__user_h->user_exists($_playlist['author']))
18 18
         header("Location: /?userdoesntexist");    
19 19
 
20 20
     $_user = $__user_h->fetch_user_username($_playlist['author']);
@@ -66,28 +66,28 @@  discard block
 block discarded – undo
66 66
     $_user['genre'] = strtolower($_user['genre']);
67 67
 	$_user['subscribed'] = $__user_h->if_subscribed(@$_SESSION['siteusername'], $_user['username']);
68 68
 
69
-    if(!check_valid_colorhex($_user['primary_color']) && strlen($_user['primary_color']) != 6) { $_user['primary_color'] = ""; }
70
-    if(!check_valid_colorhex($_user['secondary_color']) && strlen($_user['secondary_color']) != 6) { $_user['secondary_color'] = ""; }
71
-    if(!check_valid_colorhex($_user['third_color']) && strlen($_user['third_color']) != 6) { $_user['third_color'] = ""; }
72
-    if(!check_valid_colorhex($_user['text_color']) && strlen($_user['text_color']) != 6) { $_user['text_color'] = ""; }
73
-    if(!check_valid_colorhex($_user['primary_color_text']) && strlen($_user['primary_color_text']) != 6) { $_user['primary_color_text'] = ""; }
74
-    if(!check_valid_colorhex($_user['2009_bgcolor']) && strlen($_user['2009_bgcolor']) != 6) { $_user['2009_bgcolor'] = ""; }
69
+    if (!check_valid_colorhex($_user['primary_color']) && strlen($_user['primary_color']) != 6) { $_user['primary_color'] = ""; }
70
+    if (!check_valid_colorhex($_user['secondary_color']) && strlen($_user['secondary_color']) != 6) { $_user['secondary_color'] = ""; }
71
+    if (!check_valid_colorhex($_user['third_color']) && strlen($_user['third_color']) != 6) { $_user['third_color'] = ""; }
72
+    if (!check_valid_colorhex($_user['text_color']) && strlen($_user['text_color']) != 6) { $_user['text_color'] = ""; }
73
+    if (!check_valid_colorhex($_user['primary_color_text']) && strlen($_user['primary_color_text']) != 6) { $_user['primary_color_text'] = ""; }
74
+    if (!check_valid_colorhex($_user['2009_bgcolor']) && strlen($_user['2009_bgcolor']) != 6) { $_user['2009_bgcolor'] = ""; }
75 75
 
76
-	if(isset($_SESSION['siteusername']))
76
+	if (isset($_SESSION['siteusername']))
77 77
     	$__user_i->check_view_channel($_user['username'], @$_SESSION['siteusername']);
78 78
 
79
-    if($_SERVER['REQUEST_METHOD'] == 'POST') {
79
+    if ($_SERVER['REQUEST_METHOD'] == 'POST') {
80 80
         $error = array();
81 81
 
82
-        if(!isset($_SESSION['siteusername'])){ $error['message'] = "you are not logged in"; $error['status'] = true; }
83
-        if(!$_POST['comment']){ $error['message'] = "your comment cannot be blank"; $error['status'] = true; }
84
-        if(strlen($_POST['comment']) > 1000){ $error['message'] = "your comment must be shorter than 1000 characters"; $error['status'] = true; }
82
+        if (!isset($_SESSION['siteusername'])) { $error['message'] = "you are not logged in"; $error['status'] = true; }
83
+        if (!$_POST['comment']) { $error['message'] = "your comment cannot be blank"; $error['status'] = true; }
84
+        if (strlen($_POST['comment']) > 1000) { $error['message'] = "your comment must be shorter than 1000 characters"; $error['status'] = true; }
85 85
         //if(!isset($_POST['g-recaptcha-response'])){ $error['message'] = "captcha validation failed"; $error['status'] = true; }
86 86
         //if(!$_user_insert_utils->validateCaptcha($config['recaptcha_secret'], $_POST['g-recaptcha-response'])) { $error['message'] = "captcha validation failed"; $error['status'] = true; }
87
-        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; }
87
+        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 88
         //if(ifBlocked(@$_SESSION['siteusername'], $user['username'], $__db)) { $error = "This user has blocked you!"; $error['status'] = true; } 
89 89
 
90
-        if(!isset($error['message'])) {
90
+        if (!isset($error['message'])) {
91 91
 			$text = $_POST['comment'];
92 92
             $stmt = $__db->prepare("INSERT INTO profile_comments (toid, author, comment) VALUES (:id, :username, :comment)");
93 93
 			$stmt->bindParam(":id", $_user['username']);
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 
98 98
             $_user_update_utils->update_comment_cooldown_time($_SESSION['siteusername']);
99 99
 
100
-            if(@$_SESSION['siteusername'] != $_user['username']) { 
100
+            if (@$_SESSION['siteusername'] != $_user['username']) { 
101 101
                 $_user_insert_utils->send_message($_user['username'], "New comment", 'I commented "' . $_POST['comment'] . '" on your profile!', $_SESSION['siteusername']);
102 102
             }
103 103
         }
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
 		<link rel="stylesheet" href="/yt/cssbin/www-extra.css">
132 132
 		<style>
133 133
 			#content-container {
134
-				background-color: <?php echo $_user['primary_color'];  ?>;
134
+				background-color: <?php echo $_user['primary_color']; ?>;
135 135
 				background-image: url(/dynamic/banners/<?php echo $_user['2009_bg']; ?>);
136 136
 				background-repeat: repeat;
137 137
 				background-position: center top;
@@ -147,11 +147,11 @@  discard block
 block discarded – undo
147 147
 			<div id="masthead-container"><?php require($_SERVER['DOCUMENT_ROOT'] . "/s/mod/header.php"); ?></div>
148 148
 			<div id="content-container">
149 149
 				<!-- begin content -->
150
-				<?php if(isset($_SESSION['siteusername']) && $_user['username'] == $_SESSION['siteusername']) { ?>
150
+				<?php if (isset($_SESSION['siteusername']) && $_user['username'] == $_SESSION['siteusername']) { ?>
151 151
 					<div class="channel_customization"><?php require($_SERVER['DOCUMENT_ROOT'] . "/s/mod/channel_customization.php"); ?></div>
152 152
 				<?php } ?>
153 153
 				<?php
154
-					if(empty(trim($_user['bio'])))
154
+					if (empty(trim($_user['bio'])))
155 155
 						$_user['bio'] = "This user has no description.";
156 156
 				?>
157 157
 				<div id="content">
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
 												</div>
212 212
 											</div>
213 213
 											<div class="upper-left-section enable-fancy-subscribe-button">
214
-												<?php if($_user['username'] != @$_SESSION['siteusername']) { ?>
214
+												<?php if ($_user['username'] != @$_SESSION['siteusername']) { ?>
215 215
 													<div class="yt-subscription-button-hovercard yt-uix-hovercard">
216 216
 														<button 
217 217
 															href="#" 
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
 															title="" 
220 220
 															id="subscribe-button"
221 221
 															type="button" 
222
-															class="yt-subscription-button <?php if($_user['subscribed']) { echo "subscribed "; } ?>  yt-uix-button yt-uix-button-subscription yt-uix-tooltip" 
222
+															class="yt-subscription-button <?php if ($_user['subscribed']) { echo "subscribed "; } ?>  yt-uix-button yt-uix-button-subscription yt-uix-tooltip" 
223 223
 															role="button"><span class="yt-uix-button-icon-wrapper"><img class="yt-uix-button-icon yt-uix-button-icon-subscribe" 
224 224
 															src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt=""></span><span class="yt-uix-button-content">  <span class="subscribe-label">Subscribe</span>
225 225
 														<span class="subscribed-label">Subscribed</span>
@@ -253,7 +253,7 @@  discard block
 block discarded – undo
253 253
 									</div>
254 254
 								</div>
255 255
 							</div>
256
-                            <?php if($_user['featured'] != "None") { $video = $__video_h->fetch_video_rid($_user['featured']); } else { $_user['featured'] = false; } ?>
256
+                            <?php if ($_user['featured'] != "None") { $video = $__video_h->fetch_video_rid($_user['featured']); } else { $_user['featured'] = false; } ?>
257 257
 							<div id="branded-page-body">
258 258
 								<div class="channel-tab-content channel-layout-two-column selected blogger-template">
259 259
 									<div class="tab-content-body">
@@ -287,8 +287,8 @@  discard block
 block discarded – undo
287 287
 															<?php
288 288
 																$_playlist['videos'] = json_decode($_playlist['videos']);
289 289
 																$_playlist['count'] = 1;
290
-																foreach($_playlist['videos'] as $video) {
291
-																	if($__video_h->video_exists($video)) {
290
+																foreach ($_playlist['videos'] as $video) {
291
+																	if ($__video_h->video_exists($video)) {
292 292
 																		$_video = $__video_h->fetch_video_rid($video);
293 293
 																		$_video['video_responses'] = $__video_h->get_video_responses($_video['rid']);
294 294
 																		$_video['age'] = $__time_h->time_elapsed_string($_video['publish']);		
@@ -387,7 +387,7 @@  discard block
 block discarded – undo
387 387
 														</div>
388 388
 														<hr class="yt-horizontal-rule ">
389 389
 													</div>
390
-													<?php if(!empty($_user['website'])) { ?>
390
+													<?php if (!empty($_user['website'])) { ?>
391 391
 														<div class="user-profile-item">
392 392
 															<div class="yt-c3-profile-custom-url field-container ">
393 393
 																<a href="<?php echo addhttp(htmlspecialchars($_user['website'])); ?>" rel="me nofollow" target="_blank" title="<?php echo htmlspecialchars($_user['website']); ?>" class="yt-uix-redirect-link">
@@ -436,7 +436,7 @@  discard block
 block discarded – undo
436 436
 															<h5>Country</h5>
437 437
 															<span class="value"><?php echo htmlspecialchars($_user['country']); ?></span>
438 438
 														</div>
439
-														<?php if($_user['genre'] != "none") { ?>
439
+														<?php if ($_user['genre'] != "none") { ?>
440 440
 															<div class="user-profile-item ">
441 441
 																<h5>Channel Genre</h5>
442 442
 																<span class="value"><?php echo htmlspecialchars($_user['genre']); ?></span>
@@ -448,13 +448,13 @@  discard block
 block discarded – undo
448 448
 											</div>
449 449
 											<div class="channel-module other-channels yt-uix-c3-module-container other-channels-compact">
450 450
 												<?php $_user['featured_channels'] = explode(",", $_user['featured_channels']); ?>
451
-												<?php if(count($_user['featured_channels']) != 0) { ?>
451
+												<?php if (count($_user['featured_channels']) != 0) { ?>
452 452
 												<div class="module-view other-channels-view">
453 453
 													<h2>Featured Channels</h2>
454 454
 													<ul class="channel-summary-list ">
455 455
 														<?php 
456
-															foreach($_user['featured_channels'] as $user) {
457
-																if($__user_h->user_exists($user)) {
456
+															foreach ($_user['featured_channels'] as $user) {
457
+																if ($__user_h->user_exists($user)) {
458 458
 														?>
459 459
 															<li class="yt-tile-visible yt-uix-tile">
460 460
 																<div class="channel-summary clearfix channel-summary-compact">
@@ -483,13 +483,13 @@  discard block
 block discarded – undo
483 483
 												$stmt->bindParam(":search", $_user['username']);
484 484
 												$stmt->execute();
485 485
 
486
-												if($stmt->rowCount() != 0) {
486
+												if ($stmt->rowCount() != 0) {
487 487
 											?>
488 488
 												<div class="playlists-narrow channel-module yt-uix-c3-module-container">
489 489
 													<div class="module-view gh-featured">
490 490
 														<h2>Featured Playlists</h2>     
491 491
 														<?php
492
-														while($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { 
492
+														while ($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { 
493 493
 															$playlist['videos'] = json_decode($playlist['videos']);
494 494
 														?> 
495 495
 															<div class="playlist yt-tile-visible yt-uix-tile">
Please login to merge, or discard this patch.
web/public/watch.php 3 patches
Indentation   +91 added lines, -91 removed lines patch added patch discarded remove patch
@@ -24,33 +24,33 @@  discard block
 block discarded – undo
24 24
         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; }
25 25
 
26 26
         if(!isset($error['message'])) {
27
-			$text = $_POST['comment'];
27
+            $text = $_POST['comment'];
28 28
             $stmt = $__db->prepare("INSERT INTO comments (toid, author, comment) VALUES (:v, :username, :comment)");
29 29
             $stmt->bindParam(":v", $_GET['v']);
30
-			$stmt->bindParam(":username", $_SESSION['siteusername']);
31
-			$stmt->bindParam(":comment", $text);
30
+            $stmt->bindParam(":username", $_SESSION['siteusername']);
31
+            $stmt->bindParam(":comment", $text);
32 32
             $stmt->execute();
33 33
 
34
-			$__user_u->update_cooldown_time($_SESSION['siteusername'], "cooldown_comment");
35
-			$__user_i->send_message($_SESSION['siteusername'], "New comment", $_video['author'], "I commented \"" . $_POST['comment'] . "\" on your video!", $_video['rid'], "nt");
34
+            $__user_u->update_cooldown_time($_SESSION['siteusername'], "cooldown_comment");
35
+            $__user_i->send_message($_SESSION['siteusername'], "New comment", $_video['author'], "I commented \"" . $_POST['comment'] . "\" on your video!", $_video['rid'], "nt");
36 36
         }
37 37
     }
38 38
 
39
-	/* 
39
+    /* 
40 40
 	PREPARE EMBEDS CLASS -- function(string $page_title, string $page_description...) 
41 41
 	Returns a list of arrays for compatibility purposes & but downside is ugly for loop codes 
42 42
 	Work on this tomorrow or some shit idk lol
43 43
 	*/
44 44
 
45
-	/* 
45
+    /* 
46 46
 	USE THE GOD DAMN __CONFIG MORE -- idiot
47 47
 	Work on this tomorrow or some shit
48 48
 	*/
49 49
 
50
-	$__server->page_embeds->page_title = htmlspecialchars($_video['title']);
51
-	$__server->page_embeds->page_description = htmlspecialchars($_video['description']);
52
-	$__server->page_embeds->page_image = "/dynamic/thumbs/" . $_video['thumbnail'];
53
-	$__server->page_embeds->page_url = "https://subrock.rocks/watch?v=" . htmlspecialchars($_video['rid']);
50
+    $__server->page_embeds->page_title = htmlspecialchars($_video['title']);
51
+    $__server->page_embeds->page_description = htmlspecialchars($_video['description']);
52
+    $__server->page_embeds->page_image = "/dynamic/thumbs/" . $_video['thumbnail'];
53
+    $__server->page_embeds->page_url = "https://subrock.rocks/watch?v=" . htmlspecialchars($_video['rid']);
54 54
 ?>
55 55
 <!DOCTYPE html>
56 56
 <html>
@@ -80,29 +80,29 @@  discard block
 block discarded – undo
80 80
          if (window.yt.timing) {yt.timing.tick("ct");}    
81 81
       </script>
82 82
 		<?php
83
-			$_video['dislikes'] =  $__video_h->get_video_stars_level($_video['rid'], 1);
84
-			$_video['dislikes'] += $__video_h->get_video_stars_level($_video['rid'], 2);
83
+            $_video['dislikes'] =  $__video_h->get_video_stars_level($_video['rid'], 1);
84
+            $_video['dislikes'] += $__video_h->get_video_stars_level($_video['rid'], 2);
85 85
 
86
-			$_video['likes'] =     $__video_h->get_video_stars_level($_video['rid'], 4);
87
-			$_video['likes'] +=    $__video_h->get_video_stars_level($_video['rid'], 5);
86
+            $_video['likes'] =     $__video_h->get_video_stars_level($_video['rid'], 4);
87
+            $_video['likes'] +=    $__video_h->get_video_stars_level($_video['rid'], 5);
88 88
 
89
-			$_video['dislikes'] += $__video_h->get_video_likes($_video['rid'], false);
90
-			$_video['likes'] += $__video_h->get_video_likes($_video['rid'], true);
89
+            $_video['dislikes'] += $__video_h->get_video_likes($_video['rid'], false);
90
+            $_video['likes'] += $__video_h->get_video_likes($_video['rid'], true);
91 91
 
92
-			if($_video['likes'] == 0 && $_video['dislikes'] == 0) {
93
-				$_video['likeswidth'] = 50;
94
-				$_video['dislikeswidth'] = 50;
95
-			} else {
96
-				$_video['likeswidth'] = $_video['likes'] / ($_video['likes'] + $_video['dislikes']) * 100;
97
-				$_video['dislikeswidth'] = 100 - $_video['likeswidth'];
98
-			}
92
+            if($_video['likes'] == 0 && $_video['dislikes'] == 0) {
93
+                $_video['likeswidth'] = 50;
94
+                $_video['dislikeswidth'] = 50;
95
+            } else {
96
+                $_video['likeswidth'] = $_video['likes'] / ($_video['likes'] + $_video['dislikes']) * 100;
97
+                $_video['dislikeswidth'] = 100 - $_video['likeswidth'];
98
+            }
99 99
 
100
-			$_video['liked'] = $__video_h->if_liked(@$_SESSION['siteusername'], $_video['rid'], true);
101
-			$_video['disliked'] = $__video_h->if_liked(@$_SESSION['siteusername'], $_video['rid'], false);
102
-			$_video['author_videos'] = $__video_h->fetch_user_videos($_video['author']);
103
-			$_video['subscribed'] = $__user_h->if_subscribed(@$_SESSION['siteusername'], $_video['author']);
104
-			$_video['favorited'] = $__video_h->if_favorited(@$_SESSION['siteusername'], $_video['rid']);
105
-		?>
100
+            $_video['liked'] = $__video_h->if_liked(@$_SESSION['siteusername'], $_video['rid'], true);
101
+            $_video['disliked'] = $__video_h->if_liked(@$_SESSION['siteusername'], $_video['rid'], false);
102
+            $_video['author_videos'] = $__video_h->fetch_user_videos($_video['author']);
103
+            $_video['subscribed'] = $__user_h->if_subscribed(@$_SESSION['siteusername'], $_video['author']);
104
+            $_video['favorited'] = $__video_h->if_favorited(@$_SESSION['siteusername'], $_video['rid']);
105
+        ?>
106 106
 	</head>
107 107
 	<body id="" class="date-20120927 en_US ltr   ytg-old-clearfix guide-feed-v2 gecko gecko-15" dir="ltr">
108 108
 		<form name="logoutForm" method="POST" action="/logout">
@@ -324,21 +324,21 @@  discard block
 block discarded – undo
324 324
 													<hr><br>
325 325
 													<h3>Add to a Playlist</h3>
326 326
 													<?php
327
-														$stmt = $__db->prepare("SELECT * FROM playlists WHERE author = :username ORDER BY id DESC LIMIT 20");
328
-														$stmt->bindParam(":username", $_SESSION['siteusername']);
329
-														$stmt->execute();
330
-														while($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { 
331
-															$buffer = json_decode($playlist['videos']);
332
-															@$rid = $buffer[0];
333
-															if(!empty($rid)) {
334
-																@$video = $__video_h->fetch_video_rid($rid);
335
-															} else {
336
-																$video['thumbnail'] = "";
337
-																$video['duration'] = 0;
338
-															}
327
+                                                        $stmt = $__db->prepare("SELECT * FROM playlists WHERE author = :username ORDER BY id DESC LIMIT 20");
328
+                                                        $stmt->bindParam(":username", $_SESSION['siteusername']);
329
+                                                        $stmt->execute();
330
+                                                        while($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { 
331
+                                                            $buffer = json_decode($playlist['videos']);
332
+                                                            @$rid = $buffer[0];
333
+                                                            if(!empty($rid)) {
334
+                                                                @$video = $__video_h->fetch_video_rid($rid);
335
+                                                            } else {
336
+                                                                $video['thumbnail'] = "";
337
+                                                                $video['duration'] = 0;
338
+                                                            }
339 339
 
340
-															$videos = count($buffer);
341
-													?>
340
+                                                            $videos = count($buffer);
341
+                                                    ?>
342 342
 														<a href="/get/add_to_playlist?id=<?php echo $_video['rid']; ?>&playlist=<?php echo $playlist['rid']; ?>">Add to <?php echo htmlspecialchars($playlist['title']); ?></a>
343 343
 													<?php } ?>
344 344
 												<?php } ?>
@@ -603,10 +603,10 @@  discard block
 block discarded – undo
603 603
 												</div>
604 604
 											</div>
605 605
 											<?php 
606
-												$stmt = $__db->prepare("SELECT * FROM video_response WHERE toid = :v ORDER BY id DESC LIMIT 4");
607
-												$stmt->bindParam(":v", $_GET['v']);
608
-												$stmt->execute();
609
-											?>
606
+                                                $stmt = $__db->prepare("SELECT * FROM video_response WHERE toid = :v ORDER BY id DESC LIMIT 4");
607
+                                                $stmt->bindParam(":v", $_GET['v']);
608
+                                                $stmt->execute();
609
+                                            ?>
610 610
 
611 611
 											<?php if($stmt->rowCount() != 0) { ?>
612 612
 												<div class="comments-section">
@@ -616,16 +616,16 @@  discard block
 block discarded – undo
616 616
 													<h4>Video Responses</h4>
617 617
 													<ul class="video-list">
618 618
 													<?php 
619
-														while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { 
620
-															if($__video_h->video_exists($video['video'])) { 
621
-																$video = $__video_h->fetch_video_rid($video['video']);
622
-																$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
623
-																$video['duration'] = $__time_h->timestamp($video['duration']);
624
-																$video['views'] = $__video_h->fetch_video_views($video['rid']);
625
-																$video['author'] = htmlspecialchars($video['author']);		
626
-																$video['title'] = htmlspecialchars($video['title']);
627
-																$video['description'] = $__video_h->shorten_description($video['description'], 50);
628
-													?>
619
+                                                        while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { 
620
+                                                            if($__video_h->video_exists($video['video'])) { 
621
+                                                                $video = $__video_h->fetch_video_rid($video['video']);
622
+                                                                $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
623
+                                                                $video['duration'] = $__time_h->timestamp($video['duration']);
624
+                                                                $video['views'] = $__video_h->fetch_video_views($video['rid']);
625
+                                                                $video['author'] = htmlspecialchars($video['author']);		
626
+                                                                $video['title'] = htmlspecialchars($video['title']);
627
+                                                                $video['description'] = $__video_h->shorten_description($video['description'], 50);
628
+                                                    ?>
629 629
 														<li class="video-list-item yt-tile-default">
630 630
 															<a href="/watch?v=<?php echo $video['rid']; ?>" class="related-video yt-uix-contextlink  yt-uix-sessionlink" data-sessionlink="<?php echo htmlspecialchars($_video['author']); ?>&amp;feature=watch_response"><span class="ux-thumb-wrap contains-addto "><span class="video-thumb ux-thumb yt-thumb-default-120 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="<?php echo $video['title']; ?>" data-thumb="/dynamic/thumbs/<?php echo $video['thumbnail']; ?>" width="120"><span class="vertical-align"></span></span></span></span><span class="video-time"><?php echo $video['duration']; ?></span>
631 631
 															<button onclick=";return false;" title="Watch Later" type="button" class="addto-button video-actions addto-watch-later-button-sign-in yt-uix-button yt-uix-button-default yt-uix-button-short yt-uix-tooltip" data-button-menu-id="shared-addto-watch-later-login" data-video-ids="cjls0QsHOBE" role="button"><span class="yt-uix-button-content">  <img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Watch Later">
@@ -707,35 +707,35 @@  discard block
 block discarded – undo
707 707
 												</div>
708 708
 												<ul class="comment-list" id="live_comments">
709 709
 														<?php
710
-														$results_per_page = 20;
710
+                                                        $results_per_page = 20;
711 711
 
712
-														$stmt = $__db->prepare("SELECT * FROM comments WHERE toid = :rid ORDER BY id DESC");
713
-														$stmt->bindParam(":rid", $_video['rid']);
714
-														$stmt->execute();
712
+                                                        $stmt = $__db->prepare("SELECT * FROM comments WHERE toid = :rid ORDER BY id DESC");
713
+                                                        $stmt->bindParam(":rid", $_video['rid']);
714
+                                                        $stmt->execute();
715 715
 
716
-														$number_of_result = $stmt->rowCount();
717
-														$number_of_page = ceil ($number_of_result / $results_per_page);  
716
+                                                        $number_of_result = $stmt->rowCount();
717
+                                                        $number_of_page = ceil ($number_of_result / $results_per_page);  
718 718
 
719
-														if (!isset ($_GET['page']) ) {  
720
-															$page = 1;  
721
-														} else {  
722
-															$page = (int)$_GET['page'];  
723
-														}  
719
+                                                        if (!isset ($_GET['page']) ) {  
720
+                                                            $page = 1;  
721
+                                                        } else {  
722
+                                                            $page = (int)$_GET['page'];  
723
+                                                        }  
724 724
 
725
-														$page_first_result = ($page - 1) * $results_per_page;  
725
+                                                        $page_first_result = ($page - 1) * $results_per_page;  
726 726
 
727
-														$stmt = $__db->prepare("SELECT * FROM comments WHERE toid = :rid ORDER BY id DESC LIMIT :pfirst, :pper");
728
-														$stmt->bindParam(":rid", $_video['rid']);
729
-														$stmt->bindParam(":pfirst", $page_first_result);
730
-														$stmt->bindParam(":pper", $results_per_page);
731
-														$stmt->execute();
727
+                                                        $stmt = $__db->prepare("SELECT * FROM comments WHERE toid = :rid ORDER BY id DESC LIMIT :pfirst, :pper");
728
+                                                        $stmt->bindParam(":rid", $_video['rid']);
729
+                                                        $stmt->bindParam(":pfirst", $page_first_result);
730
+                                                        $stmt->bindParam(":pper", $results_per_page);
731
+                                                        $stmt->execute();
732 732
 
733
-														while($comment = $stmt->fetch(PDO::FETCH_ASSOC)) { 
734
-															if($__video_h->if_comment_liked($comment['id'], $_SESSION['siteusername'], true))
735
-																$comment['liked'] = true;
736
-															else if($__video_h->if_comment_liked($comment['id'], $_SESSION['siteusername'], false))
737
-																$comment['disliked'] = true;	
738
-													?>
733
+                                                        while($comment = $stmt->fetch(PDO::FETCH_ASSOC)) { 
734
+                                                            if($__video_h->if_comment_liked($comment['id'], $_SESSION['siteusername'], true))
735
+                                                                $comment['liked'] = true;
736
+                                                            else if($__video_h->if_comment_liked($comment['id'], $_SESSION['siteusername'], false))
737
+                                                                $comment['disliked'] = true;	
738
+                                                    ?>
739 739
 
740 740
 													<li class="comment yt-tile-default " data-author-viewing="" data-author-id="-uD01K8FQTeOSS5sniRFzQ" data-id="<?php echo $comment['id']; ?>" data-score="0">
741 741
 														<div class="comment-body">
@@ -814,16 +814,16 @@  discard block
 block discarded – undo
814 814
 											<ul id="watch-related" class="video-list">
815 815
 												<div id="ppv-container" class="hid"></div>
816 816
 												<?php
817
-													$stmt = $__db->prepare("SELECT * FROM videos ORDER BY rand() LIMIT 20");
818
-													$stmt->execute();
819
-													while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
820
-														$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
821
-														$video['duration'] = $__time_h->timestamp($video['duration']);
822
-														$video['views'] = $__video_h->fetch_video_views($video['rid']);
823
-														$video['author'] = htmlspecialchars($video['author']);		
824
-														$video['title'] = htmlspecialchars($video['title']);
825
-														$video['description'] = $__video_h->shorten_description($video['description'], 50);
826
-												?>
817
+                                                    $stmt = $__db->prepare("SELECT * FROM videos ORDER BY rand() LIMIT 20");
818
+                                                    $stmt->execute();
819
+                                                    while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
820
+                                                        $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
821
+                                                        $video['duration'] = $__time_h->timestamp($video['duration']);
822
+                                                        $video['views'] = $__video_h->fetch_video_views($video['rid']);
823
+                                                        $video['author'] = htmlspecialchars($video['author']);		
824
+                                                        $video['title'] = htmlspecialchars($video['title']);
825
+                                                        $video['description'] = $__video_h->shorten_description($video['description'], 50);
826
+                                                ?>
827 827
 												<li class="video-list-item"><a href="/watch?v=<?php echo $video['rid']; ?>" class="related-video yt-uix-contextlink  yt-uix-sessionlink" data-sessionlink="ved=CAIQzRooAA%3D%3D&amp;<?php echo htmlspecialchars($_video['author']); ?>&amp;feature=relmfu"><span class="ux-thumb-wrap contains-addto "><span class="video-thumb ux-thumb yt-thumb-default-120 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="<?php echo $video['title']; ?>" onerror="this.onerror=null;this.src='/dynamic/thumbs/default.jpg';" data-thumb="/dynamic/thumbs/<?php echo $video['thumbnail']; ?>" width="120"><span class="vertical-align"></span></span></span></span><span class="video-time"><?php echo $video['duration']; ?></span>
828 828
 													<button onclick=";return false;" title="Watch Later" type="button" class="addto-button video-actions addto-watch-later-button-sign-in yt-uix-button yt-uix-button-default yt-uix-button-short yt-uix-tooltip" data-button-menu-id="shared-addto-watch-later-login" data-video-ids="gyAaIKF6tSQ" role="button"><span class="yt-uix-button-content">  <img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Watch Later">
829 829
 													</span><img class="yt-uix-button-arrow" src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt=""></button>
Please login to merge, or discard this patch.
Spacing   +37 added lines, -37 removed lines patch added patch discarded remove patch
@@ -11,19 +11,19 @@  discard block
 block discarded – undo
11 11
 <?php $__user_u = new user_update($__db); ?>
12 12
 <?php $__db_h = new db_helper(); ?>
13 13
 <?php $__time_h = new time_helper(); ?>
14
-<?php if(!$__video_h->video_exists($_GET['v'])) { header("Location: /?error=This video doesn't exist!"); } ?>
14
+<?php if (!$__video_h->video_exists($_GET['v'])) { header("Location: /?error=This video doesn't exist!"); } ?>
15 15
 <?php $_video = $__video_h->fetch_video_rid($_GET['v']); ?>
16 16
 <?php $_video['comments'] = $__video_h->get_comments_from_video($_video['rid']); ?>
17 17
 <?php
18
-    if($_SERVER['REQUEST_METHOD'] == 'POST') {
18
+    if ($_SERVER['REQUEST_METHOD'] == 'POST') {
19 19
         $error = array();
20 20
 
21
-        if(!isset($_SESSION['siteusername'])){ $error['message'] = "you are not logged in"; $error['status'] = true; }
22
-        if(!$_POST['comment']){ $error['message'] = "your comment cannot be blank"; $error['status'] = true; }
23
-        if(strlen($_POST['comment']) > 1000){ $error['message'] = "your comment must be shorter than 1000 characters"; $error['status'] = true; }
24
-        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; }
21
+        if (!isset($_SESSION['siteusername'])) { $error['message'] = "you are not logged in"; $error['status'] = true; }
22
+        if (!$_POST['comment']) { $error['message'] = "your comment cannot be blank"; $error['status'] = true; }
23
+        if (strlen($_POST['comment']) > 1000) { $error['message'] = "your comment must be shorter than 1000 characters"; $error['status'] = true; }
24
+        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; }
25 25
 
26
-        if(!isset($error['message'])) {
26
+        if (!isset($error['message'])) {
27 27
 			$text = $_POST['comment'];
28 28
             $stmt = $__db->prepare("INSERT INTO comments (toid, author, comment) VALUES (:v, :username, :comment)");
29 29
             $stmt->bindParam(":v", $_GET['v']);
@@ -80,20 +80,20 @@  discard block
 block discarded – undo
80 80
          if (window.yt.timing) {yt.timing.tick("ct");}    
81 81
       </script>
82 82
 		<?php
83
-			$_video['dislikes'] =  $__video_h->get_video_stars_level($_video['rid'], 1);
83
+			$_video['dislikes'] = $__video_h->get_video_stars_level($_video['rid'], 1);
84 84
 			$_video['dislikes'] += $__video_h->get_video_stars_level($_video['rid'], 2);
85 85
 
86
-			$_video['likes'] =     $__video_h->get_video_stars_level($_video['rid'], 4);
87
-			$_video['likes'] +=    $__video_h->get_video_stars_level($_video['rid'], 5);
86
+			$_video['likes'] = $__video_h->get_video_stars_level($_video['rid'], 4);
87
+			$_video['likes'] += $__video_h->get_video_stars_level($_video['rid'], 5);
88 88
 
89 89
 			$_video['dislikes'] += $__video_h->get_video_likes($_video['rid'], false);
90 90
 			$_video['likes'] += $__video_h->get_video_likes($_video['rid'], true);
91 91
 
92
-			if($_video['likes'] == 0 && $_video['dislikes'] == 0) {
92
+			if ($_video['likes'] == 0 && $_video['dislikes'] == 0) {
93 93
 				$_video['likeswidth'] = 50;
94 94
 				$_video['dislikeswidth'] = 50;
95 95
 			} else {
96
-				$_video['likeswidth'] = $_video['likes'] / ($_video['likes'] + $_video['dislikes']) * 100;
96
+				$_video['likeswidth'] = $_video['likes']/($_video['likes'] + $_video['dislikes'])*100;
97 97
 				$_video['dislikeswidth'] = 100 - $_video['likeswidth'];
98 98
 			}
99 99
 
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
 									</div>
128 128
 									<div id="instream_google_companion_ad_div"></div>
129 129
 								</div>
130
-								<?php if(@$_SESSION['siteusername'] == $_video['author']) { ?>
130
+								<?php if (@$_SESSION['siteusername'] == $_video['author']) { ?>
131 131
 									<div id="watch-owner-container">
132 132
 										<div id="masthead-subnav" class="yt-nav yt-nav-dark ">
133 133
 											<ul class="yt-nav-aside">
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
 											title="" 
163 163
 											id="subscribe-button"
164 164
 											type="button" 
165
-											class="<?php if($_video['subscribed']) { echo "subscribed "; } ?>yt-subscription-button  yt-uix-button yt-uix-button-subscription yt-uix-tooltip" 
165
+											class="<?php if ($_video['subscribed']) { echo "subscribed "; } ?>yt-subscription-button  yt-uix-button yt-uix-button-subscription yt-uix-tooltip" 
166 166
 											role="button">
167 167
 											<span class="yt-uix-button-icon-wrapper">
168 168
 												<img class="yt-uix-button-icon yt-uix-button-icon-subscribe" src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="">
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
 											<button onclick=";like_video();return false;"
244 244
 											title="I like this" 
245 245
 											type="button" 
246
-											class="start <?php if($_video['liked']) { echo "liked "; } ?>yt-uix-tooltip-reverse  yt-uix-button yt-uix-button-default yt-uix-tooltip" 
246
+											class="start <?php if ($_video['liked']) { echo "liked "; } ?>yt-uix-tooltip-reverse  yt-uix-button yt-uix-button-default yt-uix-tooltip" 
247 247
 											id="watch-like"  
248 248
 											href="/get/like_video?v=<?php echo $_video['rid']; ?>"
249 249
 											role="button"><span class="yt-uix-button-icon-wrapper">
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
 											type="button" 
258 258
 											style="margin-left: -2px;"
259 259
 											href="/get/dislike_video?v=<?php echo $_video['rid']; ?>"
260
-											class="end yt-uix-tooltip-reverse <?php if($_video['disliked']) { echo "unliked "; } ?>  yt-uix-button yt-uix-button-default yt-uix-tooltip yt-uix-button-empty" 
260
+											class="end yt-uix-tooltip-reverse <?php if ($_video['disliked']) { echo "unliked "; } ?>  yt-uix-button yt-uix-button-default yt-uix-tooltip yt-uix-button-empty" 
261 261
 											id="watch-unlike" 
262 262
 											role="button">
263 263
 												<span class="yt-uix-button-icon-wrapper">
@@ -275,7 +275,7 @@  discard block
 block discarded – undo
275 275
 												not implemented ismnf
276 276
 											</div>
277 277
 											<div id="watch-actions-logged-out" class="watch-actions-panel hid">
278
-												<?php if(!isset($_SESSION['siteusername'])) { ?>
278
+												<?php if (!isset($_SESSION['siteusername'])) { ?>
279 279
 												<div class="yt-alert yt-alert-naked yt-alert-warn  ">
280 280
 													<div class="yt-alert-icon">
281 281
 														<img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" class="icon master-sprite" alt="Alert icon">
@@ -291,7 +291,7 @@  discard block
 block discarded – undo
291 291
 												<?php } else { ?>
292 292
 													<h3>Be friends with the creator</h3>
293 293
 
294
-													<?php if($_SESSION['siteusername'] != $_video['author']) { ?>
294
+													<?php if ($_SESSION['siteusername'] != $_video['author']) { ?>
295 295
 														<img style="width: 50px;height:50px;" src="/dynamic/pfp/<?php echo $__user_h->fetch_pfp($_video['author']); ?>">
296 296
 														<span style="display: inline-block; vertical-align:top;width: 100px;font-size:11px;">
297 297
 															<b><a href="/user/<?php echo htmlspecialchars($_video['author']); ?>"><?php echo htmlspecialchars($_video['author']); ?></a></b><br>
@@ -305,8 +305,8 @@  discard block
 block discarded – undo
305 305
 														</span><br><br>
306 306
 													<?php } ?>
307 307
 
308
-													<?php if($_SESSION['siteusername'] != $_video['author']) { ?>
309
-														<?php if($_video['friended'] == false) { ?>
308
+													<?php if ($_SESSION['siteusername'] != $_video['author']) { ?>
309
+														<?php if ($_video['friended'] == false) { ?>
310 310
 															<a href="/friends">Send a friend request</a>
311 311
 														<?php } else { ?>
312 312
 															Your friend request is pending.
@@ -316,7 +316,7 @@  discard block
 block discarded – undo
316 316
 													<?php } ?>
317 317
 													<hr><br>
318 318
 													<h3>Add to Favorites</h3>
319
-													<?php if($_video['favorited'] == false) { ?>
319
+													<?php if ($_video['favorited'] == false) { ?>
320 320
 														<a href="/get/favorite?v=<?php echo $_video['rid']; ?>">Favorite Video</a>
321 321
 													<?php } else { ?>
322 322
 														<a href="/get/unfavorite?v=<?php echo $_video['rid']; ?>">Unfavorite Video</a>
@@ -327,10 +327,10 @@  discard block
 block discarded – undo
327 327
 														$stmt = $__db->prepare("SELECT * FROM playlists WHERE author = :username ORDER BY id DESC LIMIT 20");
328 328
 														$stmt->bindParam(":username", $_SESSION['siteusername']);
329 329
 														$stmt->execute();
330
-														while($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { 
330
+														while ($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { 
331 331
 															$buffer = json_decode($playlist['videos']);
332 332
 															@$rid = $buffer[0];
333
-															if(!empty($rid)) {
333
+															if (!empty($rid)) {
334 334
 																@$video = $__video_h->fetch_video_rid($rid);
335 335
 															} else {
336 336
 																$video['thumbnail'] = "";
@@ -608,7 +608,7 @@  discard block
 block discarded – undo
608 608
 												$stmt->execute();
609 609
 											?>
610 610
 
611
-											<?php if($stmt->rowCount() != 0) { ?>
611
+											<?php if ($stmt->rowCount() != 0) { ?>
612 612
 												<div class="comments-section">
613 613
 													<a class="comments-section-see-all" href="/video_response_view_all?v=<?php echo htmlspecialchars($_video['rid']); ?>">
614 614
 													see all
@@ -616,8 +616,8 @@  discard block
 block discarded – undo
616 616
 													<h4>Video Responses</h4>
617 617
 													<ul class="video-list">
618 618
 													<?php 
619
-														while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { 
620
-															if($__video_h->video_exists($video['video'])) { 
619
+														while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) { 
620
+															if ($__video_h->video_exists($video['video'])) { 
621 621
 																$video = $__video_h->fetch_video_rid($video['video']);
622 622
 																$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
623 623
 																$video['duration'] = $__time_h->timestamp($video['duration']);
@@ -648,19 +648,19 @@  discard block
 block discarded – undo
648 648
 														</h4>
649 649
 													</div>
650 650
 												</div>
651
-												<?php if(!isset($_SESSION['siteusername'])) { ?>
651
+												<?php if (!isset($_SESSION['siteusername'])) { ?>
652 652
 													<div class="comments-post-container clearfix">
653 653
 														<div class="comments-post-alert">
654 654
 															<a href="/sign_in">Sign In</a> or <a href="/sign_up">Sign Up</a><span class="comments-post-form-rollover-text"> now to post a comment!</span>
655 655
 														</div>
656 656
 													</div>
657
-												<?php } else if($_video['commenting'] == "d") { ?>
657
+												<?php } else if ($_video['commenting'] == "d") { ?>
658 658
 													<div class="comments-post-container clearfix">
659 659
 														<div class="comments-post-alert">
660 660
 															This video has comemnting disabled!
661 661
 														</div>
662 662
 													</div>
663
-												<?php } else if($__user_h->if_blocked($_video['author'], $_SESSION['siteusername'])) { ?>
663
+												<?php } else if ($__user_h->if_blocked($_video['author'], $_SESSION['siteusername'])) { ?>
664 664
 													<div class="comments-post-container clearfix">
665 665
 														<div class="comments-post-alert">
666 666
 															This user has blocked you!
@@ -714,15 +714,15 @@  discard block
 block discarded – undo
714 714
 														$stmt->execute();
715 715
 
716 716
 														$number_of_result = $stmt->rowCount();
717
-														$number_of_page = ceil ($number_of_result / $results_per_page);  
717
+														$number_of_page = ceil($number_of_result/$results_per_page);  
718 718
 
719
-														if (!isset ($_GET['page']) ) {  
719
+														if (!isset ($_GET['page'])) {  
720 720
 															$page = 1;  
721 721
 														} else {  
722
-															$page = (int)$_GET['page'];  
722
+															$page = (int) $_GET['page'];  
723 723
 														}  
724 724
 
725
-														$page_first_result = ($page - 1) * $results_per_page;  
725
+														$page_first_result = ($page - 1)*$results_per_page;  
726 726
 
727 727
 														$stmt = $__db->prepare("SELECT * FROM comments WHERE toid = :rid ORDER BY id DESC LIMIT :pfirst, :pper");
728 728
 														$stmt->bindParam(":rid", $_video['rid']);
@@ -730,10 +730,10 @@  discard block
 block discarded – undo
730 730
 														$stmt->bindParam(":pper", $results_per_page);
731 731
 														$stmt->execute();
732 732
 
733
-														while($comment = $stmt->fetch(PDO::FETCH_ASSOC)) { 
734
-															if($__video_h->if_comment_liked($comment['id'], $_SESSION['siteusername'], true))
733
+														while ($comment = $stmt->fetch(PDO::FETCH_ASSOC)) { 
734
+															if ($__video_h->if_comment_liked($comment['id'], $_SESSION['siteusername'], true))
735 735
 																$comment['liked'] = true;
736
-															else if($__video_h->if_comment_liked($comment['id'], $_SESSION['siteusername'], false))
736
+															else if ($__video_h->if_comment_liked($comment['id'], $_SESSION['siteusername'], false))
737 737
 																$comment['disliked'] = true;	
738 738
 													?>
739 739
 
@@ -816,7 +816,7 @@  discard block
 block discarded – undo
816 816
 												<?php
817 817
 													$stmt = $__db->prepare("SELECT * FROM videos ORDER BY rand() LIMIT 20");
818 818
 													$stmt->execute();
819
-													while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
819
+													while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
820 820
 														$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
821 821
 														$video['duration'] = $__time_h->timestamp($video['duration']);
822 822
 														$video['views'] = $__video_h->fetch_video_views($video['rid']);
Please login to merge, or discard this patch.
Braces   +5 added lines, -4 removed lines patch added patch discarded remove patch
@@ -731,10 +731,11 @@
 block discarded – undo
731 731
 														$stmt->execute();
732 732
 
733 733
 														while($comment = $stmt->fetch(PDO::FETCH_ASSOC)) { 
734
-															if($__video_h->if_comment_liked($comment['id'], $_SESSION['siteusername'], true))
735
-																$comment['liked'] = true;
736
-															else if($__video_h->if_comment_liked($comment['id'], $_SESSION['siteusername'], false))
737
-																$comment['disliked'] = true;	
734
+															if($__video_h->if_comment_liked($comment['id'], $_SESSION['siteusername'], true)) {
735
+																															$comment['liked'] = true;
736
+															} else if($__video_h->if_comment_liked($comment['id'], $_SESSION['siteusername'], false)) {
737
+																															$comment['disliked'] = true;
738
+															}
738 739
 													?>
739 740
 
740 741
 													<li class="comment yt-tile-default " data-author-viewing="" data-author-id="-uD01K8FQTeOSS5sniRFzQ" data-id="<?php echo $comment['id']; ?>" data-score="0">
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/upload.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 block discarded – undo
1 1
 <?php
2 2
  
3 3
 if (empty($_FILES) || $_FILES["file"]["error"]) {
4
-  die('{"OK": 0}');
4
+    die('{"OK": 0}');
5 5
 }
6 6
  
7 7
 $fileName = $_FILES["file"]["name"];
Please login to merge, or discard this patch.
web/public/comment_service_ajax.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
 
18 18
 {
19 19
 	"html_content": "<section class=\"comment-thread-renderer  vve-check-visible vve-check-hidden\" data-visibility-tracking=\"CL4BEMJ1GAAiEwjpsvbIjMTtAhU3yMEKHRZcD6w\" data-visibility-types=\"12\" data-priority=\"0\">\r\n<div class=\"comment-renderer vve-check-visible vve-check-hidden\" data-visibility-tracking=\"CMMBELZ1IhMI6bL2yIzE7QIVN8jBCh0WXA-s\" data-visibility-types=\"12\" data-cid=\"UgyQ8iceYjqMY000mJ54AaABAg\">\r\n<a href=\"https:\/\/www.youtube.com\/channel\/UCn_XMhUHYRHuB0tZPyNGoSw\/undefined\" class=\" yt-uix-sessionlink      spf-link \" data-sessionlink=\"itct=CMMBELZ1IhMI6bL2yIzE7QIVN8jBCh0WXA-s\">  <span class=\"video-thumb comment-author-thumbnail yt-thumb yt-thumb-48\">\r\n    <span class=\"yt-thumb-square\">\r\n      <span class=\"yt-thumb-clip\">\r\n        \r\n  <img alt=\"F\" data-ytimg=\"1\" onload=\";window.__ytRIL &amp;&amp; __ytRIL(this)\" role=\"img\" tabindex=\"0\" src=\"https:\/\/yt3.ggpht.com\/yti\/APfAmoEOgcOsU3tuc92fkZ2LUIQXv5R2rGIgfdzw3pjH=s88-c-k-c0x00ffffff-no-rj-mo\" width=\"48\" height=\"48\">\r\n\r\n        <span class=\"vertical-align\"><\/span>\r\n      <\/span>\r\n    <\/span>\r\n  <\/span>\r\n<\/a>\r\n\r\n\r\n    <div id=\"comment-renderer-edit-UgyQ8iceYjqMY000mJ54AaABAg\" class=\"comment-simplebox-edit\" data-editable-content-text=\"\" data-image-src=\"\" data-video-id=\"\">\r\n    <\/div>\r\n<div class=\"comment-renderer-content\"><div class=\"comment-renderer-header\"><a href=\"https:\/\/www.youtube.com\/channel\/UCn_XMhUHYRHuB0tZPyNGoSw\/undefined\" class=\"comment-author-text yt-uix-sessionlink      spf-link \" data-sessionlink=\"itct=CMMBELZ1IhMI6bL2yIzE7QIVN8jBCh0WXA-s\">Valmoiiaa<\/a><span class=\"comment-renderer-time\" tabindex=\"0\"><a href=\"https:\/\/www.youtube.com\/watch?v=dQw4w9WgXcQ&amp;lc=UgyQ8iceYjqMY000mJ54AaABAg\" class=\"yt-uix-sessionlink       spf-link \" data-sessionlink=\"itct=CMMBELZ1IhMI6bL2yIzE7QIVN8jBCh0WXA-s\">1 second ago<\/a><\/span><\/div><div class=\"comment-renderer-text\" tabindex=\"0\" role=\"article\"><div class=\"comment-renderer-text-content\"><?php
20
-		echo $data->content;
21
-	?><\/div><div class=\"comment-text-toggle hid\"><div class=\"comment-text-toggle-link read-more\"><button class=\"yt-uix-button yt-uix-button-size-default yt-uix-button-link\" type=\"button\" onclick=\"return false;\"><span class=\"yt-uix-button-content\">Read more\r\n<\/span><\/button><\/div><div class=\"comment-text-toggle-link show-less hid\"><button class=\"yt-uix-button yt-uix-button-size-default yt-uix-button-link\" type=\"button\" onclick=\"return false;\"><span class=\"yt-uix-button-content\">Show less\r\n<\/span><\/button><\/div><\/div><\/div>\r\n\r\n<div class=\"comment-renderer-footer\" data-vote-status=\"INDIFFERENT\"><div class=\"comment-action-buttons-toolbar\">\r\n\r\n\r\n    <button class=\"yt-uix-button yt-uix-button-size-small yt-uix-button-link comment-renderer-reply comment-simplebox-trigger\" type=\"button\" onclick=\";return false;\" data-placeholder=\"Add a public reply...\" data-simplebox-event=\"replycreated\" data-simplebox-id=\"comment-simplebox-reply-UgyQ8iceYjqMY000mJ54AaABAg\" data-simplebox-label=\"Reply\" data-simplebox-params=\"EgtteTJoX19sNDFxYyIaVWd5UThpY2VZanFNWTAwMG1KNTRBYUFCQWcqAggAUAc%3D\" data-simplebox-sessionlink=\"itct=CMgBEPBbIhMI6bL2yIzE7QIVN8jBCh0WXA-s\" data-simplebox-target=\"\/comment_service_ajax?action_create_comment_reply=1\"><span class=\"yt-uix-button-content\">Reply<\/span><\/button>\r\n\r\n\r\n    \r\n\r\n  <span role=\"radiogroup\">\r\n        <button class=\"yt-uix-button yt-uix-button-size-default yt-uix-button-default yt-uix-button-empty yt-uix-button-has-icon no-icon-markup comment-action-buttons-renderer-thumb yt-uix-sessionlink sprite-comment-actions sprite-like i-a-v-sprite-like\" type=\"button\" onclick=\";return false;\" aria-checked=\"false\" aria-label=\"Like\" role=\"radio\" data-action=\"CAUQAhoaVWd5UThpY2VZanFNWTAwMG1KNTRBYUFCQWcqC215MmhfX2w0MXFjMAA4AEoVMTEyOTM1MjAzMzA1OTEyODQ0ODg1UACoAQy6ARhVQ202eUQyNkhsYWZ6cU5sWWFLN3VFYUE%3D\" data-action-type=\"like\" data-sessionlink=\"itct=CMkBEPBbIhMI6bL2yIzE7QIVN8jBCh0WXA-s\" data-sessionlink-target=\"\/comment_service_ajax?action_perform_comment_action=1\" data-url=\"\/comment_service_ajax?action_perform_comment_action=1\"><\/button>\r\n\r\n        <button class=\"yt-uix-button yt-uix-button-size-default yt-uix-button-default yt-uix-button-empty yt-uix-button-has-icon no-icon-markup comment-action-buttons-renderer-thumb yt-uix-sessionlink sprite-comment-actions sprite-dislike i-a-v-sprite-dislike\" type=\"button\" onclick=\";return false;\" aria-checked=\"false\" aria-label=\"Dislike\" role=\"radio\" data-action=\"CAQQAhoaVWd5UThpY2VZanFNWTAwMG1KNTRBYUFCQWcqC215MmhfX2w0MXFjMAA4AEoVMTEyOTM1MjAzMzA1OTEyODQ0ODg1UACoAQy6ARhVQ202eUQyNkhsYWZ6cU5sWWFLN3VFYUE%3D\" data-action-type=\"dislike\" data-sessionlink=\"itct=CMcBEPBbIhMI6bL2yIzE7QIVN8jBCh0WXA-s\" data-sessionlink-target=\"\/comment_service_ajax?action_perform_comment_action=1\" data-url=\"\/comment_service_ajax?action_perform_comment_action=1\"><\/button>\r\n\r\n  <\/span>\r\n  <div class=\"yt-uix-menu-container comment-renderer-action-menu yt-section-hover-container\">\r\n    \r\n      <div class=\"yt-uix-menu yt-uix-menu-flipped hide-until-delayloaded\">  <button class=\"yt-uix-button yt-uix-button-size-default yt-uix-button-action-menu yt-uix-button-empty yt-uix-button-has-icon no-icon-markup yt-uix-menu-trigger\" type=\"button\" onclick=\";return false;\" aria-haspopup=\"true\" aria-label=\"Action menu.\" aria-pressed=\"false\" role=\"button\" aria-controls=\"aria-menu-id-20\" id=\"kbd-nav-113790\"><span class=\"yt-uix-button-arrow yt-sprite\"><\/span><\/button>\r\n<div class=\"yt-uix-menu-content yt-ui-menu-content yt-uix-kbd-nav yt-uix-menu-content-hidden\" role=\"menu\" style=\"min-width: 18px; left: 661.5px; top: 1126.07px;\" aria-expanded=\"false\" id=\"aria-menu-id-20\" data-kbd-nav-move-out=\"kbd-nav-113790\">  <ul tabindex=\"0\" class=\"yt-uix-kbd-nav yt-uix-kbd-nav-list\">\r\n      <li role=\"menuitem\">\r\n                <div class=\"service-endpoint-action-container hid\">\r\n    <\/div>\r\n\r\n    <button type=\"button\" class=\"yt-ui-menu-item yt-uix-menu-close-on-select  report-form-modal-renderer\" data-innertube-clicktracking=\"CMMBELZ1IhMI6bL2yIzE7QIVN8jBCh0WXA-s\" data-params=\"GhpVZ3lROGljZVlqcU1ZMDAwbUo1NEFhQUJBZygCMgFGOmkIARACGhpVZ3lROGljZVlqcU1ZMDAwbUo1NEFhQUJBZyoLbXkyaF9fbDQxcWMwAEoVMTEyOTM1MjAzMzA1OTEyODQ0ODg1UACoAQy6ARhVQ202eUQyNkhsYWZ6cU5sWWFLN3VFYUHgAQA%3D\" data-url=\"\/flag_service_ajax?action_get_report_form=1\">\r\n    <span class=\"yt-ui-menu-item-label\">Report<\/span>\r\n  <\/button>\r\n\r\n\r\n      <\/li>\r\n  <\/ul>\r\n<\/div><\/div>\r\n  <\/div>\r\n<\/div><div class=\"comment-renderer-replybox\" id=\"comment-simplebox-reply-UgyQ8iceYjqMY000mJ54AaABAg\">\r\n  <span class=\"video-thumb comment-author-thumbnail yt-thumb yt-thumb-32\">\r\n    <span class=\"yt-thumb-square\">\r\n      <span class=\"yt-thumb-clip\">\r\n        \r\n  <img alt=\"F\" data-ytimg=\"1\" onload=\";window.__ytRIL &amp;&amp; __ytRIL(this)\" role=\"img\" src=\".\/and old youtube page maybe_ - YouTube_files\/unnamed(3).png\" tabindex=\"0\" width=\"32\" height=\"32\">\r\n\r\n        <span class=\"vertical-align\"><\/span>\r\n      <\/span>\r\n    <\/span>\r\n  <\/span>\r\n<\/div><\/div><\/div><\/div><div class=\"comment-replies-renderer\" data-visibility-tracking=\"CL8BEL51IhMI6bL2yIzE7QIVN8jBCh0WXA-s\">\r\n  <div class=\"yt-uix-expander yt-uix-expander-collapsed comment-replies-renderer-header\" tabindex=\"0\">\r\n    <div class=\"yt-uix-expander-collapsed-body\">\r\n        \r\n\r\n\r\n\r\n\r\n\r\n    \r\n\r\n\r\n        <div class=\"yt-uix-expander-head comment-replies-renderer-expander-down comment-replies-renderer-view hid\" tabindex=\"0\">\r\n          View reply\r\n        <\/div>\r\n\r\n\r\n      \r\n    <\/div>\r\n    <div id=\"comment-replies-renderer-UgyQ8iceYjqMY000mJ54AaABAg\" class=\"yt-uix-expander-body comment-replies-renderer-pages\">\r\n      <div class=\"yt-uix-expander-head comment-replies-renderer-expander-up comment-replies-renderer-hide\" tabindex=\"0\">\r\n        Hide reply\r\n      <\/div>\r\n    aaaaaaaa<\/div>\r\n  <\/div>\r\n<\/div><\/section>",
20
+        echo $data->content;
21
+    ?><\/div><div class=\"comment-text-toggle hid\"><div class=\"comment-text-toggle-link read-more\"><button class=\"yt-uix-button yt-uix-button-size-default yt-uix-button-link\" type=\"button\" onclick=\"return false;\"><span class=\"yt-uix-button-content\">Read more\r\n<\/span><\/button><\/div><div class=\"comment-text-toggle-link show-less hid\"><button class=\"yt-uix-button yt-uix-button-size-default yt-uix-button-link\" type=\"button\" onclick=\"return false;\"><span class=\"yt-uix-button-content\">Show less\r\n<\/span><\/button><\/div><\/div><\/div>\r\n\r\n<div class=\"comment-renderer-footer\" data-vote-status=\"INDIFFERENT\"><div class=\"comment-action-buttons-toolbar\">\r\n\r\n\r\n    <button class=\"yt-uix-button yt-uix-button-size-small yt-uix-button-link comment-renderer-reply comment-simplebox-trigger\" type=\"button\" onclick=\";return false;\" data-placeholder=\"Add a public reply...\" data-simplebox-event=\"replycreated\" data-simplebox-id=\"comment-simplebox-reply-UgyQ8iceYjqMY000mJ54AaABAg\" data-simplebox-label=\"Reply\" data-simplebox-params=\"EgtteTJoX19sNDFxYyIaVWd5UThpY2VZanFNWTAwMG1KNTRBYUFCQWcqAggAUAc%3D\" data-simplebox-sessionlink=\"itct=CMgBEPBbIhMI6bL2yIzE7QIVN8jBCh0WXA-s\" data-simplebox-target=\"\/comment_service_ajax?action_create_comment_reply=1\"><span class=\"yt-uix-button-content\">Reply<\/span><\/button>\r\n\r\n\r\n    \r\n\r\n  <span role=\"radiogroup\">\r\n        <button class=\"yt-uix-button yt-uix-button-size-default yt-uix-button-default yt-uix-button-empty yt-uix-button-has-icon no-icon-markup comment-action-buttons-renderer-thumb yt-uix-sessionlink sprite-comment-actions sprite-like i-a-v-sprite-like\" type=\"button\" onclick=\";return false;\" aria-checked=\"false\" aria-label=\"Like\" role=\"radio\" data-action=\"CAUQAhoaVWd5UThpY2VZanFNWTAwMG1KNTRBYUFCQWcqC215MmhfX2w0MXFjMAA4AEoVMTEyOTM1MjAzMzA1OTEyODQ0ODg1UACoAQy6ARhVQ202eUQyNkhsYWZ6cU5sWWFLN3VFYUE%3D\" data-action-type=\"like\" data-sessionlink=\"itct=CMkBEPBbIhMI6bL2yIzE7QIVN8jBCh0WXA-s\" data-sessionlink-target=\"\/comment_service_ajax?action_perform_comment_action=1\" data-url=\"\/comment_service_ajax?action_perform_comment_action=1\"><\/button>\r\n\r\n        <button class=\"yt-uix-button yt-uix-button-size-default yt-uix-button-default yt-uix-button-empty yt-uix-button-has-icon no-icon-markup comment-action-buttons-renderer-thumb yt-uix-sessionlink sprite-comment-actions sprite-dislike i-a-v-sprite-dislike\" type=\"button\" onclick=\";return false;\" aria-checked=\"false\" aria-label=\"Dislike\" role=\"radio\" data-action=\"CAQQAhoaVWd5UThpY2VZanFNWTAwMG1KNTRBYUFCQWcqC215MmhfX2w0MXFjMAA4AEoVMTEyOTM1MjAzMzA1OTEyODQ0ODg1UACoAQy6ARhVQ202eUQyNkhsYWZ6cU5sWWFLN3VFYUE%3D\" data-action-type=\"dislike\" data-sessionlink=\"itct=CMcBEPBbIhMI6bL2yIzE7QIVN8jBCh0WXA-s\" data-sessionlink-target=\"\/comment_service_ajax?action_perform_comment_action=1\" data-url=\"\/comment_service_ajax?action_perform_comment_action=1\"><\/button>\r\n\r\n  <\/span>\r\n  <div class=\"yt-uix-menu-container comment-renderer-action-menu yt-section-hover-container\">\r\n    \r\n      <div class=\"yt-uix-menu yt-uix-menu-flipped hide-until-delayloaded\">  <button class=\"yt-uix-button yt-uix-button-size-default yt-uix-button-action-menu yt-uix-button-empty yt-uix-button-has-icon no-icon-markup yt-uix-menu-trigger\" type=\"button\" onclick=\";return false;\" aria-haspopup=\"true\" aria-label=\"Action menu.\" aria-pressed=\"false\" role=\"button\" aria-controls=\"aria-menu-id-20\" id=\"kbd-nav-113790\"><span class=\"yt-uix-button-arrow yt-sprite\"><\/span><\/button>\r\n<div class=\"yt-uix-menu-content yt-ui-menu-content yt-uix-kbd-nav yt-uix-menu-content-hidden\" role=\"menu\" style=\"min-width: 18px; left: 661.5px; top: 1126.07px;\" aria-expanded=\"false\" id=\"aria-menu-id-20\" data-kbd-nav-move-out=\"kbd-nav-113790\">  <ul tabindex=\"0\" class=\"yt-uix-kbd-nav yt-uix-kbd-nav-list\">\r\n      <li role=\"menuitem\">\r\n                <div class=\"service-endpoint-action-container hid\">\r\n    <\/div>\r\n\r\n    <button type=\"button\" class=\"yt-ui-menu-item yt-uix-menu-close-on-select  report-form-modal-renderer\" data-innertube-clicktracking=\"CMMBELZ1IhMI6bL2yIzE7QIVN8jBCh0WXA-s\" data-params=\"GhpVZ3lROGljZVlqcU1ZMDAwbUo1NEFhQUJBZygCMgFGOmkIARACGhpVZ3lROGljZVlqcU1ZMDAwbUo1NEFhQUJBZyoLbXkyaF9fbDQxcWMwAEoVMTEyOTM1MjAzMzA1OTEyODQ0ODg1UACoAQy6ARhVQ202eUQyNkhsYWZ6cU5sWWFLN3VFYUHgAQA%3D\" data-url=\"\/flag_service_ajax?action_get_report_form=1\">\r\n    <span class=\"yt-ui-menu-item-label\">Report<\/span>\r\n  <\/button>\r\n\r\n\r\n      <\/li>\r\n  <\/ul>\r\n<\/div><\/div>\r\n  <\/div>\r\n<\/div><div class=\"comment-renderer-replybox\" id=\"comment-simplebox-reply-UgyQ8iceYjqMY000mJ54AaABAg\">\r\n  <span class=\"video-thumb comment-author-thumbnail yt-thumb yt-thumb-32\">\r\n    <span class=\"yt-thumb-square\">\r\n      <span class=\"yt-thumb-clip\">\r\n        \r\n  <img alt=\"F\" data-ytimg=\"1\" onload=\";window.__ytRIL &amp;&amp; __ytRIL(this)\" role=\"img\" src=\".\/and old youtube page maybe_ - YouTube_files\/unnamed(3).png\" tabindex=\"0\" width=\"32\" height=\"32\">\r\n\r\n        <span class=\"vertical-align\"><\/span>\r\n      <\/span>\r\n    <\/span>\r\n  <\/span>\r\n<\/div><\/div><\/div><\/div><div class=\"comment-replies-renderer\" data-visibility-tracking=\"CL8BEL51IhMI6bL2yIzE7QIVN8jBCh0WXA-s\">\r\n  <div class=\"yt-uix-expander yt-uix-expander-collapsed comment-replies-renderer-header\" tabindex=\"0\">\r\n    <div class=\"yt-uix-expander-collapsed-body\">\r\n        \r\n\r\n\r\n\r\n\r\n\r\n    \r\n\r\n\r\n        <div class=\"yt-uix-expander-head comment-replies-renderer-expander-down comment-replies-renderer-view hid\" tabindex=\"0\">\r\n          View reply\r\n        <\/div>\r\n\r\n\r\n      \r\n    <\/div>\r\n    <div id=\"comment-replies-renderer-UgyQ8iceYjqMY000mJ54AaABAg\" class=\"yt-uix-expander-body comment-replies-renderer-pages\">\r\n      <div class=\"yt-uix-expander-head comment-replies-renderer-expander-up comment-replies-renderer-hide\" tabindex=\"0\">\r\n        Hide reply\r\n      <\/div>\r\n    aaaaaaaa<\/div>\r\n  <\/div>\r\n<\/div><\/section>",
22 22
 	"feedback_text": "aaa"
23 23
 }
24 24
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@
 block discarded – undo
2 2
 header('Content-Type: application/json');
3 3
 parse_str(file_get_contents("php://input"), $data);
4 4
 // Cast it to an object
5
-$data = (object)$data;
5
+$data = (object) $data;
6 6
 
7 7
 ?>
8 8
 <?php 
Please login to merge, or discard this patch.