Test Failed
Push — main ( 594560...d41f84 )
by chief
05:05 queued 02:09
created
web/public/inbox/sent.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
 <?php $__user_u = new user_update($__db); ?>
9 9
 <?php $__db_h = new db_helper(); ?>
10 10
 <?php $__time_h = new time_helper(); ?>
11
-<?php if(!isset($_SESSION['siteusername'])) { header("Location: /sign_in"); } ?>
11
+<?php if (!isset($_SESSION['siteusername'])) { header("Location: /sign_in"); } ?>
12 12
 <?php
13 13
 	$__server->page_embeds->page_title = "SubRocks - Sent Messages";
14 14
 	$__server->page_embeds->page_description = "SubRocks is a site dedicated to bring back the 2012 layout of YouTube.";
@@ -178,15 +178,15 @@  discard block
 block discarded – undo
178 178
                                     $stmt->execute();
179 179
 
180 180
                                     $number_of_result = $stmt->rowCount();
181
-                                    $number_of_page = ceil ($number_of_result / $results_per_page);  
181
+                                    $number_of_page = ceil($number_of_result/$results_per_page);  
182 182
 
183
-                                    if (!isset ($_GET['page']) ) {  
183
+                                    if (!isset ($_GET['page'])) {  
184 184
                                         $page = 1;  
185 185
                                     } else {  
186
-                                        $page = (int)$_GET['page'];  
186
+                                        $page = (int) $_GET['page'];  
187 187
                                     }  
188 188
 
189
-                                    $page_first_result = ($page - 1) * $results_per_page;  
189
+                                    $page_first_result = ($page - 1)*$results_per_page;  
190 190
 
191 191
                                     $stmt6 = $__db->prepare("SELECT * FROM pms WHERE owner = :search AND readed = 'y' ORDER BY id DESC LIMIT :pfirst, :pper");
192 192
                                     $stmt6->bindParam(":search", $search);
@@ -211,8 +211,8 @@  discard block
 block discarded – undo
211 211
                                     </tr>
212 212
                                     
213 213
                                     <?php
214
-                                        while($inbox = $stmt->fetch(PDO::FETCH_ASSOC)) { 
215
-                                            if($__video_h->video_exists($inbox['video_attribute'])) {
214
+                                        while ($inbox = $stmt->fetch(PDO::FETCH_ASSOC)) { 
215
+                                            if ($__video_h->video_exists($inbox['video_attribute'])) {
216 216
                                                 $inbox['video'] = $__video_h->fetch_video_rid($inbox['video_attribute']);
217 217
                                                 $inbox['video_attr_exists'] = true;
218 218
 
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
                                     ?> 
227 227
                                     <tr style="margin-top: 5px;" id="videoslist">
228 228
                                             <!--
229
-                                            <?php if($inbox['readed'] == "n") { ?>
229
+                                            <?php if ($inbox['readed'] == "n") { ?>
230 230
                                                 <a style="position:relative;top:7px;color: white;text-decoration: none;background-color: #d54343;padding: 7px;padding-left: 10px;margin-right: 12px;display: inline;" href="/inbox/">
231 231
                                                 NEW
232 232
                                                 </a>
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
 											<p style="width:475px;">
258 258
                                             <?php echo $__video_h->shorten_description($inbox['message'], 300, true); ?>
259 259
 											</p>
260
-                                            <?php if($inbox['video_attr_exists']) { ?>
260
+                                            <?php if ($inbox['video_attr_exists']) { ?>
261 261
                                                 <hr>
262 262
                                                 <ul>
263 263
                                                     <li class="video-list-item "><a href="/watch?v=<?php echo $inbox['video']['rid']; ?>" class="video-list-item-link yt-uix-sessionlink" data-sessionlink="ei=CNLr3rbS3rICFSwSIQodSW397Q%3D%3D&amp;feature=g-sptl%26cid%3Dinp-hs-ytg"><span class="ux-thumb-wrap contains-addto "><span class="video-thumb ux-thumb yt-thumb-default-120 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="http://s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="<?php echo $inbox['video']['title']; ?>" data-thumb="/dynamic/thumbs/<?php echo $inbox['video']['thumbnail']; ?>" width="120"><span class="vertical-align"></span></span></span></span><span class="video-time"><?php echo $inbox['video']['duration']; ?></span>
@@ -284,7 +284,7 @@  discard block
 block discarded – undo
284 284
                                     </div>
285 285
                                 </center><br>
286 286
 
287
-                                <?php for($page = 1; $page<= $number_of_page; $page++) { ?>
287
+                                <?php for ($page = 1; $page <= $number_of_page; $page++) { ?>
288 288
                                     <button class="yt-uix-button yt-uix-button-default" onclick="ajax_fetch(<?php echo $page; ?>)"><?php echo $page; ?></button>
289 289
                                 <?php } ?>   
290 290
 
@@ -308,7 +308,7 @@  discard block
 block discarded – undo
308 308
                                 </script>
309 309
 
310 310
                                 <?php 
311
-                                    if($stmt6->rowCount() == 0) { echo "
311
+                                    if ($stmt6->rowCount() == 0) { echo "
312 312
                                         You currently have no sent messages in your inbox.
313 313
                                     "; 
314 314
                                 } ?>
Please login to merge, or discard this patch.
web/public/inbox/markasread.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
 <?php $__db_h = new db_helper(); ?>
12 12
 <?php $__time_h = new time_helper(); ?>
13 13
 <?php
14
-    if(!isset($_SESSION['siteusername'])) { die(); }
14
+    if (!isset($_SESSION['siteusername'])) { die(); }
15 15
     $request = (object) [
16 16
         "username" => $_SESSION['siteusername'],
17 17
 
Please login to merge, or discard this patch.
web/public/inbox/delete_message.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
 <?php $__db_h = new db_helper(); ?>
12 12
 <?php $__time_h = new time_helper(); ?>
13 13
 <?php
14
-    if(!isset($_SESSION['siteusername'])) { die(); }
14
+    if (!isset($_SESSION['siteusername'])) { die(); }
15 15
 
16 16
     $request = (object) [
17 17
         "id" => $_GET['id'],
Please login to merge, or discard this patch.
web/public/channel_discussion.php 1 patch
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -12,10 +12,10 @@  discard block
 block discarded – undo
12 12
 <?php $__db_h = new db_helper(); ?>
13 13
 <?php $__time_h = new time_helper(); ?>
14 14
 <?php
15
-	if(isset($_SESSION['siteusername']))
15
+	if (isset($_SESSION['siteusername']))
16 16
 	    $_user_hp = $__user_h->fetch_user_username($_SESSION['siteusername']);
17 17
 
18
-    if(!$__user_h->user_exists($_GET['n']))
18
+    if (!$__user_h->user_exists($_GET['n']))
19 19
         header("Location: /?userdoesntexist");
20 20
 
21 21
     $_user = $__user_h->fetch_user_username($_GET['n']);
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 	$stmt->bindParam(":username", $_user['username']);
25 25
 	$stmt->execute();
26 26
 
27
-	while($ban = $stmt->fetch(PDO::FETCH_ASSOC)) { 
27
+	while ($ban = $stmt->fetch(PDO::FETCH_ASSOC)) { 
28 28
 		header("Location: /?error=This user has been terminated for violating SubRock's Community Guidelines.");
29 29
 	}
30 30
 
@@ -76,28 +76,28 @@  discard block
 block discarded – undo
76 76
     $_user['genre'] = strtolower($_user['genre']);
77 77
     $_user['subscribed'] = $__user_h->if_subscribed(@$_SESSION['siteusername'], $_user['username']);
78 78
 
79
-    if(!check_valid_colorhex($_user['primary_color']) && strlen($_user['primary_color']) != 6) { $_user['primary_color'] = ""; }
80
-    if(!check_valid_colorhex($_user['secondary_color']) && strlen($_user['secondary_color']) != 6) { $_user['secondary_color'] = ""; }
81
-    if(!check_valid_colorhex($_user['third_color']) && strlen($_user['third_color']) != 6) { $_user['third_color'] = ""; }
82
-    if(!check_valid_colorhex($_user['text_color']) && strlen($_user['text_color']) != 6) { $_user['text_color'] = ""; }
83
-    if(!check_valid_colorhex($_user['primary_color_text']) && strlen($_user['primary_color_text']) != 6) { $_user['primary_color_text'] = ""; }
84
-    if(!check_valid_colorhex($_user['2009_bgcolor']) && strlen($_user['2009_bgcolor']) != 6) { $_user['2009_bgcolor'] = ""; }
79
+    if (!check_valid_colorhex($_user['primary_color']) && strlen($_user['primary_color']) != 6) { $_user['primary_color'] = ""; }
80
+    if (!check_valid_colorhex($_user['secondary_color']) && strlen($_user['secondary_color']) != 6) { $_user['secondary_color'] = ""; }
81
+    if (!check_valid_colorhex($_user['third_color']) && strlen($_user['third_color']) != 6) { $_user['third_color'] = ""; }
82
+    if (!check_valid_colorhex($_user['text_color']) && strlen($_user['text_color']) != 6) { $_user['text_color'] = ""; }
83
+    if (!check_valid_colorhex($_user['primary_color_text']) && strlen($_user['primary_color_text']) != 6) { $_user['primary_color_text'] = ""; }
84
+    if (!check_valid_colorhex($_user['2009_bgcolor']) && strlen($_user['2009_bgcolor']) != 6) { $_user['2009_bgcolor'] = ""; }
85 85
 
86
-	if(isset($_SESSION['siteusername']))
86
+	if (isset($_SESSION['siteusername']))
87 87
     	$__user_i->check_view_channel($_user['username'], @$_SESSION['siteusername']);
88 88
 
89
-    if($_SERVER['REQUEST_METHOD'] == 'POST') {
89
+    if ($_SERVER['REQUEST_METHOD'] == 'POST') {
90 90
         $error = array();
91 91
 
92
-        if(!isset($_SESSION['siteusername'])){ $error['message'] = "you are not logged in"; $error['status'] = true; }
93
-        if(!$_POST['comment']){ $error['message'] = "your comment cannot be blank"; $error['status'] = true; }
94
-        if(strlen($_POST['comment']) > 1000){ $error['message'] = "your comment must be shorter than 1000 characters"; $error['status'] = true; }
92
+        if (!isset($_SESSION['siteusername'])) { $error['message'] = "you are not logged in"; $error['status'] = true; }
93
+        if (!$_POST['comment']) { $error['message'] = "your comment cannot be blank"; $error['status'] = true; }
94
+        if (strlen($_POST['comment']) > 1000) { $error['message'] = "your comment must be shorter than 1000 characters"; $error['status'] = true; }
95 95
         //if(!isset($_POST['g-recaptcha-response'])){ $error['message'] = "captcha validation failed"; $error['status'] = true; }
96 96
         //if(!$_user_insert_utils->validateCaptcha($config['recaptcha_secret'], $_POST['g-recaptcha-response'])) { $error['message'] = "captcha validation failed"; $error['status'] = true; }
97
-        if($__user_h->if_cooldown($_SESSION['siteusername'])) { $error['message'] = "You are on a cooldown! Wait for a minute before posting another comment."; $error['status'] = true; }
97
+        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; }
98 98
         //if(ifBlocked(@$_SESSION['siteusername'], $user['username'], $__db)) { $error = "This user has blocked you!"; $error['status'] = true; } 
99 99
 
100
-        if(!isset($error['message'])) {
100
+        if (!isset($error['message'])) {
101 101
 			$text = $_POST['comment'];
102 102
             $stmt = $__db->prepare("INSERT INTO profile_comments (toid, author, comment) VALUES (:id, :username, :comment)");
103 103
 			$stmt->bindParam(":id", $_user['username']);
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 
108 108
             $_user_update_utils->update_comment_cooldown_time($_SESSION['siteusername']);
109 109
 
110
-            if(@$_SESSION['siteusername'] != $_user['username']) { 
110
+            if (@$_SESSION['siteusername'] != $_user['username']) { 
111 111
                 $_user_insert_utils->send_message($_user['username'], "New comment", 'I commented "' . $_POST['comment'] . '" on your profile!', $_SESSION['siteusername']);
112 112
             }
113 113
         }
@@ -141,11 +141,11 @@  discard block
 block discarded – undo
141 141
 		<link rel="stylesheet" href="/yt/cssbin/www-extra.css">
142 142
 		<style>
143 143
 			#content-container {
144
-				background-color: <?php echo $_user['primary_color'];  ?>;
144
+				background-color: <?php echo $_user['primary_color']; ?>;
145 145
 				background-image: url(/dynamic/banners/<?php echo $_user['2012_bg']; ?>);
146 146
 				background-repeat: repeat;
147 147
 				<?php
148
-					switch($_user['2012_bgoption']) {
148
+					switch ($_user['2012_bgoption']) {
149 149
 						case "stretch":
150 150
 						echo "background-size: cover;";
151 151
 						break;
@@ -178,11 +178,11 @@  discard block
 block discarded – undo
178 178
 			<div id="masthead-container"><?php require($_SERVER['DOCUMENT_ROOT'] . "/s/mod/header.php"); ?></div>
179 179
 			<div id="content-container">
180 180
 				<!-- begin content -->
181
-				<?php if(isset($_SESSION['siteusername']) && $_user['username'] == $_SESSION['siteusername']) { ?>
181
+				<?php if (isset($_SESSION['siteusername']) && $_user['username'] == $_SESSION['siteusername']) { ?>
182 182
 					<div class="channel_customization"><?php require($_SERVER['DOCUMENT_ROOT'] . "/s/mod/channel_customization.php"); ?></div>
183 183
 				<?php } ?> 
184 184
 				<?php
185
-					if(empty(trim($_user['bio'])))
185
+					if (empty(trim($_user['bio'])))
186 186
 						$_user['bio'] = "This user has no description.";
187 187
 				?>
188 188
 				<div id="content">
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
 												<h1><?php echo htmlspecialchars($_user['username']); ?></h1>
238 238
 											</div>
239 239
 											<div class="upper-left-section enable-fancy-subscribe-button">
240
-											<?php if($_user['username'] != @$_SESSION['siteusername']) { ?>
240
+											<?php if ($_user['username'] != @$_SESSION['siteusername']) { ?>
241 241
 													<div class="yt-subscription-button-hovercard yt-uix-hovercard">
242 242
 														<button 
243 243
 															href="#" 
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
 															title="" 
246 246
 															id="subscribe-button"
247 247
 															type="button" 
248
-															class="yt-subscription-button <?php if($_user['subscribed']) { echo "subscribed "; } ?>  yt-uix-button yt-uix-button-subscription yt-uix-tooltip" 
248
+															class="yt-subscription-button <?php if ($_user['subscribed']) { echo "subscribed "; } ?>  yt-uix-button yt-uix-button-subscription yt-uix-tooltip" 
249 249
 															role="button"><span class="yt-uix-button-icon-wrapper"><img class="yt-uix-button-icon yt-uix-button-icon-subscribe" 
250 250
 															src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt=""></span><span class="yt-uix-button-content">  <span class="subscribe-label">Subscribe</span>
251 251
 														<span class="subscribed-label">Subscribed</span>
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
 												<?php } else { ?>
262 262
 
263 263
 												<?php } ?>
264
-												<?php if($__user_h->if_partner($_user['username'])) { ?>
264
+												<?php if ($__user_h->if_partner($_user['username'])) { ?>
265 265
 													<img style="width: 29px;vertical-align: middle;margin-left: 10px;" title="This user is a SubRocks partner" src="/yt/imgbin/RenderedImage.png">
266 266
 												<?php } ?>
267 267
 											</div>
@@ -319,7 +319,7 @@  discard block
 block discarded – undo
319 319
 									</div>
320 320
 								</div>
321 321
 							</div>
322
-                            <?php if($_user['featured'] != "None") { $video = $__video_h->fetch_video_rid($_user['featured']); } else { $_user['featured'] = false; } ?>
322
+                            <?php if ($_user['featured'] != "None") { $video = $__video_h->fetch_video_rid($_user['featured']); } else { $_user['featured'] = false; } ?>
323 323
 							<div id="branded-page-body">
324 324
 								<div class="channel-tab-content channel-layout-two-column selected blogger-template"><?php require($_SERVER['DOCUMENT_ROOT'] . "/s/mod/channel_discussion.php"); ?></div>
325 325
 							</div>
Please login to merge, or discard this patch.
web/public/s/mod/channel_discussion.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
                                                     <div class="activity-feed">
26 26
                                                         <div class="feed-list-container">
27 27
                                                             <div class="feed-item-list">
28
-                                                            <?php if(isset($_SESSION['siteusername'])) { ?>
28
+                                                            <?php if (isset($_SESSION['siteusername'])) { ?>
29 29
                                                             <form method="post" action="/d/comment_profile?u=<?php echo htmlspecialchars($_user['username']); ?>">
30 30
                                                                 <img style="width: 50px;" src="">
31 31
                                                                 <textarea style="resize:none;padding:5px;border-radius:5px;background-color:white;border: 1px solid #d3d3d3; width: 577px; resize: none;"cols="32" id="com" placeholder="Share your thoughts" name="comment"></textarea><br>
@@ -41,15 +41,15 @@  discard block
 block discarded – undo
41 41
                                                                 $stmt->execute();
42 42
 
43 43
                                                                 $number_of_result = $stmt->rowCount();
44
-                                                                $number_of_page = ceil ($number_of_result / $results_per_page);  
44
+                                                                $number_of_page = ceil($number_of_result/$results_per_page);  
45 45
 
46
-                                                                if (!isset ($_GET['page']) ) {  
46
+                                                                if (!isset ($_GET['page'])) {  
47 47
                                                                     $page = 1;  
48 48
                                                                 } else {  
49
-                                                                    $page = (int)$_GET['page'];  
49
+                                                                    $page = (int) $_GET['page'];  
50 50
                                                                 }  
51 51
 
52
-                                                                $page_first_result = ($page - 1) * $results_per_page;  
52
+                                                                $page_first_result = ($page - 1)*$results_per_page;  
53 53
 
54 54
                                                                 $stmt = $__db->prepare("SELECT * FROM profile_comments WHERE toid = :rid ORDER BY id DESC LIMIT :pfirst, :pper");
55 55
                                                                 $stmt->bindParam(":rid", $_user['username']);
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
                                                                 $stmt->bindParam(":pper", $results_per_page);
58 58
                                                                 $stmt->execute();
59 59
 
60
-                                                                while($comment = $stmt->fetch(PDO::FETCH_ASSOC)) { 
60
+                                                                while ($comment = $stmt->fetch(PDO::FETCH_ASSOC)) { 
61 61
 
62 62
                                                             ?>
63 63
 
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
                                                                                     <span dir="ltr"><?php echo $__time_h->time_elapsed_string($comment['date']); ?><span>
77 77
                                                                                     </span>
78 78
                                                                                     </span></span>
79
-                                                                                    <?php if($comment['likes'] != 0) { ?>
79
+                                                                                    <?php if ($comment['likes'] != 0) { ?>
80 80
                                                                                     <span dir="ltr" class="comments-rating-positive" title="9 up, 1 down">
81 81
                                                                                         <?php echo $comment['likes']; ?>
82 82
                                                                                         <img class="comments-rating-thumbs-up" src="//s.ytimg.com/yts/img/pixel-vfl3z5WfW.gif">
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
                                                                                     </button>
105 105
                                                                                 </span>
106 106
                                                                             </div>
107
-                                                                        <?php if(isset($_SESSION['siteusername'])) { ?> 
107
+                                                                        <?php if (isset($_SESSION['siteusername'])) { ?> 
108 108
                                                                             <li id="reply_to_<?php echo $comment['id']; ?>" style="display: none;" class="comment yt-tile-default  child" data-tag="O" data-author-viewing="" data-id="iRV7EkT9us81mDLFDSB6FAsB156Fdn13HUmTm26C3PE" data-score="34" data-author="<?php echo htmlspecialchars($row['author']); ?>">
109 109
 
110 110
                                                                             <div class="comment-body">
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
 														</div>
180 180
 														<hr class="yt-horizontal-rule ">
181 181
 													</div>
182
-													<?php if(!empty($_user['website'])) { ?>
182
+													<?php if (!empty($_user['website'])) { ?>
183 183
 														<div class="user-profile-item">
184 184
 															<div class="yt-c3-profile-custom-url field-container ">
185 185
 																<a href="<?php echo addhttp(htmlspecialchars($_user['website'])); ?>" rel="me nofollow" target="_blank" title="<?php echo htmlspecialchars($_user['website']); ?>" class="yt-uix-redirect-link">
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
 															<h5>Country</h5>
229 229
 															<span class="value"><?php echo htmlspecialchars($_user['country']); ?></span>
230 230
 														</div>
231
-														<?php if($_user['genre'] != "none") { ?>
231
+														<?php if ($_user['genre'] != "none") { ?>
232 232
 															<div class="user-profile-item ">
233 233
 																<h5>Channel Genre</h5>
234 234
 																<span class="value"><?php echo htmlspecialchars(ucfirst($_user['genre'])); ?></span>
@@ -240,16 +240,16 @@  discard block
 block discarded – undo
240 240
 											</div>
241 241
 											<div class="channel-module other-channels yt-uix-c3-module-container other-channels-compact">
242 242
 												<?php $_user['featured_channels'] = explode(",", $_user['featured_channels']); ?>
243
-												<?php if(count($_user['featured_channels']) != 0) { ?>
243
+												<?php if (count($_user['featured_channels']) != 0) { ?>
244 244
 												<div class="module-view other-channels-view">
245
-													<h2 <?php if(@$_SESSION['siteusername'] == $_user['username']) { ?>style="display: inline-block;position: relative;bottom: 10px;"<?php } ?>>Featured Channels</h2> 
246
-													<?php if(@$_SESSION['siteusername'] == $_user['username']) { 
245
+													<h2 <?php if (@$_SESSION['siteusername'] == $_user['username']) { ?>style="display: inline-block;position: relative;bottom: 10px;"<?php } ?>>Featured Channels</h2> 
246
+													<?php if (@$_SESSION['siteusername'] == $_user['username']) { 
247 247
 														echo "<a href='#' style='float:right;font-size:11px;color:black;' onclick=';open_featured_channels();return false;'>edit</a>"; 
248 248
 													} ?>
249 249
 													<ul class="channel-summary-list ">
250 250
 														<?php 
251
-															foreach($_user['featured_channels'] as $user) {
252
-																if($__user_h->user_exists($user)) {
251
+															foreach ($_user['featured_channels'] as $user) {
252
+																if ($__user_h->user_exists($user)) {
253 253
 														?>
254 254
 															<li class="yt-tile-visible yt-uix-tile">
255 255
 																<div class="channel-summary clearfix channel-summary-compact">
@@ -278,13 +278,13 @@  discard block
 block discarded – undo
278 278
 												$stmt->bindParam(":search", $_user['username']);
279 279
 												$stmt->execute();
280 280
 
281
-												if($stmt->rowCount() != 0) {
281
+												if ($stmt->rowCount() != 0) {
282 282
 											?>
283 283
 												<div class="playlists-narrow channel-module yt-uix-c3-module-container">
284 284
 													<div class="module-view gh-featured">
285 285
 														<h2>Featured Playlists</h2>     
286 286
 														<?php
287
-														while($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { 
287
+														while ($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { 
288 288
 															$playlist['videos'] = json_decode($playlist['videos']);
289 289
 														?> 
290 290
 															<div class="playlist yt-tile-visible yt-uix-tile">
Please login to merge, or discard this patch.
web/public/d/comment_profile.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -25,13 +25,13 @@  discard block
 block discarded – undo
25 25
     ]
26 26
 ]; 
27 27
 
28
-if($_SERVER['REQUEST_METHOD'] == 'POST') {
29
-    if(!isset($request->username)){ $request->error->message = "you are not logged in"; $request->error->status = ""; }
30
-    if(!$request->touser){ $request->error->message = "your comment cannot be blank"; $request->error->status = ""; }
31
-    if(strlen($request->touser) > 1000){ $request->error->message = "your comment must be shorter than 1000 characters"; $request->error->status = ""; }
32
-    if($__user_h->if_cooldown($request->username)) { $request->error->message = "You are on a cooldown! Wait for a minute before posting another comment."; $request->error->status = ""; }
28
+if ($_SERVER['REQUEST_METHOD'] == 'POST') {
29
+    if (!isset($request->username)) { $request->error->message = "you are not logged in"; $request->error->status = ""; }
30
+    if (!$request->touser) { $request->error->message = "your comment cannot be blank"; $request->error->status = ""; }
31
+    if (strlen($request->touser) > 1000) { $request->error->message = "your comment must be shorter than 1000 characters"; $request->error->status = ""; }
32
+    if ($__user_h->if_cooldown($request->username)) { $request->error->message = "You are on a cooldown! Wait for a minute before posting another comment."; $request->error->status = ""; }
33 33
 
34
-    if($request->error->status == "OK") {
34
+    if ($request->error->status == "OK") {
35 35
         $stmt = $__db->prepare("INSERT INTO profile_comments (toid, author, comment) VALUES (:username, :from, :comment)");
36 36
         $stmt->bindParam(":username", $request->touser);
37 37
         $stmt->bindParam(":from", $request->username);
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
         $stmt->execute();
40 40
 
41 41
         $__user_u->update_cooldown_time($request->username, "cooldown_comment");
42
-        if(@$request->username != $_user['author'])
42
+        if (@$request->username != $_user['author'])
43 43
             $__user_i->send_message($request->username, "New profile comment", $_user['username'], "I commented \"" . $request->touser . "\" on your profile!", "", "nt");
44 44
         
45 45
         header("Location: /user/" . $request->touser . "/discussion");
Please login to merge, or discard this patch.
web/public/s/mod/header.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@  discard block
 block discarded – undo
1 1
 <?php
2
-	if(isset($_SESSION['siteusername'])) {
2
+	if (isset($_SESSION['siteusername'])) {
3 3
         $stmt = $__db->prepare("UPDATE users SET ip = :ip WHERE username = :username");
4 4
         $stmt->bindParam(":username", $_SESSION['siteusername']);
5
-		$stmt->bindParam(":ip",       $_SERVER["HTTP_CF_CONNECTING_IP"]);
5
+		$stmt->bindParam(":ip", $_SERVER["HTTP_CF_CONNECTING_IP"]);
6 6
         $stmt->execute();
7 7
 	}
8 8
 
9
-	if(isset($_SESSION['siteusername']) && !$__user_h->user_exists(@$_SESSION['siteusername'])) {
9
+	if (isset($_SESSION['siteusername']) && !$__user_h->user_exists(@$_SESSION['siteusername'])) {
10 10
 		die("<a href='/logout'>Your user has been deleted. Logout</a>");
11 11
 	}
12 12
 ?>
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
 	<a id="logo-container" href="/" title="SubRocks home">
16 16
 	<img id="logo" src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="SubRocks home">
17 17
 	</a>
18
-	<?php if(!isset($_SESSION['siteusername'])) { ?>
18
+	<?php if (!isset($_SESSION['siteusername'])) { ?>
19 19
 	<div id="yt-masthead-signin">
20 20
 		<div id="masthead-user-display"><span id="masthead-user-wrapper"><button href="/sign_in" type="button" id="masthead-user-button" onclick=";window.location.href=this.getAttribute('href');return false;" class=" yt-uix-button yt-uix-button-text" role="button"><span class="yt-uix-button-content">  <span id="masthead-user-image">
21 21
 			<span class="clip">
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 			<div id="masthead-user-bar">
34 34
 				<div id="masthead-user">
35 35
 					<span id="masthead-gaia-user-expander" class="masthead-user-menu-expander masthead-expander" onclick="yt.www.masthead.toggleExpandedMasthead()"><span id="masthead-gaia-user-wrapper" class="yt-rounded" tabindex="0"><?php echo htmlspecialchars($_SESSION['siteusername']); ?></span></span>
36
-							<?php if($__user_h->fetch_unread_pms($_SESSION['siteusername']) != 0) { ?>
36
+							<?php if ($__user_h->fetch_unread_pms($_SESSION['siteusername']) != 0) { ?>
37 37
 							<button type="button" onclick=";window.location.href=this.getAttribute('href');return false;" href="/inbox/" class="sb-button sb-notif-on yt-uix-button" id="sb-button-notify" role="button"><span class="yt-uix-button-content"><?php echo $__user_h->fetch_unread_pms($_SESSION['siteusername']); ?></span></button>
38 38
 					<?php } else { ?>
39 39
 							<button type="button" onclick=";window.location.href=this.getAttribute('href');return false;" href="/inbox/" class="sb-button sb-notif-off yt-uix-button" id="sb-button-notify" role="button"><span class="yt-uix-button-content"><?php echo $__user_h->fetch_unread_pms($_SESSION['siteusername']); ?></span></button>
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 	<div class="alerts-2012">
56 56
 	
57 57
 	</div>
58
-	<?php if(isset($error['status'])) { ?>
58
+	<?php if (isset($error['status'])) { ?>
59 59
 		<div id="masthead_child_div" style="width: 970px;margin: auto;"><div class="yt-alert yt-alert-default yt-alert-error  yt-alert-player">  <div class="yt-alert-icon">
60 60
 			<img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" class="icon master-sprite" alt="Alert icon">
61 61
 		</div>
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 			</div>
66 66
 		</div></div></div>
67 67
 	<?php } ?>
68
-	<?php if(isset($_GET['error'])) { ?>
68
+	<?php if (isset($_GET['error'])) { ?>
69 69
 		<div id="masthead_child_div" style="width: 970px;margin: auto;"><div class="yt-alert yt-alert-default yt-alert-error ">  <div class="yt-alert-icon">
70 70
 			<img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" class="icon master-sprite" alt="Alert icon">
71 71
 		</div>
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 			</div>
76 76
 		</div></div></div>
77 77
 	<?php } ?>
78
-	<?php if(isset($_GET['success'])) { ?>
78
+	<?php if (isset($_GET['success'])) { ?>
79 79
 		<div id="masthead_child_div" style="width: 970px;margin: auto;"><div class="yt-alert yt-alert-default yt-alert-success ">  <div class="yt-alert-icon">
80 80
 			<img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" class="icon master-sprite" alt="Alert icon">
81 81
 		</div>
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 			</div>
86 86
 		</div></div></div>
87 87
 	<?php } ?>
88
-	<?php if(isset($_SESSION['error'])) { ?>
88
+	<?php if (isset($_SESSION['error'])) { ?>
89 89
 		<div id="masthead_child_div" style="width: 970px;margin: auto;"><div class="yt-alert yt-alert-default yt-alert-error">  <div class="yt-alert-icon">
90 90
 			<img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" class="icon master-sprite" alt="Alert icon">
91 91
 		</div>
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
 		<b>New minor update: <pre style="display:inline-block;">1fe1fa4</pre></b> <pre style="display:inline-block;font-size:10px;margin-left:35px;">This is a part of the Communications update. The inbox has been updated with a cleaner look.</pre>
102 102
 	</div></div></div></div><br>
103 103
 	-->
104
-<?php if(isset($_SESSION['siteusername'])) { ?>
104
+<?php if (isset($_SESSION['siteusername'])) { ?>
105 105
 <div id="masthead-expanded" class="hid" style="display: none;">
106 106
 	<div id="masthead-expanded-container" class="with-sandbar">
107 107
 	<div class="yt-uix-slider yt-rounded" id="watch-channel-discoverbox" data-slider-slide-selected="3" data-slider-slides="4"
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
                     $stmt = $__db->prepare("SELECT * FROM videos WHERE author = :username ORDER BY id DESC LIMIT 20");
123 123
                     $stmt->bindParam(":username", $_SESSION['siteusername']);
124 124
                     $stmt->execute();
125
-                    while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { 
125
+                    while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) { 
126 126
                         $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
127 127
                         $video['duration'] = $__time_h->timestamp($video['duration']);
128 128
                         $video['views'] = $__video_h->fetch_video_views($video['rid']);
Please login to merge, or discard this patch.
web/public/watch.php 1 patch
Spacing   +44 added lines, -44 removed lines patch added patch discarded remove patch
@@ -11,11 +11,11 @@  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($_video['visibility'] == "v" && @$_SESSION['siteusername'] != $_video['author'])
18
+	if ($_video['visibility'] == "v" && @$_SESSION['siteusername'] != $_video['author'])
19 19
 		header("Location: /");
20 20
 
21 21
 	$__video_h->check_view($_GET['v'], @$_SERVER["HTTP_CF_CONNECTING_IP"]);
@@ -66,20 +66,20 @@  discard block
 block discarded – undo
66 66
          if (window.yt.timing) {yt.timing.tick("ct");}    
67 67
       </script>
68 68
 		<?php
69
-			$_video['dislikes'] =  $__video_h->get_video_stars_level($_video['rid'], 1);
69
+			$_video['dislikes'] = $__video_h->get_video_stars_level($_video['rid'], 1);
70 70
 			$_video['dislikes'] += $__video_h->get_video_stars_level($_video['rid'], 2);
71 71
 
72
-			$_video['likes'] =     $__video_h->get_video_stars_level($_video['rid'], 4);
73
-			$_video['likes'] +=    $__video_h->get_video_stars_level($_video['rid'], 5);
72
+			$_video['likes'] = $__video_h->get_video_stars_level($_video['rid'], 4);
73
+			$_video['likes'] += $__video_h->get_video_stars_level($_video['rid'], 5);
74 74
 
75 75
 			$_video['dislikes'] += $__video_h->get_video_likes($_video['rid'], false);
76 76
 			$_video['likes'] += $__video_h->get_video_likes($_video['rid'], true);
77 77
 
78
-			if($_video['likes'] == 0 && $_video['dislikes'] == 0) {
78
+			if ($_video['likes'] == 0 && $_video['dislikes'] == 0) {
79 79
 				$_video['likeswidth'] = 0;
80 80
 				$_video['dislikeswidth'] = 0;
81 81
 			} else {
82
-				$_video['likeswidth'] = $_video['likes'] / ($_video['likes'] + $_video['dislikes']) * 100;
82
+				$_video['likeswidth'] = $_video['likes']/($_video['likes'] + $_video['dislikes'])*100;
83 83
 				$_video['dislikeswidth'] = 100 - $_video['likeswidth'];
84 84
 			}
85 85
 
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
 									</div>
114 114
 									<div id="instream_google_companion_ad_div"></div>
115 115
 								</div>
116
-								<?php if(@$_SESSION['siteusername'] == $_video['author']) { ?>
116
+								<?php if (@$_SESSION['siteusername'] == $_video['author']) { ?>
117 117
 									<div id="watch-owner-container">
118 118
 										<div id="masthead-subnav" class="yt-nav yt-nav-dark ">
119 119
 											<ul class="yt-nav-aside">
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
 										</div>
133 133
 									</div><br>
134 134
 								<?php } ?>
135
-								<?php if($__user_h->if_admin(@$_SESSION['siteusername']) && @$_SESSION['siteusername'] != $_video['author']) { ?>
135
+								<?php if ($__user_h->if_admin(@$_SESSION['siteusername']) && @$_SESSION['siteusername'] != $_video['author']) { ?>
136 136
 									<div id="watch-owner-container">
137 137
 										<div id="masthead-subnav" class="yt-nav yt-nav-dark ">
138 138
 											<ul class="yt-nav-aside">
@@ -161,10 +161,10 @@  discard block
 block discarded – undo
161 161
 										$stmt->execute();
162 162
 										$alts = $stmt->rowCount();
163 163
 
164
-										if($alts != 0) { echo "<span style='font-size:11px;color:grey;'>Alts will pop up below here...</span><br>"; }
164
+										if ($alts != 0) { echo "<span style='font-size:11px;color:grey;'>Alts will pop up below here...</span><br>"; }
165 165
 
166
-										while($username = $stmt->fetch(PDO::FETCH_ASSOC)) { 
167
-											if($username['username'] != $_video['author'] && $username['ip'] != "0.0.0.0")
166
+										while ($username = $stmt->fetch(PDO::FETCH_ASSOC)) { 
167
+											if ($username['username'] != $_video['author'] && $username['ip'] != "0.0.0.0")
168 168
 												echo "
169 169
 												  <a style='font-size:10px;' href='/user/" .  htmlspecialchars($username['username']) . "'>" . 
170 170
 													htmlspecialchars($username['username']) 
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
 											title="" 
190 190
 											id="subscribe-button"
191 191
 											type="button" 
192
-											class="<?php if($_video['subscribed']) { echo "subscribed "; } ?>yt-subscription-button  yt-uix-button yt-uix-button-subscription yt-uix-tooltip" 
192
+											class="<?php if ($_video['subscribed']) { echo "subscribed "; } ?>yt-subscription-button  yt-uix-button yt-uix-button-subscription yt-uix-tooltip" 
193 193
 											role="button">
194 194
 											<span class="yt-uix-button-icon-wrapper">
195 195
 												<img class="yt-uix-button-icon yt-uix-button-icon-subscribe" src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="">
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
 						<div id="watch-main-container">
248 248
 							<div id="watch-main">
249 249
 								<div id="watch-panel">
250
-									<?php if($_video['featured'] == "v") { ?>
250
+									<?php if ($_video['featured'] == "v") { ?>
251 251
 										<div id="masthead_child_div"><div class="yt-alert yt-alert-default yt-alert-warn">  <div class="yt-alert-icon">
252 252
 											<img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" class="icon master-sprite" alt="Alert icon">
253 253
 										</div>
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
 										</div></div></div>
259 259
 									<?php }  ?>
260 260
 
261
-	  								<?php if($_video['visibility'] == "u") { ?>
261
+	  								<?php if ($_video['visibility'] == "u") { ?>
262 262
 										<div id="masthead_child_div"><div class="yt-alert yt-alert-default yt-alert-warn">  <div class="yt-alert-icon">
263 263
 											<img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" class="icon master-sprite" alt="Alert icon">
264 264
 										</div>
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
 												This video is unlisted. Only people who have the link can view this video.
268 268
 											</div>
269 269
 										</div></div></div>
270
-									<?php } else if($_video['visibility'] == "v") { ?>
270
+									<?php } else if ($_video['visibility'] == "v") { ?>
271 271
 										<div id="masthead_child_div"><div class="yt-alert yt-alert-default yt-alert-error">  <div class="yt-alert-icon">
272 272
 											<img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" class="icon master-sprite" alt="Alert icon">
273 273
 										</div>
@@ -301,7 +301,7 @@  discard block
 block discarded – undo
301 301
 											<button onclick=";window.location.href=this.getAttribute('href');return false;" href="/get/like_video?v=<?php echo $_video['rid']; ?>"
302 302
 											title="I like this" 
303 303
 											type="button" 
304
-											class="start <?php if($_video['liked']) { echo "liked "; } ?>yt-uix-tooltip-reverse  yt-uix-button yt-uix-button-default yt-uix-tooltip" 
304
+											class="start <?php if ($_video['liked']) { echo "liked "; } ?>yt-uix-tooltip-reverse  yt-uix-button yt-uix-button-default yt-uix-tooltip" 
305 305
 											id="watch-like"  
306 306
 											href="/get/like_video?v=<?php echo $_video['rid']; ?>"
307 307
 											role="button"><span class="yt-uix-button-icon-wrapper">
@@ -315,7 +315,7 @@  discard block
 block discarded – undo
315 315
 											type="button" 
316 316
 											style="margin-left: -2px;"
317 317
 											href="/get/dislike_video?v=<?php echo $_video['rid']; ?>"
318
-											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" 
318
+											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" 
319 319
 											id="watch-unlike" 
320 320
 											role="button">
321 321
 												<span class="yt-uix-button-icon-wrapper">
@@ -335,7 +335,7 @@  discard block
 block discarded – undo
335 335
 												</div>
336 336
 											</div>
337 337
 											<div id="watch-actions-logged-out" class="watch-actions-panel hid">
338
-												<?php if(!isset($_SESSION['siteusername'])) { ?>
338
+												<?php if (!isset($_SESSION['siteusername'])) { ?>
339 339
 												<div class="yt-alert yt-alert-naked yt-alert-warn  ">
340 340
 													<div class="yt-alert-icon">
341 341
 														<img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" class="icon master-sprite" alt="Alert icon">
@@ -351,7 +351,7 @@  discard block
 block discarded – undo
351 351
 												<?php } else { ?>
352 352
 													<h3>Be friends with the creator</h3>
353 353
 
354
-													<?php if($_SESSION['siteusername'] != $_video['author']) { ?>
354
+													<?php if ($_SESSION['siteusername'] != $_video['author']) { ?>
355 355
 														<img style="width: 50px;height:50px;" src="/dynamic/pfp/<?php echo $__user_h->fetch_pfp($_video['author']); ?>">
356 356
 														<span style="display: inline-block; vertical-align:top;width: 100px;font-size:11px;">
357 357
 															<b><a href="/user/<?php echo htmlspecialchars($_video['author']); ?>"><?php echo htmlspecialchars($_video['author']); ?></a></b><br>
@@ -365,8 +365,8 @@  discard block
 block discarded – undo
365 365
 														</span><br><br>
366 366
 													<?php } ?>
367 367
 
368
-													<?php if($_SESSION['siteusername'] != $_video['author']) { ?>
369
-														<?php if($_video['friended'] == false) { ?>
368
+													<?php if ($_SESSION['siteusername'] != $_video['author']) { ?>
369
+														<?php if ($_video['friended'] == false) { ?>
370 370
 															<a href="/friends">Send a friend request</a>
371 371
 														<?php } else { ?>
372 372
 															Your friend request is pending.
@@ -376,7 +376,7 @@  discard block
 block discarded – undo
376 376
 													<?php } ?>
377 377
 													<hr><br>
378 378
 													<h3>Add to Favorites</h3>
379
-													<?php if($_video['favorited'] == false) { ?>
379
+													<?php if ($_video['favorited'] == false) { ?>
380 380
 														<a href="/get/favorite?v=<?php echo $_video['rid']; ?>">Favorite Video</a>
381 381
 													<?php } else { ?>
382 382
 														<a href="/get/unfavorite?v=<?php echo $_video['rid']; ?>">Unfavorite Video</a>
@@ -387,10 +387,10 @@  discard block
 block discarded – undo
387 387
 														$stmt = $__db->prepare("SELECT * FROM playlists WHERE author = :username ORDER BY id DESC LIMIT 20");
388 388
 														$stmt->bindParam(":username", $_SESSION['siteusername']);
389 389
 														$stmt->execute();
390
-														while($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { 
390
+														while ($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { 
391 391
 															$buffer = json_decode($playlist['videos']);
392 392
 															@$rid = $buffer[0];
393
-															if(!empty($rid)) {
393
+															if (!empty($rid)) {
394 394
 																@$video = $__video_h->fetch_video_rid($rid);
395 395
 															} else {
396 396
 																$video['thumbnail'] = "";
@@ -668,7 +668,7 @@  discard block
 block discarded – undo
668 668
 												$stmt->execute();
669 669
 											?>
670 670
 
671
-											<?php if($stmt->rowCount() != 0) { ?>
671
+											<?php if ($stmt->rowCount() != 0) { ?>
672 672
 												<div class="comments-section">
673 673
 													<a class="comments-section-see-all" href="/video_response_view_all?v=<?php echo htmlspecialchars($_video['rid']); ?>">
674 674
 													see all
@@ -676,8 +676,8 @@  discard block
 block discarded – undo
676 676
 													<h4>Video Responses</h4>
677 677
 													<ul class="video-list">
678 678
 													<?php 
679
-														while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { 
680
-															if($__video_h->video_exists($video['video'])) { 
679
+														while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) { 
680
+															if ($__video_h->video_exists($video['video'])) { 
681 681
 																$video = $__video_h->fetch_video_rid($video['video']);
682 682
 																$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
683 683
 																$video['duration'] = $__time_h->timestamp($video['duration']);
@@ -708,18 +708,18 @@  discard block
 block discarded – undo
708 708
 														</h4>
709 709
 													</div>
710 710
 												</div>
711
-												<?php if(!isset($_SESSION['siteusername'])) { ?>
711
+												<?php if (!isset($_SESSION['siteusername'])) { ?>
712 712
 													<div class="comments-post-container clearfix">
713 713
 														<div class="comments-post-alert">
714 714
 															<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>
715 715
 														</div>
716 716
 													</div>
717
-												<?php } else if($_video['commenting'] == "d") { ?>
717
+												<?php } else if ($_video['commenting'] == "d") { ?>
718 718
 													<div class="comments-disabled-message">
719 719
 														<img src="http://s.ytimg.com/yt/img/icon_comments_disabled-vflxokpZC.png">
720 720
 														<span>Adding comments has been disabled for this video.</span>
721 721
 													</div>
722
-												<?php } else if($__user_h->if_blocked($_video['author'], $_SESSION['siteusername'])) { ?>
722
+												<?php } else if ($__user_h->if_blocked($_video['author'], $_SESSION['siteusername'])) { ?>
723 723
 													<div class="comments-post-container clearfix">
724 724
 														<div class="comments-post-alert">
725 725
 															This user has blocked you!
@@ -773,15 +773,15 @@  discard block
 block discarded – undo
773 773
 														$stmt->execute();
774 774
 
775 775
 														$number_of_result = $stmt->rowCount();
776
-														$number_of_page = ceil ($number_of_result / $results_per_page);  
776
+														$number_of_page = ceil($number_of_result/$results_per_page);  
777 777
 
778
-														if (!isset ($_GET['page']) ) {  
778
+														if (!isset ($_GET['page'])) {  
779 779
 															$page = 1;  
780 780
 														} else {  
781
-															$page = (int)$_GET['page'];  
781
+															$page = (int) $_GET['page'];  
782 782
 														}  
783 783
 
784
-														$page_first_result = ($page - 1) * $results_per_page;  
784
+														$page_first_result = ($page - 1)*$results_per_page;  
785 785
 
786 786
 														$stmt = $__db->prepare("SELECT * FROM comments WHERE toid = :rid ORDER BY id DESC LIMIT :pfirst, :pper");
787 787
 														$stmt->bindParam(":rid", $_video['rid']);
@@ -789,10 +789,10 @@  discard block
 block discarded – undo
789 789
 														$stmt->bindParam(":pper", $results_per_page);
790 790
 														$stmt->execute();
791 791
 
792
-														while($comment = $stmt->fetch(PDO::FETCH_ASSOC)) { 
793
-															if($__video_h->if_comment_liked($comment['id'], $_SESSION['siteusername'], true))
792
+														while ($comment = $stmt->fetch(PDO::FETCH_ASSOC)) { 
793
+															if ($__video_h->if_comment_liked($comment['id'], $_SESSION['siteusername'], true))
794 794
 																$comment['liked'] = true;
795
-															else if($__video_h->if_comment_liked($comment['id'], $_SESSION['siteusername'], false))
795
+															else if ($__video_h->if_comment_liked($comment['id'], $_SESSION['siteusername'], false))
796 796
 																$comment['disliked'] = true;
797 797
 																
798 798
 															$comment['likes']  = $__video_h->get_comment_likes($comment['id'], true);
@@ -814,7 +814,7 @@  discard block
 block discarded – undo
814 814
 																			<span dir="ltr"><?php echo $__time_h->time_elapsed_string($comment['date']); ?><span>
815 815
 																			</span>
816 816
 																			</span></span>
817
-																			<?php if($comment['likes'] != 0) { ?>
817
+																			<?php if ($comment['likes'] != 0) { ?>
818 818
 																			<span dir="ltr" class="comments-rating-positive" title="9 up, 1 down">
819 819
 																				<?php echo $comment['likes']; ?>
820 820
 																				<img class="comments-rating-thumbs-up" src="//s.ytimg.com/yts/img/pixel-vfl3z5WfW.gif">
@@ -842,7 +842,7 @@  discard block
 block discarded – undo
842 842
 																			</button>
843 843
 																		</span>
844 844
 																	</div>
845
-																<?php if(isset($_SESSION['siteusername'])) { ?> 
845
+																<?php if (isset($_SESSION['siteusername'])) { ?> 
846 846
 																	<li id="reply_to_<?php echo $comment['id']; ?>" style="display: none;" class="comment yt-tile-default  child" data-tag="O" data-author-viewing="" data-id="iRV7EkT9us81mDLFDSB6FAsB156Fdn13HUmTm26C3PE" data-score="34" data-author="<?php echo htmlspecialchars($row['author']); ?>">
847 847
 
848 848
 																	<div class="comment-body">
@@ -867,7 +867,7 @@  discard block
 block discarded – undo
867 867
 															$stmt2->bindParam(":rid", $comment['id']);
868 868
 															$stmt2->execute();
869 869
 
870
-															while($reply = $stmt2->fetch(PDO::FETCH_ASSOC)) { 
870
+															while ($reply = $stmt2->fetch(PDO::FETCH_ASSOC)) { 
871 871
 														?>
872 872
 															<li class="comment yt-tile-default " style="margin-left: 30px;" data-author-viewing="" data-author-id="-uD01K8FQTeOSS5sniRFzQ" data-id="<?php echo $reply['id']; ?>" data-score="0">
873 873
 																<div class="comment-body">
@@ -950,11 +950,11 @@  discard block
 block discarded – undo
950 950
 												<?php
951 951
 													$stmt = $__db->prepare("SELECT * FROM playlists ORDER BY rand() LIMIT 2");
952 952
 													$stmt->execute();
953
-													while($_playlist = $stmt->fetch(PDO::FETCH_ASSOC)) {	
953
+													while ($_playlist = $stmt->fetch(PDO::FETCH_ASSOC)) {	
954 954
 														$_playlist['videos'] = json_decode($_playlist['videos']);
955 955
 														$_playlist['count'] = 1;
956 956
 
957
-														if($__video_h->video_exists($_playlist['videos'][0])) {
957
+														if ($__video_h->video_exists($_playlist['videos'][0])) {
958 958
 															$video = $__video_h->fetch_video_rid($_playlist['videos'][0]);
959 959
 														} else {
960 960
 															$video = [];
@@ -1009,7 +1009,7 @@  discard block
 block discarded – undo
1009 1009
 												<?php
1010 1010
 													$stmt = $__db->prepare("SELECT * FROM videos WHERE visibility = 'n' ORDER BY rand() LIMIT 20");
1011 1011
 													$stmt->execute();
1012
-													while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
1012
+													while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
1013 1013
 														$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
1014 1014
 														$video['duration'] = $__time_h->timestamp($video['duration']);
1015 1015
 														$video['views'] = $__video_h->fetch_video_views($video['rid']);
Please login to merge, or discard this patch.