Passed
Pull Request — main (#3)
by
unknown
02:15
created
pets.php 2 patches
Indentation   +50 added lines, -50 removed lines patch added patch discarded remove patch
@@ -138,16 +138,16 @@  discard block
 block discarded – undo
138 138
 									</div>
139 139
 									<div class="browse-item-row ytg-box">
140 140
 										<?php
141
-											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Pets & Animals' ORDER BY rand() LIMIT 4");
142
-											$stmt->execute();
143
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
144
-												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
145
-												$video['duration'] = $__time_h->timestamp($video['duration']);
146
-												$video['views'] = $__video_h->fetch_video_views($video['rid']);
147
-												$video['author'] = htmlspecialchars($video['author']);		
148
-												$video['title'] = htmlspecialchars($video['title']);
149
-												$video['description'] = $__video_h->shorten_description($video['description'], 50);
150
-										?>
141
+                                            $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Pets & Animals' ORDER BY rand() LIMIT 4");
142
+                                            $stmt->execute();
143
+                                            while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
144
+                                                $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
145
+                                                $video['duration'] = $__time_h->timestamp($video['duration']);
146
+                                                $video['views'] = $__video_h->fetch_video_views($video['rid']);
147
+                                                $video['author'] = htmlspecialchars($video['author']);		
148
+                                                $video['title'] = htmlspecialchars($video['title']);
149
+                                                $video['description'] = $__video_h->shorten_description($video['description'], 50);
150
+                                        ?>
151 151
 										<div class="browse-item yt-tile-default ">
152 152
 											<a href="/watch?v=<?php echo $video['rid']; ?>" class="ux-thumb-wrap yt-uix-sessionlink yt-uix-contextlink contains-addto " data-sessionlink="ei=CPjwu5ji3bICFS4RIQod9j-M-A%3D%3D&amp;feature=b-mv"><span class="video-thumb ux-thumb yt-thumb-default-194 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="http://s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Thumbnail" data-thumb="/dynamic/thumbs/<?php echo $video['thumbnail']; ?>" width="194"><span class="vertical-align"></span></span></span></span><span class="video-time"><?php echo $video['duration']; ?></span>
153 153
 											<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="rLHU-_OhT8g" role="button"><span class="yt-uix-button-content">  <img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Watch Later">
@@ -173,16 +173,16 @@  discard block
 block discarded – undo
173 173
 									</div>
174 174
                                     <div class="browse-item-row ytg-box">
175 175
 										<?php
176
-											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Pets & Animals' ORDER BY rand() LIMIT 4");
177
-											$stmt->execute();
178
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
179
-												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
180
-												$video['duration'] = $__time_h->timestamp($video['duration']);
181
-												$video['views'] = $__video_h->fetch_video_views($video['rid']);
182
-												$video['author'] = htmlspecialchars($video['author']);		
183
-												$video['title'] = htmlspecialchars($video['title']);
184
-												$video['description'] = $__video_h->shorten_description($video['description'], 50);
185
-										?>
176
+                                            $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Pets & Animals' ORDER BY rand() LIMIT 4");
177
+                                            $stmt->execute();
178
+                                            while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
179
+                                                $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
180
+                                                $video['duration'] = $__time_h->timestamp($video['duration']);
181
+                                                $video['views'] = $__video_h->fetch_video_views($video['rid']);
182
+                                                $video['author'] = htmlspecialchars($video['author']);		
183
+                                                $video['title'] = htmlspecialchars($video['title']);
184
+                                                $video['description'] = $__video_h->shorten_description($video['description'], 50);
185
+                                        ?>
186 186
 										<div class="browse-item yt-tile-default ">
187 187
 											<a href="/watch?v=<?php echo $video['rid']; ?>" class="ux-thumb-wrap yt-uix-sessionlink yt-uix-contextlink contains-addto " data-sessionlink="ei=CPjwu5ji3bICFS4RIQod9j-M-A%3D%3D&amp;feature=b-mv"><span class="video-thumb ux-thumb yt-thumb-default-194 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="http://s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Thumbnail" data-thumb="/dynamic/thumbs/<?php echo $video['thumbnail']; ?>" width="194"><span class="vertical-align"></span></span></span></span><span class="video-time"><?php echo $video['duration']; ?></span>
188 188
 											<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="rLHU-_OhT8g" role="button"><span class="yt-uix-button-content">  <img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Watch Later">
@@ -208,16 +208,16 @@  discard block
 block discarded – undo
208 208
 									</div>
209 209
                                     <div class="browse-item-row ytg-box">
210 210
 										<?php
211
-											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Pets & Animals' ORDER BY rand() LIMIT 4");
212
-											$stmt->execute();
213
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
214
-												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
215
-												$video['duration'] = $__time_h->timestamp($video['duration']);
216
-												$video['views'] = $__video_h->fetch_video_views($video['rid']);
217
-												$video['author'] = htmlspecialchars($video['author']);		
218
-												$video['title'] = htmlspecialchars($video['title']);
219
-												$video['description'] = $__video_h->shorten_description($video['description'], 50);
220
-										?>
211
+                                            $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Pets & Animals' ORDER BY rand() LIMIT 4");
212
+                                            $stmt->execute();
213
+                                            while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
214
+                                                $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
215
+                                                $video['duration'] = $__time_h->timestamp($video['duration']);
216
+                                                $video['views'] = $__video_h->fetch_video_views($video['rid']);
217
+                                                $video['author'] = htmlspecialchars($video['author']);		
218
+                                                $video['title'] = htmlspecialchars($video['title']);
219
+                                                $video['description'] = $__video_h->shorten_description($video['description'], 50);
220
+                                        ?>
221 221
 										<div class="browse-item yt-tile-default ">
222 222
 											<a href="/watch?v=<?php echo $video['rid']; ?>" class="ux-thumb-wrap yt-uix-sessionlink yt-uix-contextlink contains-addto " data-sessionlink="ei=CPjwu5ji3bICFS4RIQod9j-M-A%3D%3D&amp;feature=b-mv"><span class="video-thumb ux-thumb yt-thumb-default-194 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="http://s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Thumbnail" data-thumb="/dynamic/thumbs/<?php echo $video['thumbnail']; ?>" width="194"><span class="vertical-align"></span></span></span></span><span class="video-time"><?php echo $video['duration']; ?></span>
223 223
 											<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="rLHU-_OhT8g" role="button"><span class="yt-uix-button-content">  <img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Watch Later">
@@ -243,16 +243,16 @@  discard block
 block discarded – undo
243 243
 									</div>
244 244
                                     <div class="browse-item-row ytg-box">
245 245
 										<?php
246
-											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Pets & Animals' ORDER BY rand() LIMIT 4");
247
-											$stmt->execute();
248
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
249
-												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
250
-												$video['duration'] = $__time_h->timestamp($video['duration']);
251
-												$video['views'] = $__video_h->fetch_video_views($video['rid']);
252
-												$video['author'] = htmlspecialchars($video['author']);		
253
-												$video['title'] = htmlspecialchars($video['title']);
254
-												$video['description'] = $__video_h->shorten_description($video['description'], 50);
255
-										?>
246
+                                            $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Pets & Animals' ORDER BY rand() LIMIT 4");
247
+                                            $stmt->execute();
248
+                                            while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
249
+                                                $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
250
+                                                $video['duration'] = $__time_h->timestamp($video['duration']);
251
+                                                $video['views'] = $__video_h->fetch_video_views($video['rid']);
252
+                                                $video['author'] = htmlspecialchars($video['author']);		
253
+                                                $video['title'] = htmlspecialchars($video['title']);
254
+                                                $video['description'] = $__video_h->shorten_description($video['description'], 50);
255
+                                        ?>
256 256
 										<div class="browse-item yt-tile-default ">
257 257
 											<a href="/watch?v=<?php echo $video['rid']; ?>" class="ux-thumb-wrap yt-uix-sessionlink yt-uix-contextlink contains-addto " data-sessionlink="ei=CPjwu5ji3bICFS4RIQod9j-M-A%3D%3D&amp;feature=b-mv"><span class="video-thumb ux-thumb yt-thumb-default-194 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="http://s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Thumbnail" data-thumb="/dynamic/thumbs/<?php echo $video['thumbnail']; ?>" width="194"><span class="vertical-align"></span></span></span></span><span class="video-time"><?php echo $video['duration']; ?></span>
258 258
 											<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="rLHU-_OhT8g" role="button"><span class="yt-uix-button-content">  <img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Watch Later">
@@ -278,16 +278,16 @@  discard block
 block discarded – undo
278 278
 									</div>
279 279
                                     <div class="browse-item-row ytg-box">
280 280
 										<?php
281
-											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Pets & Animals' ORDER BY rand() LIMIT 4");
282
-											$stmt->execute();
283
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
284
-												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
285
-												$video['duration'] = $__time_h->timestamp($video['duration']);
286
-												$video['views'] = $__video_h->fetch_video_views($video['rid']);
287
-												$video['author'] = htmlspecialchars($video['author']);		
288
-												$video['title'] = htmlspecialchars($video['title']);
289
-												$video['description'] = $__video_h->shorten_description($video['description'], 50);
290
-										?>
281
+                                            $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Pets & Animals' ORDER BY rand() LIMIT 4");
282
+                                            $stmt->execute();
283
+                                            while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
284
+                                                $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
285
+                                                $video['duration'] = $__time_h->timestamp($video['duration']);
286
+                                                $video['views'] = $__video_h->fetch_video_views($video['rid']);
287
+                                                $video['author'] = htmlspecialchars($video['author']);		
288
+                                                $video['title'] = htmlspecialchars($video['title']);
289
+                                                $video['description'] = $__video_h->shorten_description($video['description'], 50);
290
+                                        ?>
291 291
 										<div class="browse-item yt-tile-default ">
292 292
 											<a href="/watch?v=<?php echo $video['rid']; ?>" class="ux-thumb-wrap yt-uix-sessionlink yt-uix-contextlink contains-addto " data-sessionlink="ei=CPjwu5ji3bICFS4RIQod9j-M-A%3D%3D&amp;feature=b-mv"><span class="video-thumb ux-thumb yt-thumb-default-194 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="http://s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Thumbnail" data-thumb="/dynamic/thumbs/<?php echo $video['thumbnail']; ?>" width="194"><span class="vertical-align"></span></span></span></span><span class="video-time"><?php echo $video['duration']; ?></span>
293 293
 											<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="rLHU-_OhT8g" role="button"><span class="yt-uix-button-content">  <img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Watch Later">
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
 										<?php
141 141
 											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Pets & Animals' ORDER BY rand() LIMIT 4");
142 142
 											$stmt->execute();
143
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
143
+											while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
144 144
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
145 145
 												$video['duration'] = $__time_h->timestamp($video['duration']);
146 146
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
 										<?php
176 176
 											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Pets & Animals' ORDER BY rand() LIMIT 4");
177 177
 											$stmt->execute();
178
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
178
+											while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
179 179
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
180 180
 												$video['duration'] = $__time_h->timestamp($video['duration']);
181 181
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
 										<?php
211 211
 											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Pets & Animals' ORDER BY rand() LIMIT 4");
212 212
 											$stmt->execute();
213
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
213
+											while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
214 214
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
215 215
 												$video['duration'] = $__time_h->timestamp($video['duration']);
216 216
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
 										<?php
246 246
 											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Pets & Animals' ORDER BY rand() LIMIT 4");
247 247
 											$stmt->execute();
248
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
248
+											while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
249 249
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
250 250
 												$video['duration'] = $__time_h->timestamp($video['duration']);
251 251
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -280,7 +280,7 @@  discard block
 block discarded – undo
280 280
 										<?php
281 281
 											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Pets & Animals' ORDER BY rand() LIMIT 4");
282 282
 											$stmt->execute();
283
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
283
+											while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
284 284
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
285 285
 												$video['duration'] = $__time_h->timestamp($video['duration']);
286 286
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
Please login to merge, or discard this patch.
gaming.php 2 patches
Indentation   +50 added lines, -50 removed lines patch added patch discarded remove patch
@@ -138,16 +138,16 @@  discard block
 block discarded – undo
138 138
 									</div>
139 139
 									<div class="browse-item-row ytg-box">
140 140
 										<?php
141
-											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Gaming' ORDER BY rand() LIMIT 4");
142
-											$stmt->execute();
143
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
144
-												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
145
-												$video['duration'] = $__time_h->timestamp($video['duration']);
146
-												$video['views'] = $__video_h->fetch_video_views($video['rid']);
147
-												$video['author'] = htmlspecialchars($video['author']);		
148
-												$video['title'] = htmlspecialchars($video['title']);
149
-												$video['description'] = $__video_h->shorten_description($video['description'], 50);
150
-										?>
141
+                                            $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Gaming' ORDER BY rand() LIMIT 4");
142
+                                            $stmt->execute();
143
+                                            while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
144
+                                                $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
145
+                                                $video['duration'] = $__time_h->timestamp($video['duration']);
146
+                                                $video['views'] = $__video_h->fetch_video_views($video['rid']);
147
+                                                $video['author'] = htmlspecialchars($video['author']);		
148
+                                                $video['title'] = htmlspecialchars($video['title']);
149
+                                                $video['description'] = $__video_h->shorten_description($video['description'], 50);
150
+                                        ?>
151 151
 										<div class="browse-item yt-tile-default ">
152 152
 											<a href="/watch?v=<?php echo $video['rid']; ?>" class="ux-thumb-wrap yt-uix-sessionlink yt-uix-contextlink contains-addto " data-sessionlink="ei=CPjwu5ji3bICFS4RIQod9j-M-A%3D%3D&amp;feature=b-mv"><span class="video-thumb ux-thumb yt-thumb-default-194 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="http://s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Thumbnail" data-thumb="/dynamic/thumbs/<?php echo $video['thumbnail']; ?>" width="194"><span class="vertical-align"></span></span></span></span><span class="video-time"><?php echo $video['duration']; ?></span>
153 153
 											<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="rLHU-_OhT8g" role="button"><span class="yt-uix-button-content">  <img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Watch Later">
@@ -173,16 +173,16 @@  discard block
 block discarded – undo
173 173
 									</div>
174 174
                                     <div class="browse-item-row ytg-box">
175 175
 										<?php
176
-											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Gaming' ORDER BY rand() LIMIT 4");
177
-											$stmt->execute();
178
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
179
-												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
180
-												$video['duration'] = $__time_h->timestamp($video['duration']);
181
-												$video['views'] = $__video_h->fetch_video_views($video['rid']);
182
-												$video['author'] = htmlspecialchars($video['author']);		
183
-												$video['title'] = htmlspecialchars($video['title']);
184
-												$video['description'] = $__video_h->shorten_description($video['description'], 50);
185
-										?>
176
+                                            $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Gaming' ORDER BY rand() LIMIT 4");
177
+                                            $stmt->execute();
178
+                                            while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
179
+                                                $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
180
+                                                $video['duration'] = $__time_h->timestamp($video['duration']);
181
+                                                $video['views'] = $__video_h->fetch_video_views($video['rid']);
182
+                                                $video['author'] = htmlspecialchars($video['author']);		
183
+                                                $video['title'] = htmlspecialchars($video['title']);
184
+                                                $video['description'] = $__video_h->shorten_description($video['description'], 50);
185
+                                        ?>
186 186
 										<div class="browse-item yt-tile-default ">
187 187
 											<a href="/watch?v=<?php echo $video['rid']; ?>" class="ux-thumb-wrap yt-uix-sessionlink yt-uix-contextlink contains-addto " data-sessionlink="ei=CPjwu5ji3bICFS4RIQod9j-M-A%3D%3D&amp;feature=b-mv"><span class="video-thumb ux-thumb yt-thumb-default-194 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="http://s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Thumbnail" data-thumb="/dynamic/thumbs/<?php echo $video['thumbnail']; ?>" width="194"><span class="vertical-align"></span></span></span></span><span class="video-time"><?php echo $video['duration']; ?></span>
188 188
 											<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="rLHU-_OhT8g" role="button"><span class="yt-uix-button-content">  <img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Watch Later">
@@ -208,16 +208,16 @@  discard block
 block discarded – undo
208 208
 									</div>
209 209
                                     <div class="browse-item-row ytg-box">
210 210
 										<?php
211
-											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Gaming' ORDER BY rand() LIMIT 4");
212
-											$stmt->execute();
213
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
214
-												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
215
-												$video['duration'] = $__time_h->timestamp($video['duration']);
216
-												$video['views'] = $__video_h->fetch_video_views($video['rid']);
217
-												$video['author'] = htmlspecialchars($video['author']);		
218
-												$video['title'] = htmlspecialchars($video['title']);
219
-												$video['description'] = $__video_h->shorten_description($video['description'], 50);
220
-										?>
211
+                                            $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Gaming' ORDER BY rand() LIMIT 4");
212
+                                            $stmt->execute();
213
+                                            while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
214
+                                                $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
215
+                                                $video['duration'] = $__time_h->timestamp($video['duration']);
216
+                                                $video['views'] = $__video_h->fetch_video_views($video['rid']);
217
+                                                $video['author'] = htmlspecialchars($video['author']);		
218
+                                                $video['title'] = htmlspecialchars($video['title']);
219
+                                                $video['description'] = $__video_h->shorten_description($video['description'], 50);
220
+                                        ?>
221 221
 										<div class="browse-item yt-tile-default ">
222 222
 											<a href="/watch?v=<?php echo $video['rid']; ?>" class="ux-thumb-wrap yt-uix-sessionlink yt-uix-contextlink contains-addto " data-sessionlink="ei=CPjwu5ji3bICFS4RIQod9j-M-A%3D%3D&amp;feature=b-mv"><span class="video-thumb ux-thumb yt-thumb-default-194 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="http://s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Thumbnail" data-thumb="/dynamic/thumbs/<?php echo $video['thumbnail']; ?>" width="194"><span class="vertical-align"></span></span></span></span><span class="video-time"><?php echo $video['duration']; ?></span>
223 223
 											<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="rLHU-_OhT8g" role="button"><span class="yt-uix-button-content">  <img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Watch Later">
@@ -243,16 +243,16 @@  discard block
 block discarded – undo
243 243
 									</div>
244 244
                                     <div class="browse-item-row ytg-box">
245 245
 										<?php
246
-											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Gaming' ORDER BY rand() LIMIT 4");
247
-											$stmt->execute();
248
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
249
-												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
250
-												$video['duration'] = $__time_h->timestamp($video['duration']);
251
-												$video['views'] = $__video_h->fetch_video_views($video['rid']);
252
-												$video['author'] = htmlspecialchars($video['author']);		
253
-												$video['title'] = htmlspecialchars($video['title']);
254
-												$video['description'] = $__video_h->shorten_description($video['description'], 50);
255
-										?>
246
+                                            $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Gaming' ORDER BY rand() LIMIT 4");
247
+                                            $stmt->execute();
248
+                                            while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
249
+                                                $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
250
+                                                $video['duration'] = $__time_h->timestamp($video['duration']);
251
+                                                $video['views'] = $__video_h->fetch_video_views($video['rid']);
252
+                                                $video['author'] = htmlspecialchars($video['author']);		
253
+                                                $video['title'] = htmlspecialchars($video['title']);
254
+                                                $video['description'] = $__video_h->shorten_description($video['description'], 50);
255
+                                        ?>
256 256
 										<div class="browse-item yt-tile-default ">
257 257
 											<a href="/watch?v=<?php echo $video['rid']; ?>" class="ux-thumb-wrap yt-uix-sessionlink yt-uix-contextlink contains-addto " data-sessionlink="ei=CPjwu5ji3bICFS4RIQod9j-M-A%3D%3D&amp;feature=b-mv"><span class="video-thumb ux-thumb yt-thumb-default-194 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="http://s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Thumbnail" data-thumb="/dynamic/thumbs/<?php echo $video['thumbnail']; ?>" width="194"><span class="vertical-align"></span></span></span></span><span class="video-time"><?php echo $video['duration']; ?></span>
258 258
 											<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="rLHU-_OhT8g" role="button"><span class="yt-uix-button-content">  <img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Watch Later">
@@ -278,16 +278,16 @@  discard block
 block discarded – undo
278 278
 									</div>
279 279
                                     <div class="browse-item-row ytg-box">
280 280
 										<?php
281
-											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Gaming' ORDER BY rand() LIMIT 4");
282
-											$stmt->execute();
283
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
284
-												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
285
-												$video['duration'] = $__time_h->timestamp($video['duration']);
286
-												$video['views'] = $__video_h->fetch_video_views($video['rid']);
287
-												$video['author'] = htmlspecialchars($video['author']);		
288
-												$video['title'] = htmlspecialchars($video['title']);
289
-												$video['description'] = $__video_h->shorten_description($video['description'], 50);
290
-										?>
281
+                                            $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Gaming' ORDER BY rand() LIMIT 4");
282
+                                            $stmt->execute();
283
+                                            while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
284
+                                                $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
285
+                                                $video['duration'] = $__time_h->timestamp($video['duration']);
286
+                                                $video['views'] = $__video_h->fetch_video_views($video['rid']);
287
+                                                $video['author'] = htmlspecialchars($video['author']);		
288
+                                                $video['title'] = htmlspecialchars($video['title']);
289
+                                                $video['description'] = $__video_h->shorten_description($video['description'], 50);
290
+                                        ?>
291 291
 										<div class="browse-item yt-tile-default ">
292 292
 											<a href="/watch?v=<?php echo $video['rid']; ?>" class="ux-thumb-wrap yt-uix-sessionlink yt-uix-contextlink contains-addto " data-sessionlink="ei=CPjwu5ji3bICFS4RIQod9j-M-A%3D%3D&amp;feature=b-mv"><span class="video-thumb ux-thumb yt-thumb-default-194 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="http://s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Thumbnail" data-thumb="/dynamic/thumbs/<?php echo $video['thumbnail']; ?>" width="194"><span class="vertical-align"></span></span></span></span><span class="video-time"><?php echo $video['duration']; ?></span>
293 293
 											<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="rLHU-_OhT8g" role="button"><span class="yt-uix-button-content">  <img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Watch Later">
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
 										<?php
141 141
 											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Gaming' ORDER BY rand() LIMIT 4");
142 142
 											$stmt->execute();
143
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
143
+											while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
144 144
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
145 145
 												$video['duration'] = $__time_h->timestamp($video['duration']);
146 146
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
 										<?php
176 176
 											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Gaming' ORDER BY rand() LIMIT 4");
177 177
 											$stmt->execute();
178
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
178
+											while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
179 179
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
180 180
 												$video['duration'] = $__time_h->timestamp($video['duration']);
181 181
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
 										<?php
211 211
 											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Gaming' ORDER BY rand() LIMIT 4");
212 212
 											$stmt->execute();
213
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
213
+											while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
214 214
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
215 215
 												$video['duration'] = $__time_h->timestamp($video['duration']);
216 216
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
 										<?php
246 246
 											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Gaming' ORDER BY rand() LIMIT 4");
247 247
 											$stmt->execute();
248
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
248
+											while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
249 249
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
250 250
 												$video['duration'] = $__time_h->timestamp($video['duration']);
251 251
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -280,7 +280,7 @@  discard block
 block discarded – undo
280 280
 										<?php
281 281
 											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Gaming' ORDER BY rand() LIMIT 4");
282 282
 											$stmt->execute();
283
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
283
+											while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
284 284
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
285 285
 												$video['duration'] = $__time_h->timestamp($video['duration']);
286 286
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
Please login to merge, or discard this patch.
channel.php 2 patches
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -15,8 +15,8 @@  discard block
 block discarded – undo
15 15
 <?php $__db_h = new db_helper(); ?>
16 16
 <?php $__time_h = new time_helper(); ?>
17 17
 <?php
18
-	if(isset($_SESSION['siteusername']))
19
-	    $_user_hp = $__user_h->fetch_user_username($_SESSION['siteusername']);
18
+    if(isset($_SESSION['siteusername']))
19
+        $_user_hp = $__user_h->fetch_user_username($_SESSION['siteusername']);
20 20
 
21 21
     if(!$__user_h->user_exists($_GET['n']))
22 22
         header("Location: /?userdoesntexist");
@@ -29,21 +29,21 @@  discard block
 block discarded – undo
29 29
         return preg_replace('/[^A-Za-z0-9\-]/', '', $string); // Removes special chars.
30 30
     }
31 31
 
32
-	function addhttp($url) {
33
-		if (!preg_match("~^(?:f|ht)tps?://~i", $url)) {
34
-			$url = "http://" . $url;
35
-		}
36
-		return $url;
37
-	}
32
+    function addhttp($url) {
33
+        if (!preg_match("~^(?:f|ht)tps?://~i", $url)) {
34
+            $url = "http://" . $url;
35
+        }
36
+        return $url;
37
+    }
38 38
 
39 39
     function check_valid_colorhex($colorCode) {
40 40
         // If user accidentally passed along the # sign, strip it off
41 41
         $colorCode = ltrim($colorCode, '#');
42 42
     
43 43
         if (
44
-              ctype_xdigit($colorCode) &&
44
+                ctype_xdigit($colorCode) &&
45 45
               (strlen($colorCode) == 6 || strlen($colorCode) == 3))
46
-                   return true;
46
+                    return true;
47 47
     
48 48
         else return false;
49 49
     }
@@ -77,8 +77,8 @@  discard block
 block discarded – undo
77 77
     if(!check_valid_colorhex($_user['primary_color_text']) && strlen($_user['primary_color_text']) != 6) { $_user['primary_color_text'] = ""; }
78 78
     if(!check_valid_colorhex($_user['2009_bgcolor']) && strlen($_user['2009_bgcolor']) != 6) { $_user['2009_bgcolor'] = ""; }
79 79
 
80
-	if(isset($_SESSION['siteusername']))
81
-    	$__user_i->check_view_channel($_user['username'], @$_SESSION['siteusername']);
80
+    if(isset($_SESSION['siteusername']))
81
+        $__user_i->check_view_channel($_user['username'], @$_SESSION['siteusername']);
82 82
 
83 83
     if($_SERVER['REQUEST_METHOD'] == 'POST') {
84 84
         $error = array();
@@ -92,11 +92,11 @@  discard block
 block discarded – undo
92 92
         //if(ifBlocked(@$_SESSION['siteusername'], $user['username'], $__db)) { $error = "This user has blocked you!"; $error['status'] = true; } 
93 93
 
94 94
         if(!isset($error['message'])) {
95
-			$text = $_POST['comment'];
95
+            $text = $_POST['comment'];
96 96
             $stmt = $__db->prepare("INSERT INTO profile_comments (toid, author, comment) VALUES (:id, :username, :comment)");
97
-			$stmt->bindParam(":id", $_user['username']);
98
-			$stmt->bindParam(":username", $_SESSION['siteusername']);
99
-			$stmt->bindParam(":comment", $text);
97
+            $stmt->bindParam(":id", $_user['username']);
98
+            $stmt->bindParam(":username", $_SESSION['siteusername']);
99
+            $stmt->bindParam(":comment", $text);
100 100
             $stmt->execute();
101 101
 
102 102
             $_user_update_utils->update_comment_cooldown_time($_SESSION['siteusername']);
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
             }
107 107
         }
108 108
     }
109
-	?>
109
+    ?>
110 110
 <!DOCTYPE html>
111 111
 <html dir="ltr" xmlns:og="http://opengraphprotocol.org/schema/" lang="en">
112 112
 	<!-- machid: sNW5tN3Z2SWdXaDRqNGxuNEF5MFBxM1BxWXd0VGo0Rkg3UXNTTTNCUGRDWjR0WGpHR3R1YzFR -->
Please login to merge, or discard this patch.
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -15,10 +15,10 @@  discard block
 block discarded – undo
15 15
 <?php $__db_h = new db_helper(); ?>
16 16
 <?php $__time_h = new time_helper(); ?>
17 17
 <?php
18
-	if(isset($_SESSION['siteusername']))
18
+	if (isset($_SESSION['siteusername']))
19 19
 	    $_user_hp = $__user_h->fetch_user_username($_SESSION['siteusername']);
20 20
 
21
-    if(!$__user_h->user_exists($_GET['n']))
21
+    if (!$__user_h->user_exists($_GET['n']))
22 22
         header("Location: /?userdoesntexist");
23 23
 
24 24
     $_user = $__user_h->fetch_user_username($_GET['n']);
@@ -70,28 +70,28 @@  discard block
 block discarded – undo
70 70
 
71 71
     $_user['genre'] = strtolower($_user['genre']);
72 72
 
73
-    if(!check_valid_colorhex($_user['primary_color']) && strlen($_user['primary_color']) != 6) { $_user['primary_color'] = ""; }
74
-    if(!check_valid_colorhex($_user['secondary_color']) && strlen($_user['secondary_color']) != 6) { $_user['secondary_color'] = ""; }
75
-    if(!check_valid_colorhex($_user['third_color']) && strlen($_user['third_color']) != 6) { $_user['third_color'] = ""; }
76
-    if(!check_valid_colorhex($_user['text_color']) && strlen($_user['text_color']) != 6) { $_user['text_color'] = ""; }
77
-    if(!check_valid_colorhex($_user['primary_color_text']) && strlen($_user['primary_color_text']) != 6) { $_user['primary_color_text'] = ""; }
78
-    if(!check_valid_colorhex($_user['2009_bgcolor']) && strlen($_user['2009_bgcolor']) != 6) { $_user['2009_bgcolor'] = ""; }
73
+    if (!check_valid_colorhex($_user['primary_color']) && strlen($_user['primary_color']) != 6) { $_user['primary_color'] = ""; }
74
+    if (!check_valid_colorhex($_user['secondary_color']) && strlen($_user['secondary_color']) != 6) { $_user['secondary_color'] = ""; }
75
+    if (!check_valid_colorhex($_user['third_color']) && strlen($_user['third_color']) != 6) { $_user['third_color'] = ""; }
76
+    if (!check_valid_colorhex($_user['text_color']) && strlen($_user['text_color']) != 6) { $_user['text_color'] = ""; }
77
+    if (!check_valid_colorhex($_user['primary_color_text']) && strlen($_user['primary_color_text']) != 6) { $_user['primary_color_text'] = ""; }
78
+    if (!check_valid_colorhex($_user['2009_bgcolor']) && strlen($_user['2009_bgcolor']) != 6) { $_user['2009_bgcolor'] = ""; }
79 79
 
80
-	if(isset($_SESSION['siteusername']))
80
+	if (isset($_SESSION['siteusername']))
81 81
     	$__user_i->check_view_channel($_user['username'], @$_SESSION['siteusername']);
82 82
 
83
-    if($_SERVER['REQUEST_METHOD'] == 'POST') {
83
+    if ($_SERVER['REQUEST_METHOD'] == 'POST') {
84 84
         $error = array();
85 85
 
86
-        if(!isset($_SESSION['siteusername'])){ $error['message'] = "you are not logged in"; $error['status'] = true; }
87
-        if(!$_POST['comment']){ $error['message'] = "your comment cannot be blank"; $error['status'] = true; }
88
-        if(strlen($_POST['comment']) > 1000){ $error['message'] = "your comment must be shorter than 1000 characters"; $error['status'] = true; }
86
+        if (!isset($_SESSION['siteusername'])) { $error['message'] = "you are not logged in"; $error['status'] = true; }
87
+        if (!$_POST['comment']) { $error['message'] = "your comment cannot be blank"; $error['status'] = true; }
88
+        if (strlen($_POST['comment']) > 1000) { $error['message'] = "your comment must be shorter than 1000 characters"; $error['status'] = true; }
89 89
         //if(!isset($_POST['g-recaptcha-response'])){ $error['message'] = "captcha validation failed"; $error['status'] = true; }
90 90
         //if(!$_user_insert_utils->validateCaptcha($config['recaptcha_secret'], $_POST['g-recaptcha-response'])) { $error['message'] = "captcha validation failed"; $error['status'] = true; }
91
-        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; }
91
+        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; }
92 92
         //if(ifBlocked(@$_SESSION['siteusername'], $user['username'], $__db)) { $error = "This user has blocked you!"; $error['status'] = true; } 
93 93
 
94
-        if(!isset($error['message'])) {
94
+        if (!isset($error['message'])) {
95 95
 			$text = $_POST['comment'];
96 96
             $stmt = $__db->prepare("INSERT INTO profile_comments (toid, author, comment) VALUES (:id, :username, :comment)");
97 97
 			$stmt->bindParam(":id", $_user['username']);
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
 
102 102
             $_user_update_utils->update_comment_cooldown_time($_SESSION['siteusername']);
103 103
 
104
-            if(@$_SESSION['siteusername'] != $_user['username']) { 
104
+            if (@$_SESSION['siteusername'] != $_user['username']) { 
105 105
                 $_user_insert_utils->send_message($_user['username'], "New comment", 'I commented "' . $_POST['comment'] . '" on your profile!', $_SESSION['siteusername']);
106 106
             }
107 107
         }
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
 		<link rel="stylesheet" href="/yt/cssbin/www-extra.css">
128 128
 		<style>
129 129
 			#content-container {
130
-				background-color: <?php echo $_user['primary_color'];  ?>;
130
+				background-color: <?php echo $_user['primary_color']; ?>;
131 131
 				background-image: url(/d/banners/<?php echo $_user['2009_bg']; ?>);
132 132
 				background-repeat: repeat;
133 133
 				background-position: center top;
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
 			<div id="content-container">
145 145
 				<!-- begin content -->
146 146
 				<div id="content">
147
-					<?php if(isset($_SESSION['siteusername']) && $_user['username'] == $_SESSION['siteusername']) { ?>
147
+					<?php if (isset($_SESSION['siteusername']) && $_user['username'] == $_SESSION['siteusername']) { ?>
148 148
 						<div class="channel_customization"><?php echo require($_SERVER['DOCUMENT_ROOT'] . "/s/mod/channel_customization.php"); ?></div>
149 149
 					<?php } ?> 
150 150
 
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
 												<h1><?php echo htmlspecialchars($_user['username']); ?></h1>
200 200
 											</div>
201 201
 											<div class="upper-left-section enable-fancy-subscribe-button">
202
-												<?php if($_user['username'] != @$_SESSION['siteusername']) { ?>
202
+												<?php if ($_user['username'] != @$_SESSION['siteusername']) { ?>
203 203
 													<div class="yt-subscription-button-hovercard yt-uix-hovercard">
204 204
 														<button href="https://accounts.google.com/ServiceLogin?uilel=3&amp;service=youtube&amp;passive=true&amp;continue=http%3A%2F%2Fwww.youtube.com%2Fsignin%3Faction_handle_signin%3Dtrue%26feature%3Dsubscribe%26nomobiletemp%3D1%26hl%3Den_US%26next%3D%252Fuser%252F<?php echo htmlspecialchars($_user['username']); ?>%253Ffeature%253Dg-logo-xit&amp;hl=en_US&amp;ltmpl=sso" onclick=";window.location.href=this.getAttribute('href');return false;" title="" type="button" class="yt-subscription-button subscription-button-with-recommended-channels   yt-uix-button yt-uix-button-subscription yt-uix-tooltip" data-enable-hovercard="true" data-subscription-value="UCIwFjwMjI0y7PDBVEO9-bkQ" data-force-position="" data-position="" data-subscription-feature="channels3" data-subscription-type="channel" role="button"><span class="yt-uix-button-icon-wrapper"><img class="yt-uix-button-icon yt-uix-button-icon-subscribe" src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt=""></span><span class="yt-uix-button-content">  <span class="subscribe-label">Subscribe</span>
205 205
 														<span class="subscribed-label">Subscribed</span>
@@ -275,12 +275,12 @@  discard block
 block discarded – undo
275 275
 									</div>
276 276
 								</div>
277 277
 							</div>
278
-                            <?php if($_user['featured'] != "None") { $video = $__video_h->fetch_video_rid($_user['featured']); } else { $_user['featured'] = false; } ?>
278
+                            <?php if ($_user['featured'] != "None") { $video = $__video_h->fetch_video_rid($_user['featured']); } else { $_user['featured'] = false; } ?>
279 279
 							<div id="branded-page-body">
280 280
 								<div class="channel-tab-content channel-layout-two-column selected blogger-template">
281 281
 									<div class="tab-content-body">
282 282
 										<div class="primary-pane">
283
-                                            <?php if($_user['featured'] != false && $__video_h->video_exists($_user['featured'])) { ?>
283
+                                            <?php if ($_user['featured'] != false && $__video_h->video_exists($_user['featured'])) { ?>
284 284
 											<div class="channels-featured-video channel-module yt-uix-c3-module-container has-visible-edge">
285 285
 												<div class="module-view featured-video-view-module">
286 286
 													<div class="channels-video-player " data-swf-config="{&quot;assets&quot;: {&quot;html&quot;: &quot;\/html5_player_template&quot;, &quot;css&quot;: &quot;http:\/\/s.ytimg.com\/yt\/cssbin\/www-player-vfllhw7HB.css&quot;, &quot;js&quot;: &quot;http:\/\/s.ytimg.com\/yt\/jsbin\/html5player-vflzTrRqK.js&quot;}, &quot;url&quot;: &quot;http:\/\/s.ytimg.com\/yt\/swfbin\/watch_as3-vflbPspVE.swf&quot;, &quot;min_version&quot;: &quot;8.0.0&quot;, &quot;args&quot;: {&quot;ttsurl&quot;: &quot;http:\/\/www.youtube.com\/api\/timedtext?sparams=asr_langs%2Ccaps%2Cv%2Cexpire\u0026asr_langs=en%2Cko%2Cja%2Ces\u0026v=/watch?v=<?php echo $video['rid']; ?>\u0026caps=asr\u0026expire=1339746882\u0026key=yttt1\u0026signature=A1B858FF427B45672676C7403417ED1F4091A806.C347A6021C0F843E46F2056AEBA38FC93A0A47B8\u0026hl=en_US&quot;, &quot;el&quot;: &quot;profilepage&quot;, &quot;fexp&quot;: &quot;904001,907342,904824,910206,908620,907217,907335,921602,919306,922600,919316,920704,912804,913542,919324,912706&quot;, &quot;url_encoded_fmt_stream_map&quot;: &quot;url=http%3A%2F%2Fo-o.preferred.nuq04s10.v1.lscache4.c.youtube.com%2Fvideoplayback%3Fupn%3D_7WL7XeDtjs%26sparams%3Dcp%252Cid%252Cip%252Cipbits%252Citag%252Cratebypass%252Csource%252Cupn%252Cexpire%26fexp%3D904001%252C907342%252C904824%252C910206%252C908620%252C907217%252C907335%252C921602%252C919306%252C922600%252C919316%252C920704%252C912804%252C913542%252C919324%252C912706%26ms%3Dau%26itag%3D44%26ip%3D207.0.0.0%26signature%3D9B9B5ECF02F2F66BDCCB0ACED26D3406F9F83241.1B2CC833461E3D2C4D081B7DFBC65B0948C61FB9%26sver%3D3%26mt%3D1339721111%26ratebypass%3Dyes%26source%3Dyoutube%26expire%3D1339743583%26key%3Dyt1%26ipbits%3D8%26cp%3DU0hSTldPUV9NTUNOMl9PSVVGOmdTcVlPRFNNTEdM%26id%3D56ffd0bfee85d71f\u0026quality=large\u0026fallback_host=tc.v1.cache4.c.youtube.com\u0026type=video%2Fwebm%3B+codecs%3D%22vp8.0%2C+vorbis%22\u0026itag=44,url=http%3A%2F%2Fo-o.preferred.nuq04s10.v14.lscache1.c.youtube.com%2Fvideoplayback%3Fupn%3D_7WL7XeDtjs%26sparams%3Dalgorithm%252Cburst%252Ccp%252Cfactor%252Cid%252Cip%252Cipbits%252Citag%252Csource%252Cupn%252Cexpire%26fexp%3D904001%252C907342%252C904824%252C910206%252C908620%252C907217%252C907335%252C921602%252C919306%252C922600%252C919316%252C920704%252C912804%252C913542%252C919324%252C912706%26mt%3D1339721111%26ms%3Dau%26algorithm%3Dthrottle-factor%26itag%3D35%26ip%3D207.0.0.0%26burst%3D40%26sver%3D3%26signature%3DB702D7CA72653169BDC2C945B5A35F4A23A3FEBF.ACC660CDAB11901FF8D3DA8D384D61F0AB0F0125%26source%3Dyoutube%26expire%3D1339743583%26key%3Dyt1%26ipbits%3D8%26factor%3D1.25%26cp%3DU0hSTldPUV9NTUNOMl9PSVVGOmdTcVlPRFNNTEdM%26id%3D56ffd0bfee85d71f\u0026quality=large\u0026fallback_host=tc.v14.cache1.c.youtube.com\u0026type=video%2Fx-flv\u0026itag=35,url=http%3A%2F%2Fo-o.preferred.nuq04s10.v24.lscache3.c.youtube.com%2Fvideoplayback%3Fupn%3D_7WL7XeDtjs%26sparams%3Dcp%252Cid%252Cip%252Cipbits%252Citag%252Cratebypass%252Csource%252Cupn%252Cexpire%26fexp%3D904001%252C907342%252C904824%252C910206%252C908620%252C907217%252C907335%252C921602%252C919306%252C922600%252C919316%252C920704%252C912804%252C913542%252C919324%252C912706%26ms%3Dau%26itag%3D43%26ip%3D207.0.0.0%26signature%3D9FABDD8C013AA137B87DF2D154D1B90E6827A2A3.880FECDEC066236D85FCF223CF472B62B8F9B3A4%26sver%3D3%26mt%3D1339721111%26ratebypass%3Dyes%26source%3Dyoutube%26expire%3D1339743583%26key%3Dyt1%26ipbits%3D8%26cp%3DU0hSTldPUV9NTUNOMl9PSVVGOmdTcVlPRFNNTEdM%26id%3D56ffd0bfee85d71f\u0026quality=medium\u0026fallback_host=tc.v24.cache3.c.youtube.com\u0026type=video%2Fwebm%3B+codecs%3D%22vp8.0%2C+vorbis%22\u0026itag=43,url=http%3A%2F%2Fo-o.preferred.nuq04s10.v3.lscache7.c.youtube.com%2Fvideoplayback%3Fupn%3D_7WL7XeDtjs%26sparams%3Dalgorithm%252Cburst%252Ccp%252Cfactor%252Cid%252Cip%252Cipbits%252Citag%252Csource%252Cupn%252Cexpire%26fexp%3D904001%252C907342%252C904824%252C910206%252C908620%252C907217%252C907335%252C921602%252C919306%252C922600%252C919316%252C920704%252C912804%252C913542%252C919324%252C912706%26mt%3D1339721111%26ms%3Dau%26algorithm%3Dthrottle-factor%26itag%3D34%26ip%3D207.0.0.0%26burst%3D40%26sver%3D3%26signature%3D1BA326B784DAA9F62FD789CBB5C2FABFCD5D351C.C4618E3AB2AB08C61C6A982A36F405DA886B5D5A%26source%3Dyoutube%26expire%3D1339743583%26key%3Dyt1%26ipbits%3D8%26factor%3D1.25%26cp%3DU0hSTldPUV9NTUNOMl9PSVVGOmdTcVlPRFNNTEdM%26id%3D56ffd0bfee85d71f\u0026quality=medium\u0026fallback_host=tc.v3.cache7.c.youtube.com\u0026type=video%2Fx-flv\u0026itag=34,url=http%3A%2F%2Fo-o.preferred.nuq04s10.v14.lscache1.c.youtube.com%2Fvideoplayback%3Fupn%3D_7WL7XeDtjs%26sparams%3Dcp%252Cid%252Cip%252Cipbits%252Citag%252Cratebypass%252Csource%252Cupn%252Cexpire%26fexp%3D904001%252C907342%252C904824%252C910206%252C908620%252C907217%252C907335%252C921602%252C919306%252C922600%252C919316%252C920704%252C912804%252C913542%252C919324%252C912706%26ms%3Dau%26itag%3D18%26ip%3D207.0.0.0%26signature%3D8806EA8FAE16557A2F9732068442133EA0A0760F.D91694A47E6B0BF627965CDA46010F36105A28FE%26sver%3D3%26mt%3D1339721111%26ratebypass%3Dyes%26source%3Dyoutube%26expire%3D1339743583%26key%3Dyt1%26ipbits%3D8%26cp%3DU0hSTldPUV9NTUNOMl9PSVVGOmdTcVlPRFNNTEdM%26id%3D56ffd0bfee85d71f\u0026quality=medium\u0026fallback_host=tc.v14.cache1.c.youtube.com\u0026type=video%2Fmp4%3B+codecs%3D%22avc1.42001E%2C+mp4a.40.2%22\u0026itag=18,url=http%3A%2F%2Fo-o.preferred.nuq04s10.v4.lscache1.c.youtube.com%2Fvideoplayback%3Fupn%3D_7WL7XeDtjs%26sparams%3Dalgorithm%252Cburst%252Ccp%252Cfactor%252Cid%252Cip%252Cipbits%252Citag%252Csource%252Cupn%252Cexpire%26fexp%3D904001%252C907342%252C904824%252C910206%252C908620%252C907217%252C907335%252C921602%252C919306%252C922600%252C919316%252C920704%252C912804%252C913542%252C919324%252C912706%26mt%3D1339721111%26ms%3Dau%26algorithm%3Dthrottle-factor%26itag%3D5%26ip%3D207.0.0.0%26burst%3D40%26sver%3D3%26signature%3D011CB6739AB60ED79D032DE2F62EB016D8A8E462.C2C0ABE42F26DBA18F2BC6E0D074EB99A95C0DF0%26source%3Dyoutube%26expire%3D1339743583%26key%3Dyt1%26ipbits%3D8%26factor%3D1.25%26cp%3DU0hSTldPUV9NTUNOMl9PSVVGOmdTcVlPRFNNTEdM%26id%3D56ffd0bfee85d71f\u0026quality=small\u0026fallback_host=tc.v4.cache1.c.youtube.com\u0026type=video%2Fx-flv\u0026itag=5,url=http%3A%2F%2Fo-o.preferred.nuq04s10.v12.lscache3.c.youtube.com%2Fvideoplayback%3Fupn%3D_7WL7XeDtjs%26sparams%3Dalgorithm%252Cburst%252Ccp%252Cfactor%252Cid%252Cip%252Cipbits%252Citag%252Csource%252Cupn%252Cexpire%26fexp%3D904001%252C907342%252C904824%252C910206%252C908620%252C907217%252C907335%252C921602%252C919306%252C922600%252C919316%252C920704%252C912804%252C913542%252C919324%252C912706%26mt%3D1339721111%26ms%3Dau%26algorithm%3Dthrottle-factor%26itag%3D36%26ip%3D207.0.0.0%26burst%3D40%26sver%3D3%26signature%3D988FDD37CBA8DB74C1148EE17921D8549434297C.A2C1796F2BA0427C9FE370BFB6B3B09BA1D81B07%26source%3Dyoutube%26expire%3D1339743583%26key%3Dyt1%26ipbits%3D8%26factor%3D1.25%26cp%3DU0hSTldPUV9NTUNOMl9PSVVGOmdTcVlPRFNNTEdM%26id%3D56ffd0bfee85d71f\u0026quality=small\u0026fallback_host=tc.v12.cache3.c.youtube.com\u0026type=video%2F3gpp\u0026itag=36&quot;, &quot;allow_embed&quot;: 1, &quot;vq&quot;: &quot;auto&quot;, &quot;account_playback_token&quot;: &quot;&quot;, &quot;allow_ratings&quot;: 1, &quot;keywords&quot;: &quot;Rehearsal,Dance,justin,bieber,believe,as,long,you,love,me,rodney,jerkins,pattie,mallette,jeremy,dad,mom,scooter,braun,island,def,jam,usher,rbmg,making,of,the,album,webisode,june,19th,19,new,amazing,song,big,sean,hit,record,<?php echo htmlspecialchars($_user['username']); ?>,always,still,studio,singing,kuk,harrell,producer,sing,boy,guy,man,smash,single,nick,demoura,dancers,sweat,beliebers,hard,work,tour,band&quot;, &quot;cc3_module&quot;: &quot;http:\/\/s.ytimg.com\/yt\/swfbin\/subtitles3_module-vflu_Qeod.swf&quot;, &quot;track_embed&quot;: 0, &quot;is_purchased&quot;: false, &quot;ps&quot;: &quot;default&quot;, &quot;fmt_list&quot;: &quot;44\/854x480\/99\/0\/0,35\/854x480\/9\/0\/115,43\/640x360\/99\/0\/0,34\/640x360\/9\/0\/115,18\/640x360\/9\/0\/115,5\/320x240\/7\/0\/0,36\/320x240\/99\/0\/0&quot;, &quot;author&quot;: &quot;<?php echo htmlspecialchars($_user['username']); ?>&quot;, &quot;muted&quot;: &quot;0&quot;, &quot;cc_module&quot;: &quot;http:\/\/s.ytimg.com\/yt\/swfbin\/subtitle_module-vflq8KnSi.swf&quot;, &quot;length_seconds&quot;: 82, &quot;feature&quot;: &quot;g-logo-xit&quot;, &quot;enablejsapi&quot;: 1, &quot;rel&quot;: 0, &quot;plid&quot;: &quot;AATCeEL9eg3Ls9t-&quot;, &quot;cc_font&quot;: &quot;Arial Unicode MS, arial, verdana, _sans&quot;, &quot;ftoken&quot;: &quot;&quot;, &quot;sdetail&quot;: &quot;f:g-logo-xit,p:\/&quot;, &quot;status&quot;: &quot;ok&quot;, &quot;cc_asr&quot;: 1, &quot;watermark&quot;: &quot;,http:\/\/s.ytimg.com\/yt\/img\/watermark\/youtube_watermark-vflHX6b6E.png,http:\/\/s.ytimg.com\/yt\/img\/watermark\/youtube_hd_watermark-vflAzLcD6.png&quot;, &quot;sourceid&quot;: &quot;y&quot;, &quot;timestamp&quot;: 1339721682, &quot;has_cc&quot;: true, &quot;view_count&quot;: 2600, &quot;quality_cap&quot;: &quot;highres&quot;, &quot;hl&quot;: &quot;en_US&quot;, &quot;tmi&quot;: &quot;1&quot;, &quot;no_get_video_log&quot;: &quot;1&quot;, &quot;eurl&quot;: &quot;http:\/\/www.youtube.com\/user\/<?php echo htmlspecialchars($_user['username']); ?>&quot;, &quot;iurl&quot;: &quot;http:\/\/i3.ytimg.com\/vi\//watch?v=<?php echo $video['rid']; ?>\/hqdefault.jpg&quot;, &quot;endscreen_module&quot;: &quot;http:\/\/s.ytimg.com\/yt\/swfbin\/endscreen-vflJBKwqC.swf&quot;, &quot;referrer&quot;: &quot;http:\/\/www.youtube.com\/&quot;, &quot;avg_rating&quot;: 4.97805486284, &quot;video_id&quot;: &quot;/watch?v=<?php echo $video['rid']; ?>&quot;, &quot;sendtmp&quot;: &quot;1&quot;, &quot;sk&quot;: &quot;bwv_lGOGF4u1g0p7puy7ERICN8NZ5cVFC&quot;, &quot;is_video_preview&quot;: false, &quot;token&quot;: &quot;vjVQa1PpcFMSYb-unvOiIgSL8pW9tObJUMfrEc1mxfE=&quot;, &quot;thumbnail_url&quot;: &quot;http:\/\/i3.ytimg.com\/vi\//watch?v=<?php echo $video['rid']; ?>\/default.jpg&quot;, &quot;iurlsd&quot;: &quot;http:\/\/i3.ytimg.com\/vi\//watch?v=<?php echo $video['rid']; ?>\/sddefault.jpg&quot;, &quot;autoplay&quot;: &quot;1&quot;}, &quot;url_v9as2&quot;: &quot;http:\/\/s.ytimg.com\/yt\/swfbin\/cps-vflhvG6F4.swf&quot;, &quot;params&quot;: {&quot;allowscriptaccess&quot;: &quot;always&quot;, &quot;allowfullscreen&quot;: &quot;true&quot;, &quot;bgcolor&quot;: &quot;#000000&quot;}, &quot;attrs&quot;: {&quot;width&quot;: &quot;640&quot;, &quot;id&quot;: &quot;movie_player&quot;, &quot;height&quot;: &quot;390&quot;}, &quot;url_v8&quot;: &quot;http:\/\/s.ytimg.com\/yt\/swfbin\/cps-vflhvG6F4.swf&quot;, &quot;html5&quot;: false}" data-video-id="/watch?v=<?php echo $video['rid']; ?>">
@@ -326,7 +326,7 @@  discard block
 block discarded – undo
326 326
                                                             $stmt = $__db->prepare("SELECT * FROM videos WHERE author = :username ORDER BY id DESC LIMIT 20");
327 327
                                                             $stmt->bindParam(":username", $_user['username']);
328 328
                                                             $stmt->execute();
329
-                                                            while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { 
329
+                                                            while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) { 
330 330
                                                         ?>
331 331
 														<li class="blogger-video">
332 332
 															<div class="video yt-tile-visible">
@@ -408,7 +408,7 @@  discard block
 block discarded – undo
408 408
 														</div>
409 409
 														<hr class="yt-horizontal-rule ">
410 410
 													</div>
411
-													<?php if(!empty($_user['website'])) { ?>
411
+													<?php if (!empty($_user['website'])) { ?>
412 412
 														<div class="user-profile-item">
413 413
 															<div class="yt-c3-profile-custom-url field-container ">
414 414
 																<a href="<?php echo addhttp(htmlspecialchars($_user['website'])); ?>" rel="me nofollow" target="_blank" title="<?php echo htmlspecialchars($_user['website']); ?>" class="yt-uix-redirect-link">
@@ -457,7 +457,7 @@  discard block
 block discarded – undo
457 457
 															<h5>Country</h5>
458 458
 															<span class="value"><?php echo htmlspecialchars($_user['country']); ?></span>
459 459
 														</div>
460
-														<?php if($_user['genre'] != "none") { ?>
460
+														<?php if ($_user['genre'] != "none") { ?>
461 461
 															<div class="user-profile-item ">
462 462
 																<h5>Channel Genre</h5>
463 463
 																<span class="value"><?php echo htmlspecialchars($_user['genre']); ?></span>
Please login to merge, or discard this patch.
travel.php 2 patches
Indentation   +50 added lines, -50 removed lines patch added patch discarded remove patch
@@ -138,16 +138,16 @@  discard block
 block discarded – undo
138 138
 									</div>
139 139
 									<div class="browse-item-row ytg-box">
140 140
 										<?php
141
-											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Travel & Events' ORDER BY rand() LIMIT 4");
142
-											$stmt->execute();
143
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
144
-												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
145
-												$video['duration'] = $__time_h->timestamp($video['duration']);
146
-												$video['views'] = $__video_h->fetch_video_views($video['rid']);
147
-												$video['author'] = htmlspecialchars($video['author']);		
148
-												$video['title'] = htmlspecialchars($video['title']);
149
-												$video['description'] = $__video_h->shorten_description($video['description'], 50);
150
-										?>
141
+                                            $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Travel & Events' ORDER BY rand() LIMIT 4");
142
+                                            $stmt->execute();
143
+                                            while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
144
+                                                $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
145
+                                                $video['duration'] = $__time_h->timestamp($video['duration']);
146
+                                                $video['views'] = $__video_h->fetch_video_views($video['rid']);
147
+                                                $video['author'] = htmlspecialchars($video['author']);		
148
+                                                $video['title'] = htmlspecialchars($video['title']);
149
+                                                $video['description'] = $__video_h->shorten_description($video['description'], 50);
150
+                                        ?>
151 151
 										<div class="browse-item yt-tile-default ">
152 152
 											<a href="/watch?v=<?php echo $video['rid']; ?>" class="ux-thumb-wrap yt-uix-sessionlink yt-uix-contextlink contains-addto " data-sessionlink="ei=CPjwu5ji3bICFS4RIQod9j-M-A%3D%3D&amp;feature=b-mv"><span class="video-thumb ux-thumb yt-thumb-default-194 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="http://s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Thumbnail" data-thumb="/dynamic/thumbs/<?php echo $video['thumbnail']; ?>" width="194"><span class="vertical-align"></span></span></span></span><span class="video-time"><?php echo $video['duration']; ?></span>
153 153
 											<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="rLHU-_OhT8g" role="button"><span class="yt-uix-button-content">  <img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Watch Later">
@@ -173,16 +173,16 @@  discard block
 block discarded – undo
173 173
 									</div>
174 174
                                     <div class="browse-item-row ytg-box">
175 175
 										<?php
176
-											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Travel & Events' ORDER BY rand() LIMIT 4");
177
-											$stmt->execute();
178
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
179
-												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
180
-												$video['duration'] = $__time_h->timestamp($video['duration']);
181
-												$video['views'] = $__video_h->fetch_video_views($video['rid']);
182
-												$video['author'] = htmlspecialchars($video['author']);		
183
-												$video['title'] = htmlspecialchars($video['title']);
184
-												$video['description'] = $__video_h->shorten_description($video['description'], 50);
185
-										?>
176
+                                            $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Travel & Events' ORDER BY rand() LIMIT 4");
177
+                                            $stmt->execute();
178
+                                            while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
179
+                                                $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
180
+                                                $video['duration'] = $__time_h->timestamp($video['duration']);
181
+                                                $video['views'] = $__video_h->fetch_video_views($video['rid']);
182
+                                                $video['author'] = htmlspecialchars($video['author']);		
183
+                                                $video['title'] = htmlspecialchars($video['title']);
184
+                                                $video['description'] = $__video_h->shorten_description($video['description'], 50);
185
+                                        ?>
186 186
 										<div class="browse-item yt-tile-default ">
187 187
 											<a href="/watch?v=<?php echo $video['rid']; ?>" class="ux-thumb-wrap yt-uix-sessionlink yt-uix-contextlink contains-addto " data-sessionlink="ei=CPjwu5ji3bICFS4RIQod9j-M-A%3D%3D&amp;feature=b-mv"><span class="video-thumb ux-thumb yt-thumb-default-194 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="http://s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Thumbnail" data-thumb="/dynamic/thumbs/<?php echo $video['thumbnail']; ?>" width="194"><span class="vertical-align"></span></span></span></span><span class="video-time"><?php echo $video['duration']; ?></span>
188 188
 											<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="rLHU-_OhT8g" role="button"><span class="yt-uix-button-content">  <img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Watch Later">
@@ -208,16 +208,16 @@  discard block
 block discarded – undo
208 208
 									</div>
209 209
                                     <div class="browse-item-row ytg-box">
210 210
 										<?php
211
-											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Travel & Events' ORDER BY rand() LIMIT 4");
212
-											$stmt->execute();
213
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
214
-												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
215
-												$video['duration'] = $__time_h->timestamp($video['duration']);
216
-												$video['views'] = $__video_h->fetch_video_views($video['rid']);
217
-												$video['author'] = htmlspecialchars($video['author']);		
218
-												$video['title'] = htmlspecialchars($video['title']);
219
-												$video['description'] = $__video_h->shorten_description($video['description'], 50);
220
-										?>
211
+                                            $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Travel & Events' ORDER BY rand() LIMIT 4");
212
+                                            $stmt->execute();
213
+                                            while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
214
+                                                $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
215
+                                                $video['duration'] = $__time_h->timestamp($video['duration']);
216
+                                                $video['views'] = $__video_h->fetch_video_views($video['rid']);
217
+                                                $video['author'] = htmlspecialchars($video['author']);		
218
+                                                $video['title'] = htmlspecialchars($video['title']);
219
+                                                $video['description'] = $__video_h->shorten_description($video['description'], 50);
220
+                                        ?>
221 221
 										<div class="browse-item yt-tile-default ">
222 222
 											<a href="/watch?v=<?php echo $video['rid']; ?>" class="ux-thumb-wrap yt-uix-sessionlink yt-uix-contextlink contains-addto " data-sessionlink="ei=CPjwu5ji3bICFS4RIQod9j-M-A%3D%3D&amp;feature=b-mv"><span class="video-thumb ux-thumb yt-thumb-default-194 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="http://s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Thumbnail" data-thumb="/dynamic/thumbs/<?php echo $video['thumbnail']; ?>" width="194"><span class="vertical-align"></span></span></span></span><span class="video-time"><?php echo $video['duration']; ?></span>
223 223
 											<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="rLHU-_OhT8g" role="button"><span class="yt-uix-button-content">  <img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Watch Later">
@@ -243,16 +243,16 @@  discard block
 block discarded – undo
243 243
 									</div>
244 244
                                     <div class="browse-item-row ytg-box">
245 245
 										<?php
246
-											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Travel & Events' ORDER BY rand() LIMIT 4");
247
-											$stmt->execute();
248
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
249
-												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
250
-												$video['duration'] = $__time_h->timestamp($video['duration']);
251
-												$video['views'] = $__video_h->fetch_video_views($video['rid']);
252
-												$video['author'] = htmlspecialchars($video['author']);		
253
-												$video['title'] = htmlspecialchars($video['title']);
254
-												$video['description'] = $__video_h->shorten_description($video['description'], 50);
255
-										?>
246
+                                            $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Travel & Events' ORDER BY rand() LIMIT 4");
247
+                                            $stmt->execute();
248
+                                            while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
249
+                                                $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
250
+                                                $video['duration'] = $__time_h->timestamp($video['duration']);
251
+                                                $video['views'] = $__video_h->fetch_video_views($video['rid']);
252
+                                                $video['author'] = htmlspecialchars($video['author']);		
253
+                                                $video['title'] = htmlspecialchars($video['title']);
254
+                                                $video['description'] = $__video_h->shorten_description($video['description'], 50);
255
+                                        ?>
256 256
 										<div class="browse-item yt-tile-default ">
257 257
 											<a href="/watch?v=<?php echo $video['rid']; ?>" class="ux-thumb-wrap yt-uix-sessionlink yt-uix-contextlink contains-addto " data-sessionlink="ei=CPjwu5ji3bICFS4RIQod9j-M-A%3D%3D&amp;feature=b-mv"><span class="video-thumb ux-thumb yt-thumb-default-194 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="http://s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Thumbnail" data-thumb="/dynamic/thumbs/<?php echo $video['thumbnail']; ?>" width="194"><span class="vertical-align"></span></span></span></span><span class="video-time"><?php echo $video['duration']; ?></span>
258 258
 											<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="rLHU-_OhT8g" role="button"><span class="yt-uix-button-content">  <img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Watch Later">
@@ -278,16 +278,16 @@  discard block
 block discarded – undo
278 278
 									</div>
279 279
                                     <div class="browse-item-row ytg-box">
280 280
 										<?php
281
-											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Travel & Events' ORDER BY rand() LIMIT 4");
282
-											$stmt->execute();
283
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
284
-												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
285
-												$video['duration'] = $__time_h->timestamp($video['duration']);
286
-												$video['views'] = $__video_h->fetch_video_views($video['rid']);
287
-												$video['author'] = htmlspecialchars($video['author']);		
288
-												$video['title'] = htmlspecialchars($video['title']);
289
-												$video['description'] = $__video_h->shorten_description($video['description'], 50);
290
-										?>
281
+                                            $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Travel & Events' ORDER BY rand() LIMIT 4");
282
+                                            $stmt->execute();
283
+                                            while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
284
+                                                $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
285
+                                                $video['duration'] = $__time_h->timestamp($video['duration']);
286
+                                                $video['views'] = $__video_h->fetch_video_views($video['rid']);
287
+                                                $video['author'] = htmlspecialchars($video['author']);		
288
+                                                $video['title'] = htmlspecialchars($video['title']);
289
+                                                $video['description'] = $__video_h->shorten_description($video['description'], 50);
290
+                                        ?>
291 291
 										<div class="browse-item yt-tile-default ">
292 292
 											<a href="/watch?v=<?php echo $video['rid']; ?>" class="ux-thumb-wrap yt-uix-sessionlink yt-uix-contextlink contains-addto " data-sessionlink="ei=CPjwu5ji3bICFS4RIQod9j-M-A%3D%3D&amp;feature=b-mv"><span class="video-thumb ux-thumb yt-thumb-default-194 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="http://s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Thumbnail" data-thumb="/dynamic/thumbs/<?php echo $video['thumbnail']; ?>" width="194"><span class="vertical-align"></span></span></span></span><span class="video-time"><?php echo $video['duration']; ?></span>
293 293
 											<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="rLHU-_OhT8g" role="button"><span class="yt-uix-button-content">  <img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Watch Later">
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
 										<?php
141 141
 											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Travel & Events' ORDER BY rand() LIMIT 4");
142 142
 											$stmt->execute();
143
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
143
+											while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
144 144
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
145 145
 												$video['duration'] = $__time_h->timestamp($video['duration']);
146 146
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
 										<?php
176 176
 											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Travel & Events' ORDER BY rand() LIMIT 4");
177 177
 											$stmt->execute();
178
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
178
+											while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
179 179
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
180 180
 												$video['duration'] = $__time_h->timestamp($video['duration']);
181 181
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
 										<?php
211 211
 											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Travel & Events' ORDER BY rand() LIMIT 4");
212 212
 											$stmt->execute();
213
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
213
+											while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
214 214
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
215 215
 												$video['duration'] = $__time_h->timestamp($video['duration']);
216 216
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
 										<?php
246 246
 											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Travel & Events' ORDER BY rand() LIMIT 4");
247 247
 											$stmt->execute();
248
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
248
+											while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
249 249
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
250 250
 												$video['duration'] = $__time_h->timestamp($video['duration']);
251 251
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -280,7 +280,7 @@  discard block
 block discarded – undo
280 280
 										<?php
281 281
 											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Travel & Events' ORDER BY rand() LIMIT 4");
282 282
 											$stmt->execute();
283
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
283
+											while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
284 284
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
285 285
 												$video['duration'] = $__time_h->timestamp($video['duration']);
286 286
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
Please login to merge, or discard this patch.
watch.php 3 patches
Indentation   +61 added lines, -61 removed lines patch added patch discarded remove patch
@@ -24,16 +24,16 @@  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")
34
+            $__user_u->update_cooldown_time($_SESSION['siteusername'], "cooldown_comment")
35 35
 
36
-			/*
36
+            /*
37 37
             if(@$_SESSION['siteusername'] != $_video['author']) { 
38 38
                 $_user_insert_utils->send_message($_video['author'], "New comment", 'I commented "' . $_POST['comment'] . '" on your video "' . $_video['title'] . '"', $_SESSION['siteusername']);
39 39
             }
@@ -58,22 +58,22 @@  discard block
 block discarded – undo
58 58
 			if (window.yt.timing) {yt.timing.tick("ct");}    
59 59
 		</script>
60 60
 		<?php
61
-			$_video['dislikes'] =  $__video_h->get_video_stars_level($_video['rid'], 1);
62
-			$_video['dislikes'] += $__video_h->get_video_stars_level($_video['rid'], 2);
61
+            $_video['dislikes'] =  $__video_h->get_video_stars_level($_video['rid'], 1);
62
+            $_video['dislikes'] += $__video_h->get_video_stars_level($_video['rid'], 2);
63 63
 
64
-			$_video['likes'] =     $__video_h->get_video_stars_level($_video['rid'], 4);
65
-			$_video['likes'] +=    $__video_h->get_video_stars_level($_video['rid'], 5);
64
+            $_video['likes'] =     $__video_h->get_video_stars_level($_video['rid'], 4);
65
+            $_video['likes'] +=    $__video_h->get_video_stars_level($_video['rid'], 5);
66 66
 
67
-			if($_video['likes'] == 0 && $_video['dislikes'] == 0) {
68
-				$_video['likeswidth'] = 50;
69
-				$_video['dislikeswidth'] = 50;
70
-			} else {
71
-				$_video['likeswidth'] = $_video['likes'] / ($_video['likes'] + $_video['dislikes']) * 100;
72
-				$_video['dislikeswidth'] = 100 - $_video['likeswidth'];
73
-			}
67
+            if($_video['likes'] == 0 && $_video['dislikes'] == 0) {
68
+                $_video['likeswidth'] = 50;
69
+                $_video['dislikeswidth'] = 50;
70
+            } else {
71
+                $_video['likeswidth'] = $_video['likes'] / ($_video['likes'] + $_video['dislikes']) * 100;
72
+                $_video['dislikeswidth'] = 100 - $_video['likeswidth'];
73
+            }
74 74
 
75
-			$_video['author_videos'] = $__video_h->fetch_user_videos($_video['author']);
76
-		?>
75
+            $_video['author_videos'] = $__video_h->fetch_user_videos($_video['author']);
76
+        ?>
77 77
 	</head>
78 78
 	<body id="" class="date-20120927 en_US ltr   ytg-old-clearfix guide-feed-v2 gecko gecko-15" dir="ltr">
79 79
 		<form name="logoutForm" method="POST" action="/logout">
@@ -296,10 +296,10 @@  discard block
 block discarded – undo
296 296
 												</div>
297 297
 											</div>
298 298
 											<?php 
299
-												$stmt = $__db->prepare("SELECT * FROM video_response WHERE toid = :v ORDER BY id DESC LIMIT 4");
300
-												$stmt->bindParam(":v", $_GET['v']);
301
-												$stmt->execute();
302
-											?>
299
+                                                $stmt = $__db->prepare("SELECT * FROM video_response WHERE toid = :v ORDER BY id DESC LIMIT 4");
300
+                                                $stmt->bindParam(":v", $_GET['v']);
301
+                                                $stmt->execute();
302
+                                            ?>
303 303
 
304 304
 											<?php if($stmt->rowCount() != 0) { ?>
305 305
 												<div class="comments-section">
@@ -309,16 +309,16 @@  discard block
 block discarded – undo
309 309
 													<h4>Video Responses</h4>
310 310
 													<ul class="video-list">
311 311
 													<?php 
312
-														while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { 
313
-															if($__video_h->video_exists($video['video'])) { 
314
-																$video = $__video_h->fetch_video_rid($video['video']);
315
-																$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
316
-																$video['duration'] = $__time_h->timestamp($video['duration']);
317
-																$video['views'] = $__video_h->fetch_video_views($video['rid']);
318
-																$video['author'] = htmlspecialchars($video['author']);		
319
-																$video['title'] = htmlspecialchars($video['title']);
320
-																$video['description'] = $__video_h->shorten_description($video['description'], 50);
321
-													?>
312
+                                                        while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { 
313
+                                                            if($__video_h->video_exists($video['video'])) { 
314
+                                                                $video = $__video_h->fetch_video_rid($video['video']);
315
+                                                                $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
316
+                                                                $video['duration'] = $__time_h->timestamp($video['duration']);
317
+                                                                $video['views'] = $__video_h->fetch_video_views($video['rid']);
318
+                                                                $video['author'] = htmlspecialchars($video['author']);		
319
+                                                                $video['title'] = htmlspecialchars($video['title']);
320
+                                                                $video['description'] = $__video_h->shorten_description($video['description'], 50);
321
+                                                    ?>
322 322
 														<li class="video-list-item yt-tile-default">
323 323
 															<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="http://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>
324 324
 															<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">
@@ -400,31 +400,31 @@  discard block
 block discarded – undo
400 400
 												</div>
401 401
 												<ul class="comment-list" id="live_comments">
402 402
 														<?php
403
-														$results_per_page = 20;
403
+                                                        $results_per_page = 20;
404 404
 
405
-														$stmt = $__db->prepare("SELECT * FROM comments WHERE toid = :rid ORDER BY id DESC");
406
-														$stmt->bindParam(":rid", $_video['rid']);
407
-														$stmt->execute();
405
+                                                        $stmt = $__db->prepare("SELECT * FROM comments WHERE toid = :rid ORDER BY id DESC");
406
+                                                        $stmt->bindParam(":rid", $_video['rid']);
407
+                                                        $stmt->execute();
408 408
 
409
-														$number_of_result = $stmt->rowCount();
410
-														$number_of_page = ceil ($number_of_result / $results_per_page);  
409
+                                                        $number_of_result = $stmt->rowCount();
410
+                                                        $number_of_page = ceil ($number_of_result / $results_per_page);  
411 411
 
412
-														if (!isset ($_GET['page']) ) {  
413
-															$page = 1;  
414
-														} else {  
415
-															$page = (int)$_GET['page'];  
416
-														}  
412
+                                                        if (!isset ($_GET['page']) ) {  
413
+                                                            $page = 1;  
414
+                                                        } else {  
415
+                                                            $page = (int)$_GET['page'];  
416
+                                                        }  
417 417
 
418
-														$page_first_result = ($page - 1) * $results_per_page;  
418
+                                                        $page_first_result = ($page - 1) * $results_per_page;  
419 419
 
420
-														$stmt = $__db->prepare("SELECT * FROM comments WHERE toid = :rid ORDER BY id DESC LIMIT :pfirst, :pper");
421
-														$stmt->bindParam(":rid", $_video['rid']);
422
-														$stmt->bindParam(":pfirst", $page_first_result);
423
-														$stmt->bindParam(":pper", $results_per_page);
424
-														$stmt->execute();
420
+                                                        $stmt = $__db->prepare("SELECT * FROM comments WHERE toid = :rid ORDER BY id DESC LIMIT :pfirst, :pper");
421
+                                                        $stmt->bindParam(":rid", $_video['rid']);
422
+                                                        $stmt->bindParam(":pfirst", $page_first_result);
423
+                                                        $stmt->bindParam(":pper", $results_per_page);
424
+                                                        $stmt->execute();
425 425
 
426
-														while($comment = $stmt->fetch(PDO::FETCH_ASSOC))) { 
427
-													?>
426
+                                                        while($comment = $stmt->fetch(PDO::FETCH_ASSOC))) { 
427
+                                                    ?>
428 428
 
429 429
 													<li class="comment yt-tile-default " data-author-viewing="" data-author-id="-uD01K8FQTeOSS5sniRFzQ" data-id="HdQrMeklJ_5hd_uPDRcvtdaMk2pMVS8d9sufcfiGx0U" data-score="0">
430 430
 														<div class="comment-body">
@@ -501,16 +501,16 @@  discard block
 block discarded – undo
501 501
 											<ul id="watch-related" class="video-list">
502 502
 												<div id="ppv-container" class="hid"></div>
503 503
 												<?php
504
-													$stmt = $__db->prepare("SELECT * FROM videos ORDER BY rand() LIMIT 20");
505
-													$stmt->execute();
506
-													while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
507
-														$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
508
-														$video['duration'] = $__time_h->timestamp($video['duration']);
509
-														$video['views'] = $__video_h->fetch_video_views($video['rid']);
510
-														$video['author'] = htmlspecialchars($video['author']);		
511
-														$video['title'] = htmlspecialchars($video['title']);
512
-														$video['description'] = $__video_h->shorten_description($video['description'], 50);
513
-												?>
504
+                                                    $stmt = $__db->prepare("SELECT * FROM videos ORDER BY rand() LIMIT 20");
505
+                                                    $stmt->execute();
506
+                                                    while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
507
+                                                        $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
508
+                                                        $video['duration'] = $__time_h->timestamp($video['duration']);
509
+                                                        $video['views'] = $__video_h->fetch_video_views($video['rid']);
510
+                                                        $video['author'] = htmlspecialchars($video['author']);		
511
+                                                        $video['title'] = htmlspecialchars($video['title']);
512
+                                                        $video['description'] = $__video_h->shorten_description($video['description'], 50);
513
+                                                ?>
514 514
 												<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="http://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>
515 515
 													<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">
516 516
 													</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   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -15,15 +15,15 @@  discard block
 block discarded – undo
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']);
@@ -58,17 +58,17 @@  discard block
 block discarded – undo
58 58
 			if (window.yt.timing) {yt.timing.tick("ct");}    
59 59
 		</script>
60 60
 		<?php
61
-			$_video['dislikes'] =  $__video_h->get_video_stars_level($_video['rid'], 1);
61
+			$_video['dislikes'] = $__video_h->get_video_stars_level($_video['rid'], 1);
62 62
 			$_video['dislikes'] += $__video_h->get_video_stars_level($_video['rid'], 2);
63 63
 
64
-			$_video['likes'] =     $__video_h->get_video_stars_level($_video['rid'], 4);
65
-			$_video['likes'] +=    $__video_h->get_video_stars_level($_video['rid'], 5);
64
+			$_video['likes'] = $__video_h->get_video_stars_level($_video['rid'], 4);
65
+			$_video['likes'] += $__video_h->get_video_stars_level($_video['rid'], 5);
66 66
 
67
-			if($_video['likes'] == 0 && $_video['dislikes'] == 0) {
67
+			if ($_video['likes'] == 0 && $_video['dislikes'] == 0) {
68 68
 				$_video['likeswidth'] = 50;
69 69
 				$_video['dislikeswidth'] = 50;
70 70
 			} else {
71
-				$_video['likeswidth'] = $_video['likes'] / ($_video['likes'] + $_video['dislikes']) * 100;
71
+				$_video['likeswidth'] = $_video['likes']/($_video['likes'] + $_video['dislikes'])*100;
72 72
 				$_video['dislikeswidth'] = 100 - $_video['likeswidth'];
73 73
 			}
74 74
 
@@ -301,7 +301,7 @@  discard block
 block discarded – undo
301 301
 												$stmt->execute();
302 302
 											?>
303 303
 
304
-											<?php if($stmt->rowCount() != 0) { ?>
304
+											<?php if ($stmt->rowCount() != 0) { ?>
305 305
 												<div class="comments-section">
306 306
 													<a class="comments-section-see-all" href="/video_response_view_all?v=rLHU-_OhT8g">
307 307
 													see all
@@ -309,8 +309,8 @@  discard block
 block discarded – undo
309 309
 													<h4>Video Responses</h4>
310 310
 													<ul class="video-list">
311 311
 													<?php 
312
-														while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { 
313
-															if($__video_h->video_exists($video['video'])) { 
312
+														while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) { 
313
+															if ($__video_h->video_exists($video['video'])) { 
314 314
 																$video = $__video_h->fetch_video_rid($video['video']);
315 315
 																$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
316 316
 																$video['duration'] = $__time_h->timestamp($video['duration']);
@@ -341,19 +341,19 @@  discard block
 block discarded – undo
341 341
 														</h4>
342 342
 													</div>
343 343
 												</div>
344
-												<?php if(!isset($_SESSION['siteusername'])) { ?>
344
+												<?php if (!isset($_SESSION['siteusername'])) { ?>
345 345
 													<div class="comments-post-container clearfix">
346 346
 														<div class="comments-post-alert">
347 347
 															<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>
348 348
 														</div>
349 349
 													</div>
350
-												<?php } else if($_video['commenting'] == "d") { ?>
350
+												<?php } else if ($_video['commenting'] == "d") { ?>
351 351
 													<div class="comments-post-container clearfix">
352 352
 														<div class="comments-post-alert">
353 353
 															This video has comemnting disabled!
354 354
 														</div>
355 355
 													</div>
356
-												<?php } else if($__user_h->if_blocked($_video['author'], $_SESSION['siteusername'])) { ?>
356
+												<?php } else if ($__user_h->if_blocked($_video['author'], $_SESSION['siteusername'])) { ?>
357 357
 													<div class="comments-post-container clearfix">
358 358
 														<div class="comments-post-alert">
359 359
 															This user has blocked you!
@@ -407,15 +407,15 @@  discard block
 block discarded – undo
407 407
 														$stmt->execute();
408 408
 
409 409
 														$number_of_result = $stmt->rowCount();
410
-														$number_of_page = ceil ($number_of_result / $results_per_page);  
410
+														$number_of_page = ceil($number_of_result/$results_per_page);  
411 411
 
412
-														if (!isset ($_GET['page']) ) {  
412
+														if (!isset ($_GET['page'])) {  
413 413
 															$page = 1;  
414 414
 														} else {  
415
-															$page = (int)$_GET['page'];  
415
+															$page = (int) $_GET['page'];  
416 416
 														}  
417 417
 
418
-														$page_first_result = ($page - 1) * $results_per_page;  
418
+														$page_first_result = ($page - 1)*$results_per_page;  
419 419
 
420 420
 														$stmt = $__db->prepare("SELECT * FROM comments WHERE toid = :rid ORDER BY id DESC LIMIT :pfirst, :pper");
421 421
 														$stmt->bindParam(":rid", $_video['rid']);
@@ -423,7 +423,7 @@  discard block
 block discarded – undo
423 423
 														$stmt->bindParam(":pper", $results_per_page);
424 424
 														$stmt->execute();
425 425
 
426
-														while($comment = $stmt->fetch(PDO::FETCH_ASSOC))) { 
426
+														while ($comment = $stmt->fetch(PDO::FETCH_ASSOC))) { 
427 427
 													?>
428 428
 
429 429
 													<li class="comment yt-tile-default " data-author-viewing="" data-author-id="-uD01K8FQTeOSS5sniRFzQ" data-id="HdQrMeklJ_5hd_uPDRcvtdaMk2pMVS8d9sufcfiGx0U" data-score="0">
@@ -503,7 +503,7 @@  discard block
 block discarded – undo
503 503
 												<?php
504 504
 													$stmt = $__db->prepare("SELECT * FROM videos ORDER BY rand() LIMIT 20");
505 505
 													$stmt->execute();
506
-													while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
506
+													while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
507 507
 														$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
508 508
 														$video['duration'] = $__time_h->timestamp($video['duration']);
509 509
 														$video['views'] = $__video_h->fetch_video_views($video['rid']);
Please login to merge, or discard this patch.
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -423,7 +423,8 @@  discard block
 block discarded – undo
423 423
 														$stmt->bindParam(":pper", $results_per_page);
424 424
 														$stmt->execute();
425 425
 
426
-														while($comment = $stmt->fetch(PDO::FETCH_ASSOC))) { 
426
+														while($comment = $stmt->fetch(PDO::FETCH_ASSOC)) {
427
+														    ) { 
427 428
 													?>
428 429
 
429 430
 													<li class="comment yt-tile-default " data-author-viewing="" data-author-id="-uD01K8FQTeOSS5sniRFzQ" data-id="HdQrMeklJ_5hd_uPDRcvtdaMk2pMVS8d9sufcfiGx0U" data-score="0">
@@ -431,7 +432,9 @@  discard block
 block discarded – undo
431 432
 															<div class="content-container">
432 433
 																<div class="content">
433 434
 																	<div class="comment-text" dir="ltr">
434
-																		<p><?php echo $__video_h->shorten_description($comment['comment'], 3000, true); ?></p>
435
+																		<p><?php echo $__video_h->shorten_description($comment['comment'], 3000, true);
436
+														}
437
+														?></p>
435 438
 																	</div>
436 439
 																	<p class="metadata">
437 440
 																		<span class="author ">
Please login to merge, or discard this patch.
index.php 2 patches
Indentation   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -56,8 +56,8 @@  discard block
 block discarded – undo
56 56
 							</div>
57 57
 							<div class="guide">
58 58
 							<?php 
59
-								if(isset($_SESSION['siteusername'])) {
60
-								?>
59
+                                if(isset($_SESSION['siteusername'])) {
60
+                                ?>
61 61
 								<div style="/*! margin-top: 0px; *//*! margin-left: 10px; *//*! margin-bottom: 13px; */height: 99px;" class="guide-section feed-header channel first"><img alt="" src="/dynamic/pfp/<?php echo $__user_h->fetch_pfp($_SESSION['siteusername']); ?>" style="height: 88px;position: relative;top: 4px;left: 4px;" class="feed-header-thumb channel-thumb" width="88px"><div id="links" style="/*! margin-left: 5px; */position: relative;left: 13px;top: 7px;"><div style="font-size: 11px;margin-bottom: 6px;" class="metadata">
62 62
 							<a href="/user/<?php echo htmlspecialchars($_SESSION['siteusername']); ?>" style="color: inherit;">My channel
63 63
 							<img src="/static/pixel-vfl3z5WfW.gif" class="see-more-arrow" alt=""></a>        
@@ -210,16 +210,16 @@  discard block
 block discarded – undo
210 210
 							</p>
211 211
 							<ul>
212 212
 								<?php
213
-									$stmt = $__db->prepare("SELECT * FROM videos ORDER BY rand() LIMIT 4");
214
-									$stmt->execute();
215
-									while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
216
-										$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
217
-										$video['duration'] = $__time_h->timestamp($video['duration']);
218
-										$video['views'] = $__video_h->fetch_video_views($video['rid']);
219
-										$video['author'] = htmlspecialchars($video['author']);		
220
-										$video['title'] = htmlspecialchars($video['title']);
221
-										$video['description'] = $__video_h->shorten_description($video['description'], 50);
222
-								?>
213
+                                    $stmt = $__db->prepare("SELECT * FROM videos ORDER BY rand() LIMIT 4");
214
+                                    $stmt->execute();
215
+                                    while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
216
+                                        $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
217
+                                        $video['duration'] = $__time_h->timestamp($video['duration']);
218
+                                        $video['views'] = $__video_h->fetch_video_views($video['rid']);
219
+                                        $video['author'] = htmlspecialchars($video['author']);		
220
+                                        $video['title'] = htmlspecialchars($video['title']);
221
+                                        $video['description'] = $__video_h->shorten_description($video['description'], 50);
222
+                                ?>
223 223
 								<li class="video-list-item "><a href="/watch?v=<?php echo $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 $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>
224 224
 									<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="yuTBQ86r8o0" role="button"><span class="yt-uix-button-content">  <img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Watch Later">
225 225
 									</span><img class="yt-uix-button-arrow" src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt=""></button>
@@ -233,16 +233,16 @@  discard block
 block discarded – undo
233 233
 							</h3>
234 234
 							<ul>
235 235
 								<?php
236
-									$stmt = $__db->prepare("SELECT * FROM videos WHERE featured = 'v' ORDER BY id DESC LIMIT 4");
237
-									$stmt->execute();
238
-									while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
239
-										$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
240
-										$video['duration'] = $__time_h->timestamp($video['duration']);
241
-										$video['views'] = $__video_h->fetch_video_views($video['rid']);
242
-										$video['author'] = htmlspecialchars($video['author']);		
243
-										$video['title'] = htmlspecialchars($video['title']);
244
-										$video['description'] = $__video_h->shorten_description($video['description'], 50);
245
-								?>
236
+                                    $stmt = $__db->prepare("SELECT * FROM videos WHERE featured = 'v' ORDER BY id DESC LIMIT 4");
237
+                                    $stmt->execute();
238
+                                    while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
239
+                                        $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
240
+                                        $video['duration'] = $__time_h->timestamp($video['duration']);
241
+                                        $video['views'] = $__video_h->fetch_video_views($video['rid']);
242
+                                        $video['author'] = htmlspecialchars($video['author']);		
243
+                                        $video['title'] = htmlspecialchars($video['title']);
244
+                                        $video['description'] = $__video_h->shorten_description($video['description'], 50);
245
+                                ?>
246 246
 								<li class="video-list-item "><a href="/watch?v=<?php echo $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 $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>
247 247
 									<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="yuTBQ86r8o0" role="button"><span class="yt-uix-button-content">  <img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Watch Later">
248 248
 									</span><img class="yt-uix-button-arrow" src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt=""></button>
@@ -266,16 +266,16 @@  discard block
 block discarded – undo
266 266
 									<div class="feed-page">
267 267
 										<ul>
268 268
 											<?php
269
-												$stmt = $__db->prepare("SELECT * FROM videos ORDER BY id DESC LIMIT 20");
270
-												$stmt->execute();
271
-												while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
272
-													$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
273
-													$video['duration'] = $__time_h->timestamp($video['duration']);
274
-													$video['views'] = $__video_h->fetch_video_views($video['rid']);
275
-													$video['author'] = htmlspecialchars($video['author']);		
276
-													$video['title'] = htmlspecialchars($video['title']);
277
-													$video['description'] = $__video_h->shorten_description($video['description'], 50);
278
-											?>
269
+                                                $stmt = $__db->prepare("SELECT * FROM videos ORDER BY id DESC LIMIT 20");
270
+                                                $stmt->execute();
271
+                                                while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
272
+                                                    $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
273
+                                                    $video['duration'] = $__time_h->timestamp($video['duration']);
274
+                                                    $video['views'] = $__video_h->fetch_video_views($video['rid']);
275
+                                                    $video['author'] = htmlspecialchars($video['author']);		
276
+                                                    $video['title'] = htmlspecialchars($video['title']);
277
+                                                    $video['description'] = $__video_h->shorten_description($video['description'], 50);
278
+                                            ?>
279 279
 											<li>
280 280
 												<div class="feed-item-container first " data-channel-key="UCR2A9ZNliJfgC66IvIpe-Zw">
281 281
 													<div class="feed-author-bubble-container">
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 				<div id="content">
38 38
 					<div class="guide-layout-container enable-fancy-subscribe-button">
39 39
 						<div class="guide-container">
40
-						<?php if(!isset($_SESSION['siteusername'])) { ?>
40
+						<?php if (!isset($_SESSION['siteusername'])) { ?>
41 41
 									<div id="guide-builder-promo">
42 42
 								<h2>
43 43
 							Sign in to add channels to your homepage
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 							</div>
57 57
 							<div class="guide">
58 58
 							<?php 
59
-								if(isset($_SESSION['siteusername'])) {
59
+								if (isset($_SESSION['siteusername'])) {
60 60
 								?>
61 61
 								<div style="/*! margin-top: 0px; *//*! margin-left: 10px; *//*! margin-bottom: 13px; */height: 99px;" class="guide-section feed-header channel first"><img alt="" src="/dynamic/pfp/<?php echo $__user_h->fetch_pfp($_SESSION['siteusername']); ?>" style="height: 88px;position: relative;top: 4px;left: 4px;" class="feed-header-thumb channel-thumb" width="88px"><div id="links" style="/*! margin-left: 5px; */position: relative;left: 13px;top: 7px;"><div style="font-size: 11px;margin-bottom: 6px;" class="metadata">
62 62
 							<a href="/user/<?php echo htmlspecialchars($_SESSION['siteusername']); ?>" style="color: inherit;">My channel
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
 											</span>
175 175
 											</a>
176 176
 										</li>
177
-										<?php foreach($__server->featured_channels as $channel) { ?>
177
+										<?php foreach ($__server->featured_channels as $channel) { ?>
178 178
 											<li class="guide-item-container ">
179 179
 												<a class="guide-item" data-external-id="<?php echo htmlspecialchars($channel); ?>" data-feed-name="<?php echo htmlspecialchars($channel); ?>" data-feed-type="user">
180 180
 												<span class="thumb">  <span class="video-thumb ux-thumb yt-thumb-square-28 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="http://s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Thumbnail" data-thumb="/dynamic/pfp/<?php echo $__user_h->fetch_pfp($channel); ?>" width="28"><span class="vertical-align"></span></span></span></span>
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
 								<?php
213 213
 									$stmt = $__db->prepare("SELECT * FROM videos ORDER BY rand() LIMIT 4");
214 214
 									$stmt->execute();
215
-									while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
215
+									while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
216 216
 										$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
217 217
 										$video['duration'] = $__time_h->timestamp($video['duration']);
218 218
 										$video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
 								<?php
236 236
 									$stmt = $__db->prepare("SELECT * FROM videos WHERE featured = 'v' ORDER BY id DESC LIMIT 4");
237 237
 									$stmt->execute();
238
-									while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
238
+									while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
239 239
 										$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
240 240
 										$video['duration'] = $__time_h->timestamp($video['duration']);
241 241
 										$video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -268,7 +268,7 @@  discard block
 block discarded – undo
268 268
 											<?php
269 269
 												$stmt = $__db->prepare("SELECT * FROM videos ORDER BY id DESC LIMIT 20");
270 270
 												$stmt->execute();
271
-												while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
271
+												while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
272 272
 													$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
273 273
 													$video['duration'] = $__time_h->timestamp($video['duration']);
274 274
 													$video['views'] = $__video_h->fetch_video_views($video['rid']);
Please login to merge, or discard this patch.
people.php 2 patches
Indentation   +50 added lines, -50 removed lines patch added patch discarded remove patch
@@ -138,16 +138,16 @@  discard block
 block discarded – undo
138 138
 									</div>
139 139
 									<div class="browse-item-row ytg-box">
140 140
 										<?php
141
-											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'People & Blogs' ORDER BY rand() LIMIT 4");
142
-											$stmt->execute();
143
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
144
-												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
145
-												$video['duration'] = $__time_h->timestamp($video['duration']);
146
-												$video['views'] = $__video_h->fetch_video_views($video['rid']);
147
-												$video['author'] = htmlspecialchars($video['author']);		
148
-												$video['title'] = htmlspecialchars($video['title']);
149
-												$video['description'] = $__video_h->shorten_description($video['description'], 50);
150
-										?>
141
+                                            $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'People & Blogs' ORDER BY rand() LIMIT 4");
142
+                                            $stmt->execute();
143
+                                            while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
144
+                                                $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
145
+                                                $video['duration'] = $__time_h->timestamp($video['duration']);
146
+                                                $video['views'] = $__video_h->fetch_video_views($video['rid']);
147
+                                                $video['author'] = htmlspecialchars($video['author']);		
148
+                                                $video['title'] = htmlspecialchars($video['title']);
149
+                                                $video['description'] = $__video_h->shorten_description($video['description'], 50);
150
+                                        ?>
151 151
 										<div class="browse-item yt-tile-default ">
152 152
 											<a href="/watch?v=<?php echo $video['rid']; ?>" class="ux-thumb-wrap yt-uix-sessionlink yt-uix-contextlink contains-addto " data-sessionlink="ei=CPjwu5ji3bICFS4RIQod9j-M-A%3D%3D&amp;feature=b-mv"><span class="video-thumb ux-thumb yt-thumb-default-194 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="http://s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Thumbnail" data-thumb="/dynamic/thumbs/<?php echo $video['thumbnail']; ?>" width="194"><span class="vertical-align"></span></span></span></span><span class="video-time"><?php echo $video['duration']; ?></span>
153 153
 											<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="rLHU-_OhT8g" role="button"><span class="yt-uix-button-content">  <img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Watch Later">
@@ -173,16 +173,16 @@  discard block
 block discarded – undo
173 173
 									</div>
174 174
                                     <div class="browse-item-row ytg-box">
175 175
 										<?php
176
-											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'People & Blogs' ORDER BY rand() LIMIT 4");
177
-											$stmt->execute();
178
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
179
-												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
180
-												$video['duration'] = $__time_h->timestamp($video['duration']);
181
-												$video['views'] = $__video_h->fetch_video_views($video['rid']);
182
-												$video['author'] = htmlspecialchars($video['author']);		
183
-												$video['title'] = htmlspecialchars($video['title']);
184
-												$video['description'] = $__video_h->shorten_description($video['description'], 50);
185
-										?>
176
+                                            $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'People & Blogs' ORDER BY rand() LIMIT 4");
177
+                                            $stmt->execute();
178
+                                            while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
179
+                                                $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
180
+                                                $video['duration'] = $__time_h->timestamp($video['duration']);
181
+                                                $video['views'] = $__video_h->fetch_video_views($video['rid']);
182
+                                                $video['author'] = htmlspecialchars($video['author']);		
183
+                                                $video['title'] = htmlspecialchars($video['title']);
184
+                                                $video['description'] = $__video_h->shorten_description($video['description'], 50);
185
+                                        ?>
186 186
 										<div class="browse-item yt-tile-default ">
187 187
 											<a href="/watch?v=<?php echo $video['rid']; ?>" class="ux-thumb-wrap yt-uix-sessionlink yt-uix-contextlink contains-addto " data-sessionlink="ei=CPjwu5ji3bICFS4RIQod9j-M-A%3D%3D&amp;feature=b-mv"><span class="video-thumb ux-thumb yt-thumb-default-194 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="http://s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Thumbnail" data-thumb="/dynamic/thumbs/<?php echo $video['thumbnail']; ?>" width="194"><span class="vertical-align"></span></span></span></span><span class="video-time"><?php echo $video['duration']; ?></span>
188 188
 											<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="rLHU-_OhT8g" role="button"><span class="yt-uix-button-content">  <img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Watch Later">
@@ -208,16 +208,16 @@  discard block
 block discarded – undo
208 208
 									</div>
209 209
                                     <div class="browse-item-row ytg-box">
210 210
 										<?php
211
-											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'People & Blogs' ORDER BY rand() LIMIT 4");
212
-											$stmt->execute();
213
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
214
-												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
215
-												$video['duration'] = $__time_h->timestamp($video['duration']);
216
-												$video['views'] = $__video_h->fetch_video_views($video['rid']);
217
-												$video['author'] = htmlspecialchars($video['author']);		
218
-												$video['title'] = htmlspecialchars($video['title']);
219
-												$video['description'] = $__video_h->shorten_description($video['description'], 50);
220
-										?>
211
+                                            $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'People & Blogs' ORDER BY rand() LIMIT 4");
212
+                                            $stmt->execute();
213
+                                            while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
214
+                                                $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
215
+                                                $video['duration'] = $__time_h->timestamp($video['duration']);
216
+                                                $video['views'] = $__video_h->fetch_video_views($video['rid']);
217
+                                                $video['author'] = htmlspecialchars($video['author']);		
218
+                                                $video['title'] = htmlspecialchars($video['title']);
219
+                                                $video['description'] = $__video_h->shorten_description($video['description'], 50);
220
+                                        ?>
221 221
 										<div class="browse-item yt-tile-default ">
222 222
 											<a href="/watch?v=<?php echo $video['rid']; ?>" class="ux-thumb-wrap yt-uix-sessionlink yt-uix-contextlink contains-addto " data-sessionlink="ei=CPjwu5ji3bICFS4RIQod9j-M-A%3D%3D&amp;feature=b-mv"><span class="video-thumb ux-thumb yt-thumb-default-194 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="http://s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Thumbnail" data-thumb="/dynamic/thumbs/<?php echo $video['thumbnail']; ?>" width="194"><span class="vertical-align"></span></span></span></span><span class="video-time"><?php echo $video['duration']; ?></span>
223 223
 											<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="rLHU-_OhT8g" role="button"><span class="yt-uix-button-content">  <img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Watch Later">
@@ -243,16 +243,16 @@  discard block
 block discarded – undo
243 243
 									</div>
244 244
                                     <div class="browse-item-row ytg-box">
245 245
 										<?php
246
-											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'People & Blogs' ORDER BY rand() LIMIT 4");
247
-											$stmt->execute();
248
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
249
-												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
250
-												$video['duration'] = $__time_h->timestamp($video['duration']);
251
-												$video['views'] = $__video_h->fetch_video_views($video['rid']);
252
-												$video['author'] = htmlspecialchars($video['author']);		
253
-												$video['title'] = htmlspecialchars($video['title']);
254
-												$video['description'] = $__video_h->shorten_description($video['description'], 50);
255
-										?>
246
+                                            $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'People & Blogs' ORDER BY rand() LIMIT 4");
247
+                                            $stmt->execute();
248
+                                            while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
249
+                                                $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
250
+                                                $video['duration'] = $__time_h->timestamp($video['duration']);
251
+                                                $video['views'] = $__video_h->fetch_video_views($video['rid']);
252
+                                                $video['author'] = htmlspecialchars($video['author']);		
253
+                                                $video['title'] = htmlspecialchars($video['title']);
254
+                                                $video['description'] = $__video_h->shorten_description($video['description'], 50);
255
+                                        ?>
256 256
 										<div class="browse-item yt-tile-default ">
257 257
 											<a href="/watch?v=<?php echo $video['rid']; ?>" class="ux-thumb-wrap yt-uix-sessionlink yt-uix-contextlink contains-addto " data-sessionlink="ei=CPjwu5ji3bICFS4RIQod9j-M-A%3D%3D&amp;feature=b-mv"><span class="video-thumb ux-thumb yt-thumb-default-194 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="http://s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Thumbnail" data-thumb="/dynamic/thumbs/<?php echo $video['thumbnail']; ?>" width="194"><span class="vertical-align"></span></span></span></span><span class="video-time"><?php echo $video['duration']; ?></span>
258 258
 											<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="rLHU-_OhT8g" role="button"><span class="yt-uix-button-content">  <img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Watch Later">
@@ -278,16 +278,16 @@  discard block
 block discarded – undo
278 278
 									</div>
279 279
                                     <div class="browse-item-row ytg-box">
280 280
 										<?php
281
-											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'People & Blogs' ORDER BY rand() LIMIT 4");
282
-											$stmt->execute();
283
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
284
-												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
285
-												$video['duration'] = $__time_h->timestamp($video['duration']);
286
-												$video['views'] = $__video_h->fetch_video_views($video['rid']);
287
-												$video['author'] = htmlspecialchars($video['author']);		
288
-												$video['title'] = htmlspecialchars($video['title']);
289
-												$video['description'] = $__video_h->shorten_description($video['description'], 50);
290
-										?>
281
+                                            $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'People & Blogs' ORDER BY rand() LIMIT 4");
282
+                                            $stmt->execute();
283
+                                            while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
284
+                                                $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
285
+                                                $video['duration'] = $__time_h->timestamp($video['duration']);
286
+                                                $video['views'] = $__video_h->fetch_video_views($video['rid']);
287
+                                                $video['author'] = htmlspecialchars($video['author']);		
288
+                                                $video['title'] = htmlspecialchars($video['title']);
289
+                                                $video['description'] = $__video_h->shorten_description($video['description'], 50);
290
+                                        ?>
291 291
 										<div class="browse-item yt-tile-default ">
292 292
 											<a href="/watch?v=<?php echo $video['rid']; ?>" class="ux-thumb-wrap yt-uix-sessionlink yt-uix-contextlink contains-addto " data-sessionlink="ei=CPjwu5ji3bICFS4RIQod9j-M-A%3D%3D&amp;feature=b-mv"><span class="video-thumb ux-thumb yt-thumb-default-194 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="http://s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Thumbnail" data-thumb="/dynamic/thumbs/<?php echo $video['thumbnail']; ?>" width="194"><span class="vertical-align"></span></span></span></span><span class="video-time"><?php echo $video['duration']; ?></span>
293 293
 											<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="rLHU-_OhT8g" role="button"><span class="yt-uix-button-content">  <img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Watch Later">
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
 										<?php
141 141
 											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'People & Blogs' ORDER BY rand() LIMIT 4");
142 142
 											$stmt->execute();
143
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
143
+											while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
144 144
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
145 145
 												$video['duration'] = $__time_h->timestamp($video['duration']);
146 146
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
 										<?php
176 176
 											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'People & Blogs' ORDER BY rand() LIMIT 4");
177 177
 											$stmt->execute();
178
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
178
+											while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
179 179
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
180 180
 												$video['duration'] = $__time_h->timestamp($video['duration']);
181 181
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
 										<?php
211 211
 											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'People & Blogs' ORDER BY rand() LIMIT 4");
212 212
 											$stmt->execute();
213
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
213
+											while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
214 214
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
215 215
 												$video['duration'] = $__time_h->timestamp($video['duration']);
216 216
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
 										<?php
246 246
 											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'People & Blogs' ORDER BY rand() LIMIT 4");
247 247
 											$stmt->execute();
248
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
248
+											while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
249 249
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
250 250
 												$video['duration'] = $__time_h->timestamp($video['duration']);
251 251
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -280,7 +280,7 @@  discard block
 block discarded – undo
280 280
 										<?php
281 281
 											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'People & Blogs' ORDER BY rand() LIMIT 4");
282 282
 											$stmt->execute();
283
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
283
+											while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
284 284
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
285 285
 												$video['duration'] = $__time_h->timestamp($video['duration']);
286 286
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
Please login to merge, or discard this patch.
comedy.php 2 patches
Indentation   +50 added lines, -50 removed lines patch added patch discarded remove patch
@@ -138,16 +138,16 @@  discard block
 block discarded – undo
138 138
 									</div>
139 139
 									<div class="browse-item-row ytg-box">
140 140
 										<?php
141
-											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Comedy' ORDER BY rand() LIMIT 4");
142
-											$stmt->execute();
143
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
144
-												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
145
-												$video['duration'] = $__time_h->timestamp($video['duration']);
146
-												$video['views'] = $__video_h->fetch_video_views($video['rid']);
147
-												$video['author'] = htmlspecialchars($video['author']);		
148
-												$video['title'] = htmlspecialchars($video['title']);
149
-												$video['description'] = $__video_h->shorten_description($video['description'], 50);
150
-										?>
141
+                                            $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Comedy' ORDER BY rand() LIMIT 4");
142
+                                            $stmt->execute();
143
+                                            while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
144
+                                                $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
145
+                                                $video['duration'] = $__time_h->timestamp($video['duration']);
146
+                                                $video['views'] = $__video_h->fetch_video_views($video['rid']);
147
+                                                $video['author'] = htmlspecialchars($video['author']);		
148
+                                                $video['title'] = htmlspecialchars($video['title']);
149
+                                                $video['description'] = $__video_h->shorten_description($video['description'], 50);
150
+                                        ?>
151 151
 										<div class="browse-item yt-tile-default ">
152 152
 											<a href="/watch?v=<?php echo $video['rid']; ?>" class="ux-thumb-wrap yt-uix-sessionlink yt-uix-contextlink contains-addto " data-sessionlink="ei=CPjwu5ji3bICFS4RIQod9j-M-A%3D%3D&amp;feature=b-mv"><span class="video-thumb ux-thumb yt-thumb-default-194 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="http://s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Thumbnail" data-thumb="/dynamic/thumbs/<?php echo $video['thumbnail']; ?>" width="194"><span class="vertical-align"></span></span></span></span><span class="video-time"><?php echo $video['duration']; ?></span>
153 153
 											<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="rLHU-_OhT8g" role="button"><span class="yt-uix-button-content">  <img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Watch Later">
@@ -173,16 +173,16 @@  discard block
 block discarded – undo
173 173
 									</div>
174 174
                                     <div class="browse-item-row ytg-box">
175 175
 										<?php
176
-											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Comedy' ORDER BY rand() LIMIT 4");
177
-											$stmt->execute();
178
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
179
-												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
180
-												$video['duration'] = $__time_h->timestamp($video['duration']);
181
-												$video['views'] = $__video_h->fetch_video_views($video['rid']);
182
-												$video['author'] = htmlspecialchars($video['author']);		
183
-												$video['title'] = htmlspecialchars($video['title']);
184
-												$video['description'] = $__video_h->shorten_description($video['description'], 50);
185
-										?>
176
+                                            $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Comedy' ORDER BY rand() LIMIT 4");
177
+                                            $stmt->execute();
178
+                                            while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
179
+                                                $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
180
+                                                $video['duration'] = $__time_h->timestamp($video['duration']);
181
+                                                $video['views'] = $__video_h->fetch_video_views($video['rid']);
182
+                                                $video['author'] = htmlspecialchars($video['author']);		
183
+                                                $video['title'] = htmlspecialchars($video['title']);
184
+                                                $video['description'] = $__video_h->shorten_description($video['description'], 50);
185
+                                        ?>
186 186
 										<div class="browse-item yt-tile-default ">
187 187
 											<a href="/watch?v=<?php echo $video['rid']; ?>" class="ux-thumb-wrap yt-uix-sessionlink yt-uix-contextlink contains-addto " data-sessionlink="ei=CPjwu5ji3bICFS4RIQod9j-M-A%3D%3D&amp;feature=b-mv"><span class="video-thumb ux-thumb yt-thumb-default-194 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="http://s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Thumbnail" data-thumb="/dynamic/thumbs/<?php echo $video['thumbnail']; ?>" width="194"><span class="vertical-align"></span></span></span></span><span class="video-time"><?php echo $video['duration']; ?></span>
188 188
 											<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="rLHU-_OhT8g" role="button"><span class="yt-uix-button-content">  <img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Watch Later">
@@ -208,16 +208,16 @@  discard block
 block discarded – undo
208 208
 									</div>
209 209
                                     <div class="browse-item-row ytg-box">
210 210
 										<?php
211
-											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Comedy' ORDER BY rand() LIMIT 4");
212
-											$stmt->execute();
213
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
214
-												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
215
-												$video['duration'] = $__time_h->timestamp($video['duration']);
216
-												$video['views'] = $__video_h->fetch_video_views($video['rid']);
217
-												$video['author'] = htmlspecialchars($video['author']);		
218
-												$video['title'] = htmlspecialchars($video['title']);
219
-												$video['description'] = $__video_h->shorten_description($video['description'], 50);
220
-										?>
211
+                                            $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Comedy' ORDER BY rand() LIMIT 4");
212
+                                            $stmt->execute();
213
+                                            while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
214
+                                                $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
215
+                                                $video['duration'] = $__time_h->timestamp($video['duration']);
216
+                                                $video['views'] = $__video_h->fetch_video_views($video['rid']);
217
+                                                $video['author'] = htmlspecialchars($video['author']);		
218
+                                                $video['title'] = htmlspecialchars($video['title']);
219
+                                                $video['description'] = $__video_h->shorten_description($video['description'], 50);
220
+                                        ?>
221 221
 										<div class="browse-item yt-tile-default ">
222 222
 											<a href="/watch?v=<?php echo $video['rid']; ?>" class="ux-thumb-wrap yt-uix-sessionlink yt-uix-contextlink contains-addto " data-sessionlink="ei=CPjwu5ji3bICFS4RIQod9j-M-A%3D%3D&amp;feature=b-mv"><span class="video-thumb ux-thumb yt-thumb-default-194 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="http://s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Thumbnail" data-thumb="/dynamic/thumbs/<?php echo $video['thumbnail']; ?>" width="194"><span class="vertical-align"></span></span></span></span><span class="video-time"><?php echo $video['duration']; ?></span>
223 223
 											<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="rLHU-_OhT8g" role="button"><span class="yt-uix-button-content">  <img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Watch Later">
@@ -243,16 +243,16 @@  discard block
 block discarded – undo
243 243
 									</div>
244 244
                                     <div class="browse-item-row ytg-box">
245 245
 										<?php
246
-											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Comedy' ORDER BY rand() LIMIT 4");
247
-											$stmt->execute();
248
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
249
-												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
250
-												$video['duration'] = $__time_h->timestamp($video['duration']);
251
-												$video['views'] = $__video_h->fetch_video_views($video['rid']);
252
-												$video['author'] = htmlspecialchars($video['author']);		
253
-												$video['title'] = htmlspecialchars($video['title']);
254
-												$video['description'] = $__video_h->shorten_description($video['description'], 50);
255
-										?>
246
+                                            $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Comedy' ORDER BY rand() LIMIT 4");
247
+                                            $stmt->execute();
248
+                                            while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
249
+                                                $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
250
+                                                $video['duration'] = $__time_h->timestamp($video['duration']);
251
+                                                $video['views'] = $__video_h->fetch_video_views($video['rid']);
252
+                                                $video['author'] = htmlspecialchars($video['author']);		
253
+                                                $video['title'] = htmlspecialchars($video['title']);
254
+                                                $video['description'] = $__video_h->shorten_description($video['description'], 50);
255
+                                        ?>
256 256
 										<div class="browse-item yt-tile-default ">
257 257
 											<a href="/watch?v=<?php echo $video['rid']; ?>" class="ux-thumb-wrap yt-uix-sessionlink yt-uix-contextlink contains-addto " data-sessionlink="ei=CPjwu5ji3bICFS4RIQod9j-M-A%3D%3D&amp;feature=b-mv"><span class="video-thumb ux-thumb yt-thumb-default-194 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="http://s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Thumbnail" data-thumb="/dynamic/thumbs/<?php echo $video['thumbnail']; ?>" width="194"><span class="vertical-align"></span></span></span></span><span class="video-time"><?php echo $video['duration']; ?></span>
258 258
 											<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="rLHU-_OhT8g" role="button"><span class="yt-uix-button-content">  <img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Watch Later">
@@ -278,16 +278,16 @@  discard block
 block discarded – undo
278 278
 									</div>
279 279
                                     <div class="browse-item-row ytg-box">
280 280
 										<?php
281
-											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Comedy' ORDER BY rand() LIMIT 4");
282
-											$stmt->execute();
283
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
284
-												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
285
-												$video['duration'] = $__time_h->timestamp($video['duration']);
286
-												$video['views'] = $__video_h->fetch_video_views($video['rid']);
287
-												$video['author'] = htmlspecialchars($video['author']);		
288
-												$video['title'] = htmlspecialchars($video['title']);
289
-												$video['description'] = $__video_h->shorten_description($video['description'], 50);
290
-										?>
281
+                                            $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Comedy' ORDER BY rand() LIMIT 4");
282
+                                            $stmt->execute();
283
+                                            while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
284
+                                                $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
285
+                                                $video['duration'] = $__time_h->timestamp($video['duration']);
286
+                                                $video['views'] = $__video_h->fetch_video_views($video['rid']);
287
+                                                $video['author'] = htmlspecialchars($video['author']);		
288
+                                                $video['title'] = htmlspecialchars($video['title']);
289
+                                                $video['description'] = $__video_h->shorten_description($video['description'], 50);
290
+                                        ?>
291 291
 										<div class="browse-item yt-tile-default ">
292 292
 											<a href="/watch?v=<?php echo $video['rid']; ?>" class="ux-thumb-wrap yt-uix-sessionlink yt-uix-contextlink contains-addto " data-sessionlink="ei=CPjwu5ji3bICFS4RIQod9j-M-A%3D%3D&amp;feature=b-mv"><span class="video-thumb ux-thumb yt-thumb-default-194 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="http://s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Thumbnail" data-thumb="/dynamic/thumbs/<?php echo $video['thumbnail']; ?>" width="194"><span class="vertical-align"></span></span></span></span><span class="video-time"><?php echo $video['duration']; ?></span>
293 293
 											<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="rLHU-_OhT8g" role="button"><span class="yt-uix-button-content">  <img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Watch Later">
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
 										<?php
141 141
 											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Comedy' ORDER BY rand() LIMIT 4");
142 142
 											$stmt->execute();
143
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
143
+											while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
144 144
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
145 145
 												$video['duration'] = $__time_h->timestamp($video['duration']);
146 146
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
 										<?php
176 176
 											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Comedy' ORDER BY rand() LIMIT 4");
177 177
 											$stmt->execute();
178
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
178
+											while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
179 179
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
180 180
 												$video['duration'] = $__time_h->timestamp($video['duration']);
181 181
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
 										<?php
211 211
 											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Comedy' ORDER BY rand() LIMIT 4");
212 212
 											$stmt->execute();
213
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
213
+											while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
214 214
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
215 215
 												$video['duration'] = $__time_h->timestamp($video['duration']);
216 216
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
 										<?php
246 246
 											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Comedy' ORDER BY rand() LIMIT 4");
247 247
 											$stmt->execute();
248
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
248
+											while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
249 249
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
250 250
 												$video['duration'] = $__time_h->timestamp($video['duration']);
251 251
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -280,7 +280,7 @@  discard block
 block discarded – undo
280 280
 										<?php
281 281
 											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Comedy' ORDER BY rand() LIMIT 4");
282 282
 											$stmt->execute();
283
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
283
+											while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
284 284
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
285 285
 												$video['duration'] = $__time_h->timestamp($video['duration']);
286 286
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
Please login to merge, or discard this patch.
playlists_ajax.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -11,13 +11,13 @@  discard block
 block discarded – undo
11 11
 <?php
12 12
     $search = $_SESSION['siteusername'];
13 13
 
14
-    if($_GET['filter'] == "time") {
14
+    if ($_GET['filter'] == "time") {
15 15
         $stmt = $__db->prepare("SELECT * FROM playlists WHERE author = :username ORDER BY id DESC");
16 16
         $stmt->bindParam(":username", $_SESSION['siteusername']);
17 17
         $stmt->execute();
18 18
         $result = $stmt->get_result();
19 19
         $results = $result->num_rows;
20
-    } else if($_GET['filter'] == "title") {
20
+    } else if ($_GET['filter'] == "title") {
21 21
         $stmt = $__db->prepare("SELECT * FROM playlists WHERE author = :username ORDER BY title DESC");
22 22
         $stmt->bindParam(":username", $_SESSION['siteusername']);
23 23
         $stmt->execute();
@@ -30,18 +30,18 @@  discard block
 block discarded – undo
30 30
         <th style="width: 80%;">
31 31
             <small class="video-filter-options">
32 32
                 Sort by:  
33
-                <a id="selector-title" onclick="changeFilter_Title();" <?php if($_GET['filter'] == "title") { ?>class="selected"<?php } ?>>Title</a> | 
34
-                    <a id="selector-time" onclick="changeFilter_Time();" <?php if($_GET['filter'] == "time") { ?>class="selected"<?php } ?>>Time</a>
33
+                <a id="selector-title" onclick="changeFilter_Title();" <?php if ($_GET['filter'] == "title") { ?>class="selected"<?php } ?>>Title</a> | 
34
+                    <a id="selector-time" onclick="changeFilter_Time();" <?php if ($_GET['filter'] == "time") { ?>class="selected"<?php } ?>>Time</a>
35 35
             </small>
36 36
         </th>
37 37
         <th style="margin: 5px; width: 20%;"></th>
38 38
     </tr>
39 39
     
40 40
     <?php
41
-        while($playlist = $result->fetch_assoc()) { 
41
+        while ($playlist = $result->fetch_assoc()) { 
42 42
             $playlist['videos'] = json_decode($playlist['videos']);
43
-            if($__video_h->video_exists(@$playlist['videos'][0])) {
44
-                if(count($playlist['videos']) != 0) {
43
+            if ($__video_h->video_exists(@$playlist['videos'][0])) {
44
+                if (count($playlist['videos']) != 0) {
45 45
                     $video = $__video_h->fetch_video_rid($playlist['videos'][0]);
46 46
                     $video['video_responses'] = $__video_h->get_video_responses($video['rid']);
47 47
                     $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
Please login to merge, or discard this patch.