Passed
Push — main ( fcdcda...b78c1f )
by chief
02:32
created
video_manager_ajax.php 2 patches
Spacing   +16 added lines, -16 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 videos WHERE author = ? ORDER BY id DESC");
16 16
         $stmt->bind_param("s", $_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 videos WHERE author = ? ORDER BY title DESC");
22 22
         $stmt->bind_param("s", $_SESSION['siteusername']);
23 23
         $stmt->execute();
@@ -27,24 +27,24 @@  discard block
 block discarded – undo
27 27
 
28 28
     $results_per_page = 12;
29 29
     $number_of_result = $result->num_rows;
30
-    $number_of_page = ceil ($number_of_result / $results_per_page);  
30
+    $number_of_page = ceil($number_of_result/$results_per_page);  
31 31
 
32
-    if (!isset ($_GET['page']) ) {  
32
+    if (!isset ($_GET['page'])) {  
33 33
         $page = 1;  
34 34
     } else {  
35
-        $page = (int)$_GET['page'];  
35
+        $page = (int) $_GET['page'];  
36 36
     }  
37 37
 
38
-    $page_first_result = ($page - 1) * $results_per_page;  
38
+    $page_first_result = ($page - 1)*$results_per_page;  
39 39
 
40 40
     $stmt->close();
41 41
 
42
-    if($_GET['filter'] == "time") {
42
+    if ($_GET['filter'] == "time") {
43 43
         $stmt6 = $__db->prepare("SELECT * FROM videos WHERE author = ? ORDER BY id DESC LIMIT ?, ?");
44 44
         $stmt6->bind_param("sss", $search, $page_first_result, $results_per_page);
45 45
         $stmt6->execute();
46 46
         $result6 = $stmt6->get_result();
47
-    } else if($_GET['filter'] == "title") {
47
+    } else if ($_GET['filter'] == "title") {
48 48
         $stmt6 = $__db->prepare("SELECT * FROM videos WHERE author = ? ORDER BY title LIMIT ?, ?");
49 49
         $stmt6->bind_param("sss", $search, $page_first_result, $results_per_page);
50 50
         $stmt6->execute();
@@ -56,15 +56,15 @@  discard block
 block discarded – undo
56 56
         <th style="width: 80%;">
57 57
             <small class="video-filter-options">
58 58
                 Sort by:  
59
-                <a id="selector-title" onclick="changeFilter_Title();" <?php if($_GET['filter'] == "title") { ?>class="selected"<?php } ?>>Title</a> | 
60
-                    <a id="selector-time" onclick="changeFilter_Time();" <?php if($_GET['filter'] == "time") { ?>class="selected"<?php } ?>>Time</a>
59
+                <a id="selector-title" onclick="changeFilter_Title();" <?php if ($_GET['filter'] == "title") { ?>class="selected"<?php } ?>>Title</a> | 
60
+                    <a id="selector-time" onclick="changeFilter_Time();" <?php if ($_GET['filter'] == "time") { ?>class="selected"<?php } ?>>Time</a>
61 61
             </small>
62 62
         </th>
63 63
         <th style="margin: 5px; width: 20%;"></th>
64 64
     </tr>
65 65
     
66 66
     <?php
67
-        while($video = $result6->fetch_assoc()) { 
67
+        while ($video = $result6->fetch_assoc()) { 
68 68
             $video['video_responses'] = $__video_h->get_video_responses($video['rid']);
69 69
             $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
70 70
             $video['duration'] = $__time_h->timestamp($video['duration']);
@@ -73,19 +73,19 @@  discard block
 block discarded – undo
73 73
             $video['title'] = htmlspecialchars($video['title']);
74 74
             $video['description'] = $__video_h->shorten_description($video['description'], 50);
75 75
 
76
-            if($video['thumbnail'] == ".png" && $video['filename'] == ".mp4") {
76
+            if ($video['thumbnail'] == ".png" && $video['filename'] == ".mp4") {
77 77
                 $status = "Corrupted";
78
-            } else if($video['visibility'] == "v") {
78
+            } else if ($video['visibility'] == "v") {
79 79
                 $status = "Approved";
80
-            } else if($video['visibility'] == "n") {
80
+            } else if ($video['visibility'] == "n") {
81 81
                 $status = "Approved";
82
-            } else if($video['visibility'] == "o") {
82
+            } else if ($video['visibility'] == "o") {
83 83
                 $status = "Disapproved";
84 84
             } else {
85 85
                 $status = "Unknown";
86 86
             }                      
87 87
             
88
-            if($video['commenting'] == "a") 
88
+            if ($video['commenting'] == "a") 
89 89
                 $video['commentstatus'] = "Commenting allowed";
90 90
             else 
91 91
                 $video['commentstatus'] = "Commenting disallowed";
Please login to merge, or discard this patch.
Braces   +5 added lines, -4 removed lines patch added patch discarded remove patch
@@ -85,10 +85,11 @@
 block discarded – undo
85 85
                 $status = "Unknown";
86 86
             }                      
87 87
             
88
-            if($video['commenting'] == "a") 
89
-                $video['commentstatus'] = "Commenting allowed";
90
-            else 
91
-                $video['commentstatus'] = "Commenting disallowed";
88
+            if($video['commenting'] == "a") {
89
+                            $video['commentstatus'] = "Commenting allowed";
90
+            } else {
91
+                            $video['commentstatus'] = "Commenting disallowed";
92
+            }
92 93
     ?> 
93 94
     <tr style="margin-top: 5px;" id="videoslist">
94 95
         <td class="video-manager-left">
Please login to merge, or discard this patch.
howto.php 2 patches
Indentation   +55 added lines, -55 removed lines patch added patch discarded remove patch
@@ -138,17 +138,17 @@  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 = 'Howto & Style' ORDER BY rand() LIMIT 4");
142
-											$stmt->execute();
143
-											$result = $stmt->get_result();
144
-											while($video = $result->fetch_assoc()) {	
145
-												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
146
-												$video['duration'] = $__time_h->timestamp($video['duration']);
147
-												$video['views'] = $__video_h->fetch_video_views($video['rid']);
148
-												$video['author'] = htmlspecialchars($video['author']);		
149
-												$video['title'] = htmlspecialchars($video['title']);
150
-												$video['description'] = $__video_h->shorten_description($video['description'], 50);
151
-										?>
141
+                                            $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Howto & Style' ORDER BY rand() LIMIT 4");
142
+                                            $stmt->execute();
143
+                                            $result = $stmt->get_result();
144
+                                            while($video = $result->fetch_assoc()) {	
145
+                                                $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
146
+                                                $video['duration'] = $__time_h->timestamp($video['duration']);
147
+                                                $video['views'] = $__video_h->fetch_video_views($video['rid']);
148
+                                                $video['author'] = htmlspecialchars($video['author']);		
149
+                                                $video['title'] = htmlspecialchars($video['title']);
150
+                                                $video['description'] = $__video_h->shorten_description($video['description'], 50);
151
+                                        ?>
152 152
 										<div class="browse-item yt-tile-default ">
153 153
 											<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>
154 154
 											<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">
@@ -174,17 +174,17 @@  discard block
 block discarded – undo
174 174
 									</div>
175 175
                                     <div class="browse-item-row ytg-box">
176 176
 										<?php
177
-											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Howto & Style' ORDER BY rand() LIMIT 4");
178
-											$stmt->execute();
179
-											$result = $stmt->get_result();
180
-											while($video = $result->fetch_assoc()) {	
181
-												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
182
-												$video['duration'] = $__time_h->timestamp($video['duration']);
183
-												$video['views'] = $__video_h->fetch_video_views($video['rid']);
184
-												$video['author'] = htmlspecialchars($video['author']);		
185
-												$video['title'] = htmlspecialchars($video['title']);
186
-												$video['description'] = $__video_h->shorten_description($video['description'], 50);
187
-										?>
177
+                                            $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Howto & Style' ORDER BY rand() LIMIT 4");
178
+                                            $stmt->execute();
179
+                                            $result = $stmt->get_result();
180
+                                            while($video = $result->fetch_assoc()) {	
181
+                                                $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
182
+                                                $video['duration'] = $__time_h->timestamp($video['duration']);
183
+                                                $video['views'] = $__video_h->fetch_video_views($video['rid']);
184
+                                                $video['author'] = htmlspecialchars($video['author']);		
185
+                                                $video['title'] = htmlspecialchars($video['title']);
186
+                                                $video['description'] = $__video_h->shorten_description($video['description'], 50);
187
+                                        ?>
188 188
 										<div class="browse-item yt-tile-default ">
189 189
 											<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>
190 190
 											<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">
@@ -210,17 +210,17 @@  discard block
 block discarded – undo
210 210
 									</div>
211 211
                                     <div class="browse-item-row ytg-box">
212 212
 										<?php
213
-											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Howto & Style' ORDER BY rand() LIMIT 4");
214
-											$stmt->execute();
215
-											$result = $stmt->get_result();
216
-											while($video = $result->fetch_assoc()) {	
217
-												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
218
-												$video['duration'] = $__time_h->timestamp($video['duration']);
219
-												$video['views'] = $__video_h->fetch_video_views($video['rid']);
220
-												$video['author'] = htmlspecialchars($video['author']);		
221
-												$video['title'] = htmlspecialchars($video['title']);
222
-												$video['description'] = $__video_h->shorten_description($video['description'], 50);
223
-										?>
213
+                                            $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Howto & Style' ORDER BY rand() LIMIT 4");
214
+                                            $stmt->execute();
215
+                                            $result = $stmt->get_result();
216
+                                            while($video = $result->fetch_assoc()) {	
217
+                                                $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
218
+                                                $video['duration'] = $__time_h->timestamp($video['duration']);
219
+                                                $video['views'] = $__video_h->fetch_video_views($video['rid']);
220
+                                                $video['author'] = htmlspecialchars($video['author']);		
221
+                                                $video['title'] = htmlspecialchars($video['title']);
222
+                                                $video['description'] = $__video_h->shorten_description($video['description'], 50);
223
+                                        ?>
224 224
 										<div class="browse-item yt-tile-default ">
225 225
 											<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>
226 226
 											<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">
@@ -246,17 +246,17 @@  discard block
 block discarded – undo
246 246
 									</div>
247 247
                                     <div class="browse-item-row ytg-box">
248 248
 										<?php
249
-											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Howto & Style' ORDER BY rand() LIMIT 4");
250
-											$stmt->execute();
251
-											$result = $stmt->get_result();
252
-											while($video = $result->fetch_assoc()) {	
253
-												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
254
-												$video['duration'] = $__time_h->timestamp($video['duration']);
255
-												$video['views'] = $__video_h->fetch_video_views($video['rid']);
256
-												$video['author'] = htmlspecialchars($video['author']);		
257
-												$video['title'] = htmlspecialchars($video['title']);
258
-												$video['description'] = $__video_h->shorten_description($video['description'], 50);
259
-										?>
249
+                                            $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Howto & Style' ORDER BY rand() LIMIT 4");
250
+                                            $stmt->execute();
251
+                                            $result = $stmt->get_result();
252
+                                            while($video = $result->fetch_assoc()) {	
253
+                                                $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
254
+                                                $video['duration'] = $__time_h->timestamp($video['duration']);
255
+                                                $video['views'] = $__video_h->fetch_video_views($video['rid']);
256
+                                                $video['author'] = htmlspecialchars($video['author']);		
257
+                                                $video['title'] = htmlspecialchars($video['title']);
258
+                                                $video['description'] = $__video_h->shorten_description($video['description'], 50);
259
+                                        ?>
260 260
 										<div class="browse-item yt-tile-default ">
261 261
 											<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>
262 262
 											<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">
@@ -282,17 +282,17 @@  discard block
 block discarded – undo
282 282
 									</div>
283 283
                                     <div class="browse-item-row ytg-box">
284 284
 										<?php
285
-											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Howto & Style' ORDER BY rand() LIMIT 4");
286
-											$stmt->execute();
287
-											$result = $stmt->get_result();
288
-											while($video = $result->fetch_assoc()) {	
289
-												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
290
-												$video['duration'] = $__time_h->timestamp($video['duration']);
291
-												$video['views'] = $__video_h->fetch_video_views($video['rid']);
292
-												$video['author'] = htmlspecialchars($video['author']);		
293
-												$video['title'] = htmlspecialchars($video['title']);
294
-												$video['description'] = $__video_h->shorten_description($video['description'], 50);
295
-										?>
285
+                                            $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Howto & Style' ORDER BY rand() LIMIT 4");
286
+                                            $stmt->execute();
287
+                                            $result = $stmt->get_result();
288
+                                            while($video = $result->fetch_assoc()) {	
289
+                                                $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
290
+                                                $video['duration'] = $__time_h->timestamp($video['duration']);
291
+                                                $video['views'] = $__video_h->fetch_video_views($video['rid']);
292
+                                                $video['author'] = htmlspecialchars($video['author']);		
293
+                                                $video['title'] = htmlspecialchars($video['title']);
294
+                                                $video['description'] = $__video_h->shorten_description($video['description'], 50);
295
+                                        ?>
296 296
 										<div class="browse-item yt-tile-default ">
297 297
 											<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>
298 298
 											<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
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
 											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Howto & Style' ORDER BY rand() LIMIT 4");
142 142
 											$stmt->execute();
143 143
 											$result = $stmt->get_result();
144
-											while($video = $result->fetch_assoc()) {	
144
+											while ($video = $result->fetch_assoc()) {	
145 145
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
146 146
 												$video['duration'] = $__time_h->timestamp($video['duration']);
147 147
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
 											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Howto & Style' ORDER BY rand() LIMIT 4");
178 178
 											$stmt->execute();
179 179
 											$result = $stmt->get_result();
180
-											while($video = $result->fetch_assoc()) {	
180
+											while ($video = $result->fetch_assoc()) {	
181 181
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
182 182
 												$video['duration'] = $__time_h->timestamp($video['duration']);
183 183
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
 											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Howto & Style' ORDER BY rand() LIMIT 4");
214 214
 											$stmt->execute();
215 215
 											$result = $stmt->get_result();
216
-											while($video = $result->fetch_assoc()) {	
216
+											while ($video = $result->fetch_assoc()) {	
217 217
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
218 218
 												$video['duration'] = $__time_h->timestamp($video['duration']);
219 219
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
 											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Howto & Style' ORDER BY rand() LIMIT 4");
250 250
 											$stmt->execute();
251 251
 											$result = $stmt->get_result();
252
-											while($video = $result->fetch_assoc()) {	
252
+											while ($video = $result->fetch_assoc()) {	
253 253
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
254 254
 												$video['duration'] = $__time_h->timestamp($video['duration']);
255 255
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
 											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Howto & Style' ORDER BY rand() LIMIT 4");
286 286
 											$stmt->execute();
287 287
 											$result = $stmt->get_result();
288
-											while($video = $result->fetch_assoc()) {	
288
+											while ($video = $result->fetch_assoc()) {	
289 289
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
290 290
 												$video['duration'] = $__time_h->timestamp($video['duration']);
291 291
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
Please login to merge, or discard this patch.
my_videos.php 2 patches
Braces   +5 added lines, -4 removed lines patch added patch discarded remove patch
@@ -224,10 +224,11 @@
 block discarded – undo
224 224
                                                 $status = "Unknown";
225 225
                                             }                      
226 226
                                             
227
-                                            if($video['commenting'] == "a") 
228
-                                                $video['commentstatus'] = "Commenting allowed";
229
-                                            else 
230
-                                                $video['commentstatus'] = "Commenting disallowed";
227
+                                            if($video['commenting'] == "a") {
228
+                                                                                            $video['commentstatus'] = "Commenting allowed";
229
+                                            } else {
230
+                                                                                            $video['commentstatus'] = "Commenting disallowed";
231
+                                            }
231 232
                                     ?> 
232 233
                                     <tr style="margin-top: 5px;" id="videoslist">
233 234
                                         <td class="video-manager-left">
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
 <?php $__user_h = new user_helper($__db); ?>
11 11
 <?php $__db_h = new db_helper(); ?>
12 12
 <?php $__time_h = new time_helper(); ?>
13
-<?php if(!isset($_SESSION['siteusername'])) { header("Location: /sign_in"); } ?>
13
+<?php if (!isset($_SESSION['siteusername'])) { header("Location: /sign_in"); } ?>
14 14
 <!DOCTYPE html>
15 15
 <html dir="ltr">
16 16
 	<head>
@@ -170,15 +170,15 @@  discard block
 block discarded – undo
170 170
                                     $results = $result->num_rows;
171 171
 
172 172
                                     $number_of_result = $result->num_rows;
173
-                                    $number_of_page = ceil ($number_of_result / $results_per_page);  
173
+                                    $number_of_page = ceil($number_of_result/$results_per_page);  
174 174
 
175
-                                    if (!isset ($_GET['page']) ) {  
175
+                                    if (!isset ($_GET['page'])) {  
176 176
                                         $page = 1;  
177 177
                                     } else {  
178
-                                        $page = (int)$_GET['page'];  
178
+                                        $page = (int) $_GET['page'];  
179 179
                                     }  
180 180
 
181
-                                    $page_first_result = ($page - 1) * $results_per_page;  
181
+                                    $page_first_result = ($page - 1)*$results_per_page;  
182 182
 
183 183
                                     $stmt->close();
184 184
                                 ?>
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
                                     </tr>
205 205
                                     
206 206
                                     <?php
207
-                                        while($video = $result6->fetch_assoc()) { 
207
+                                        while ($video = $result6->fetch_assoc()) { 
208 208
                                             $video['video_responses'] = $__video_h->get_video_responses($video['rid']);
209 209
                                             $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
210 210
                                             $video['duration'] = $__time_h->timestamp($video['duration']);
@@ -213,19 +213,19 @@  discard block
 block discarded – undo
213 213
                                             $video['title'] = htmlspecialchars($video['title']);
214 214
                                             $video['description'] = $__video_h->shorten_description($video['description'], 50);
215 215
 
216
-                                            if($video['thumbnail'] == ".png" && $video['filename'] == ".mp4") {
216
+                                            if ($video['thumbnail'] == ".png" && $video['filename'] == ".mp4") {
217 217
                                                 $status = "Corrupted";
218
-                                            } else if($video['visibility'] == "v") {
218
+                                            } else if ($video['visibility'] == "v") {
219 219
                                                 $status = "Approved";
220
-                                            } else if($video['visibility'] == "n") {
220
+                                            } else if ($video['visibility'] == "n") {
221 221
                                                 $status = "Approved";
222
-                                            } else if($video['visibility'] == "o") {
222
+                                            } else if ($video['visibility'] == "o") {
223 223
                                                 $status = "Disapproved";
224 224
                                             } else {
225 225
                                                 $status = "Unknown";
226 226
                                             }                      
227 227
                                             
228
-                                            if($video['commenting'] == "a") 
228
+                                            if ($video['commenting'] == "a") 
229 229
                                                 $video['commentstatus'] = "Commenting allowed";
230 230
                                             else 
231 231
                                                 $video['commentstatus'] = "Commenting disallowed";
@@ -286,7 +286,7 @@  discard block
 block discarded – undo
286 286
                                     </div>
287 287
                                 </center>
288 288
 
289
-                                <?php for($page = 1; $page<= $number_of_page; $page++) { ?>
289
+                                <?php for ($page = 1; $page <= $number_of_page; $page++) { ?>
290 290
                                     <button class="yt-uix-button yt-uix-button-default" onclick="ajax_fetch_videomanager(<?php echo $page; ?>)"><?php echo $page; ?></button>
291 291
                                 <?php } ?>   
292 292
 
@@ -332,7 +332,7 @@  discard block
 block discarded – undo
332 332
                                 </script>
333 333
 
334 334
                                 <?php 
335
-                                    if($result6->num_rows == 0) { echo "
335
+                                    if ($result6->num_rows == 0) { echo "
336 336
                                         <br>Welcome to your Video Manager! You can manage your uploaded videos here.<br>
337 337
                                         <a href=\"upload_video\">
338 338
                                             <button type=\"button\" class=\" yt-uix-button yt-uix-button-default\" role=\"button\">
Please login to merge, or discard this patch.
film.php 2 patches
Indentation   +55 added lines, -55 removed lines patch added patch discarded remove patch
@@ -138,17 +138,17 @@  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 = 'Film & Animation' ORDER BY rand() LIMIT 4");
142
-											$stmt->execute();
143
-											$result = $stmt->get_result();
144
-											while($video = $result->fetch_assoc()) {	
145
-												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
146
-												$video['duration'] = $__time_h->timestamp($video['duration']);
147
-												$video['views'] = $__video_h->fetch_video_views($video['rid']);
148
-												$video['author'] = htmlspecialchars($video['author']);		
149
-												$video['title'] = htmlspecialchars($video['title']);
150
-												$video['description'] = $__video_h->shorten_description($video['description'], 50);
151
-										?>
141
+                                            $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Film & Animation' ORDER BY rand() LIMIT 4");
142
+                                            $stmt->execute();
143
+                                            $result = $stmt->get_result();
144
+                                            while($video = $result->fetch_assoc()) {	
145
+                                                $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
146
+                                                $video['duration'] = $__time_h->timestamp($video['duration']);
147
+                                                $video['views'] = $__video_h->fetch_video_views($video['rid']);
148
+                                                $video['author'] = htmlspecialchars($video['author']);		
149
+                                                $video['title'] = htmlspecialchars($video['title']);
150
+                                                $video['description'] = $__video_h->shorten_description($video['description'], 50);
151
+                                        ?>
152 152
 										<div class="browse-item yt-tile-default ">
153 153
 											<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>
154 154
 											<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">
@@ -174,17 +174,17 @@  discard block
 block discarded – undo
174 174
 									</div>
175 175
                                     <div class="browse-item-row ytg-box">
176 176
 										<?php
177
-											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Film & Animation' ORDER BY rand() LIMIT 4");
178
-											$stmt->execute();
179
-											$result = $stmt->get_result();
180
-											while($video = $result->fetch_assoc()) {	
181
-												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
182
-												$video['duration'] = $__time_h->timestamp($video['duration']);
183
-												$video['views'] = $__video_h->fetch_video_views($video['rid']);
184
-												$video['author'] = htmlspecialchars($video['author']);		
185
-												$video['title'] = htmlspecialchars($video['title']);
186
-												$video['description'] = $__video_h->shorten_description($video['description'], 50);
187
-										?>
177
+                                            $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Film & Animation' ORDER BY rand() LIMIT 4");
178
+                                            $stmt->execute();
179
+                                            $result = $stmt->get_result();
180
+                                            while($video = $result->fetch_assoc()) {	
181
+                                                $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
182
+                                                $video['duration'] = $__time_h->timestamp($video['duration']);
183
+                                                $video['views'] = $__video_h->fetch_video_views($video['rid']);
184
+                                                $video['author'] = htmlspecialchars($video['author']);		
185
+                                                $video['title'] = htmlspecialchars($video['title']);
186
+                                                $video['description'] = $__video_h->shorten_description($video['description'], 50);
187
+                                        ?>
188 188
 										<div class="browse-item yt-tile-default ">
189 189
 											<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>
190 190
 											<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">
@@ -210,17 +210,17 @@  discard block
 block discarded – undo
210 210
 									</div>
211 211
                                     <div class="browse-item-row ytg-box">
212 212
 										<?php
213
-											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Film & Animation' ORDER BY rand() LIMIT 4");
214
-											$stmt->execute();
215
-											$result = $stmt->get_result();
216
-											while($video = $result->fetch_assoc()) {	
217
-												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
218
-												$video['duration'] = $__time_h->timestamp($video['duration']);
219
-												$video['views'] = $__video_h->fetch_video_views($video['rid']);
220
-												$video['author'] = htmlspecialchars($video['author']);		
221
-												$video['title'] = htmlspecialchars($video['title']);
222
-												$video['description'] = $__video_h->shorten_description($video['description'], 50);
223
-										?>
213
+                                            $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Film & Animation' ORDER BY rand() LIMIT 4");
214
+                                            $stmt->execute();
215
+                                            $result = $stmt->get_result();
216
+                                            while($video = $result->fetch_assoc()) {	
217
+                                                $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
218
+                                                $video['duration'] = $__time_h->timestamp($video['duration']);
219
+                                                $video['views'] = $__video_h->fetch_video_views($video['rid']);
220
+                                                $video['author'] = htmlspecialchars($video['author']);		
221
+                                                $video['title'] = htmlspecialchars($video['title']);
222
+                                                $video['description'] = $__video_h->shorten_description($video['description'], 50);
223
+                                        ?>
224 224
 										<div class="browse-item yt-tile-default ">
225 225
 											<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>
226 226
 											<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">
@@ -246,17 +246,17 @@  discard block
 block discarded – undo
246 246
 									</div>
247 247
                                     <div class="browse-item-row ytg-box">
248 248
 										<?php
249
-											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Film & Animation' ORDER BY rand() LIMIT 4");
250
-											$stmt->execute();
251
-											$result = $stmt->get_result();
252
-											while($video = $result->fetch_assoc()) {	
253
-												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
254
-												$video['duration'] = $__time_h->timestamp($video['duration']);
255
-												$video['views'] = $__video_h->fetch_video_views($video['rid']);
256
-												$video['author'] = htmlspecialchars($video['author']);		
257
-												$video['title'] = htmlspecialchars($video['title']);
258
-												$video['description'] = $__video_h->shorten_description($video['description'], 50);
259
-										?>
249
+                                            $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Film & Animation' ORDER BY rand() LIMIT 4");
250
+                                            $stmt->execute();
251
+                                            $result = $stmt->get_result();
252
+                                            while($video = $result->fetch_assoc()) {	
253
+                                                $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
254
+                                                $video['duration'] = $__time_h->timestamp($video['duration']);
255
+                                                $video['views'] = $__video_h->fetch_video_views($video['rid']);
256
+                                                $video['author'] = htmlspecialchars($video['author']);		
257
+                                                $video['title'] = htmlspecialchars($video['title']);
258
+                                                $video['description'] = $__video_h->shorten_description($video['description'], 50);
259
+                                        ?>
260 260
 										<div class="browse-item yt-tile-default ">
261 261
 											<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>
262 262
 											<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">
@@ -282,17 +282,17 @@  discard block
 block discarded – undo
282 282
 									</div>
283 283
                                     <div class="browse-item-row ytg-box">
284 284
 										<?php
285
-											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Film & Animation' ORDER BY rand() LIMIT 4");
286
-											$stmt->execute();
287
-											$result = $stmt->get_result();
288
-											while($video = $result->fetch_assoc()) {	
289
-												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
290
-												$video['duration'] = $__time_h->timestamp($video['duration']);
291
-												$video['views'] = $__video_h->fetch_video_views($video['rid']);
292
-												$video['author'] = htmlspecialchars($video['author']);		
293
-												$video['title'] = htmlspecialchars($video['title']);
294
-												$video['description'] = $__video_h->shorten_description($video['description'], 50);
295
-										?>
285
+                                            $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Film & Animation' ORDER BY rand() LIMIT 4");
286
+                                            $stmt->execute();
287
+                                            $result = $stmt->get_result();
288
+                                            while($video = $result->fetch_assoc()) {	
289
+                                                $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
290
+                                                $video['duration'] = $__time_h->timestamp($video['duration']);
291
+                                                $video['views'] = $__video_h->fetch_video_views($video['rid']);
292
+                                                $video['author'] = htmlspecialchars($video['author']);		
293
+                                                $video['title'] = htmlspecialchars($video['title']);
294
+                                                $video['description'] = $__video_h->shorten_description($video['description'], 50);
295
+                                        ?>
296 296
 										<div class="browse-item yt-tile-default ">
297 297
 											<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>
298 298
 											<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
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
 											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Film & Animation' ORDER BY rand() LIMIT 4");
142 142
 											$stmt->execute();
143 143
 											$result = $stmt->get_result();
144
-											while($video = $result->fetch_assoc()) {	
144
+											while ($video = $result->fetch_assoc()) {	
145 145
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
146 146
 												$video['duration'] = $__time_h->timestamp($video['duration']);
147 147
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
 											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Film & Animation' ORDER BY rand() LIMIT 4");
178 178
 											$stmt->execute();
179 179
 											$result = $stmt->get_result();
180
-											while($video = $result->fetch_assoc()) {	
180
+											while ($video = $result->fetch_assoc()) {	
181 181
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
182 182
 												$video['duration'] = $__time_h->timestamp($video['duration']);
183 183
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
 											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Film & Animation' ORDER BY rand() LIMIT 4");
214 214
 											$stmt->execute();
215 215
 											$result = $stmt->get_result();
216
-											while($video = $result->fetch_assoc()) {	
216
+											while ($video = $result->fetch_assoc()) {	
217 217
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
218 218
 												$video['duration'] = $__time_h->timestamp($video['duration']);
219 219
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
 											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Film & Animation' ORDER BY rand() LIMIT 4");
250 250
 											$stmt->execute();
251 251
 											$result = $stmt->get_result();
252
-											while($video = $result->fetch_assoc()) {	
252
+											while ($video = $result->fetch_assoc()) {	
253 253
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
254 254
 												$video['duration'] = $__time_h->timestamp($video['duration']);
255 255
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
 											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Film & Animation' ORDER BY rand() LIMIT 4");
286 286
 											$stmt->execute();
287 287
 											$result = $stmt->get_result();
288
-											while($video = $result->fetch_assoc()) {	
288
+											while ($video = $result->fetch_assoc()) {	
289 289
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
290 290
 												$video['duration'] = $__time_h->timestamp($video['duration']);
291 291
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
Please login to merge, or discard this patch.
science.php 2 patches
Indentation   +55 added lines, -55 removed lines patch added patch discarded remove patch
@@ -138,17 +138,17 @@  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 = 'Science & Technology' ORDER BY rand() LIMIT 4");
142
-											$stmt->execute();
143
-											$result = $stmt->get_result();
144
-											while($video = $result->fetch_assoc()) {	
145
-												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
146
-												$video['duration'] = $__time_h->timestamp($video['duration']);
147
-												$video['views'] = $__video_h->fetch_video_views($video['rid']);
148
-												$video['author'] = htmlspecialchars($video['author']);		
149
-												$video['title'] = htmlspecialchars($video['title']);
150
-												$video['description'] = $__video_h->shorten_description($video['description'], 50);
151
-										?>
141
+                                            $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Science & Technology' ORDER BY rand() LIMIT 4");
142
+                                            $stmt->execute();
143
+                                            $result = $stmt->get_result();
144
+                                            while($video = $result->fetch_assoc()) {	
145
+                                                $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
146
+                                                $video['duration'] = $__time_h->timestamp($video['duration']);
147
+                                                $video['views'] = $__video_h->fetch_video_views($video['rid']);
148
+                                                $video['author'] = htmlspecialchars($video['author']);		
149
+                                                $video['title'] = htmlspecialchars($video['title']);
150
+                                                $video['description'] = $__video_h->shorten_description($video['description'], 50);
151
+                                        ?>
152 152
 										<div class="browse-item yt-tile-default ">
153 153
 											<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>
154 154
 											<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">
@@ -174,17 +174,17 @@  discard block
 block discarded – undo
174 174
 									</div>
175 175
                                     <div class="browse-item-row ytg-box">
176 176
 										<?php
177
-											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Science & Technology' ORDER BY rand() LIMIT 4");
178
-											$stmt->execute();
179
-											$result = $stmt->get_result();
180
-											while($video = $result->fetch_assoc()) {	
181
-												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
182
-												$video['duration'] = $__time_h->timestamp($video['duration']);
183
-												$video['views'] = $__video_h->fetch_video_views($video['rid']);
184
-												$video['author'] = htmlspecialchars($video['author']);		
185
-												$video['title'] = htmlspecialchars($video['title']);
186
-												$video['description'] = $__video_h->shorten_description($video['description'], 50);
187
-										?>
177
+                                            $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Science & Technology' ORDER BY rand() LIMIT 4");
178
+                                            $stmt->execute();
179
+                                            $result = $stmt->get_result();
180
+                                            while($video = $result->fetch_assoc()) {	
181
+                                                $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
182
+                                                $video['duration'] = $__time_h->timestamp($video['duration']);
183
+                                                $video['views'] = $__video_h->fetch_video_views($video['rid']);
184
+                                                $video['author'] = htmlspecialchars($video['author']);		
185
+                                                $video['title'] = htmlspecialchars($video['title']);
186
+                                                $video['description'] = $__video_h->shorten_description($video['description'], 50);
187
+                                        ?>
188 188
 										<div class="browse-item yt-tile-default ">
189 189
 											<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>
190 190
 											<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">
@@ -210,17 +210,17 @@  discard block
 block discarded – undo
210 210
 									</div>
211 211
                                     <div class="browse-item-row ytg-box">
212 212
 										<?php
213
-											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Science & Technology' ORDER BY rand() LIMIT 4");
214
-											$stmt->execute();
215
-											$result = $stmt->get_result();
216
-											while($video = $result->fetch_assoc()) {	
217
-												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
218
-												$video['duration'] = $__time_h->timestamp($video['duration']);
219
-												$video['views'] = $__video_h->fetch_video_views($video['rid']);
220
-												$video['author'] = htmlspecialchars($video['author']);		
221
-												$video['title'] = htmlspecialchars($video['title']);
222
-												$video['description'] = $__video_h->shorten_description($video['description'], 50);
223
-										?>
213
+                                            $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Science & Technology' ORDER BY rand() LIMIT 4");
214
+                                            $stmt->execute();
215
+                                            $result = $stmt->get_result();
216
+                                            while($video = $result->fetch_assoc()) {	
217
+                                                $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
218
+                                                $video['duration'] = $__time_h->timestamp($video['duration']);
219
+                                                $video['views'] = $__video_h->fetch_video_views($video['rid']);
220
+                                                $video['author'] = htmlspecialchars($video['author']);		
221
+                                                $video['title'] = htmlspecialchars($video['title']);
222
+                                                $video['description'] = $__video_h->shorten_description($video['description'], 50);
223
+                                        ?>
224 224
 										<div class="browse-item yt-tile-default ">
225 225
 											<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>
226 226
 											<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">
@@ -246,17 +246,17 @@  discard block
 block discarded – undo
246 246
 									</div>
247 247
                                     <div class="browse-item-row ytg-box">
248 248
 										<?php
249
-											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Science & Technology' ORDER BY rand() LIMIT 4");
250
-											$stmt->execute();
251
-											$result = $stmt->get_result();
252
-											while($video = $result->fetch_assoc()) {	
253
-												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
254
-												$video['duration'] = $__time_h->timestamp($video['duration']);
255
-												$video['views'] = $__video_h->fetch_video_views($video['rid']);
256
-												$video['author'] = htmlspecialchars($video['author']);		
257
-												$video['title'] = htmlspecialchars($video['title']);
258
-												$video['description'] = $__video_h->shorten_description($video['description'], 50);
259
-										?>
249
+                                            $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Science & Technology' ORDER BY rand() LIMIT 4");
250
+                                            $stmt->execute();
251
+                                            $result = $stmt->get_result();
252
+                                            while($video = $result->fetch_assoc()) {	
253
+                                                $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
254
+                                                $video['duration'] = $__time_h->timestamp($video['duration']);
255
+                                                $video['views'] = $__video_h->fetch_video_views($video['rid']);
256
+                                                $video['author'] = htmlspecialchars($video['author']);		
257
+                                                $video['title'] = htmlspecialchars($video['title']);
258
+                                                $video['description'] = $__video_h->shorten_description($video['description'], 50);
259
+                                        ?>
260 260
 										<div class="browse-item yt-tile-default ">
261 261
 											<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>
262 262
 											<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">
@@ -282,17 +282,17 @@  discard block
 block discarded – undo
282 282
 									</div>
283 283
                                     <div class="browse-item-row ytg-box">
284 284
 										<?php
285
-											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Science & Technology' ORDER BY rand() LIMIT 4");
286
-											$stmt->execute();
287
-											$result = $stmt->get_result();
288
-											while($video = $result->fetch_assoc()) {	
289
-												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
290
-												$video['duration'] = $__time_h->timestamp($video['duration']);
291
-												$video['views'] = $__video_h->fetch_video_views($video['rid']);
292
-												$video['author'] = htmlspecialchars($video['author']);		
293
-												$video['title'] = htmlspecialchars($video['title']);
294
-												$video['description'] = $__video_h->shorten_description($video['description'], 50);
295
-										?>
285
+                                            $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Science & Technology' ORDER BY rand() LIMIT 4");
286
+                                            $stmt->execute();
287
+                                            $result = $stmt->get_result();
288
+                                            while($video = $result->fetch_assoc()) {	
289
+                                                $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
290
+                                                $video['duration'] = $__time_h->timestamp($video['duration']);
291
+                                                $video['views'] = $__video_h->fetch_video_views($video['rid']);
292
+                                                $video['author'] = htmlspecialchars($video['author']);		
293
+                                                $video['title'] = htmlspecialchars($video['title']);
294
+                                                $video['description'] = $__video_h->shorten_description($video['description'], 50);
295
+                                        ?>
296 296
 										<div class="browse-item yt-tile-default ">
297 297
 											<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>
298 298
 											<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
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
 											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Science & Technology' ORDER BY rand() LIMIT 4");
142 142
 											$stmt->execute();
143 143
 											$result = $stmt->get_result();
144
-											while($video = $result->fetch_assoc()) {	
144
+											while ($video = $result->fetch_assoc()) {	
145 145
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
146 146
 												$video['duration'] = $__time_h->timestamp($video['duration']);
147 147
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
 											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Science & Technology' ORDER BY rand() LIMIT 4");
178 178
 											$stmt->execute();
179 179
 											$result = $stmt->get_result();
180
-											while($video = $result->fetch_assoc()) {	
180
+											while ($video = $result->fetch_assoc()) {	
181 181
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
182 182
 												$video['duration'] = $__time_h->timestamp($video['duration']);
183 183
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
 											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Science & Technology' ORDER BY rand() LIMIT 4");
214 214
 											$stmt->execute();
215 215
 											$result = $stmt->get_result();
216
-											while($video = $result->fetch_assoc()) {	
216
+											while ($video = $result->fetch_assoc()) {	
217 217
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
218 218
 												$video['duration'] = $__time_h->timestamp($video['duration']);
219 219
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
 											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Science & Technology' ORDER BY rand() LIMIT 4");
250 250
 											$stmt->execute();
251 251
 											$result = $stmt->get_result();
252
-											while($video = $result->fetch_assoc()) {	
252
+											while ($video = $result->fetch_assoc()) {	
253 253
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
254 254
 												$video['duration'] = $__time_h->timestamp($video['duration']);
255 255
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
 											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Science & Technology' ORDER BY rand() LIMIT 4");
286 286
 											$stmt->execute();
287 287
 											$result = $stmt->get_result();
288
-											while($video = $result->fetch_assoc()) {	
288
+											while ($video = $result->fetch_assoc()) {	
289 289
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
290 290
 												$video['duration'] = $__time_h->timestamp($video['duration']);
291 291
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
Please login to merge, or discard this patch.
videos.php 2 patches
Indentation   +88 added lines, -88 removed lines patch added patch discarded remove patch
@@ -138,17 +138,17 @@  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 ORDER BY rand() LIMIT 4");
142
-											$stmt->execute();
143
-											$result = $stmt->get_result();
144
-											while($video = $result->fetch_assoc()) {	
145
-												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
146
-												$video['duration'] = $__time_h->timestamp($video['duration']);
147
-												$video['views'] = $__video_h->fetch_video_views($video['rid']);
148
-												$video['author'] = htmlspecialchars($video['author']);		
149
-												$video['title'] = htmlspecialchars($video['title']);
150
-												$video['description'] = $__video_h->shorten_description($video['description'], 50);
151
-										?>
141
+                                            $stmt = $__db->prepare("SELECT * FROM videos ORDER BY rand() LIMIT 4");
142
+                                            $stmt->execute();
143
+                                            $result = $stmt->get_result();
144
+                                            while($video = $result->fetch_assoc()) {	
145
+                                                $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
146
+                                                $video['duration'] = $__time_h->timestamp($video['duration']);
147
+                                                $video['views'] = $__video_h->fetch_video_views($video['rid']);
148
+                                                $video['author'] = htmlspecialchars($video['author']);		
149
+                                                $video['title'] = htmlspecialchars($video['title']);
150
+                                                $video['description'] = $__video_h->shorten_description($video['description'], 50);
151
+                                        ?>
152 152
 										<div class="browse-item yt-tile-default ">
153 153
 											<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>
154 154
 											<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">
@@ -184,17 +184,17 @@  discard block
 block discarded – undo
184 184
 									</div>
185 185
 									<div class="browse-item-row ytg-box">
186 186
 										<?php
187
-											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Comedy' ORDER BY rand() LIMIT 4");
188
-											$stmt->execute();
189
-											$result = $stmt->get_result();
190
-											while($video = $result->fetch_assoc()) {	
191
-												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
192
-												$video['duration'] = $__time_h->timestamp($video['duration']);
193
-												$video['views'] = $__video_h->fetch_video_views($video['rid']);
194
-												$video['author'] = htmlspecialchars($video['author']);		
195
-												$video['title'] = htmlspecialchars($video['title']);
196
-												$video['description'] = $__video_h->shorten_description($video['description'], 50);
197
-										?>
187
+                                            $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Comedy' ORDER BY rand() LIMIT 4");
188
+                                            $stmt->execute();
189
+                                            $result = $stmt->get_result();
190
+                                            while($video = $result->fetch_assoc()) {	
191
+                                                $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
192
+                                                $video['duration'] = $__time_h->timestamp($video['duration']);
193
+                                                $video['views'] = $__video_h->fetch_video_views($video['rid']);
194
+                                                $video['author'] = htmlspecialchars($video['author']);		
195
+                                                $video['title'] = htmlspecialchars($video['title']);
196
+                                                $video['description'] = $__video_h->shorten_description($video['description'], 50);
197
+                                        ?>
198 198
 										<div class="browse-item yt-tile-default ">
199 199
 											<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>
200 200
 											<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">
@@ -230,17 +230,17 @@  discard block
 block discarded – undo
230 230
 									</div>
231 231
 									<div class="browse-item-row ytg-box">
232 232
 										<?php
233
-											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Film & Animation' ORDER BY rand() LIMIT 4");
234
-											$stmt->execute();
235
-											$result = $stmt->get_result();
236
-											while($video = $result->fetch_assoc()) {	
237
-												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
238
-												$video['duration'] = $__time_h->timestamp($video['duration']);
239
-												$video['views'] = $__video_h->fetch_video_views($video['rid']);
240
-												$video['author'] = htmlspecialchars($video['author']);		
241
-												$video['title'] = htmlspecialchars($video['title']);
242
-												$video['description'] = $__video_h->shorten_description($video['description'], 50);
243
-										?>
233
+                                            $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Film & Animation' ORDER BY rand() LIMIT 4");
234
+                                            $stmt->execute();
235
+                                            $result = $stmt->get_result();
236
+                                            while($video = $result->fetch_assoc()) {	
237
+                                                $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
238
+                                                $video['duration'] = $__time_h->timestamp($video['duration']);
239
+                                                $video['views'] = $__video_h->fetch_video_views($video['rid']);
240
+                                                $video['author'] = htmlspecialchars($video['author']);		
241
+                                                $video['title'] = htmlspecialchars($video['title']);
242
+                                                $video['description'] = $__video_h->shorten_description($video['description'], 50);
243
+                                        ?>
244 244
 										<div class="browse-item yt-tile-default ">
245 245
 											<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>
246 246
 											<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">
@@ -280,17 +280,17 @@  discard block
 block discarded – undo
280 280
 									</div>
281 281
 									<div class="browse-item-row ytg-box">
282 282
 										<?php
283
-											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Gaming' ORDER BY rand() LIMIT 4");
284
-											$stmt->execute();
285
-											$result = $stmt->get_result();
286
-											while($video = $result->fetch_assoc()) {	
287
-												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
288
-												$video['duration'] = $__time_h->timestamp($video['duration']);
289
-												$video['views'] = $__video_h->fetch_video_views($video['rid']);
290
-												$video['author'] = htmlspecialchars($video['author']);		
291
-												$video['title'] = htmlspecialchars($video['title']);
292
-												$video['description'] = $__video_h->shorten_description($video['description'], 50);
293
-										?>
283
+                                            $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Gaming' ORDER BY rand() LIMIT 4");
284
+                                            $stmt->execute();
285
+                                            $result = $stmt->get_result();
286
+                                            while($video = $result->fetch_assoc()) {	
287
+                                                $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
288
+                                                $video['duration'] = $__time_h->timestamp($video['duration']);
289
+                                                $video['views'] = $__video_h->fetch_video_views($video['rid']);
290
+                                                $video['author'] = htmlspecialchars($video['author']);		
291
+                                                $video['title'] = htmlspecialchars($video['title']);
292
+                                                $video['description'] = $__video_h->shorten_description($video['description'], 50);
293
+                                        ?>
294 294
 										<div class="browse-item yt-tile-default ">
295 295
 											<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>
296 296
 											<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">
@@ -330,17 +330,17 @@  discard block
 block discarded – undo
330 330
 									</div>
331 331
 									<div class="browse-item-row ytg-box">
332 332
 										<?php
333
-											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Nonprofits & Activism' ORDER BY rand() LIMIT 4");
334
-											$stmt->execute();
335
-											$result = $stmt->get_result();
336
-											while($video = $result->fetch_assoc()) {	
337
-												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
338
-												$video['duration'] = $__time_h->timestamp($video['duration']);
339
-												$video['views'] = $__video_h->fetch_video_views($video['rid']);
340
-												$video['author'] = htmlspecialchars($video['author']);		
341
-												$video['title'] = htmlspecialchars($video['title']);
342
-												$video['description'] = $__video_h->shorten_description($video['description'], 50);
343
-										?>
333
+                                            $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Nonprofits & Activism' ORDER BY rand() LIMIT 4");
334
+                                            $stmt->execute();
335
+                                            $result = $stmt->get_result();
336
+                                            while($video = $result->fetch_assoc()) {	
337
+                                                $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
338
+                                                $video['duration'] = $__time_h->timestamp($video['duration']);
339
+                                                $video['views'] = $__video_h->fetch_video_views($video['rid']);
340
+                                                $video['author'] = htmlspecialchars($video['author']);		
341
+                                                $video['title'] = htmlspecialchars($video['title']);
342
+                                                $video['description'] = $__video_h->shorten_description($video['description'], 50);
343
+                                        ?>
344 344
 										<div class="browse-item yt-tile-default ">
345 345
 											<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>
346 346
 											<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">
@@ -380,17 +380,17 @@  discard block
 block discarded – undo
380 380
 									</div>
381 381
 									<div class="browse-item-row ytg-box">
382 382
 										<?php
383
-											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Pets & Animals' ORDER BY rand() LIMIT 4");
384
-											$stmt->execute();
385
-											$result = $stmt->get_result();
386
-											while($video = $result->fetch_assoc()) {	
387
-												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
388
-												$video['duration'] = $__time_h->timestamp($video['duration']);
389
-												$video['views'] = $__video_h->fetch_video_views($video['rid']);
390
-												$video['author'] = htmlspecialchars($video['author']);		
391
-												$video['title'] = htmlspecialchars($video['title']);
392
-												$video['description'] = $__video_h->shorten_description($video['description'], 50);
393
-										?>
383
+                                            $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Pets & Animals' ORDER BY rand() LIMIT 4");
384
+                                            $stmt->execute();
385
+                                            $result = $stmt->get_result();
386
+                                            while($video = $result->fetch_assoc()) {	
387
+                                                $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
388
+                                                $video['duration'] = $__time_h->timestamp($video['duration']);
389
+                                                $video['views'] = $__video_h->fetch_video_views($video['rid']);
390
+                                                $video['author'] = htmlspecialchars($video['author']);		
391
+                                                $video['title'] = htmlspecialchars($video['title']);
392
+                                                $video['description'] = $__video_h->shorten_description($video['description'], 50);
393
+                                        ?>
394 394
 										<div class="browse-item yt-tile-default ">
395 395
 											<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>
396 396
 											<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">
@@ -430,17 +430,17 @@  discard block
 block discarded – undo
430 430
 									</div>
431 431
 									<div class="browse-item-row ytg-box">
432 432
 										<?php
433
-											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Science & Technology' ORDER BY rand() LIMIT 4");
434
-											$stmt->execute();
435
-											$result = $stmt->get_result();
436
-											while($video = $result->fetch_assoc()) {	
437
-												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
438
-												$video['duration'] = $__time_h->timestamp($video['duration']);
439
-												$video['views'] = $__video_h->fetch_video_views($video['rid']);
440
-												$video['author'] = htmlspecialchars($video['author']);		
441
-												$video['title'] = htmlspecialchars($video['title']);
442
-												$video['description'] = $__video_h->shorten_description($video['description'], 50);
443
-										?>
433
+                                            $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Science & Technology' ORDER BY rand() LIMIT 4");
434
+                                            $stmt->execute();
435
+                                            $result = $stmt->get_result();
436
+                                            while($video = $result->fetch_assoc()) {	
437
+                                                $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
438
+                                                $video['duration'] = $__time_h->timestamp($video['duration']);
439
+                                                $video['views'] = $__video_h->fetch_video_views($video['rid']);
440
+                                                $video['author'] = htmlspecialchars($video['author']);		
441
+                                                $video['title'] = htmlspecialchars($video['title']);
442
+                                                $video['description'] = $__video_h->shorten_description($video['description'], 50);
443
+                                        ?>
444 444
 										<div class="browse-item yt-tile-default ">
445 445
 											<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>
446 446
 											<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">
@@ -480,17 +480,17 @@  discard block
 block discarded – undo
480 480
 									</div>
481 481
 									<div class="browse-item-row ytg-box">
482 482
 										<?php
483
-											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Travel & Events' ORDER BY rand() LIMIT 4");
484
-											$stmt->execute();
485
-											$result = $stmt->get_result();
486
-											while($video = $result->fetch_assoc()) {	
487
-												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
488
-												$video['duration'] = $__time_h->timestamp($video['duration']);
489
-												$video['views'] = $__video_h->fetch_video_views($video['rid']);
490
-												$video['author'] = htmlspecialchars($video['author']);		
491
-												$video['title'] = htmlspecialchars($video['title']);
492
-												$video['description'] = $__video_h->shorten_description($video['description'], 50);
493
-										?>
483
+                                            $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Travel & Events' ORDER BY rand() LIMIT 4");
484
+                                            $stmt->execute();
485
+                                            $result = $stmt->get_result();
486
+                                            while($video = $result->fetch_assoc()) {	
487
+                                                $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
488
+                                                $video['duration'] = $__time_h->timestamp($video['duration']);
489
+                                                $video['views'] = $__video_h->fetch_video_views($video['rid']);
490
+                                                $video['author'] = htmlspecialchars($video['author']);		
491
+                                                $video['title'] = htmlspecialchars($video['title']);
492
+                                                $video['description'] = $__video_h->shorten_description($video['description'], 50);
493
+                                        ?>
494 494
 										<div class="browse-item yt-tile-default ">
495 495
 											<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>
496 496
 											<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   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
 											$stmt = $__db->prepare("SELECT * FROM videos ORDER BY rand() LIMIT 4");
142 142
 											$stmt->execute();
143 143
 											$result = $stmt->get_result();
144
-											while($video = $result->fetch_assoc()) {	
144
+											while ($video = $result->fetch_assoc()) {	
145 145
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
146 146
 												$video['duration'] = $__time_h->timestamp($video['duration']);
147 147
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
 											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Comedy' ORDER BY rand() LIMIT 4");
188 188
 											$stmt->execute();
189 189
 											$result = $stmt->get_result();
190
-											while($video = $result->fetch_assoc()) {	
190
+											while ($video = $result->fetch_assoc()) {	
191 191
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
192 192
 												$video['duration'] = $__time_h->timestamp($video['duration']);
193 193
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
 											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Film & Animation' ORDER BY rand() LIMIT 4");
234 234
 											$stmt->execute();
235 235
 											$result = $stmt->get_result();
236
-											while($video = $result->fetch_assoc()) {	
236
+											while ($video = $result->fetch_assoc()) {	
237 237
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
238 238
 												$video['duration'] = $__time_h->timestamp($video['duration']);
239 239
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
 											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Gaming' ORDER BY rand() LIMIT 4");
284 284
 											$stmt->execute();
285 285
 											$result = $stmt->get_result();
286
-											while($video = $result->fetch_assoc()) {	
286
+											while ($video = $result->fetch_assoc()) {	
287 287
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
288 288
 												$video['duration'] = $__time_h->timestamp($video['duration']);
289 289
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -333,7 +333,7 @@  discard block
 block discarded – undo
333 333
 											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Nonprofits & Activism' ORDER BY rand() LIMIT 4");
334 334
 											$stmt->execute();
335 335
 											$result = $stmt->get_result();
336
-											while($video = $result->fetch_assoc()) {	
336
+											while ($video = $result->fetch_assoc()) {	
337 337
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
338 338
 												$video['duration'] = $__time_h->timestamp($video['duration']);
339 339
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -383,7 +383,7 @@  discard block
 block discarded – undo
383 383
 											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Pets & Animals' ORDER BY rand() LIMIT 4");
384 384
 											$stmt->execute();
385 385
 											$result = $stmt->get_result();
386
-											while($video = $result->fetch_assoc()) {	
386
+											while ($video = $result->fetch_assoc()) {	
387 387
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
388 388
 												$video['duration'] = $__time_h->timestamp($video['duration']);
389 389
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -433,7 +433,7 @@  discard block
 block discarded – undo
433 433
 											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Science & Technology' ORDER BY rand() LIMIT 4");
434 434
 											$stmt->execute();
435 435
 											$result = $stmt->get_result();
436
-											while($video = $result->fetch_assoc()) {	
436
+											while ($video = $result->fetch_assoc()) {	
437 437
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
438 438
 												$video['duration'] = $__time_h->timestamp($video['duration']);
439 439
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -483,7 +483,7 @@  discard block
 block discarded – undo
483 483
 											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Travel & Events' ORDER BY rand() LIMIT 4");
484 484
 											$stmt->execute();
485 485
 											$result = $stmt->get_result();
486
-											while($video = $result->fetch_assoc()) {	
486
+											while ($video = $result->fetch_assoc()) {	
487 487
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
488 488
 												$video['duration'] = $__time_h->timestamp($video['duration']);
489 489
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
Please login to merge, or discard this patch.
entertainment.php 2 patches
Indentation   +55 added lines, -55 removed lines patch added patch discarded remove patch
@@ -138,17 +138,17 @@  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 = 'Entertainment' ORDER BY rand() LIMIT 4");
142
-											$stmt->execute();
143
-											$result = $stmt->get_result();
144
-											while($video = $result->fetch_assoc()) {	
145
-												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
146
-												$video['duration'] = $__time_h->timestamp($video['duration']);
147
-												$video['views'] = $__video_h->fetch_video_views($video['rid']);
148
-												$video['author'] = htmlspecialchars($video['author']);		
149
-												$video['title'] = htmlspecialchars($video['title']);
150
-												$video['description'] = $__video_h->shorten_description($video['description'], 50);
151
-										?>
141
+                                            $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Entertainment' ORDER BY rand() LIMIT 4");
142
+                                            $stmt->execute();
143
+                                            $result = $stmt->get_result();
144
+                                            while($video = $result->fetch_assoc()) {	
145
+                                                $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
146
+                                                $video['duration'] = $__time_h->timestamp($video['duration']);
147
+                                                $video['views'] = $__video_h->fetch_video_views($video['rid']);
148
+                                                $video['author'] = htmlspecialchars($video['author']);		
149
+                                                $video['title'] = htmlspecialchars($video['title']);
150
+                                                $video['description'] = $__video_h->shorten_description($video['description'], 50);
151
+                                        ?>
152 152
 										<div class="browse-item yt-tile-default ">
153 153
 											<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>
154 154
 											<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">
@@ -174,17 +174,17 @@  discard block
 block discarded – undo
174 174
 									</div>
175 175
                                     <div class="browse-item-row ytg-box">
176 176
 										<?php
177
-											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Entertainment' ORDER BY rand() LIMIT 4");
178
-											$stmt->execute();
179
-											$result = $stmt->get_result();
180
-											while($video = $result->fetch_assoc()) {	
181
-												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
182
-												$video['duration'] = $__time_h->timestamp($video['duration']);
183
-												$video['views'] = $__video_h->fetch_video_views($video['rid']);
184
-												$video['author'] = htmlspecialchars($video['author']);		
185
-												$video['title'] = htmlspecialchars($video['title']);
186
-												$video['description'] = $__video_h->shorten_description($video['description'], 50);
187
-										?>
177
+                                            $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Entertainment' ORDER BY rand() LIMIT 4");
178
+                                            $stmt->execute();
179
+                                            $result = $stmt->get_result();
180
+                                            while($video = $result->fetch_assoc()) {	
181
+                                                $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
182
+                                                $video['duration'] = $__time_h->timestamp($video['duration']);
183
+                                                $video['views'] = $__video_h->fetch_video_views($video['rid']);
184
+                                                $video['author'] = htmlspecialchars($video['author']);		
185
+                                                $video['title'] = htmlspecialchars($video['title']);
186
+                                                $video['description'] = $__video_h->shorten_description($video['description'], 50);
187
+                                        ?>
188 188
 										<div class="browse-item yt-tile-default ">
189 189
 											<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>
190 190
 											<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">
@@ -210,17 +210,17 @@  discard block
 block discarded – undo
210 210
 									</div>
211 211
                                     <div class="browse-item-row ytg-box">
212 212
 										<?php
213
-											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Entertainment' ORDER BY rand() LIMIT 4");
214
-											$stmt->execute();
215
-											$result = $stmt->get_result();
216
-											while($video = $result->fetch_assoc()) {	
217
-												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
218
-												$video['duration'] = $__time_h->timestamp($video['duration']);
219
-												$video['views'] = $__video_h->fetch_video_views($video['rid']);
220
-												$video['author'] = htmlspecialchars($video['author']);		
221
-												$video['title'] = htmlspecialchars($video['title']);
222
-												$video['description'] = $__video_h->shorten_description($video['description'], 50);
223
-										?>
213
+                                            $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Entertainment' ORDER BY rand() LIMIT 4");
214
+                                            $stmt->execute();
215
+                                            $result = $stmt->get_result();
216
+                                            while($video = $result->fetch_assoc()) {	
217
+                                                $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
218
+                                                $video['duration'] = $__time_h->timestamp($video['duration']);
219
+                                                $video['views'] = $__video_h->fetch_video_views($video['rid']);
220
+                                                $video['author'] = htmlspecialchars($video['author']);		
221
+                                                $video['title'] = htmlspecialchars($video['title']);
222
+                                                $video['description'] = $__video_h->shorten_description($video['description'], 50);
223
+                                        ?>
224 224
 										<div class="browse-item yt-tile-default ">
225 225
 											<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>
226 226
 											<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">
@@ -246,17 +246,17 @@  discard block
 block discarded – undo
246 246
 									</div>
247 247
                                     <div class="browse-item-row ytg-box">
248 248
 										<?php
249
-											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Entertainment' ORDER BY rand() LIMIT 4");
250
-											$stmt->execute();
251
-											$result = $stmt->get_result();
252
-											while($video = $result->fetch_assoc()) {	
253
-												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
254
-												$video['duration'] = $__time_h->timestamp($video['duration']);
255
-												$video['views'] = $__video_h->fetch_video_views($video['rid']);
256
-												$video['author'] = htmlspecialchars($video['author']);		
257
-												$video['title'] = htmlspecialchars($video['title']);
258
-												$video['description'] = $__video_h->shorten_description($video['description'], 50);
259
-										?>
249
+                                            $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Entertainment' ORDER BY rand() LIMIT 4");
250
+                                            $stmt->execute();
251
+                                            $result = $stmt->get_result();
252
+                                            while($video = $result->fetch_assoc()) {	
253
+                                                $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
254
+                                                $video['duration'] = $__time_h->timestamp($video['duration']);
255
+                                                $video['views'] = $__video_h->fetch_video_views($video['rid']);
256
+                                                $video['author'] = htmlspecialchars($video['author']);		
257
+                                                $video['title'] = htmlspecialchars($video['title']);
258
+                                                $video['description'] = $__video_h->shorten_description($video['description'], 50);
259
+                                        ?>
260 260
 										<div class="browse-item yt-tile-default ">
261 261
 											<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>
262 262
 											<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">
@@ -282,17 +282,17 @@  discard block
 block discarded – undo
282 282
 									</div>
283 283
                                     <div class="browse-item-row ytg-box">
284 284
 										<?php
285
-											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Entertainment' ORDER BY rand() LIMIT 4");
286
-											$stmt->execute();
287
-											$result = $stmt->get_result();
288
-											while($video = $result->fetch_assoc()) {	
289
-												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
290
-												$video['duration'] = $__time_h->timestamp($video['duration']);
291
-												$video['views'] = $__video_h->fetch_video_views($video['rid']);
292
-												$video['author'] = htmlspecialchars($video['author']);		
293
-												$video['title'] = htmlspecialchars($video['title']);
294
-												$video['description'] = $__video_h->shorten_description($video['description'], 50);
295
-										?>
285
+                                            $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Entertainment' ORDER BY rand() LIMIT 4");
286
+                                            $stmt->execute();
287
+                                            $result = $stmt->get_result();
288
+                                            while($video = $result->fetch_assoc()) {	
289
+                                                $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
290
+                                                $video['duration'] = $__time_h->timestamp($video['duration']);
291
+                                                $video['views'] = $__video_h->fetch_video_views($video['rid']);
292
+                                                $video['author'] = htmlspecialchars($video['author']);		
293
+                                                $video['title'] = htmlspecialchars($video['title']);
294
+                                                $video['description'] = $__video_h->shorten_description($video['description'], 50);
295
+                                        ?>
296 296
 										<div class="browse-item yt-tile-default ">
297 297
 											<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>
298 298
 											<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
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
 											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Entertainment' ORDER BY rand() LIMIT 4");
142 142
 											$stmt->execute();
143 143
 											$result = $stmt->get_result();
144
-											while($video = $result->fetch_assoc()) {	
144
+											while ($video = $result->fetch_assoc()) {	
145 145
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
146 146
 												$video['duration'] = $__time_h->timestamp($video['duration']);
147 147
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
 											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Entertainment' ORDER BY rand() LIMIT 4");
178 178
 											$stmt->execute();
179 179
 											$result = $stmt->get_result();
180
-											while($video = $result->fetch_assoc()) {	
180
+											while ($video = $result->fetch_assoc()) {	
181 181
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
182 182
 												$video['duration'] = $__time_h->timestamp($video['duration']);
183 183
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
 											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Entertainment' ORDER BY rand() LIMIT 4");
214 214
 											$stmt->execute();
215 215
 											$result = $stmt->get_result();
216
-											while($video = $result->fetch_assoc()) {	
216
+											while ($video = $result->fetch_assoc()) {	
217 217
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
218 218
 												$video['duration'] = $__time_h->timestamp($video['duration']);
219 219
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
 											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Entertainment' ORDER BY rand() LIMIT 4");
250 250
 											$stmt->execute();
251 251
 											$result = $stmt->get_result();
252
-											while($video = $result->fetch_assoc()) {	
252
+											while ($video = $result->fetch_assoc()) {	
253 253
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
254 254
 												$video['duration'] = $__time_h->timestamp($video['duration']);
255 255
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
 											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Entertainment' ORDER BY rand() LIMIT 4");
286 286
 											$stmt->execute();
287 287
 											$result = $stmt->get_result();
288
-											while($video = $result->fetch_assoc()) {	
288
+											while ($video = $result->fetch_assoc()) {	
289 289
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
290 290
 												$video['duration'] = $__time_h->timestamp($video['duration']);
291 291
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
Please login to merge, or discard this patch.
favorite_ajax.php 2 patches
Spacing   +15 added lines, -15 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 favorite_video WHERE sender = ? ORDER BY id DESC");
16 16
         $stmt->bind_param("s", $_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 favorite_video WHERE sender = ? ORDER BY title DESC");
22 22
         $stmt->bind_param("s", $_SESSION['siteusername']);
23 23
         $stmt->execute();
@@ -27,24 +27,24 @@  discard block
 block discarded – undo
27 27
 
28 28
     $results_per_page = 12;
29 29
     $number_of_result = $result->num_rows;
30
-    $number_of_page = ceil ($number_of_result / $results_per_page);  
30
+    $number_of_page = ceil($number_of_result/$results_per_page);  
31 31
 
32
-    if (!isset ($_GET['page']) ) {  
32
+    if (!isset ($_GET['page'])) {  
33 33
         $page = 1;  
34 34
     } else {  
35
-        $page = (int)$_GET['page'];  
35
+        $page = (int) $_GET['page'];  
36 36
     }  
37 37
 
38
-    $page_first_result = ($page - 1) * $results_per_page;  
38
+    $page_first_result = ($page - 1)*$results_per_page;  
39 39
 
40 40
     $stmt->close();
41 41
 
42
-    if($_GET['filter'] == "time") {
42
+    if ($_GET['filter'] == "time") {
43 43
         $stmt6 = $__db->prepare("SELECT * FROM favorite_video WHERE sender = ? ORDER BY id DESC LIMIT ?, ?");
44 44
         $stmt6->bind_param("sss", $search, $page_first_result, $results_per_page);
45 45
         $stmt6->execute();
46 46
         $result6 = $stmt6->get_result();
47
-    } else if($_GET['filter'] == "title") {
47
+    } else if ($_GET['filter'] == "title") {
48 48
         $stmt6 = $__db->prepare("SELECT * FROM favorite_video WHERE sender = ? ORDER BY title LIMIT ?, ?");
49 49
         $stmt6->bind_param("sss", $search, $page_first_result, $results_per_page);
50 50
         $stmt6->execute();
@@ -60,8 +60,8 @@  discard block
 block discarded – undo
60 60
     </tr>
61 61
     
62 62
     <?php
63
-        while($video = $result6->fetch_assoc()) { 
64
-            if($__video_h->video_exists($video['reciever'])) {
63
+        while ($video = $result6->fetch_assoc()) { 
64
+            if ($__video_h->video_exists($video['reciever'])) {
65 65
                 $_video = $__video_h->fetch_video_rid($video['reciever']);
66 66
                 $_video['video_responses'] = $__video_h->get_video_responses($_video['rid']);
67 67
                 $_video['age'] = $__time_h->time_elapsed_string($_video['publish']);		
@@ -71,19 +71,19 @@  discard block
 block discarded – undo
71 71
                 $_video['title'] = htmlspecialchars($_video['title']);
72 72
                 $_video['description'] = $__video_h->shorten_description($_video['description'], 50);
73 73
 
74
-                if($_video['thumbnail'] == ".png" && $_video['filename'] == ".mp4") {
74
+                if ($_video['thumbnail'] == ".png" && $_video['filename'] == ".mp4") {
75 75
                     $status = "Corrupted";
76
-                } else if($_video['visibility'] == "v") {
76
+                } else if ($_video['visibility'] == "v") {
77 77
                     $status = "Approved";
78
-                } else if($_video['visibility'] == "n") {
78
+                } else if ($_video['visibility'] == "n") {
79 79
                     $status = "Approved";
80
-                } else if($_video['visibility'] == "o") {
80
+                } else if ($_video['visibility'] == "o") {
81 81
                     $status = "Disapproved";
82 82
                 } else {
83 83
                     $status = "Unknown";
84 84
                 }                      
85 85
                 
86
-                if($_video['commenting'] == "a") 
86
+                if ($_video['commenting'] == "a") 
87 87
                     $_video['commentstatus'] = "Commenting allowed";
88 88
                 else 
89 89
                     $_video['commentstatus'] = "Commenting disallowed";
Please login to merge, or discard this patch.
Braces   +5 added lines, -4 removed lines patch added patch discarded remove patch
@@ -83,10 +83,11 @@
 block discarded – undo
83 83
                     $status = "Unknown";
84 84
                 }                      
85 85
                 
86
-                if($_video['commenting'] == "a") 
87
-                    $_video['commentstatus'] = "Commenting allowed";
88
-                else 
89
-                    $_video['commentstatus'] = "Commenting disallowed";
86
+                if($_video['commenting'] == "a") {
87
+                                    $_video['commentstatus'] = "Commenting allowed";
88
+                } else {
89
+                                    $_video['commentstatus'] = "Commenting disallowed";
90
+                }
90 91
     ?> 
91 92
     <tr style="margin-top: 5px;" id="videoslist">
92 93
         <td class="video-manager-left">
Please login to merge, or discard this patch.
recommended.php 2 patches
Indentation   +55 added lines, -55 removed lines patch added patch discarded remove patch
@@ -138,17 +138,17 @@  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 ORDER BY rand() LIMIT 4");
142
-											$stmt->execute();
143
-											$result = $stmt->get_result();
144
-											while($video = $result->fetch_assoc()) {	
145
-												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
146
-												$video['duration'] = $__time_h->timestamp($video['duration']);
147
-												$video['views'] = $__video_h->fetch_video_views($video['rid']);
148
-												$video['author'] = htmlspecialchars($video['author']);		
149
-												$video['title'] = htmlspecialchars($video['title']);
150
-												$video['description'] = $__video_h->shorten_description($video['description'], 50);
151
-										?>
141
+                                            $stmt = $__db->prepare("SELECT * FROM videos ORDER BY rand() LIMIT 4");
142
+                                            $stmt->execute();
143
+                                            $result = $stmt->get_result();
144
+                                            while($video = $result->fetch_assoc()) {	
145
+                                                $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
146
+                                                $video['duration'] = $__time_h->timestamp($video['duration']);
147
+                                                $video['views'] = $__video_h->fetch_video_views($video['rid']);
148
+                                                $video['author'] = htmlspecialchars($video['author']);		
149
+                                                $video['title'] = htmlspecialchars($video['title']);
150
+                                                $video['description'] = $__video_h->shorten_description($video['description'], 50);
151
+                                        ?>
152 152
 										<div class="browse-item yt-tile-default ">
153 153
 											<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>
154 154
 											<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">
@@ -174,17 +174,17 @@  discard block
 block discarded – undo
174 174
 									</div>
175 175
                                     <div class="browse-item-row ytg-box">
176 176
 										<?php
177
-											$stmt = $__db->prepare("SELECT * FROM videos ORDER BY rand() LIMIT 4");
178
-											$stmt->execute();
179
-											$result = $stmt->get_result();
180
-											while($video = $result->fetch_assoc()) {	
181
-												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
182
-												$video['duration'] = $__time_h->timestamp($video['duration']);
183
-												$video['views'] = $__video_h->fetch_video_views($video['rid']);
184
-												$video['author'] = htmlspecialchars($video['author']);		
185
-												$video['title'] = htmlspecialchars($video['title']);
186
-												$video['description'] = $__video_h->shorten_description($video['description'], 50);
187
-										?>
177
+                                            $stmt = $__db->prepare("SELECT * FROM videos ORDER BY rand() LIMIT 4");
178
+                                            $stmt->execute();
179
+                                            $result = $stmt->get_result();
180
+                                            while($video = $result->fetch_assoc()) {	
181
+                                                $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
182
+                                                $video['duration'] = $__time_h->timestamp($video['duration']);
183
+                                                $video['views'] = $__video_h->fetch_video_views($video['rid']);
184
+                                                $video['author'] = htmlspecialchars($video['author']);		
185
+                                                $video['title'] = htmlspecialchars($video['title']);
186
+                                                $video['description'] = $__video_h->shorten_description($video['description'], 50);
187
+                                        ?>
188 188
 										<div class="browse-item yt-tile-default ">
189 189
 											<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>
190 190
 											<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">
@@ -210,17 +210,17 @@  discard block
 block discarded – undo
210 210
 									</div>
211 211
                                     <div class="browse-item-row ytg-box">
212 212
 										<?php
213
-											$stmt = $__db->prepare("SELECT * FROM videos ORDER BY rand() LIMIT 4");
214
-											$stmt->execute();
215
-											$result = $stmt->get_result();
216
-											while($video = $result->fetch_assoc()) {	
217
-												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
218
-												$video['duration'] = $__time_h->timestamp($video['duration']);
219
-												$video['views'] = $__video_h->fetch_video_views($video['rid']);
220
-												$video['author'] = htmlspecialchars($video['author']);		
221
-												$video['title'] = htmlspecialchars($video['title']);
222
-												$video['description'] = $__video_h->shorten_description($video['description'], 50);
223
-										?>
213
+                                            $stmt = $__db->prepare("SELECT * FROM videos ORDER BY rand() LIMIT 4");
214
+                                            $stmt->execute();
215
+                                            $result = $stmt->get_result();
216
+                                            while($video = $result->fetch_assoc()) {	
217
+                                                $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
218
+                                                $video['duration'] = $__time_h->timestamp($video['duration']);
219
+                                                $video['views'] = $__video_h->fetch_video_views($video['rid']);
220
+                                                $video['author'] = htmlspecialchars($video['author']);		
221
+                                                $video['title'] = htmlspecialchars($video['title']);
222
+                                                $video['description'] = $__video_h->shorten_description($video['description'], 50);
223
+                                        ?>
224 224
 										<div class="browse-item yt-tile-default ">
225 225
 											<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>
226 226
 											<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">
@@ -246,17 +246,17 @@  discard block
 block discarded – undo
246 246
 									</div>
247 247
                                     <div class="browse-item-row ytg-box">
248 248
 										<?php
249
-											$stmt = $__db->prepare("SELECT * FROM videos ORDER BY rand() LIMIT 4");
250
-											$stmt->execute();
251
-											$result = $stmt->get_result();
252
-											while($video = $result->fetch_assoc()) {	
253
-												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
254
-												$video['duration'] = $__time_h->timestamp($video['duration']);
255
-												$video['views'] = $__video_h->fetch_video_views($video['rid']);
256
-												$video['author'] = htmlspecialchars($video['author']);		
257
-												$video['title'] = htmlspecialchars($video['title']);
258
-												$video['description'] = $__video_h->shorten_description($video['description'], 50);
259
-										?>
249
+                                            $stmt = $__db->prepare("SELECT * FROM videos ORDER BY rand() LIMIT 4");
250
+                                            $stmt->execute();
251
+                                            $result = $stmt->get_result();
252
+                                            while($video = $result->fetch_assoc()) {	
253
+                                                $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
254
+                                                $video['duration'] = $__time_h->timestamp($video['duration']);
255
+                                                $video['views'] = $__video_h->fetch_video_views($video['rid']);
256
+                                                $video['author'] = htmlspecialchars($video['author']);		
257
+                                                $video['title'] = htmlspecialchars($video['title']);
258
+                                                $video['description'] = $__video_h->shorten_description($video['description'], 50);
259
+                                        ?>
260 260
 										<div class="browse-item yt-tile-default ">
261 261
 											<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>
262 262
 											<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">
@@ -282,17 +282,17 @@  discard block
 block discarded – undo
282 282
 									</div>
283 283
                                     <div class="browse-item-row ytg-box">
284 284
 										<?php
285
-											$stmt = $__db->prepare("SELECT * FROM videos ORDER BY rand() LIMIT 4");
286
-											$stmt->execute();
287
-											$result = $stmt->get_result();
288
-											while($video = $result->fetch_assoc()) {	
289
-												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
290
-												$video['duration'] = $__time_h->timestamp($video['duration']);
291
-												$video['views'] = $__video_h->fetch_video_views($video['rid']);
292
-												$video['author'] = htmlspecialchars($video['author']);		
293
-												$video['title'] = htmlspecialchars($video['title']);
294
-												$video['description'] = $__video_h->shorten_description($video['description'], 50);
295
-										?>
285
+                                            $stmt = $__db->prepare("SELECT * FROM videos ORDER BY rand() LIMIT 4");
286
+                                            $stmt->execute();
287
+                                            $result = $stmt->get_result();
288
+                                            while($video = $result->fetch_assoc()) {	
289
+                                                $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
290
+                                                $video['duration'] = $__time_h->timestamp($video['duration']);
291
+                                                $video['views'] = $__video_h->fetch_video_views($video['rid']);
292
+                                                $video['author'] = htmlspecialchars($video['author']);		
293
+                                                $video['title'] = htmlspecialchars($video['title']);
294
+                                                $video['description'] = $__video_h->shorten_description($video['description'], 50);
295
+                                        ?>
296 296
 										<div class="browse-item yt-tile-default ">
297 297
 											<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>
298 298
 											<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
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
 											$stmt = $__db->prepare("SELECT * FROM videos ORDER BY rand() LIMIT 4");
142 142
 											$stmt->execute();
143 143
 											$result = $stmt->get_result();
144
-											while($video = $result->fetch_assoc()) {	
144
+											while ($video = $result->fetch_assoc()) {	
145 145
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
146 146
 												$video['duration'] = $__time_h->timestamp($video['duration']);
147 147
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
 											$stmt = $__db->prepare("SELECT * FROM videos ORDER BY rand() LIMIT 4");
178 178
 											$stmt->execute();
179 179
 											$result = $stmt->get_result();
180
-											while($video = $result->fetch_assoc()) {	
180
+											while ($video = $result->fetch_assoc()) {	
181 181
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
182 182
 												$video['duration'] = $__time_h->timestamp($video['duration']);
183 183
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
 											$stmt = $__db->prepare("SELECT * FROM videos ORDER BY rand() LIMIT 4");
214 214
 											$stmt->execute();
215 215
 											$result = $stmt->get_result();
216
-											while($video = $result->fetch_assoc()) {	
216
+											while ($video = $result->fetch_assoc()) {	
217 217
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
218 218
 												$video['duration'] = $__time_h->timestamp($video['duration']);
219 219
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
 											$stmt = $__db->prepare("SELECT * FROM videos ORDER BY rand() LIMIT 4");
250 250
 											$stmt->execute();
251 251
 											$result = $stmt->get_result();
252
-											while($video = $result->fetch_assoc()) {	
252
+											while ($video = $result->fetch_assoc()) {	
253 253
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
254 254
 												$video['duration'] = $__time_h->timestamp($video['duration']);
255 255
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
 											$stmt = $__db->prepare("SELECT * FROM videos ORDER BY rand() LIMIT 4");
286 286
 											$stmt->execute();
287 287
 											$result = $stmt->get_result();
288
-											while($video = $result->fetch_assoc()) {	
288
+											while ($video = $result->fetch_assoc()) {	
289 289
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
290 290
 												$video['duration'] = $__time_h->timestamp($video['duration']);
291 291
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
Please login to merge, or discard this patch.