Passed
Push — main ( fcdcda...b78c1f )
by chief
02:32
created
video_manager_ajax.php 1 patch
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.
howto.php 1 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.
film.php 1 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 1 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 1 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 1 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 1 patch
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.
recommended.php 1 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.
activism.php 1 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 = 'Nonprofits & Activism' 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 = 'Nonprofits & Activism' 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 = 'Nonprofits & Activism' 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 = 'Nonprofits & Activism' 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 = 'Nonprofits & Activism' 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.