Passed
Push — main ( 17bea0...d9df25 )
by chief
02:43
created
science.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
 										<?php
141 141
 											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Science & Technology' ORDER BY rand() LIMIT 4");
142 142
 											$stmt->execute();
143
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
143
+											while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
144 144
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
145 145
 												$video['duration'] = $__time_h->timestamp($video['duration']);
146 146
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
 										<?php
176 176
 											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Science & Technology' ORDER BY rand() LIMIT 4");
177 177
 											$stmt->execute();
178
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
178
+											while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
179 179
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
180 180
 												$video['duration'] = $__time_h->timestamp($video['duration']);
181 181
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
 										<?php
211 211
 											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Science & Technology' ORDER BY rand() LIMIT 4");
212 212
 											$stmt->execute();
213
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
213
+											while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
214 214
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
215 215
 												$video['duration'] = $__time_h->timestamp($video['duration']);
216 216
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
 										<?php
246 246
 											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Science & Technology' ORDER BY rand() LIMIT 4");
247 247
 											$stmt->execute();
248
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
248
+											while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
249 249
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
250 250
 												$video['duration'] = $__time_h->timestamp($video['duration']);
251 251
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -280,7 +280,7 @@  discard block
 block discarded – undo
280 280
 										<?php
281 281
 											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Science & Technology' ORDER BY rand() LIMIT 4");
282 282
 											$stmt->execute();
283
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
283
+											while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
284 284
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
285 285
 												$video['duration'] = $__time_h->timestamp($video['duration']);
286 286
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
Please login to merge, or discard this patch.
videos.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
 										<?php
141 141
 											$stmt = $__db->prepare("SELECT * FROM videos ORDER BY rand() LIMIT 4");
142 142
 											$stmt->execute();
143
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
143
+											while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
144 144
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
145 145
 												$video['duration'] = $__time_h->timestamp($video['duration']);
146 146
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
 										<?php
186 186
 											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Comedy' ORDER BY rand() LIMIT 4");
187 187
 											$stmt->execute();
188
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
188
+											while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
189 189
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
190 190
 												$video['duration'] = $__time_h->timestamp($video['duration']);
191 191
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
 										<?php
231 231
 											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Film & Animation' ORDER BY rand() LIMIT 4");
232 232
 											$stmt->execute();
233
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
233
+											while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
234 234
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
235 235
 												$video['duration'] = $__time_h->timestamp($video['duration']);
236 236
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
 										<?php
280 280
 											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Gaming' ORDER BY rand() LIMIT 4");
281 281
 											$stmt->execute();
282
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
282
+											while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
283 283
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
284 284
 												$video['duration'] = $__time_h->timestamp($video['duration']);
285 285
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -328,7 +328,7 @@  discard block
 block discarded – undo
328 328
 										<?php
329 329
 											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Nonprofits & Activism' ORDER BY rand() LIMIT 4");
330 330
 											$stmt->execute();
331
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
331
+											while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
332 332
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
333 333
 												$video['duration'] = $__time_h->timestamp($video['duration']);
334 334
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -377,7 +377,7 @@  discard block
 block discarded – undo
377 377
 										<?php
378 378
 											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Pets & Animals' ORDER BY rand() LIMIT 4");
379 379
 											$stmt->execute();
380
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
380
+											while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
381 381
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
382 382
 												$video['duration'] = $__time_h->timestamp($video['duration']);
383 383
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -426,7 +426,7 @@  discard block
 block discarded – undo
426 426
 										<?php
427 427
 											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Science & Technology' ORDER BY rand() LIMIT 4");
428 428
 											$stmt->execute();
429
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
429
+											while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
430 430
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
431 431
 												$video['duration'] = $__time_h->timestamp($video['duration']);
432 432
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -475,7 +475,7 @@  discard block
 block discarded – undo
475 475
 										<?php
476 476
 											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Travel & Events' ORDER BY rand() LIMIT 4");
477 477
 											$stmt->execute();
478
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
478
+											while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
479 479
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
480 480
 												$video['duration'] = $__time_h->timestamp($video['duration']);
481 481
 												$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
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
 										<?php
141 141
 											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Entertainment' ORDER BY rand() LIMIT 4");
142 142
 											$stmt->execute();
143
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
143
+											while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
144 144
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
145 145
 												$video['duration'] = $__time_h->timestamp($video['duration']);
146 146
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
 										<?php
176 176
 											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Entertainment' ORDER BY rand() LIMIT 4");
177 177
 											$stmt->execute();
178
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
178
+											while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
179 179
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
180 180
 												$video['duration'] = $__time_h->timestamp($video['duration']);
181 181
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
 										<?php
211 211
 											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Entertainment' ORDER BY rand() LIMIT 4");
212 212
 											$stmt->execute();
213
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
213
+											while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
214 214
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
215 215
 												$video['duration'] = $__time_h->timestamp($video['duration']);
216 216
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
 										<?php
246 246
 											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Entertainment' ORDER BY rand() LIMIT 4");
247 247
 											$stmt->execute();
248
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
248
+											while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
249 249
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
250 250
 												$video['duration'] = $__time_h->timestamp($video['duration']);
251 251
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -280,7 +280,7 @@  discard block
 block discarded – undo
280 280
 										<?php
281 281
 											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Entertainment' ORDER BY rand() LIMIT 4");
282 282
 											$stmt->execute();
283
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
283
+											while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
284 284
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
285 285
 												$video['duration'] = $__time_h->timestamp($video['duration']);
286 286
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
Please login to merge, or discard this patch.
favorite_ajax.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -11,11 +11,11 @@  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 = :username ORDER BY id DESC");
16 16
         $stmt->bindParam(":username", $_SESSION['siteusername']);
17 17
         $stmt->execute();
18
-    } else if($_GET['filter'] == "title") {
18
+    } else if ($_GET['filter'] == "title") {
19 19
         $stmt = $__db->prepare("SELECT * FROM favorite_video WHERE sender = :username ORDER BY title DESC");
20 20
         $stmt->bindParam(":username", $_SESSION['siteusername']);
21 21
         $stmt->execute();
@@ -23,23 +23,23 @@  discard block
 block discarded – undo
23 23
 
24 24
     $results_per_page = 12;
25 25
     $number_of_result = $stmt->rowCount();
26
-    $number_of_page = ceil ($number_of_result / $results_per_page);  
26
+    $number_of_page = ceil($number_of_result/$results_per_page);  
27 27
 
28
-    if (!isset ($_GET['page']) ) {  
28
+    if (!isset ($_GET['page'])) {  
29 29
         $page = 1;  
30 30
     } else {  
31
-        $page = (int)$_GET['page'];  
31
+        $page = (int) $_GET['page'];  
32 32
     }  
33 33
 
34
-    $page_first_result = ($page - 1) * $results_per_page;
34
+    $page_first_result = ($page - 1)*$results_per_page;
35 35
 
36
-    if($_GET['filter'] == "time") {
36
+    if ($_GET['filter'] == "time") {
37 37
         $stmt6 = $__db->prepare("SELECT * FROM favorite_video WHERE sender = :search ORDER BY id DESC LIMIT :pfirst, :pper");
38 38
         $stmt6->bindParam(":search", $search);
39 39
         $stmt6->bindParam(":pfirst", $page_first_result);
40 40
         $stmt6->bindParam(":pper", $results_per_page);
41 41
         $stmt6->execute();
42
-    } else if($_GET['filter'] == "title") {
42
+    } else if ($_GET['filter'] == "title") {
43 43
         $stmt6 = $__db->prepare("SELECT * FROM favorite_video WHERE sender = :search ORDER BY title LIMIT :pfirst, :pper");
44 44
         $stmt6->bindParam(":search", $search);
45 45
         $stmt6->bindParam(":pfirst", $page_first_result);
@@ -56,8 +56,8 @@  discard block
 block discarded – undo
56 56
     </tr>
57 57
     
58 58
     <?php
59
-        while($video = $stmt6->fetch(PDO::FETCH_ASSOC)) { 
60
-            if($__video_h->video_exists($video['reciever'])) {
59
+        while ($video = $stmt6->fetch(PDO::FETCH_ASSOC)) { 
60
+            if ($__video_h->video_exists($video['reciever'])) {
61 61
                 $_video = $__video_h->fetch_video_rid($video['reciever']);
62 62
                 $_video['video_responses'] = $__video_h->get_video_responses($_video['rid']);
63 63
                 $_video['age'] = $__time_h->time_elapsed_string($_video['publish']);		
@@ -67,19 +67,19 @@  discard block
 block discarded – undo
67 67
                 $_video['title'] = htmlspecialchars($_video['title']);
68 68
                 $_video['description'] = $__video_h->shorten_description($_video['description'], 50);
69 69
 
70
-                if($_video['thumbnail'] == ".png" && $_video['filename'] == ".mp4") {
70
+                if ($_video['thumbnail'] == ".png" && $_video['filename'] == ".mp4") {
71 71
                     $status = "Corrupted";
72
-                } else if($_video['visibility'] == "v") {
72
+                } else if ($_video['visibility'] == "v") {
73 73
                     $status = "Approved";
74
-                } else if($_video['visibility'] == "n") {
74
+                } else if ($_video['visibility'] == "n") {
75 75
                     $status = "Approved";
76
-                } else if($_video['visibility'] == "o") {
76
+                } else if ($_video['visibility'] == "o") {
77 77
                     $status = "Disapproved";
78 78
                 } else {
79 79
                     $status = "Unknown";
80 80
                 }                      
81 81
                 
82
-                if($_video['commenting'] == "a") 
82
+                if ($_video['commenting'] == "a") 
83 83
                     $_video['commentstatus'] = "Commenting allowed";
84 84
                 else 
85 85
                     $_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
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
 										<?php
141 141
 											$stmt = $__db->prepare("SELECT * FROM videos ORDER BY rand() LIMIT 4");
142 142
 											$stmt->execute();
143
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
143
+											while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
144 144
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
145 145
 												$video['duration'] = $__time_h->timestamp($video['duration']);
146 146
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
 										<?php
176 176
 											$stmt = $__db->prepare("SELECT * FROM videos ORDER BY rand() LIMIT 4");
177 177
 											$stmt->execute();
178
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
178
+											while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
179 179
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
180 180
 												$video['duration'] = $__time_h->timestamp($video['duration']);
181 181
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
 										<?php
211 211
 											$stmt = $__db->prepare("SELECT * FROM videos ORDER BY rand() LIMIT 4");
212 212
 											$stmt->execute();
213
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
213
+											while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
214 214
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
215 215
 												$video['duration'] = $__time_h->timestamp($video['duration']);
216 216
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
 										<?php
246 246
 											$stmt = $__db->prepare("SELECT * FROM videos ORDER BY rand() LIMIT 4");
247 247
 											$stmt->execute();
248
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
248
+											while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
249 249
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
250 250
 												$video['duration'] = $__time_h->timestamp($video['duration']);
251 251
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -280,7 +280,7 @@  discard block
 block discarded – undo
280 280
 										<?php
281 281
 											$stmt = $__db->prepare("SELECT * FROM videos ORDER BY rand() LIMIT 4");
282 282
 											$stmt->execute();
283
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
283
+											while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
284 284
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
285 285
 												$video['duration'] = $__time_h->timestamp($video['duration']);
286 286
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
Please login to merge, or discard this patch.
activism.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
 										<?php
141 141
 											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Nonprofits & Activism' ORDER BY rand() LIMIT 4");
142 142
 											$stmt->execute();
143
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
143
+											while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
144 144
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
145 145
 												$video['duration'] = $__time_h->timestamp($video['duration']);
146 146
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
 										<?php
176 176
 											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Nonprofits & Activism' ORDER BY rand() LIMIT 4");
177 177
 											$stmt->execute();
178
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
178
+											while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
179 179
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
180 180
 												$video['duration'] = $__time_h->timestamp($video['duration']);
181 181
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
 										<?php
211 211
 											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Nonprofits & Activism' ORDER BY rand() LIMIT 4");
212 212
 											$stmt->execute();
213
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
213
+											while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
214 214
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
215 215
 												$video['duration'] = $__time_h->timestamp($video['duration']);
216 216
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
 										<?php
246 246
 											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Nonprofits & Activism' ORDER BY rand() LIMIT 4");
247 247
 											$stmt->execute();
248
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
248
+											while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
249 249
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
250 250
 												$video['duration'] = $__time_h->timestamp($video['duration']);
251 251
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
@@ -280,7 +280,7 @@  discard block
 block discarded – undo
280 280
 										<?php
281 281
 											$stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Nonprofits & Activism' ORDER BY rand() LIMIT 4");
282 282
 											$stmt->execute();
283
-											while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
283
+											while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
284 284
 												$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
285 285
 												$video['duration'] = $__time_h->timestamp($video['duration']);
286 286
 												$video['views'] = $__video_h->fetch_video_views($video['rid']);
Please login to merge, or discard this patch.
d/post/login.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
 <?php $__db_h = new db_helper(); ?>
10 10
 <?php $__time_h = new time_helper(); ?>
11 11
 <?php
12
-    if($_SERVER['REQUEST_METHOD'] == 'POST' && $_POST['password'] && $_POST['username']) {
12
+    if ($_SERVER['REQUEST_METHOD'] == 'POST' && $_POST['password'] && $_POST['username']) {
13 13
         $request = (object) [
14 14
             "username" => $_POST['username'],
15 15
             "password" => $_POST['password'],
@@ -28,19 +28,19 @@  discard block
 block discarded – undo
28 28
         $stmt->bindParam(":username", $request->username);
29 29
         $stmt->execute();
30 30
 
31
-        if(!$stmt->rowCount()){ 
31
+        if (!$stmt->rowCount()) { 
32 32
             { $request->error->message = "Incorrect username or password!"; $request->error->status = ""; } }
33 33
 
34 34
         $row = $stmt->fetch(PDO::FETCH_ASSOC);
35
-        if(!isset($row['password'])) 
35
+        if (!isset($row['password'])) 
36 36
             { $request->error->message = "Incorrect username or password!"; $request->error->status = ""; } 
37 37
         else 
38 38
             { $request->returned_password = $row['password']; }
39 39
 
40
-        if(!password_verify($request->password, $request->returned_password)) 
40
+        if (!password_verify($request->password, $request->returned_password)) 
41 41
             { $request->error->message = "Incorrect username or password!"; $request->error->status = ""; }
42 42
         
43
-        if($request->error->status == "OK") {
43
+        if ($request->error->status == "OK") {
44 44
             $_SESSION['siteusername'] = $request->username;
45 45
             header("Location: /");
46 46
         }
Please login to merge, or discard this patch.
d/post/signup.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
 <?php $__db_h = new db_helper(); ?>
10 10
 <?php $__time_h = new time_helper(); ?>
11 11
 <?php
12
-    if($_SERVER['REQUEST_METHOD'] == 'POST' && $_POST['password'] && $_POST['username']) {
12
+    if ($_SERVER['REQUEST_METHOD'] == 'POST' && $_POST['password'] && $_POST['username']) {
13 13
         $request = (object) [
14 14
             "username" => $_POST['username'],
15 15
             "password" => $_POST['password'],
@@ -23,27 +23,27 @@  discard block
 block discarded – undo
23 23
         ]; 
24 24
 
25 25
         if (!filter_var($request->email, FILTER_VALIDATE_EMAIL)) 
26
-            { $request->error->message = "Your email is invalid!"; $request->error->status = "";  }
27
-        if(strlen($request->username) > 21) 
26
+            { $request->error->message = "Your email is invalid!"; $request->error->status = ""; }
27
+        if (strlen($request->username) > 21) 
28 28
             { $request->error->message = "Your username must be shorter than 21 characters."; $request->error->status = ""; }
29
-        if(strlen($request->password) < 8) 
29
+        if (strlen($request->password) < 8) 
30 30
             { $request->error->message = "Your password must at least be 8 characters long."; $request->error->status = ""; }
31
-        if(!preg_match('/[A-Za-z].*[0-9]|[0-9].*[A-Za-z]/', $request->password)) 
31
+        if (!preg_match('/[A-Za-z].*[0-9]|[0-9].*[A-Za-z]/', $request->password)) 
32 32
             { $request->error->message = "Include numbers and letters in your password!"; $request->error->status = ""; }
33
-        if(!preg_match('/^\S+\w\S{1,}/', $request->username)) 
33
+        if (!preg_match('/^\S+\w\S{1,}/', $request->username)) 
34 34
             { $request->error->message = "Your username cannot contain any special characters!"; $request->error->status = ""; }
35
-        if(empty(trim($request->username))) 
35
+        if (empty(trim($request->username))) 
36 36
             { $request->error->message = "Your username cannot be empty!"; $request->error->status = ""; }
37 37
         
38 38
         $stmt = $__db->prepare("SELECT username FROM users WHERE username = :username");
39 39
         $stmt->bindParam(":username", $username);
40 40
         $stmt->execute();
41
-        if($stmt->rowCount()) 
41
+        if ($stmt->rowCount()) 
42 42
             { $request->error->message = "There's already a user with that same username!"; $request->error->status = ""; }
43 43
             
44 44
         echo json_encode($request->error);
45 45
         
46
-        if($request->error->status == "OK") {
46
+        if ($request->error->status == "OK") {
47 47
             $stmt = $__db->prepare("INSERT INTO users (username, email, password) VALUES (:username, :email, :password)");
48 48
             $stmt->bindParam(":username", $request->username);
49 49
             $stmt->bindParam(":email", $request->email);
Please login to merge, or discard this patch.
d/post/channel_update.php 1 patch
Spacing   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -35,8 +35,8 @@  discard block
 block discarded – undo
35 35
         $stmt->execute();
36 36
 
37 37
 
38
-        if($_SERVER['REQUEST_METHOD'] == 'POST' && @$_FILES['pfpset']) {
39
-            if(!empty($_FILES["pfpset"]["name"])) {
38
+        if ($_SERVER['REQUEST_METHOD'] == 'POST' && @$_FILES['pfpset']) {
39
+            if (!empty($_FILES["pfpset"]["name"])) {
40 40
                 $target_dir = "../pfp/";
41 41
                 $imageFileType = strtolower(pathinfo($_FILES["pfpset"]["name"], PATHINFO_EXTENSION));
42 42
                 $target_name = md5_file($_FILES["pfpset"]["tmp_name"]) . "." . $imageFileType;
@@ -46,8 +46,8 @@  discard block
 block discarded – undo
46 46
                 $uploadOk = true;
47 47
                 $movedFile = false;
48 48
         
49
-                if($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg"
50
-                    && $imageFileType != "gif" ) {
49
+                if ($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg"
50
+                    && $imageFileType != "gif") {
51 51
                     $fileerror = 'unsupported file type. must be jpg, png, jpeg, or gif';
52 52
                     $uploadOk = false;
53 53
                     goto skip;
@@ -70,8 +70,8 @@  discard block
 block discarded – undo
70 70
                     }
71 71
                 }
72 72
             }
73
-        } else if($_SERVER['REQUEST_METHOD'] == 'POST' && @$_FILES['backgroundbgset']) {
74
-            if(!empty($_FILES["backgroundbgset"]["name"])) {
73
+        } else if ($_SERVER['REQUEST_METHOD'] == 'POST' && @$_FILES['backgroundbgset']) {
74
+            if (!empty($_FILES["backgroundbgset"]["name"])) {
75 75
                 $target_dir = "../banners/";
76 76
                 $imageFileType = strtolower(pathinfo($_FILES["backgroundbgset"]["name"], PATHINFO_EXTENSION));
77 77
                 $target_name = md5_file($_FILES["backgroundbgset"]["tmp_name"]) . "." . $imageFileType;
@@ -81,14 +81,14 @@  discard block
 block discarded – undo
81 81
                 $uploadOk = true;
82 82
                 $movedFile = false;
83 83
     
84
-                if($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg"
85
-                    && $imageFileType != "gif" ) {
84
+                if ($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg"
85
+                    && $imageFileType != "gif") {
86 86
                     $fileerror = 'unsupported file type. must be jpg, png, jpeg, or gif';
87 87
                     $uploadOk = false;
88 88
                     goto skip;
89 89
                 }
90 90
     
91
-                if($uploadOk) { 
91
+                if ($uploadOk) { 
92 92
                     if (file_exists($target_file)) {
93 93
                         $movedFile = true;
94 94
                     } else {
@@ -104,8 +104,8 @@  discard block
 block discarded – undo
104 104
                     }
105 105
                 }
106 106
             }
107
-        } else if($_SERVER['REQUEST_METHOD'] == 'POST' && @$_POST['bannerset']) {
108
-            if(!empty($_FILES["file"]["name"])) {
107
+        } else if ($_SERVER['REQUEST_METHOD'] == 'POST' && @$_POST['bannerset']) {
108
+            if (!empty($_FILES["file"]["name"])) {
109 109
                 $target_dir = "../banners/";
110 110
                 $imageFileType = strtolower(pathinfo($_FILES["file"]["name"], PATHINFO_EXTENSION));
111 111
                 $target_name = md5_file($_FILES["file"]["tmp_name"]) . "." . $imageFileType;
@@ -115,14 +115,14 @@  discard block
 block discarded – undo
115 115
                 $uploadOk = true;
116 116
                 $movedFile = false;
117 117
     
118
-                if($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg"
119
-                    && $imageFileType != "gif" ) {
118
+                if ($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg"
119
+                    && $imageFileType != "gif") {
120 120
                     $fileerror = 'unsupported file type. must be jpg, png, jpeg, or gif';
121 121
                     $uploadOk = false;
122 122
                     goto skip;
123 123
                 }
124 124
     
125
-                if($uploadOk) { 
125
+                if ($uploadOk) { 
126 126
                     if (file_exists($target_file)) {
127 127
                         $movedFile = true;
128 128
                     } else {
@@ -138,8 +138,8 @@  discard block
 block discarded – undo
138 138
                     }
139 139
                 } 
140 140
             }
141
-        } else if($_SERVER['REQUEST_METHOD'] == 'POST' && @$_FILES['videopagebanner']) {
142
-            if(!empty($_FILES["videopagebanner"]["name"])) {
141
+        } else if ($_SERVER['REQUEST_METHOD'] == 'POST' && @$_FILES['videopagebanner']) {
142
+            if (!empty($_FILES["videopagebanner"]["name"])) {
143 143
                 $target_dir = "../subscribe/";
144 144
                 $imageFileType = strtolower(pathinfo($_FILES["videopagebanner"]["name"], PATHINFO_EXTENSION));
145 145
                 $target_name = md5_file($_FILES["videopagebanner"]["tmp_name"]) . "." . $imageFileType;
@@ -149,14 +149,14 @@  discard block
 block discarded – undo
149 149
                 $uploadOk = true;
150 150
                 $movedFile = false;
151 151
     
152
-                if($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg"
153
-                    && $imageFileType != "gif" ) {
152
+                if ($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg"
153
+                    && $imageFileType != "gif") {
154 154
                     $fileerror = 'unsupported file type. must be jpg, png, jpeg, or gif';
155 155
                     $uploadOk = false;
156 156
                     goto skip;
157 157
                 }
158 158
     
159
-                if($uploadOk) { 
159
+                if ($uploadOk) { 
160 160
                     if (file_exists($target_file)) {
161 161
                         $movedFile = true;
162 162
                     } else {
@@ -174,75 +174,75 @@  discard block
 block discarded – undo
174 174
             }
175 175
         }
176 176
 
177
-        if(!empty($_POST['bio'])) { 
177
+        if (!empty($_POST['bio'])) { 
178 178
             $__user_u->update_row($_SESSION['siteusername'], "bio", $_POST['bio']);
179 179
         }
180 180
 
181
-        if(!empty($_POST['videoid'])) { 
181
+        if (!empty($_POST['videoid'])) { 
182 182
             $__user_u->update_row($_SESSION['siteusername'], "featured_channels", $_POST['videoid']);
183 183
         } // duplicate?
184 184
     
185
-        if(!empty($_POST['css'])) {
185
+        if (!empty($_POST['css'])) {
186 186
             $__user_u->update_row($_SESSION['siteusername'], "css", $_POST['css']);
187 187
         }
188 188
 
189
-        if(!empty($_POST['videoid'])) {
189
+        if (!empty($_POST['videoid'])) {
190 190
             $__user_u->update_row($_SESSION['siteusername'], "featured", $_POST['videoid']);
191 191
         }
192 192
 
193
-        if(!empty($_POST['solidcolor'])) {
193
+        if (!empty($_POST['solidcolor'])) {
194 194
             $__user_u->update_row($_SESSION['siteusername'], "primary_color", $_POST['solidcolor']);
195 195
         }
196 196
 
197
-        if(!empty($_POST['transparency'])) {
197
+        if (!empty($_POST['transparency'])) {
198 198
             $__user_u->update_row($_SESSION['siteusername'], "transparency", $_POST['transparency']);
199 199
         }
200 200
 
201
-        if(!empty($_POST['genre'])) {
201
+        if (!empty($_POST['genre'])) {
202 202
             $__user_u->update_row($_SESSION['siteusername'], "genre", $_POST['genre']);
203 203
         }
204 204
 
205
-        if(!empty($_POST['bordercolor'])) {
205
+        if (!empty($_POST['bordercolor'])) {
206 206
             $__user_u->update_row($_SESSION['siteusername'], "border_color", $_POST['bordercolor']);
207 207
         }
208 208
 
209
-        if(!empty($_POST['country'])) {
209
+        if (!empty($_POST['country'])) {
210 210
             $__user_u->update_row($_SESSION['siteusername'], "country", $_POST['country']);
211 211
         } // duplicate?
212 212
 
213
-        if(!empty($_POST['header'])) {
213
+        if (!empty($_POST['header'])) {
214 214
             $__user_u->update_row($_SESSION['siteusername'], "custom_header", $_POST['header']);
215 215
         }
216 216
 
217
-        if(!empty($_POST['channels'])) {
217
+        if (!empty($_POST['channels'])) {
218 218
             $__user_u->update_row($_SESSION['siteusername'], "featured_channels", $_POST['channels']);
219 219
         } // duplicate?
220 220
 
221
-        if(!empty($_POST['customtext'])) {
221
+        if (!empty($_POST['customtext'])) {
222 222
             $__user_u->update_row($_SESSION['siteusername'], "custom_text", $_POST['customtext']);
223 223
         }
224 224
 
225
-        if(!empty($_POST['country'])) {
225
+        if (!empty($_POST['country'])) {
226 226
             $__user_u->update_row($_SESSION['siteusername'], "custom_text", $_POST['country']);
227 227
         } // duplicate?
228 228
 
229
-        if(!empty($_POST['website'])) {
229
+        if (!empty($_POST['website'])) {
230 230
             $__user_u->update_row($_SESSION['siteusername'], "website", $_POST['website']);
231 231
         }
232 232
     
233
-        if(!empty($_POST['channelboxcolor'])) {
233
+        if (!empty($_POST['channelboxcolor'])) {
234 234
             $__user_u->update_row($_SESSION['siteusername'], "secondary_color", $_POST['channelboxcolor']);
235 235
         }
236 236
 
237
-        if(!empty($_POST['backgroundcolor'])) {
237
+        if (!empty($_POST['backgroundcolor'])) {
238 238
             $__user_u->update_row($_SESSION['siteusername'], "third_color", $_POST['backgroundcolor']);
239 239
         }
240 240
 
241
-        if(!empty($_POST['textmaincolor'])) {
241
+        if (!empty($_POST['textmaincolor'])) {
242 242
             $__user_u->update_row($_SESSION['siteusername'], "primary_color_text", $_POST['textmaincolor']);
243 243
         }
244 244
 
245
-    if(!empty($_POST['bgoptionset'])) {
245
+    if (!empty($_POST['bgoptionset'])) {
246 246
         $bgoption = $_POST['bgoption'];
247 247
         $bgcolor = $_POST['solidcolor'];
248 248
         $default = "default.png";
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
         
252 252
         $__user_u->update_row($_SESSION['siteusername'], "2009_bgcolor", $bgcolor);
253 253
 
254
-        if($bgoption == "solid") {
254
+        if ($bgoption == "solid") {
255 255
             $__user_u->update_row($_SESSION['siteusername'], "2009_bg", $default);
256 256
         }
257 257
     }
Please login to merge, or discard this patch.