@@ -1,7 +1,7 @@ |
||
1 | 1 | <?php |
2 | 2 | require($_SERVER['DOCUMENT_ROOT'] . "/s/classes/config.inc.php"); |
3 | 3 | |
4 | -if(isset($_SESSION['siteusername'])) { |
|
4 | +if (isset($_SESSION['siteusername'])) { |
|
5 | 5 | $_SESSION = []; |
6 | 6 | session_destroy(); |
7 | 7 | } |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | <?php |
141 | 141 | $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Gaming' ORDER BY rand() LIMIT 4"); |
142 | 142 | $stmt->execute(); |
143 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
143 | + while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
144 | 144 | $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
145 | 145 | $video['duration'] = $__time_h->timestamp($video['duration']); |
146 | 146 | $video['views'] = $__video_h->fetch_video_views($video['rid']); |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | <?php |
176 | 176 | $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Gaming' ORDER BY rand() LIMIT 4"); |
177 | 177 | $stmt->execute(); |
178 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
178 | + while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
179 | 179 | $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
180 | 180 | $video['duration'] = $__time_h->timestamp($video['duration']); |
181 | 181 | $video['views'] = $__video_h->fetch_video_views($video['rid']); |
@@ -210,7 +210,7 @@ discard block |
||
210 | 210 | <?php |
211 | 211 | $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Gaming' ORDER BY rand() LIMIT 4"); |
212 | 212 | $stmt->execute(); |
213 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
213 | + while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
214 | 214 | $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
215 | 215 | $video['duration'] = $__time_h->timestamp($video['duration']); |
216 | 216 | $video['views'] = $__video_h->fetch_video_views($video['rid']); |
@@ -245,7 +245,7 @@ discard block |
||
245 | 245 | <?php |
246 | 246 | $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Gaming' ORDER BY rand() LIMIT 4"); |
247 | 247 | $stmt->execute(); |
248 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
248 | + while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
249 | 249 | $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
250 | 250 | $video['duration'] = $__time_h->timestamp($video['duration']); |
251 | 251 | $video['views'] = $__video_h->fetch_video_views($video['rid']); |
@@ -280,7 +280,7 @@ discard block |
||
280 | 280 | <?php |
281 | 281 | $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Gaming' ORDER BY rand() LIMIT 4"); |
282 | 282 | $stmt->execute(); |
283 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
283 | + while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
284 | 284 | $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
285 | 285 | $video['duration'] = $__time_h->timestamp($video['duration']); |
286 | 286 | $video['views'] = $__video_h->fetch_video_views($video['rid']); |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | <?php |
141 | 141 | $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Howto & Style' 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 |
||
175 | 175 | <?php |
176 | 176 | $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Howto & Style' 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 |
||
210 | 210 | <?php |
211 | 211 | $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Howto & Style' 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 |
||
245 | 245 | <?php |
246 | 246 | $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Howto & Style' 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 |
||
280 | 280 | <?php |
281 | 281 | $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Howto & Style' 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']); |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | <?php |
141 | 141 | $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'People & Blogs' ORDER BY rand() LIMIT 4"); |
142 | 142 | $stmt->execute(); |
143 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
143 | + while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
144 | 144 | $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
145 | 145 | $video['duration'] = $__time_h->timestamp($video['duration']); |
146 | 146 | $video['views'] = $__video_h->fetch_video_views($video['rid']); |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | <?php |
176 | 176 | $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'People & Blogs' ORDER BY rand() LIMIT 4"); |
177 | 177 | $stmt->execute(); |
178 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
178 | + while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
179 | 179 | $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
180 | 180 | $video['duration'] = $__time_h->timestamp($video['duration']); |
181 | 181 | $video['views'] = $__video_h->fetch_video_views($video['rid']); |
@@ -210,7 +210,7 @@ discard block |
||
210 | 210 | <?php |
211 | 211 | $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'People & Blogs' ORDER BY rand() LIMIT 4"); |
212 | 212 | $stmt->execute(); |
213 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
213 | + while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
214 | 214 | $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
215 | 215 | $video['duration'] = $__time_h->timestamp($video['duration']); |
216 | 216 | $video['views'] = $__video_h->fetch_video_views($video['rid']); |
@@ -245,7 +245,7 @@ discard block |
||
245 | 245 | <?php |
246 | 246 | $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'People & Blogs' ORDER BY rand() LIMIT 4"); |
247 | 247 | $stmt->execute(); |
248 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
248 | + while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
249 | 249 | $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
250 | 250 | $video['duration'] = $__time_h->timestamp($video['duration']); |
251 | 251 | $video['views'] = $__video_h->fetch_video_views($video['rid']); |
@@ -280,7 +280,7 @@ discard block |
||
280 | 280 | <?php |
281 | 281 | $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'People & Blogs' ORDER BY rand() LIMIT 4"); |
282 | 282 | $stmt->execute(); |
283 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
283 | + while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
284 | 284 | $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
285 | 285 | $video['duration'] = $__time_h->timestamp($video['duration']); |
286 | 286 | $video['views'] = $__video_h->fetch_video_views($video['rid']); |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | <?php |
141 | 141 | $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Comedy' ORDER BY rand() LIMIT 4"); |
142 | 142 | $stmt->execute(); |
143 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
143 | + while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
144 | 144 | $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
145 | 145 | $video['duration'] = $__time_h->timestamp($video['duration']); |
146 | 146 | $video['views'] = $__video_h->fetch_video_views($video['rid']); |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | <?php |
176 | 176 | $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Comedy' ORDER BY rand() LIMIT 4"); |
177 | 177 | $stmt->execute(); |
178 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
178 | + while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
179 | 179 | $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
180 | 180 | $video['duration'] = $__time_h->timestamp($video['duration']); |
181 | 181 | $video['views'] = $__video_h->fetch_video_views($video['rid']); |
@@ -210,7 +210,7 @@ discard block |
||
210 | 210 | <?php |
211 | 211 | $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Comedy' ORDER BY rand() LIMIT 4"); |
212 | 212 | $stmt->execute(); |
213 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
213 | + while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
214 | 214 | $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
215 | 215 | $video['duration'] = $__time_h->timestamp($video['duration']); |
216 | 216 | $video['views'] = $__video_h->fetch_video_views($video['rid']); |
@@ -245,7 +245,7 @@ discard block |
||
245 | 245 | <?php |
246 | 246 | $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Comedy' ORDER BY rand() LIMIT 4"); |
247 | 247 | $stmt->execute(); |
248 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
248 | + while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
249 | 249 | $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
250 | 250 | $video['duration'] = $__time_h->timestamp($video['duration']); |
251 | 251 | $video['views'] = $__video_h->fetch_video_views($video['rid']); |
@@ -280,7 +280,7 @@ discard block |
||
280 | 280 | <?php |
281 | 281 | $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Comedy' ORDER BY rand() LIMIT 4"); |
282 | 282 | $stmt->execute(); |
283 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
283 | + while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
284 | 284 | $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
285 | 285 | $video['duration'] = $__time_h->timestamp($video['duration']); |
286 | 286 | $video['views'] = $__video_h->fetch_video_views($video['rid']); |
@@ -19,7 +19,7 @@ |
||
19 | 19 | |
20 | 20 | $name = $friend['reciever']; |
21 | 21 | |
22 | -if($name != $_SESSION['siteusername'] || !isset($_GET['id'])) { |
|
22 | +if ($name != $_SESSION['siteusername'] || !isset($_GET['id'])) { |
|
23 | 23 | die("You are not logged in or you did not put in an argument"); |
24 | 24 | } |
25 | 25 |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | $stmt->bindParam(":username", $_SESSION['siteusername']); |
18 | 18 | $stmt->bindParam(":reciever", $name); |
19 | 19 | $stmt->execute(); |
20 | -while($comment = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
20 | +while ($comment = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
21 | 21 | $stmt = $__db->prepare("DELETE FROM likes WHERE sender = :username AND reciever = :reciever"); |
22 | 22 | $stmt->execute(array( |
23 | 23 | ':username' => $_SESSION['siteusername'], |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | $stmt->bindParam(":username", $_SESSION['siteusername']); |
31 | 31 | $stmt->bindParam(":reciever", $name); |
32 | 32 | $stmt->execute(); |
33 | -while($comment = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
33 | +while ($comment = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
34 | 34 | $stmt = $__db->prepare("DELETE FROM likes WHERE sender = :username AND reciever = :reciever"); |
35 | 35 | $stmt->execute(array( |
36 | 36 | ':username' => $_SESSION['siteusername'], |
@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | <?php |
14 | 14 | $name = $_GET['v']; |
15 | 15 | |
16 | -if(!isset($_SESSION['siteusername']) || !isset($_GET['v'])) { |
|
16 | +if (!isset($_SESSION['siteusername']) || !isset($_GET['v'])) { |
|
17 | 17 | header('Location: ' . $_SERVER['HTTP_REFERER']); |
18 | 18 | } |
19 | 19 | |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | $stmt->bindParam(":username", $_SESSION['siteusername']); |
22 | 22 | $stmt->bindParam(":reciever", $name); |
23 | 23 | $stmt->execute(); |
24 | -while($comment = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
24 | +while ($comment = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
25 | 25 | $stmt = $__db->prepare("DELETE FROM likes WHERE sender = :username AND reciever = :reciever"); |
26 | 26 | $stmt->execute(array( |
27 | 27 | ':username' => $_SESSION['siteusername'], |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | $stmt->bindParam(":username", $_SESSION['siteusername']); |
35 | 35 | $stmt->bindParam(":reciever", $name); |
36 | 36 | $stmt->execute(); |
37 | -while($comment = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
37 | +while ($comment = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
38 | 38 | $stmt = $__db->prepare("DELETE FROM likes WHERE sender = :username AND reciever = :reciever"); |
39 | 39 | $stmt->execute(array( |
40 | 40 | ':username' => $_SESSION['siteusername'], |
@@ -12,7 +12,7 @@ |
||
12 | 12 | <?php $__time_h = new time_helper(); ?> |
13 | 13 | <?php $playlist = $__video_h->fetch_playlist_rid($_GET['id']); ?> |
14 | 14 | <?php |
15 | -if($playlist['author'] == $_SESSION['siteusername']) { |
|
15 | +if ($playlist['author'] == $_SESSION['siteusername']) { |
|
16 | 16 | $stmt = $__db->prepare("DELETE FROM playlists WHERE rid=:rid AND author=:author"); |
17 | 17 | $stmt->execute(array( |
18 | 18 | ':author' => $_SESSION['siteusername'], |