@@ -9,10 +9,10 @@ |
||
9 | 9 | <?php $__db_h = new db_helper(); ?> |
10 | 10 | <?php $__time_h = new time_helper(); ?> |
11 | 11 | <?php |
12 | - $__server->page_embeds->page_title = "SubRocks - Notifications"; |
|
13 | - $__server->page_embeds->page_description = "SubRocks is a site dedicated to bring back the 2012 layout of YouTube."; |
|
14 | - $__server->page_embeds->page_image = "/yt/imgbin/full-size-logo.png"; |
|
15 | - $__server->page_embeds->page_url = "https://subrock.rocks/"; |
|
12 | + $__server->page_embeds->page_title = "SubRocks - Notifications"; |
|
13 | + $__server->page_embeds->page_description = "SubRocks is a site dedicated to bring back the 2012 layout of YouTube."; |
|
14 | + $__server->page_embeds->page_image = "/yt/imgbin/full-size-logo.png"; |
|
15 | + $__server->page_embeds->page_url = "https://subrock.rocks/"; |
|
16 | 16 | ?> |
17 | 17 | <?php if(!isset($_SESSION['siteusername'])) { header("Location: /sign_in"); } ?> |
18 | 18 | <!DOCTYPE html> |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | $__server->page_embeds->page_image = "/yt/imgbin/full-size-logo.png"; |
15 | 15 | $__server->page_embeds->page_url = "https://subrock.rocks/"; |
16 | 16 | ?> |
17 | -<?php if(!isset($_SESSION['siteusername'])) { header("Location: /sign_in"); } ?> |
|
17 | +<?php if (!isset($_SESSION['siteusername'])) { header("Location: /sign_in"); } ?> |
|
18 | 18 | <!DOCTYPE html> |
19 | 19 | <html dir="ltr"> |
20 | 20 | <head> |
@@ -169,15 +169,15 @@ discard block |
||
169 | 169 | $stmt->execute(); |
170 | 170 | |
171 | 171 | $number_of_result = $stmt->rowCount(); |
172 | - $number_of_page = ceil ($number_of_result / $results_per_page); |
|
172 | + $number_of_page = ceil($number_of_result/$results_per_page); |
|
173 | 173 | |
174 | - if (!isset ($_GET['page']) ) { |
|
174 | + if (!isset ($_GET['page'])) { |
|
175 | 175 | $page = 1; |
176 | 176 | } else { |
177 | - $page = (int)$_GET['page']; |
|
177 | + $page = (int) $_GET['page']; |
|
178 | 178 | } |
179 | 179 | |
180 | - $page_first_result = ($page - 1) * $results_per_page; |
|
180 | + $page_first_result = ($page - 1)*$results_per_page; |
|
181 | 181 | |
182 | 182 | $stmt6 = $__db->prepare("SELECT * FROM pms WHERE touser = :search AND type = 'nt' ORDER BY id DESC LIMIT :pfirst, :pper"); |
183 | 183 | $stmt6->bindParam(":search", $search); |
@@ -202,8 +202,8 @@ discard block |
||
202 | 202 | </tr> |
203 | 203 | |
204 | 204 | <?php |
205 | - while($inbox = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
206 | - if($__video_h->video_exists($inbox['video_attribute'])) { |
|
205 | + while ($inbox = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
206 | + if ($__video_h->video_exists($inbox['video_attribute'])) { |
|
207 | 207 | $inbox['video'] = $__video_h->fetch_video_rid($inbox['video_attribute']); |
208 | 208 | $inbox['video_attr_exists'] = true; |
209 | 209 | |
@@ -217,7 +217,7 @@ discard block |
||
217 | 217 | ?> |
218 | 218 | <tr style="margin-top: 5px;" id="videoslist"> |
219 | 219 | <!-- |
220 | - <?php if($inbox['readed'] == "n") { ?> |
|
220 | + <?php if ($inbox['readed'] == "n") { ?> |
|
221 | 221 | <a style="position:relative;top:7px;color: white;text-decoration: none;background-color: #d54343;padding: 7px;padding-left: 10px;margin-right: 12px;display: inline;" href="/inbox/"> |
222 | 222 | NEW |
223 | 223 | </a> |
@@ -240,7 +240,7 @@ discard block |
||
240 | 240 | <td class="video-manager-stats" style="background: none;padding-left: 8px;"> |
241 | 241 | <h3><?php echo htmlspecialchars($inbox['subject']); ?></h3> |
242 | 242 | <?php echo $__video_h->shorten_description($inbox['message'], 300, true); ?> |
243 | - <?php if($inbox['video_attr_exists']) { ?> |
|
243 | + <?php if ($inbox['video_attr_exists']) { ?> |
|
244 | 244 | <hr> |
245 | 245 | <ul> |
246 | 246 | <li class="video-list-item "><a href="/watch?v=<?php echo $inbox['video']['rid']; ?>" class="video-list-item-link yt-uix-sessionlink" data-sessionlink="ei=CNLr3rbS3rICFSwSIQodSW397Q%3D%3D&feature=g-sptl%26cid%3Dinp-hs-ytg"><span class="ux-thumb-wrap contains-addto "><span class="video-thumb ux-thumb yt-thumb-default-120 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="http://s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="<?php echo $inbox['video']['title']; ?>" data-thumb="/dynamic/thumbs/<?php echo $inbox['video']['thumbnail']; ?>" width="120"><span class="vertical-align"></span></span></span></span><span class="video-time"><?php echo $inbox['video']['duration']; ?></span> |
@@ -267,7 +267,7 @@ discard block |
||
267 | 267 | </div> |
268 | 268 | </center><br> |
269 | 269 | |
270 | - <?php for($page = 1; $page<= $number_of_page; $page++) { ?> |
|
270 | + <?php for ($page = 1; $page <= $number_of_page; $page++) { ?> |
|
271 | 271 | <button class="yt-uix-button yt-uix-button-default" onclick="ajax_fetch(<?php echo $page; ?>)"><?php echo $page; ?></button> |
272 | 272 | <?php } ?> |
273 | 273 | |
@@ -291,7 +291,7 @@ discard block |
||
291 | 291 | </script> |
292 | 292 | |
293 | 293 | <?php |
294 | - if($stmt6->rowCount() == 0) { echo " |
|
294 | + if ($stmt6->rowCount() == 0) { echo " |
|
295 | 295 | You currently have no notifications in your inbox. |
296 | 296 | "; |
297 | 297 | } ?> |
@@ -10,10 +10,10 @@ |
||
10 | 10 | <?php $__time_h = new time_helper(); ?> |
11 | 11 | <?php if(!isset($_SESSION['siteusername'])) { header("Location: /sign_in"); } ?> |
12 | 12 | <?php |
13 | - $__server->page_embeds->page_title = "SubRocks - Compose"; |
|
14 | - $__server->page_embeds->page_description = "SubRocks is a site dedicated to bring back the 2012 layout of YouTube."; |
|
15 | - $__server->page_embeds->page_image = "/yt/imgbin/full-size-logo.png"; |
|
16 | - $__server->page_embeds->page_url = "https://subrock.rocks/"; |
|
13 | + $__server->page_embeds->page_title = "SubRocks - Compose"; |
|
14 | + $__server->page_embeds->page_description = "SubRocks is a site dedicated to bring back the 2012 layout of YouTube."; |
|
15 | + $__server->page_embeds->page_image = "/yt/imgbin/full-size-logo.png"; |
|
16 | + $__server->page_embeds->page_url = "https://subrock.rocks/"; |
|
17 | 17 | ?> |
18 | 18 | <?php |
19 | 19 | if($_SERVER['REQUEST_METHOD'] == 'POST') { |
@@ -8,7 +8,7 @@ discard block |
||
8 | 8 | <?php $__user_u = new user_update($__db); ?> |
9 | 9 | <?php $__db_h = new db_helper(); ?> |
10 | 10 | <?php $__time_h = new time_helper(); ?> |
11 | -<?php if(!isset($_SESSION['siteusername'])) { header("Location: /sign_in"); } ?> |
|
11 | +<?php if (!isset($_SESSION['siteusername'])) { header("Location: /sign_in"); } ?> |
|
12 | 12 | <?php |
13 | 13 | $__server->page_embeds->page_title = "SubRocks - Compose"; |
14 | 14 | $__server->page_embeds->page_description = "SubRocks is a site dedicated to bring back the 2012 layout of YouTube."; |
@@ -16,16 +16,16 @@ discard block |
||
16 | 16 | $__server->page_embeds->page_url = "https://subrock.rocks/"; |
17 | 17 | ?> |
18 | 18 | <?php |
19 | - if($_SERVER['REQUEST_METHOD'] == 'POST') { |
|
19 | + if ($_SERVER['REQUEST_METHOD'] == 'POST') { |
|
20 | 20 | $error = array(); |
21 | 21 | |
22 | - if(!isset($_SESSION['siteusername'])){ $error['message'] = "You are not logged in"; $error['status'] = true; } |
|
23 | - if(!$_POST['contents']){ $error['message'] = "Your description cannot be blank"; $error['status'] = true; } |
|
24 | - if(empty(trim($_POST['subject']))){ $error['message'] = "Your subject cannot be blank"; $error['status'] = true; } |
|
25 | - if(strlen($_POST['contents']) > 1000){ $error['message'] = "Your description must be shorter than 1000 characters"; $error['status'] = true; } |
|
26 | - if($__user_h->if_cooldown($_SESSION['siteusername'])) { $error['message'] = "You are on a cooldown! Wait for a minute before sending a private message."; $error['status'] = true; } |
|
22 | + if (!isset($_SESSION['siteusername'])) { $error['message'] = "You are not logged in"; $error['status'] = true; } |
|
23 | + if (!$_POST['contents']) { $error['message'] = "Your description cannot be blank"; $error['status'] = true; } |
|
24 | + if (empty(trim($_POST['subject']))) { $error['message'] = "Your subject cannot be blank"; $error['status'] = true; } |
|
25 | + if (strlen($_POST['contents']) > 1000) { $error['message'] = "Your description must be shorter than 1000 characters"; $error['status'] = true; } |
|
26 | + if ($__user_h->if_cooldown($_SESSION['siteusername'])) { $error['message'] = "You are on a cooldown! Wait for a minute before sending a private message."; $error['status'] = true; } |
|
27 | 27 | |
28 | - if(!isset($error['message'])) { |
|
28 | + if (!isset($error['message'])) { |
|
29 | 29 | $stmt = $__db->prepare("INSERT INTO pms (touser, subject, message, owner) VALUES (:touser, :subject, :message, :owner)"); |
30 | 30 | $stmt->bindParam(":subject", $_POST['subject']); |
31 | 31 | $stmt->bindParam(":message", $_POST['contents']); |
@@ -11,10 +11,10 @@ |
||
11 | 11 | <?php $__time_h = new time_helper(); ?> |
12 | 12 | <?php if(!isset($_SESSION['siteusername'])) { header("Location: /sign_in"); } ?> |
13 | 13 | <?php |
14 | - $__server->page_embeds->page_title = "SubRocks - Inbox"; |
|
15 | - $__server->page_embeds->page_description = "SubRocks is a site dedicated to bring back the 2012 layout of YouTube."; |
|
16 | - $__server->page_embeds->page_image = "/yt/imgbin/full-size-logo.png"; |
|
17 | - $__server->page_embeds->page_url = "https://subrock.rocks/"; |
|
14 | + $__server->page_embeds->page_title = "SubRocks - Inbox"; |
|
15 | + $__server->page_embeds->page_description = "SubRocks is a site dedicated to bring back the 2012 layout of YouTube."; |
|
16 | + $__server->page_embeds->page_image = "/yt/imgbin/full-size-logo.png"; |
|
17 | + $__server->page_embeds->page_url = "https://subrock.rocks/"; |
|
18 | 18 | ?> |
19 | 19 | <!DOCTYPE html> |
20 | 20 | <html dir="ltr"> |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | <?php $__user_u = new user_update($__db); ?> |
10 | 10 | <?php $__db_h = new db_helper(); ?> |
11 | 11 | <?php $__time_h = new time_helper(); ?> |
12 | -<?php if(!isset($_SESSION['siteusername'])) { header("Location: /sign_in"); } ?> |
|
12 | +<?php if (!isset($_SESSION['siteusername'])) { header("Location: /sign_in"); } ?> |
|
13 | 13 | <?php |
14 | 14 | $__server->page_embeds->page_title = "SubRocks - Inbox"; |
15 | 15 | $__server->page_embeds->page_description = "SubRocks is a site dedicated to bring back the 2012 layout of YouTube."; |
@@ -170,15 +170,15 @@ discard block |
||
170 | 170 | $stmt->execute(); |
171 | 171 | |
172 | 172 | $number_of_result = $stmt->rowCount(); |
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 | $stmt6 = $__db->prepare("SELECT * FROM pms WHERE touser = :search ORDER BY id DESC LIMIT :pfirst, :pper"); |
184 | 184 | $stmt6->bindParam(":search", $search); |
@@ -203,8 +203,8 @@ discard block |
||
203 | 203 | </tr> |
204 | 204 | |
205 | 205 | <?php |
206 | - while($inbox = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
207 | - if($__video_h->video_exists($inbox['video_attribute'])) { |
|
206 | + while ($inbox = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
207 | + if ($__video_h->video_exists($inbox['video_attribute'])) { |
|
208 | 208 | $inbox['video'] = $__video_h->fetch_video_rid($inbox['video_attribute']); |
209 | 209 | $inbox['video_attr_exists'] = true; |
210 | 210 | |
@@ -218,7 +218,7 @@ discard block |
||
218 | 218 | ?> |
219 | 219 | <tr style="margin-top: 5px;" id="videoslist"> |
220 | 220 | <!-- |
221 | - <?php if($inbox['readed'] == "n") { ?> |
|
221 | + <?php if ($inbox['readed'] == "n") { ?> |
|
222 | 222 | <a style="position:relative;top:7px;color: white;text-decoration: none;background-color: #d54343;padding: 7px;padding-left: 10px;margin-right: 12px;display: inline;" href="/inbox/"> |
223 | 223 | NEW |
224 | 224 | </a> |
@@ -241,7 +241,7 @@ discard block |
||
241 | 241 | <td class="video-manager-stats" style="background: none;padding-left: 8px;"> |
242 | 242 | <h3><?php echo htmlspecialchars($inbox['subject']); ?></h3> |
243 | 243 | <?php echo $__video_h->shorten_description($inbox['message'], 300, true); ?> |
244 | - <?php if($inbox['video_attr_exists']) { ?> |
|
244 | + <?php if ($inbox['video_attr_exists']) { ?> |
|
245 | 245 | <hr> |
246 | 246 | <ul> |
247 | 247 | <li class="video-list-item "><a href="/watch?v=<?php echo $inbox['video']['rid']; ?>" class="video-list-item-link yt-uix-sessionlink" data-sessionlink="ei=CNLr3rbS3rICFSwSIQodSW397Q%3D%3D&feature=g-sptl%26cid%3Dinp-hs-ytg"><span class="ux-thumb-wrap contains-addto "><span class="video-thumb ux-thumb yt-thumb-default-120 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="http://s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="<?php echo $inbox['video']['title']; ?>" data-thumb="/dynamic/thumbs/<?php echo $inbox['video']['thumbnail']; ?>" width="120"><span class="vertical-align"></span></span></span></span><span class="video-time"><?php echo $inbox['video']['duration']; ?></span> |
@@ -268,7 +268,7 @@ discard block |
||
268 | 268 | </div> |
269 | 269 | </center><br> |
270 | 270 | |
271 | - <?php for($page = 1; $page<= $number_of_page; $page++) { ?> |
|
271 | + <?php for ($page = 1; $page <= $number_of_page; $page++) { ?> |
|
272 | 272 | <button class="yt-uix-button yt-uix-button-default" onclick="ajax_fetch(<?php echo $page; ?>)"><?php echo $page; ?></button> |
273 | 273 | <?php } ?> |
274 | 274 | |
@@ -292,7 +292,7 @@ discard block |
||
292 | 292 | </script> |
293 | 293 | |
294 | 294 | <?php |
295 | - if($stmt6->rowCount() == 0) { echo " |
|
295 | + if ($stmt6->rowCount() == 0) { echo " |
|
296 | 296 | You currently have no messages in your inbox. |
297 | 297 | "; |
298 | 298 | } ?> |
@@ -10,10 +10,10 @@ |
||
10 | 10 | <?php $__time_h = new time_helper(); ?> |
11 | 11 | <?php if(!isset($_SESSION['siteusername'])) { header("Location: /sign_in"); } ?> |
12 | 12 | <?php |
13 | - $__server->page_embeds->page_title = "SubRocks - Sent Messages"; |
|
14 | - $__server->page_embeds->page_description = "SubRocks is a site dedicated to bring back the 2012 layout of YouTube."; |
|
15 | - $__server->page_embeds->page_image = "/yt/imgbin/full-size-logo.png"; |
|
16 | - $__server->page_embeds->page_url = "https://subrock.rocks/"; |
|
13 | + $__server->page_embeds->page_title = "SubRocks - Sent Messages"; |
|
14 | + $__server->page_embeds->page_description = "SubRocks is a site dedicated to bring back the 2012 layout of YouTube."; |
|
15 | + $__server->page_embeds->page_image = "/yt/imgbin/full-size-logo.png"; |
|
16 | + $__server->page_embeds->page_url = "https://subrock.rocks/"; |
|
17 | 17 | ?> |
18 | 18 | <!DOCTYPE html> |
19 | 19 | <html dir="ltr"> |
@@ -8,7 +8,7 @@ discard block |
||
8 | 8 | <?php $__user_u = new user_update($__db); ?> |
9 | 9 | <?php $__db_h = new db_helper(); ?> |
10 | 10 | <?php $__time_h = new time_helper(); ?> |
11 | -<?php if(!isset($_SESSION['siteusername'])) { header("Location: /sign_in"); } ?> |
|
11 | +<?php if (!isset($_SESSION['siteusername'])) { header("Location: /sign_in"); } ?> |
|
12 | 12 | <?php |
13 | 13 | $__server->page_embeds->page_title = "SubRocks - Sent Messages"; |
14 | 14 | $__server->page_embeds->page_description = "SubRocks is a site dedicated to bring back the 2012 layout of YouTube."; |
@@ -169,15 +169,15 @@ discard block |
||
169 | 169 | $stmt->execute(); |
170 | 170 | |
171 | 171 | $number_of_result = $stmt->rowCount(); |
172 | - $number_of_page = ceil ($number_of_result / $results_per_page); |
|
172 | + $number_of_page = ceil($number_of_result/$results_per_page); |
|
173 | 173 | |
174 | - if (!isset ($_GET['page']) ) { |
|
174 | + if (!isset ($_GET['page'])) { |
|
175 | 175 | $page = 1; |
176 | 176 | } else { |
177 | - $page = (int)$_GET['page']; |
|
177 | + $page = (int) $_GET['page']; |
|
178 | 178 | } |
179 | 179 | |
180 | - $page_first_result = ($page - 1) * $results_per_page; |
|
180 | + $page_first_result = ($page - 1)*$results_per_page; |
|
181 | 181 | |
182 | 182 | $stmt6 = $__db->prepare("SELECT * FROM pms WHERE owner = :search ORDER BY id DESC LIMIT :pfirst, :pper"); |
183 | 183 | $stmt6->bindParam(":search", $search); |
@@ -202,8 +202,8 @@ discard block |
||
202 | 202 | </tr> |
203 | 203 | |
204 | 204 | <?php |
205 | - while($inbox = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
206 | - if($__video_h->video_exists($inbox['video_attribute'])) { |
|
205 | + while ($inbox = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
206 | + if ($__video_h->video_exists($inbox['video_attribute'])) { |
|
207 | 207 | $inbox['video'] = $__video_h->fetch_video_rid($inbox['video_attribute']); |
208 | 208 | $inbox['video_attr_exists'] = true; |
209 | 209 | |
@@ -217,7 +217,7 @@ discard block |
||
217 | 217 | ?> |
218 | 218 | <tr style="margin-top: 5px;" id="videoslist"> |
219 | 219 | <!-- |
220 | - <?php if($inbox['readed'] == "n") { ?> |
|
220 | + <?php if ($inbox['readed'] == "n") { ?> |
|
221 | 221 | <a style="position:relative;top:7px;color: white;text-decoration: none;background-color: #d54343;padding: 7px;padding-left: 10px;margin-right: 12px;display: inline;" href="/inbox/"> |
222 | 222 | NEW |
223 | 223 | </a> |
@@ -240,7 +240,7 @@ discard block |
||
240 | 240 | <td class="video-manager-stats" style="background: none;padding-left: 8px;"> |
241 | 241 | <h3><?php echo htmlspecialchars($inbox['subject']); ?></h3> |
242 | 242 | <?php echo $__video_h->shorten_description($inbox['message'], 300, true); ?> |
243 | - <?php if($inbox['video_attr_exists']) { ?> |
|
243 | + <?php if ($inbox['video_attr_exists']) { ?> |
|
244 | 244 | <hr> |
245 | 245 | <ul> |
246 | 246 | <li class="video-list-item "><a href="/watch?v=<?php echo $inbox['video']['rid']; ?>" class="video-list-item-link yt-uix-sessionlink" data-sessionlink="ei=CNLr3rbS3rICFSwSIQodSW397Q%3D%3D&feature=g-sptl%26cid%3Dinp-hs-ytg"><span class="ux-thumb-wrap contains-addto "><span class="video-thumb ux-thumb yt-thumb-default-120 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="http://s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="<?php echo $inbox['video']['title']; ?>" data-thumb="/dynamic/thumbs/<?php echo $inbox['video']['thumbnail']; ?>" width="120"><span class="vertical-align"></span></span></span></span><span class="video-time"><?php echo $inbox['video']['duration']; ?></span> |
@@ -267,7 +267,7 @@ discard block |
||
267 | 267 | </div> |
268 | 268 | </center><br> |
269 | 269 | |
270 | - <?php for($page = 1; $page<= $number_of_page; $page++) { ?> |
|
270 | + <?php for ($page = 1; $page <= $number_of_page; $page++) { ?> |
|
271 | 271 | <button class="yt-uix-button yt-uix-button-default" onclick="ajax_fetch(<?php echo $page; ?>)"><?php echo $page; ?></button> |
272 | 272 | <?php } ?> |
273 | 273 | |
@@ -291,7 +291,7 @@ discard block |
||
291 | 291 | </script> |
292 | 292 | |
293 | 293 | <?php |
294 | - if($stmt6->rowCount() == 0) { echo " |
|
294 | + if ($stmt6->rowCount() == 0) { echo " |
|
295 | 295 | You currently have no sent messages in your inbox. |
296 | 296 | "; |
297 | 297 | } ?> |
@@ -15,11 +15,13 @@ discard block |
||
15 | 15 | <?php $_video = $__video_h->fetch_video_rid($_GET['v']); ?> |
16 | 16 | <?php $_video['comments'] = $__video_h->get_comments_from_video($_video['rid']); ?> |
17 | 17 | <?php |
18 | - if($_video['visibility'] == "v" && @$_SESSION['siteusername'] != $_video['author']) |
|
19 | - header("Location: /"); |
|
18 | + if($_video['visibility'] == "v" && @$_SESSION['siteusername'] != $_video['author']) { |
|
19 | + header("Location: /"); |
|
20 | + } |
|
20 | 21 | |
21 | - if(isset($_SESSION['siteusername'])) |
|
22 | - $__video_h->check_view($_GET['v'], @$_SESSION['siteusername']); |
|
22 | + if(isset($_SESSION['siteusername'])) { |
|
23 | + $__video_h->check_view($_GET['v'], @$_SESSION['siteusername']); |
|
24 | + } |
|
23 | 25 | |
24 | 26 | $_SESSION['current_video'] = $_video['rid']; |
25 | 27 | |
@@ -739,10 +741,11 @@ discard block |
||
739 | 741 | $stmt->execute(); |
740 | 742 | |
741 | 743 | while($comment = $stmt->fetch(PDO::FETCH_ASSOC)) { |
742 | - if($__video_h->if_comment_liked($comment['id'], $_SESSION['siteusername'], true)) |
|
743 | - $comment['liked'] = true; |
|
744 | - else if($__video_h->if_comment_liked($comment['id'], $_SESSION['siteusername'], false)) |
|
745 | - $comment['disliked'] = true; |
|
744 | + if($__video_h->if_comment_liked($comment['id'], $_SESSION['siteusername'], true)) { |
|
745 | + $comment['liked'] = true; |
|
746 | + } else if($__video_h->if_comment_liked($comment['id'], $_SESSION['siteusername'], false)) { |
|
747 | + $comment['disliked'] = true; |
|
748 | + } |
|
746 | 749 | |
747 | 750 | $comment['likes'] = $__video_h->get_comment_likes($comment['id'], true); |
748 | 751 | $comment['likes'] -= $__video_h->get_comment_likes($comment['id'], false); |
@@ -15,29 +15,29 @@ discard block |
||
15 | 15 | <?php $_video = $__video_h->fetch_video_rid($_GET['v']); ?> |
16 | 16 | <?php $_video['comments'] = $__video_h->get_comments_from_video($_video['rid']); ?> |
17 | 17 | <?php |
18 | - if($_video['visibility'] == "v" && @$_SESSION['siteusername'] != $_video['author']) |
|
19 | - header("Location: /"); |
|
18 | + if($_video['visibility'] == "v" && @$_SESSION['siteusername'] != $_video['author']) |
|
19 | + header("Location: /"); |
|
20 | 20 | |
21 | - if(isset($_SESSION['siteusername'])) |
|
22 | - $__video_h->check_view($_GET['v'], @$_SESSION['siteusername']); |
|
21 | + if(isset($_SESSION['siteusername'])) |
|
22 | + $__video_h->check_view($_GET['v'], @$_SESSION['siteusername']); |
|
23 | 23 | |
24 | - $_SESSION['current_video'] = $_video['rid']; |
|
24 | + $_SESSION['current_video'] = $_video['rid']; |
|
25 | 25 | |
26 | - /* |
|
26 | + /* |
|
27 | 27 | PREPARE EMBEDS CLASS -- function(string $page_title, string $page_description...) |
28 | 28 | Returns a list of arrays for compatibility purposes & but downside is ugly for loop codes |
29 | 29 | Work on this tomorrow or some shit idk lol |
30 | 30 | */ |
31 | 31 | |
32 | - /* |
|
32 | + /* |
|
33 | 33 | USE THE GOD DAMN __CONFIG MORE -- idiot |
34 | 34 | Work on this tomorrow or some shit |
35 | 35 | */ |
36 | 36 | |
37 | - $__server->page_embeds->page_title = htmlspecialchars($_video['title']); |
|
38 | - $__server->page_embeds->page_description = htmlspecialchars($_video['description']); |
|
39 | - $__server->page_embeds->page_image = "/dynamic/thumbs/" . $_video['thumbnail']; |
|
40 | - $__server->page_embeds->page_url = "https://subrock.rocks/watch?v=" . htmlspecialchars($_video['rid']); |
|
37 | + $__server->page_embeds->page_title = htmlspecialchars($_video['title']); |
|
38 | + $__server->page_embeds->page_description = htmlspecialchars($_video['description']); |
|
39 | + $__server->page_embeds->page_image = "/dynamic/thumbs/" . $_video['thumbnail']; |
|
40 | + $__server->page_embeds->page_url = "https://subrock.rocks/watch?v=" . htmlspecialchars($_video['rid']); |
|
41 | 41 | ?> |
42 | 42 | <!DOCTYPE html> |
43 | 43 | <html> |
@@ -67,29 +67,29 @@ discard block |
||
67 | 67 | if (window.yt.timing) {yt.timing.tick("ct");} |
68 | 68 | </script> |
69 | 69 | <?php |
70 | - $_video['dislikes'] = $__video_h->get_video_stars_level($_video['rid'], 1); |
|
71 | - $_video['dislikes'] += $__video_h->get_video_stars_level($_video['rid'], 2); |
|
70 | + $_video['dislikes'] = $__video_h->get_video_stars_level($_video['rid'], 1); |
|
71 | + $_video['dislikes'] += $__video_h->get_video_stars_level($_video['rid'], 2); |
|
72 | 72 | |
73 | - $_video['likes'] = $__video_h->get_video_stars_level($_video['rid'], 4); |
|
74 | - $_video['likes'] += $__video_h->get_video_stars_level($_video['rid'], 5); |
|
73 | + $_video['likes'] = $__video_h->get_video_stars_level($_video['rid'], 4); |
|
74 | + $_video['likes'] += $__video_h->get_video_stars_level($_video['rid'], 5); |
|
75 | 75 | |
76 | - $_video['dislikes'] += $__video_h->get_video_likes($_video['rid'], false); |
|
77 | - $_video['likes'] += $__video_h->get_video_likes($_video['rid'], true); |
|
76 | + $_video['dislikes'] += $__video_h->get_video_likes($_video['rid'], false); |
|
77 | + $_video['likes'] += $__video_h->get_video_likes($_video['rid'], true); |
|
78 | 78 | |
79 | - if($_video['likes'] == 0 && $_video['dislikes'] == 0) { |
|
80 | - $_video['likeswidth'] = 0; |
|
81 | - $_video['dislikeswidth'] = 0; |
|
82 | - } else { |
|
83 | - $_video['likeswidth'] = $_video['likes'] / ($_video['likes'] + $_video['dislikes']) * 100; |
|
84 | - $_video['dislikeswidth'] = 100 - $_video['likeswidth']; |
|
85 | - } |
|
79 | + if($_video['likes'] == 0 && $_video['dislikes'] == 0) { |
|
80 | + $_video['likeswidth'] = 0; |
|
81 | + $_video['dislikeswidth'] = 0; |
|
82 | + } else { |
|
83 | + $_video['likeswidth'] = $_video['likes'] / ($_video['likes'] + $_video['dislikes']) * 100; |
|
84 | + $_video['dislikeswidth'] = 100 - $_video['likeswidth']; |
|
85 | + } |
|
86 | 86 | |
87 | - $_video['liked'] = $__video_h->if_liked(@$_SESSION['siteusername'], $_video['rid'], true); |
|
88 | - $_video['disliked'] = $__video_h->if_liked(@$_SESSION['siteusername'], $_video['rid'], false); |
|
89 | - $_video['author_videos'] = $__video_h->fetch_user_videos($_video['author']); |
|
90 | - $_video['subscribed'] = $__user_h->if_subscribed(@$_SESSION['siteusername'], $_video['author']); |
|
91 | - $_video['favorited'] = $__video_h->if_favorited(@$_SESSION['siteusername'], $_video['rid']); |
|
92 | - ?> |
|
87 | + $_video['liked'] = $__video_h->if_liked(@$_SESSION['siteusername'], $_video['rid'], true); |
|
88 | + $_video['disliked'] = $__video_h->if_liked(@$_SESSION['siteusername'], $_video['rid'], false); |
|
89 | + $_video['author_videos'] = $__video_h->fetch_user_videos($_video['author']); |
|
90 | + $_video['subscribed'] = $__user_h->if_subscribed(@$_SESSION['siteusername'], $_video['author']); |
|
91 | + $_video['favorited'] = $__video_h->if_favorited(@$_SESSION['siteusername'], $_video['rid']); |
|
92 | + ?> |
|
93 | 93 | </head> |
94 | 94 | <body id="" class="date-20120927 en_US ltr ytg-old-clearfix guide-feed-v2 gecko gecko-15" dir="ltr"> |
95 | 95 | <form name="logoutForm" method="POST" action="/logout"> |
@@ -353,21 +353,21 @@ discard block |
||
353 | 353 | <hr><br> |
354 | 354 | <h3>Add to a Playlist</h3> |
355 | 355 | <?php |
356 | - $stmt = $__db->prepare("SELECT * FROM playlists WHERE author = :username ORDER BY id DESC LIMIT 20"); |
|
357 | - $stmt->bindParam(":username", $_SESSION['siteusername']); |
|
358 | - $stmt->execute(); |
|
359 | - while($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
360 | - $buffer = json_decode($playlist['videos']); |
|
361 | - @$rid = $buffer[0]; |
|
362 | - if(!empty($rid)) { |
|
363 | - @$video = $__video_h->fetch_video_rid($rid); |
|
364 | - } else { |
|
365 | - $video['thumbnail'] = ""; |
|
366 | - $video['duration'] = 0; |
|
367 | - } |
|
356 | + $stmt = $__db->prepare("SELECT * FROM playlists WHERE author = :username ORDER BY id DESC LIMIT 20"); |
|
357 | + $stmt->bindParam(":username", $_SESSION['siteusername']); |
|
358 | + $stmt->execute(); |
|
359 | + while($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
360 | + $buffer = json_decode($playlist['videos']); |
|
361 | + @$rid = $buffer[0]; |
|
362 | + if(!empty($rid)) { |
|
363 | + @$video = $__video_h->fetch_video_rid($rid); |
|
364 | + } else { |
|
365 | + $video['thumbnail'] = ""; |
|
366 | + $video['duration'] = 0; |
|
367 | + } |
|
368 | 368 | |
369 | - $videos = count($buffer); |
|
370 | - ?> |
|
369 | + $videos = count($buffer); |
|
370 | + ?> |
|
371 | 371 | <a href="/get/add_to_playlist?id=<?php echo $_video['rid']; ?>&playlist=<?php echo $playlist['rid']; ?>">Add to <?php echo htmlspecialchars($playlist['title']); ?></a><br> |
372 | 372 | <?php } ?> |
373 | 373 | <?php } ?> |
@@ -632,10 +632,10 @@ discard block |
||
632 | 632 | </div> |
633 | 633 | </div> |
634 | 634 | <?php |
635 | - $stmt = $__db->prepare("SELECT * FROM video_response WHERE toid = :v ORDER BY id DESC LIMIT 4"); |
|
636 | - $stmt->bindParam(":v", $_GET['v']); |
|
637 | - $stmt->execute(); |
|
638 | - ?> |
|
635 | + $stmt = $__db->prepare("SELECT * FROM video_response WHERE toid = :v ORDER BY id DESC LIMIT 4"); |
|
636 | + $stmt->bindParam(":v", $_GET['v']); |
|
637 | + $stmt->execute(); |
|
638 | + ?> |
|
639 | 639 | |
640 | 640 | <?php if($stmt->rowCount() != 0) { ?> |
641 | 641 | <div class="comments-section"> |
@@ -645,16 +645,16 @@ discard block |
||
645 | 645 | <h4>Video Responses</h4> |
646 | 646 | <ul class="video-list"> |
647 | 647 | <?php |
648 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
649 | - if($__video_h->video_exists($video['video'])) { |
|
650 | - $video = $__video_h->fetch_video_rid($video['video']); |
|
651 | - $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
|
652 | - $video['duration'] = $__time_h->timestamp($video['duration']); |
|
653 | - $video['views'] = $__video_h->fetch_video_views($video['rid']); |
|
654 | - $video['author'] = htmlspecialchars($video['author']); |
|
655 | - $video['title'] = htmlspecialchars($video['title']); |
|
656 | - $video['description'] = $__video_h->shorten_description($video['description'], 50); |
|
657 | - ?> |
|
648 | + while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
649 | + if($__video_h->video_exists($video['video'])) { |
|
650 | + $video = $__video_h->fetch_video_rid($video['video']); |
|
651 | + $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
|
652 | + $video['duration'] = $__time_h->timestamp($video['duration']); |
|
653 | + $video['views'] = $__video_h->fetch_video_views($video['rid']); |
|
654 | + $video['author'] = htmlspecialchars($video['author']); |
|
655 | + $video['title'] = htmlspecialchars($video['title']); |
|
656 | + $video['description'] = $__video_h->shorten_description($video['description'], 50); |
|
657 | + ?> |
|
658 | 658 | <li class="video-list-item yt-tile-default"> |
659 | 659 | <a href="/watch?v=<?php echo $video['rid']; ?>" class="related-video yt-uix-contextlink yt-uix-sessionlink" data-sessionlink="<?php echo htmlspecialchars($_video['author']); ?>&feature=watch_response"><span class="ux-thumb-wrap contains-addto "><span class="video-thumb ux-thumb yt-thumb-default-120 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="<?php echo $video['title']; ?>" data-thumb="/dynamic/thumbs/<?php echo $video['thumbnail']; ?>" width="120"><span class="vertical-align"></span></span></span></span><span class="video-time"><?php echo $video['duration']; ?></span> |
660 | 660 | <button onclick=";return false;" title="Watch Later" type="button" class="addto-button video-actions addto-watch-later-button-sign-in yt-uix-button yt-uix-button-default yt-uix-button-short yt-uix-tooltip" data-button-menu-id="shared-addto-watch-later-login" data-video-ids="cjls0QsHOBE" role="button"><span class="yt-uix-button-content"> <img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Watch Later"> |
@@ -735,38 +735,38 @@ discard block |
||
735 | 735 | </div> |
736 | 736 | <ul class="comment-list" id="live_comments"> |
737 | 737 | <?php |
738 | - $results_per_page = 20; |
|
738 | + $results_per_page = 20; |
|
739 | 739 | |
740 | - $stmt = $__db->prepare("SELECT * FROM comments WHERE toid = :rid ORDER BY id DESC"); |
|
741 | - $stmt->bindParam(":rid", $_video['rid']); |
|
742 | - $stmt->execute(); |
|
740 | + $stmt = $__db->prepare("SELECT * FROM comments WHERE toid = :rid ORDER BY id DESC"); |
|
741 | + $stmt->bindParam(":rid", $_video['rid']); |
|
742 | + $stmt->execute(); |
|
743 | 743 | |
744 | - $number_of_result = $stmt->rowCount(); |
|
745 | - $number_of_page = ceil ($number_of_result / $results_per_page); |
|
744 | + $number_of_result = $stmt->rowCount(); |
|
745 | + $number_of_page = ceil ($number_of_result / $results_per_page); |
|
746 | 746 | |
747 | - if (!isset ($_GET['page']) ) { |
|
748 | - $page = 1; |
|
749 | - } else { |
|
750 | - $page = (int)$_GET['page']; |
|
751 | - } |
|
747 | + if (!isset ($_GET['page']) ) { |
|
748 | + $page = 1; |
|
749 | + } else { |
|
750 | + $page = (int)$_GET['page']; |
|
751 | + } |
|
752 | 752 | |
753 | - $page_first_result = ($page - 1) * $results_per_page; |
|
753 | + $page_first_result = ($page - 1) * $results_per_page; |
|
754 | 754 | |
755 | - $stmt = $__db->prepare("SELECT * FROM comments WHERE toid = :rid ORDER BY id DESC LIMIT :pfirst, :pper"); |
|
756 | - $stmt->bindParam(":rid", $_video['rid']); |
|
757 | - $stmt->bindParam(":pfirst", $page_first_result); |
|
758 | - $stmt->bindParam(":pper", $results_per_page); |
|
759 | - $stmt->execute(); |
|
755 | + $stmt = $__db->prepare("SELECT * FROM comments WHERE toid = :rid ORDER BY id DESC LIMIT :pfirst, :pper"); |
|
756 | + $stmt->bindParam(":rid", $_video['rid']); |
|
757 | + $stmt->bindParam(":pfirst", $page_first_result); |
|
758 | + $stmt->bindParam(":pper", $results_per_page); |
|
759 | + $stmt->execute(); |
|
760 | 760 | |
761 | - while($comment = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
762 | - if($__video_h->if_comment_liked($comment['id'], $_SESSION['siteusername'], true)) |
|
763 | - $comment['liked'] = true; |
|
764 | - else if($__video_h->if_comment_liked($comment['id'], $_SESSION['siteusername'], false)) |
|
765 | - $comment['disliked'] = true; |
|
761 | + while($comment = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
762 | + if($__video_h->if_comment_liked($comment['id'], $_SESSION['siteusername'], true)) |
|
763 | + $comment['liked'] = true; |
|
764 | + else if($__video_h->if_comment_liked($comment['id'], $_SESSION['siteusername'], false)) |
|
765 | + $comment['disliked'] = true; |
|
766 | 766 | |
767 | - $comment['likes'] = $__video_h->get_comment_likes($comment['id'], true); |
|
768 | - $comment['likes'] -= $__video_h->get_comment_likes($comment['id'], false); |
|
769 | - ?> |
|
767 | + $comment['likes'] = $__video_h->get_comment_likes($comment['id'], true); |
|
768 | + $comment['likes'] -= $__video_h->get_comment_likes($comment['id'], false); |
|
769 | + ?> |
|
770 | 770 | |
771 | 771 | <li class="comment yt-tile-default " data-author-viewing="" data-author-id="-uD01K8FQTeOSS5sniRFzQ" data-id="<?php echo $comment['id']; ?>" data-score="0"> |
772 | 772 | <div class="comment-body"> |
@@ -832,12 +832,12 @@ discard block |
||
832 | 832 | </div> |
833 | 833 | </li> |
834 | 834 | <?php |
835 | - $stmt2 = $__db->prepare("SELECT * FROM comment_reply WHERE toid = :rid ORDER BY id"); |
|
836 | - $stmt2->bindParam(":rid", $comment['id']); |
|
837 | - $stmt2->execute(); |
|
835 | + $stmt2 = $__db->prepare("SELECT * FROM comment_reply WHERE toid = :rid ORDER BY id"); |
|
836 | + $stmt2->bindParam(":rid", $comment['id']); |
|
837 | + $stmt2->execute(); |
|
838 | 838 | |
839 | - while($reply = $stmt2->fetch(PDO::FETCH_ASSOC)) { |
|
840 | - ?> |
|
839 | + while($reply = $stmt2->fetch(PDO::FETCH_ASSOC)) { |
|
840 | + ?> |
|
841 | 841 | <li class="comment yt-tile-default " style="padding-left: 30px;" data-author-viewing="" data-author-id="-uD01K8FQTeOSS5sniRFzQ" data-id="<?php echo $reply['id']; ?>" data-score="0"> |
842 | 842 | <div class="comment-body"> |
843 | 843 | <div class="content-container"> |
@@ -917,19 +917,19 @@ discard block |
||
917 | 917 | <div id="watch-related-container" class="watch-sidebar-body"> |
918 | 918 | <ul id="watch-related" class="video-list"> |
919 | 919 | <?php |
920 | - $stmt = $__db->prepare("SELECT * FROM playlists ORDER BY rand() LIMIT 2"); |
|
921 | - $stmt->execute(); |
|
922 | - while($_playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
923 | - $_playlist['videos'] = json_decode($_playlist['videos']); |
|
924 | - $_playlist['count'] = 1; |
|
920 | + $stmt = $__db->prepare("SELECT * FROM playlists ORDER BY rand() LIMIT 2"); |
|
921 | + $stmt->execute(); |
|
922 | + while($_playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
923 | + $_playlist['videos'] = json_decode($_playlist['videos']); |
|
924 | + $_playlist['count'] = 1; |
|
925 | 925 | |
926 | - if($__video_h->video_exists($_playlist['videos'][0])) { |
|
927 | - $video = $__video_h->fetch_video_rid($_playlist['videos'][0]); |
|
928 | - } else { |
|
929 | - $video = []; |
|
930 | - $video['thumbnail'] = "default.jpg"; |
|
931 | - } |
|
932 | - ?> |
|
926 | + if($__video_h->video_exists($_playlist['videos'][0])) { |
|
927 | + $video = $__video_h->fetch_video_rid($_playlist['videos'][0]); |
|
928 | + } else { |
|
929 | + $video = []; |
|
930 | + $video['thumbnail'] = "default.jpg"; |
|
931 | + } |
|
932 | + ?> |
|
933 | 933 | <li class="video-list-item"> |
934 | 934 | <a href="/view_playlist?v=<?php echo $_playlist['rid']; ?>" class="related-playlist yt-uix-contextlink yt-uix-sessionlink" data-sessionlink="ved=CAMQzhooAA%3D%3D&ei=CKf4md_r7rMCFYMfRAodLGlRiA%3D%3D&feature=list_other"> |
935 | 935 | <span class="ux-thumb-wrap"> |
@@ -976,16 +976,16 @@ discard block |
||
976 | 976 | <?php } ?> |
977 | 977 | <div id="ppv-container" class="hid"></div> |
978 | 978 | <?php |
979 | - $stmt = $__db->prepare("SELECT * FROM videos WHERE visibility = 'n' ORDER BY rand() LIMIT 20"); |
|
980 | - $stmt->execute(); |
|
981 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
982 | - $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
|
983 | - $video['duration'] = $__time_h->timestamp($video['duration']); |
|
984 | - $video['views'] = $__video_h->fetch_video_views($video['rid']); |
|
985 | - $video['author'] = htmlspecialchars($video['author']); |
|
986 | - $video['title'] = htmlspecialchars($video['title']); |
|
987 | - $video['description'] = $__video_h->shorten_description($video['description'], 50); |
|
988 | - ?> |
|
979 | + $stmt = $__db->prepare("SELECT * FROM videos WHERE visibility = 'n' ORDER BY rand() LIMIT 20"); |
|
980 | + $stmt->execute(); |
|
981 | + while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
982 | + $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
|
983 | + $video['duration'] = $__time_h->timestamp($video['duration']); |
|
984 | + $video['views'] = $__video_h->fetch_video_views($video['rid']); |
|
985 | + $video['author'] = htmlspecialchars($video['author']); |
|
986 | + $video['title'] = htmlspecialchars($video['title']); |
|
987 | + $video['description'] = $__video_h->shorten_description($video['description'], 50); |
|
988 | + ?> |
|
989 | 989 | <li class="video-list-item"><a href="/watch?v=<?php echo $video['rid']; ?>" class="related-video yt-uix-contextlink yt-uix-sessionlink" data-sessionlink="ved=CAIQzRooAA%3D%3D&<?php echo htmlspecialchars($_video['author']); ?>&feature=relmfu"><span class="ux-thumb-wrap contains-addto "><span class="video-thumb ux-thumb yt-thumb-default-120 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="<?php echo $video['title']; ?>" onerror=";this.src='/dynamic/thumbs/default.jpg';" data-thumb="/dynamic/thumbs/<?php echo $video['thumbnail']; ?>" width="120"><span class="vertical-align"></span></span></span></span><span class="video-time"><?php echo $video['duration']; ?></span> |
990 | 990 | <button onclick=";return false;" title="Watch Later" type="button" class="addto-button video-actions addto-watch-later-button-sign-in yt-uix-button yt-uix-button-default yt-uix-button-short yt-uix-tooltip" data-button-menu-id="shared-addto-watch-later-login" data-video-ids="gyAaIKF6tSQ" role="button"><span class="yt-uix-button-content"> <img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Watch Later"> |
991 | 991 | </span><img class="yt-uix-button-arrow" src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt=""></button> |
@@ -11,14 +11,14 @@ discard block |
||
11 | 11 | <?php $__user_u = new user_update($__db); ?> |
12 | 12 | <?php $__db_h = new db_helper(); ?> |
13 | 13 | <?php $__time_h = new time_helper(); ?> |
14 | -<?php if(!$__video_h->video_exists($_GET['v'])) { header("Location: /?error=This video doesn't exist!"); } ?> |
|
14 | +<?php if (!$__video_h->video_exists($_GET['v'])) { header("Location: /?error=This video doesn't exist!"); } ?> |
|
15 | 15 | <?php $_video = $__video_h->fetch_video_rid($_GET['v']); ?> |
16 | 16 | <?php $_video['comments'] = $__video_h->get_comments_from_video($_video['rid']); ?> |
17 | 17 | <?php |
18 | - if($_video['visibility'] == "v" && @$_SESSION['siteusername'] != $_video['author']) |
|
18 | + if ($_video['visibility'] == "v" && @$_SESSION['siteusername'] != $_video['author']) |
|
19 | 19 | header("Location: /"); |
20 | 20 | |
21 | - if(isset($_SESSION['siteusername'])) |
|
21 | + if (isset($_SESSION['siteusername'])) |
|
22 | 22 | $__video_h->check_view($_GET['v'], @$_SESSION['siteusername']); |
23 | 23 | |
24 | 24 | $_SESSION['current_video'] = $_video['rid']; |
@@ -67,20 +67,20 @@ discard block |
||
67 | 67 | if (window.yt.timing) {yt.timing.tick("ct");} |
68 | 68 | </script> |
69 | 69 | <?php |
70 | - $_video['dislikes'] = $__video_h->get_video_stars_level($_video['rid'], 1); |
|
70 | + $_video['dislikes'] = $__video_h->get_video_stars_level($_video['rid'], 1); |
|
71 | 71 | $_video['dislikes'] += $__video_h->get_video_stars_level($_video['rid'], 2); |
72 | 72 | |
73 | - $_video['likes'] = $__video_h->get_video_stars_level($_video['rid'], 4); |
|
74 | - $_video['likes'] += $__video_h->get_video_stars_level($_video['rid'], 5); |
|
73 | + $_video['likes'] = $__video_h->get_video_stars_level($_video['rid'], 4); |
|
74 | + $_video['likes'] += $__video_h->get_video_stars_level($_video['rid'], 5); |
|
75 | 75 | |
76 | 76 | $_video['dislikes'] += $__video_h->get_video_likes($_video['rid'], false); |
77 | 77 | $_video['likes'] += $__video_h->get_video_likes($_video['rid'], true); |
78 | 78 | |
79 | - if($_video['likes'] == 0 && $_video['dislikes'] == 0) { |
|
79 | + if ($_video['likes'] == 0 && $_video['dislikes'] == 0) { |
|
80 | 80 | $_video['likeswidth'] = 0; |
81 | 81 | $_video['dislikeswidth'] = 0; |
82 | 82 | } else { |
83 | - $_video['likeswidth'] = $_video['likes'] / ($_video['likes'] + $_video['dislikes']) * 100; |
|
83 | + $_video['likeswidth'] = $_video['likes']/($_video['likes'] + $_video['dislikes'])*100; |
|
84 | 84 | $_video['dislikeswidth'] = 100 - $_video['likeswidth']; |
85 | 85 | } |
86 | 86 | |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | </div> |
115 | 115 | <div id="instream_google_companion_ad_div"></div> |
116 | 116 | </div> |
117 | - <?php if(@$_SESSION['siteusername'] == $_video['author']) { ?> |
|
117 | + <?php if (@$_SESSION['siteusername'] == $_video['author']) { ?> |
|
118 | 118 | <div id="watch-owner-container"> |
119 | 119 | <div id="masthead-subnav" class="yt-nav yt-nav-dark "> |
120 | 120 | <ul class="yt-nav-aside"> |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | </div><br> |
135 | 135 | <?php } ?> |
136 | 136 | |
137 | - <?php if($__user_h->if_admin(@$_SESSION['siteusername'])) { ?> |
|
137 | + <?php if ($__user_h->if_admin(@$_SESSION['siteusername'])) { ?> |
|
138 | 138 | <div id="watch-owner-container"> |
139 | 139 | <div id="masthead-subnav" class="yt-nav yt-nav-dark "> |
140 | 140 | <ul class="yt-nav-aside"> |
@@ -169,7 +169,7 @@ discard block |
||
169 | 169 | title="" |
170 | 170 | id="subscribe-button" |
171 | 171 | type="button" |
172 | - class="<?php if($_video['subscribed']) { echo "subscribed "; } ?>yt-subscription-button yt-uix-button yt-uix-button-subscription yt-uix-tooltip" |
|
172 | + class="<?php if ($_video['subscribed']) { echo "subscribed "; } ?>yt-subscription-button yt-uix-button yt-uix-button-subscription yt-uix-tooltip" |
|
173 | 173 | role="button"> |
174 | 174 | <span class="yt-uix-button-icon-wrapper"> |
175 | 175 | <img class="yt-uix-button-icon yt-uix-button-icon-subscribe" src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt=""> |
@@ -227,7 +227,7 @@ discard block |
||
227 | 227 | <div id="watch-main-container"> |
228 | 228 | <div id="watch-main"> |
229 | 229 | <div id="watch-panel"> |
230 | - <?php if($_video['visibility'] == "u") { ?> |
|
230 | + <?php if ($_video['visibility'] == "u") { ?> |
|
231 | 231 | <div id="masthead_child_div"><div class="yt-alert yt-alert-default yt-alert-warn"> <div class="yt-alert-icon"> |
232 | 232 | <img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" class="icon master-sprite" alt="Alert icon"> |
233 | 233 | </div> |
@@ -236,7 +236,7 @@ discard block |
||
236 | 236 | This video is unlisted. Only people who have the link can view this video. |
237 | 237 | </div> |
238 | 238 | </div></div></div> |
239 | - <?php } else if($_video['visibility'] == "v") { ?> |
|
239 | + <?php } else if ($_video['visibility'] == "v") { ?> |
|
240 | 240 | <div id="masthead_child_div"><div class="yt-alert yt-alert-default yt-alert-error"> <div class="yt-alert-icon"> |
241 | 241 | <img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" class="icon master-sprite" alt="Alert icon"> |
242 | 242 | </div> |
@@ -270,7 +270,7 @@ discard block |
||
270 | 270 | <button onclick=";like_video();return false;" |
271 | 271 | title="I like this" |
272 | 272 | type="button" |
273 | - class="start <?php if($_video['liked']) { echo "liked "; } ?>yt-uix-tooltip-reverse yt-uix-button yt-uix-button-default yt-uix-tooltip" |
|
273 | + class="start <?php if ($_video['liked']) { echo "liked "; } ?>yt-uix-tooltip-reverse yt-uix-button yt-uix-button-default yt-uix-tooltip" |
|
274 | 274 | id="watch-like" |
275 | 275 | href="/get/like_video?v=<?php echo $_video['rid']; ?>" |
276 | 276 | role="button"><span class="yt-uix-button-icon-wrapper"> |
@@ -284,7 +284,7 @@ discard block |
||
284 | 284 | type="button" |
285 | 285 | style="margin-left: -2px;" |
286 | 286 | href="/get/dislike_video?v=<?php echo $_video['rid']; ?>" |
287 | - class="end yt-uix-tooltip-reverse <?php if($_video['disliked']) { echo "unliked "; } ?> yt-uix-button yt-uix-button-default yt-uix-tooltip yt-uix-button-empty" |
|
287 | + class="end yt-uix-tooltip-reverse <?php if ($_video['disliked']) { echo "unliked "; } ?> yt-uix-button yt-uix-button-default yt-uix-tooltip yt-uix-button-empty" |
|
288 | 288 | id="watch-unlike" |
289 | 289 | role="button"> |
290 | 290 | <span class="yt-uix-button-icon-wrapper"> |
@@ -304,7 +304,7 @@ discard block |
||
304 | 304 | </div> |
305 | 305 | </div> |
306 | 306 | <div id="watch-actions-logged-out" class="watch-actions-panel hid"> |
307 | - <?php if(!isset($_SESSION['siteusername'])) { ?> |
|
307 | + <?php if (!isset($_SESSION['siteusername'])) { ?> |
|
308 | 308 | <div class="yt-alert yt-alert-naked yt-alert-warn "> |
309 | 309 | <div class="yt-alert-icon"> |
310 | 310 | <img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" class="icon master-sprite" alt="Alert icon"> |
@@ -320,7 +320,7 @@ discard block |
||
320 | 320 | <?php } else { ?> |
321 | 321 | <h3>Be friends with the creator</h3> |
322 | 322 | |
323 | - <?php if($_SESSION['siteusername'] != $_video['author']) { ?> |
|
323 | + <?php if ($_SESSION['siteusername'] != $_video['author']) { ?> |
|
324 | 324 | <img style="width: 50px;height:50px;" src="/dynamic/pfp/<?php echo $__user_h->fetch_pfp($_video['author']); ?>"> |
325 | 325 | <span style="display: inline-block; vertical-align:top;width: 100px;font-size:11px;"> |
326 | 326 | <b><a href="/user/<?php echo htmlspecialchars($_video['author']); ?>"><?php echo htmlspecialchars($_video['author']); ?></a></b><br> |
@@ -334,8 +334,8 @@ discard block |
||
334 | 334 | </span><br><br> |
335 | 335 | <?php } ?> |
336 | 336 | |
337 | - <?php if($_SESSION['siteusername'] != $_video['author']) { ?> |
|
338 | - <?php if($_video['friended'] == false) { ?> |
|
337 | + <?php if ($_SESSION['siteusername'] != $_video['author']) { ?> |
|
338 | + <?php if ($_video['friended'] == false) { ?> |
|
339 | 339 | <a href="/friends">Send a friend request</a> |
340 | 340 | <?php } else { ?> |
341 | 341 | Your friend request is pending. |
@@ -345,7 +345,7 @@ discard block |
||
345 | 345 | <?php } ?> |
346 | 346 | <hr><br> |
347 | 347 | <h3>Add to Favorites</h3> |
348 | - <?php if($_video['favorited'] == false) { ?> |
|
348 | + <?php if ($_video['favorited'] == false) { ?> |
|
349 | 349 | <a href="/get/favorite?v=<?php echo $_video['rid']; ?>">Favorite Video</a> |
350 | 350 | <?php } else { ?> |
351 | 351 | <a href="/get/unfavorite?v=<?php echo $_video['rid']; ?>">Unfavorite Video</a> |
@@ -356,10 +356,10 @@ discard block |
||
356 | 356 | $stmt = $__db->prepare("SELECT * FROM playlists WHERE author = :username ORDER BY id DESC LIMIT 20"); |
357 | 357 | $stmt->bindParam(":username", $_SESSION['siteusername']); |
358 | 358 | $stmt->execute(); |
359 | - while($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
359 | + while ($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
360 | 360 | $buffer = json_decode($playlist['videos']); |
361 | 361 | @$rid = $buffer[0]; |
362 | - if(!empty($rid)) { |
|
362 | + if (!empty($rid)) { |
|
363 | 363 | @$video = $__video_h->fetch_video_rid($rid); |
364 | 364 | } else { |
365 | 365 | $video['thumbnail'] = ""; |
@@ -637,7 +637,7 @@ discard block |
||
637 | 637 | $stmt->execute(); |
638 | 638 | ?> |
639 | 639 | |
640 | - <?php if($stmt->rowCount() != 0) { ?> |
|
640 | + <?php if ($stmt->rowCount() != 0) { ?> |
|
641 | 641 | <div class="comments-section"> |
642 | 642 | <a class="comments-section-see-all" href="/video_response_view_all?v=<?php echo htmlspecialchars($_video['rid']); ?>"> |
643 | 643 | see all |
@@ -645,8 +645,8 @@ discard block |
||
645 | 645 | <h4>Video Responses</h4> |
646 | 646 | <ul class="video-list"> |
647 | 647 | <?php |
648 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
649 | - if($__video_h->video_exists($video['video'])) { |
|
648 | + while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
649 | + if ($__video_h->video_exists($video['video'])) { |
|
650 | 650 | $video = $__video_h->fetch_video_rid($video['video']); |
651 | 651 | $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
652 | 652 | $video['duration'] = $__time_h->timestamp($video['duration']); |
@@ -677,18 +677,18 @@ discard block |
||
677 | 677 | </h4> |
678 | 678 | </div> |
679 | 679 | </div> |
680 | - <?php if(!isset($_SESSION['siteusername'])) { ?> |
|
680 | + <?php if (!isset($_SESSION['siteusername'])) { ?> |
|
681 | 681 | <div class="comments-post-container clearfix"> |
682 | 682 | <div class="comments-post-alert"> |
683 | 683 | <a href="/sign_in">Sign In</a> or <a href="/sign_up">Sign Up</a><span class="comments-post-form-rollover-text"> now to post a comment!</span> |
684 | 684 | </div> |
685 | 685 | </div> |
686 | - <?php } else if($_video['commenting'] == "d") { ?> |
|
686 | + <?php } else if ($_video['commenting'] == "d") { ?> |
|
687 | 687 | <div class="comments-disabled-message"> |
688 | 688 | <img src="http://s.ytimg.com/yt/img/icon_comments_disabled-vflxokpZC.png"> |
689 | 689 | <span>Adding comments has been disabled for this video.</span> |
690 | 690 | </div> |
691 | - <?php } else if($__user_h->if_blocked($_video['author'], $_SESSION['siteusername'])) { ?> |
|
691 | + <?php } else if ($__user_h->if_blocked($_video['author'], $_SESSION['siteusername'])) { ?> |
|
692 | 692 | <div class="comments-post-container clearfix"> |
693 | 693 | <div class="comments-post-alert"> |
694 | 694 | This user has blocked you! |
@@ -742,15 +742,15 @@ discard block |
||
742 | 742 | $stmt->execute(); |
743 | 743 | |
744 | 744 | $number_of_result = $stmt->rowCount(); |
745 | - $number_of_page = ceil ($number_of_result / $results_per_page); |
|
745 | + $number_of_page = ceil($number_of_result/$results_per_page); |
|
746 | 746 | |
747 | - if (!isset ($_GET['page']) ) { |
|
747 | + if (!isset ($_GET['page'])) { |
|
748 | 748 | $page = 1; |
749 | 749 | } else { |
750 | - $page = (int)$_GET['page']; |
|
750 | + $page = (int) $_GET['page']; |
|
751 | 751 | } |
752 | 752 | |
753 | - $page_first_result = ($page - 1) * $results_per_page; |
|
753 | + $page_first_result = ($page - 1)*$results_per_page; |
|
754 | 754 | |
755 | 755 | $stmt = $__db->prepare("SELECT * FROM comments WHERE toid = :rid ORDER BY id DESC LIMIT :pfirst, :pper"); |
756 | 756 | $stmt->bindParam(":rid", $_video['rid']); |
@@ -758,10 +758,10 @@ discard block |
||
758 | 758 | $stmt->bindParam(":pper", $results_per_page); |
759 | 759 | $stmt->execute(); |
760 | 760 | |
761 | - while($comment = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
762 | - if($__video_h->if_comment_liked($comment['id'], $_SESSION['siteusername'], true)) |
|
761 | + while ($comment = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
762 | + if ($__video_h->if_comment_liked($comment['id'], $_SESSION['siteusername'], true)) |
|
763 | 763 | $comment['liked'] = true; |
764 | - else if($__video_h->if_comment_liked($comment['id'], $_SESSION['siteusername'], false)) |
|
764 | + else if ($__video_h->if_comment_liked($comment['id'], $_SESSION['siteusername'], false)) |
|
765 | 765 | $comment['disliked'] = true; |
766 | 766 | |
767 | 767 | $comment['likes'] = $__video_h->get_comment_likes($comment['id'], true); |
@@ -783,7 +783,7 @@ discard block |
||
783 | 783 | <span dir="ltr"><?php echo $__time_h->time_elapsed_string($comment['date']); ?><span> |
784 | 784 | </span> |
785 | 785 | </span></span> |
786 | - <?php if($comment['likes'] != 0) { ?> |
|
786 | + <?php if ($comment['likes'] != 0) { ?> |
|
787 | 787 | <span dir="ltr" class="comments-rating-positive" title="9 up, 1 down"> |
788 | 788 | <?php echo $comment['likes']; ?> |
789 | 789 | <img class="comments-rating-thumbs-up" src="//s.ytimg.com/yts/img/pixel-vfl3z5WfW.gif"> |
@@ -811,7 +811,7 @@ discard block |
||
811 | 811 | </button> |
812 | 812 | </span> |
813 | 813 | </div> |
814 | - <?php if(isset($_SESSION['siteusername'])) { ?> |
|
814 | + <?php if (isset($_SESSION['siteusername'])) { ?> |
|
815 | 815 | <li id="reply_to_<?php echo $comment['id']; ?>" style="display: none;" class="comment yt-tile-default child" data-tag="O" data-author-viewing="" data-id="iRV7EkT9us81mDLFDSB6FAsB156Fdn13HUmTm26C3PE" data-score="34" data-author="<?php echo htmlspecialchars($row['author']); ?>"> |
816 | 816 | |
817 | 817 | <div class="comment-body"> |
@@ -836,7 +836,7 @@ discard block |
||
836 | 836 | $stmt2->bindParam(":rid", $comment['id']); |
837 | 837 | $stmt2->execute(); |
838 | 838 | |
839 | - while($reply = $stmt2->fetch(PDO::FETCH_ASSOC)) { |
|
839 | + while ($reply = $stmt2->fetch(PDO::FETCH_ASSOC)) { |
|
840 | 840 | ?> |
841 | 841 | <li class="comment yt-tile-default " style="padding-left: 30px;" data-author-viewing="" data-author-id="-uD01K8FQTeOSS5sniRFzQ" data-id="<?php echo $reply['id']; ?>" data-score="0"> |
842 | 842 | <div class="comment-body"> |
@@ -919,11 +919,11 @@ discard block |
||
919 | 919 | <?php |
920 | 920 | $stmt = $__db->prepare("SELECT * FROM playlists ORDER BY rand() LIMIT 2"); |
921 | 921 | $stmt->execute(); |
922 | - while($_playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
922 | + while ($_playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
923 | 923 | $_playlist['videos'] = json_decode($_playlist['videos']); |
924 | 924 | $_playlist['count'] = 1; |
925 | 925 | |
926 | - if($__video_h->video_exists($_playlist['videos'][0])) { |
|
926 | + if ($__video_h->video_exists($_playlist['videos'][0])) { |
|
927 | 927 | $video = $__video_h->fetch_video_rid($_playlist['videos'][0]); |
928 | 928 | } else { |
929 | 929 | $video = []; |
@@ -978,7 +978,7 @@ discard block |
||
978 | 978 | <?php |
979 | 979 | $stmt = $__db->prepare("SELECT * FROM videos WHERE visibility = 'n' ORDER BY rand() LIMIT 20"); |
980 | 980 | $stmt->execute(); |
981 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
981 | + while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
982 | 982 | $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
983 | 983 | $video['duration'] = $__time_h->timestamp($video['duration']); |
984 | 984 | $video['views'] = $__video_h->fetch_video_views($video['rid']); |
@@ -8,7 +8,7 @@ discard block |
||
8 | 8 | <?php $__db_h = new db_helper(); ?> |
9 | 9 | <?php $__time_h = new time_helper(); ?> |
10 | 10 | <?php |
11 | -if(!isset($_SESSION['siteusername'])) |
|
11 | +if (!isset($_SESSION['siteusername'])) |
|
12 | 12 | header('Location: ' . $_SERVER['HTTP_REFERER'] . '&error=You have to be logged in to report videos.'); |
13 | 13 | |
14 | 14 | $_video = $__video_h->fetch_video_rid($_GET['v']); |
@@ -21,17 +21,17 @@ discard block |
||
21 | 21 | "username" => str_replace("@", "", $_SESSION['siteusername']), |
22 | 22 | // "avatar_url" => "https://subrock.rocks/dynamic/pfp/", |
23 | 23 | "tts" => false, |
24 | -], JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE ); |
|
24 | +], JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); |
|
25 | 25 | |
26 | -$ch = curl_init( $webhookurl ); |
|
27 | -curl_setopt( $ch, CURLOPT_HTTPHEADER, array('Content-type: application/json')); |
|
28 | -curl_setopt( $ch, CURLOPT_POST, 1); |
|
29 | -curl_setopt( $ch, CURLOPT_POSTFIELDS, $json_data); |
|
30 | -curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, 1); |
|
31 | -curl_setopt( $ch, CURLOPT_HEADER, 0); |
|
32 | -curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1); |
|
26 | +$ch = curl_init($webhookurl); |
|
27 | +curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-type: application/json')); |
|
28 | +curl_setopt($ch, CURLOPT_POST, 1); |
|
29 | +curl_setopt($ch, CURLOPT_POSTFIELDS, $json_data); |
|
30 | +curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); |
|
31 | +curl_setopt($ch, CURLOPT_HEADER, 0); |
|
32 | +curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); |
|
33 | 33 | |
34 | -$response = curl_exec( $ch ); |
|
35 | -curl_close( $ch ); |
|
34 | +$response = curl_exec($ch); |
|
35 | +curl_close($ch); |
|
36 | 36 | header('Location: ' . $_SERVER['HTTP_REFERER'] . '&success=Successfully reported this video.'); |
37 | 37 | ?> |
38 | 38 | \ No newline at end of file |
@@ -8,8 +8,9 @@ |
||
8 | 8 | <?php $__db_h = new db_helper(); ?> |
9 | 9 | <?php $__time_h = new time_helper(); ?> |
10 | 10 | <?php |
11 | -if(!isset($_SESSION['siteusername'])) |
|
11 | +if(!isset($_SESSION['siteusername'])) { |
|
12 | 12 | header('Location: ' . $_SERVER['HTTP_REFERER'] . '&error=You have to be logged in to report videos.'); |
13 | +} |
|
13 | 14 | |
14 | 15 | $_video = $__video_h->fetch_video_rid($_GET['v']); |
15 | 16 | $webhookurl = $__server->discord_webhook; |
@@ -286,7 +286,7 @@ discard block |
||
286 | 286 | </script> |
287 | 287 | <!--<button class="yt-uix-button yt-uix-button-default" id="av-uplod">Select File</button>--> |
288 | 288 | <img src="/dynamic/pfp/<?php echo $_user['pfp']; ?>" style="width:100px;height:100px;"><br> |
289 | - <?php if($_user['pfp'] != "default.png") { ?> |
|
289 | + <?php if ($_user['pfp'] != "default.png") { ?> |
|
290 | 290 | <a href="/get/remove_profile_pic">Remove Profile Picture</a><br> |
291 | 291 | <?php } ?> |
292 | 292 | <br><hr class="thin-line-darker" style="width:unset;"> |
@@ -296,7 +296,7 @@ discard block |
||
296 | 296 | <input style="width: 169px;position: relative;top: 10px;" type="file" name="videopagebanner" id="avatar-upload"> |
297 | 297 | <button class="yt-uix-button yt-uix-button-default" id="av-uplod">Select File</button> |
298 | 298 | </div><br> |
299 | - <?php if(!empty($_user['subbutton'])) { ?> |
|
299 | + <?php if (!empty($_user['subbutton'])) { ?> |
|
300 | 300 | <a href="/get/remove_watch_banner">Remove Watch Page Banner</a><br> |
301 | 301 | <?php } ?><br><hr class="thin-line-darker" style="width:unset;"> |
302 | 302 | |
@@ -322,19 +322,19 @@ discard block |
||
322 | 322 | |
323 | 323 | <b>Featured Video</b> |
324 | 324 | <div class="customization-module" id="featuredvid" action="/d/channel_update" enctype="multipart/form-data" style="display: inline-block;float:right;position: relative;bottom: 6px;"> |
325 | - <input class="yt-uix-form-input-text" style="width: 291px;" id="biomd" placeholder="Video ID" value="<?php echo htmlspecialchars($_user['featured']);?>" name="videoid"> |
|
325 | + <input class="yt-uix-form-input-text" style="width: 291px;" id="biomd" placeholder="Video ID" value="<?php echo htmlspecialchars($_user['featured']); ?>" name="videoid"> |
|
326 | 326 | </div><br><br><hr class="thin-line-darker" style="width:unset;"> |
327 | 327 | |
328 | 328 | <div style="position: relative;top: 7px;"> |
329 | 329 | <b>Featured Channels</b> |
330 | 330 | <div class="customization-module" id="featuredvid" action="/d/channel_update" enctype="multipart/form-data" style="display: inline-block;float:right;position: relative;bottom: 6px;"> |
331 | - <input class="yt-uix-form-input-text" style="width: 291px;" id="biomd" placeholder="Seperate by commas!" value="<?php echo htmlspecialchars($_user['featured_channels']);?>" name="featuredchannels"> |
|
331 | + <input class="yt-uix-form-input-text" style="width: 291px;" id="biomd" placeholder="Seperate by commas!" value="<?php echo htmlspecialchars($_user['featured_channels']); ?>" name="featuredchannels"> |
|
332 | 332 | </div> |
333 | 333 | </div><br><br><hr class="thin-line-darker" style="margin-top: 0px;width:unset;"><br> |
334 | 334 | |
335 | 335 | <b>Website</b> |
336 | 336 | <div class="customization-module" id="featuredvid" action="/d/channel_update" enctype="multipart/form-data" style="float: right;position: relative;top: -7px;"> |
337 | - <input class="yt-uix-form-input-text" style="width: 291px;" id="biomd" placeholder="Website URL" value="<?php echo htmlspecialchars($_user['website']);?>" name="website"> |
|
337 | + <input class="yt-uix-form-input-text" style="width: 291px;" id="biomd" placeholder="Website URL" value="<?php echo htmlspecialchars($_user['website']); ?>" name="website"> |
|
338 | 338 | |
339 | 339 | </div><br><br><hr class="thin-line-darker" style="width:unset;"> |
340 | 340 | |
@@ -344,7 +344,7 @@ discard block |
||
344 | 344 | <span style="font-size: 11px;" class="grey-text">This will show what type of channel you are to other users.</span> |
345 | 345 | <div class="customization-module" id="channellayout" action="/d/channel_update" enctype="multipart/form-data" style="float: right;position: relative;top: -19px;"> |
346 | 346 | <select class="yt-uix-button yt-uix-button-default" style="position:relative;top:6px;" name="genre"> |
347 | - <?php foreach($categories as $category) { ?> |
|
347 | + <?php foreach ($categories as $category) { ?> |
|
348 | 348 | <option value="<?php echo $category; ?>"><?php echo $category; ?></option> |
349 | 349 | <?php } ?> |
350 | 350 | </select> |
@@ -358,7 +358,7 @@ discard block |
||
358 | 358 | <select class="yt-uix-button yt-uix-button-default" style="position:relative;top:6px;" name="transparency"> |
359 | 359 | <?php |
360 | 360 | $trans = array( |
361 | - "1.1","1.0","0.9","0.8","0.7","0.6","0.5","0.4","0.3","0.2","0.1", |
|
361 | + "1.1", "1.0", "0.9", "0.8", "0.7", "0.6", "0.5", "0.4", "0.3", "0.2", "0.1", |
|
362 | 362 | ); |
363 | 363 | ?> |
364 | 364 | <option value="1.0">100% (Visible)</option> |
@@ -381,12 +381,12 @@ discard block |
||
381 | 381 | <select class="yt-uix-button yt-uix-button-default" style="position:relative;top:6px;" id="country" name="country" value="<?php echo $_user['country']?>"> |
382 | 382 | <?php |
383 | 383 | $countries = array( |
384 | - "Select country","Afghanistan", "Albania", "Algeria", "American Samoa", "Andorra", "Angola", "Anguilla", "Antarctica", "Antigua and Barbuda", "Argentina", "Armenia", "Aruba", "Australia", "Austria", "Azerbaijan", "Bahamas", "Bahrain", "Bangladesh", "Barbados", "Belarus", "Belgium", "Belize", "Benin", "Bermuda", "Bhutan", "Bolivia", "Bosnia and Herzegowina", "Botswana", "Bouvet Island", "Brazil", "British Indian Ocean Territory", "Brunei Darussalam", "Bulgaria", "Burkina Faso", "Burundi", "Cambodia", "Cameroon", "Canada", "Cape Verde", "Cayman Islands", "Central African Republic", "Chad", "Chile", "China", "Christmas Island", "Cocos (Keeling) Islands", "Colombia", "Comoros", "Congo", "Congo, the Democratic Republic of the", "Cook Islands", "Costa Rica", "Cote d'Ivoire", "Croatia (Hrvatska)", "Cuba", "Cyprus", "Czech Republic", "Denmark", "Djibouti", "Dominica", "Dominican Republic", "East Timor", "Ecuador", "Egypt", "El Salvador", "Equatorial Guinea", "Eritrea", "Estonia", "Ethiopia", "Falkland Islands (Malvinas)", "Faroe Islands", "Fiji", "Finland", "France", "France Metropolitan", "French Guiana", "French Polynesia", "French Southern Territories", "Gabon", "Gambia", "Georgia", "Germany", "Ghana", "Gibraltar", "Greece", "Greenland", "Grenada", "Guadeloupe", "Guam", "Guatemala", "Guinea", "Guinea-Bissau", "Guyana", "Haiti", "Heard and Mc Donald Islands", "Holy See (Vatican City State)", "Honduras", "Hong Kong", "Hungary", "Iceland", "India", "Indonesia", "Iran (Islamic Republic of)", "Iraq", "Ireland", "Israel", "Italy", "Jamaica", "Japan", "Jordan", "Kazakhstan", "Kenya", "Kiribati", "Korea, Democratic People's Republic of", "Korea, Republic of", "Kuwait", "Kyrgyzstan", "Lao, People's Democratic Republic", "Latvia", "Lebanon", "Lesotho", "Liberia", "Libyan Arab Jamahiriya", "Liechtenstein", "Lithuania", "Luxembourg", "Macau", "Macedonia, The Former Yugoslav Republic of", "Madagascar", "Malawi", "Malaysia", "Maldives", "Mali", "Malta", "Marshall Islands", "Martinique", "Mauritania", "Mauritius", "Mayotte", "Mexico", "Micronesia, Federated States of", "Moldova, Republic of", "Monaco", "Mongolia", "Montserrat", "Morocco", "Mozambique", "Myanmar", "Namibia", "Nauru", "Nepal", "Netherlands", "Netherlands Antilles", "New Caledonia", "New Zealand", "Nicaragua", "Niger", "Nigeria", "Niue", "Norfolk Island", "Northern Mariana Islands", "Norway", "Oman", "Pakistan", "Palau", "Panama", "Papua New Guinea", "Paraguay", "Peru", "Philippines", "Pitcairn", "Poland", "Portugal", "Puerto Rico", "Qatar", "Reunion", "Romania", "Russian Federation", "Rwanda", "Saint Kitts and Nevis", "Saint Lucia", "Saint Vincent and the Grenadines", "Samoa", "San Marino", "Sao Tome and Principe", "Saudi Arabia", "Senegal", "Seychelles", "Sierra Leone", "Singapore", "Slovakia (Slovak Republic)", "Slovenia", "Solomon Islands", "Somalia", "South Africa", "South Georgia and the South Sandwich Islands", "Spain", "Sri Lanka", "St. Helena", "St. Pierre and Miquelon", "Sudan", "Suriname", "Svalbard and Jan Mayen Islands", "Swaziland", "Sweden", "Switzerland", "Syrian Arab Republic", "Taiwan, Province of China", "Tajikistan", "Tanzania, United Republic of", "Thailand", "Togo", "Tokelau", "Tonga", "Trinidad and Tobago", "Tunisia", "Turkey", "Turkmenistan", "Turks and Caicos Islands", "Tuvalu", "Uganda", "Ukraine", "United Arab Emirates", "United Kingdom", "United States", "United States Minor Outlying Islands", "Uruguay", "Uzbekistan", "Vanuatu", "Venezuela", "Vietnam", "Virgin Islands (British)", "Virgin Islands (U.S.)", "Wallis and Futuna Islands", "Western Sahara", "Yemen", "Yugoslavia", "Zambia", "Zimbabwe" |
|
384 | + "Select country", "Afghanistan", "Albania", "Algeria", "American Samoa", "Andorra", "Angola", "Anguilla", "Antarctica", "Antigua and Barbuda", "Argentina", "Armenia", "Aruba", "Australia", "Austria", "Azerbaijan", "Bahamas", "Bahrain", "Bangladesh", "Barbados", "Belarus", "Belgium", "Belize", "Benin", "Bermuda", "Bhutan", "Bolivia", "Bosnia and Herzegowina", "Botswana", "Bouvet Island", "Brazil", "British Indian Ocean Territory", "Brunei Darussalam", "Bulgaria", "Burkina Faso", "Burundi", "Cambodia", "Cameroon", "Canada", "Cape Verde", "Cayman Islands", "Central African Republic", "Chad", "Chile", "China", "Christmas Island", "Cocos (Keeling) Islands", "Colombia", "Comoros", "Congo", "Congo, the Democratic Republic of the", "Cook Islands", "Costa Rica", "Cote d'Ivoire", "Croatia (Hrvatska)", "Cuba", "Cyprus", "Czech Republic", "Denmark", "Djibouti", "Dominica", "Dominican Republic", "East Timor", "Ecuador", "Egypt", "El Salvador", "Equatorial Guinea", "Eritrea", "Estonia", "Ethiopia", "Falkland Islands (Malvinas)", "Faroe Islands", "Fiji", "Finland", "France", "France Metropolitan", "French Guiana", "French Polynesia", "French Southern Territories", "Gabon", "Gambia", "Georgia", "Germany", "Ghana", "Gibraltar", "Greece", "Greenland", "Grenada", "Guadeloupe", "Guam", "Guatemala", "Guinea", "Guinea-Bissau", "Guyana", "Haiti", "Heard and Mc Donald Islands", "Holy See (Vatican City State)", "Honduras", "Hong Kong", "Hungary", "Iceland", "India", "Indonesia", "Iran (Islamic Republic of)", "Iraq", "Ireland", "Israel", "Italy", "Jamaica", "Japan", "Jordan", "Kazakhstan", "Kenya", "Kiribati", "Korea, Democratic People's Republic of", "Korea, Republic of", "Kuwait", "Kyrgyzstan", "Lao, People's Democratic Republic", "Latvia", "Lebanon", "Lesotho", "Liberia", "Libyan Arab Jamahiriya", "Liechtenstein", "Lithuania", "Luxembourg", "Macau", "Macedonia, The Former Yugoslav Republic of", "Madagascar", "Malawi", "Malaysia", "Maldives", "Mali", "Malta", "Marshall Islands", "Martinique", "Mauritania", "Mauritius", "Mayotte", "Mexico", "Micronesia, Federated States of", "Moldova, Republic of", "Monaco", "Mongolia", "Montserrat", "Morocco", "Mozambique", "Myanmar", "Namibia", "Nauru", "Nepal", "Netherlands", "Netherlands Antilles", "New Caledonia", "New Zealand", "Nicaragua", "Niger", "Nigeria", "Niue", "Norfolk Island", "Northern Mariana Islands", "Norway", "Oman", "Pakistan", "Palau", "Panama", "Papua New Guinea", "Paraguay", "Peru", "Philippines", "Pitcairn", "Poland", "Portugal", "Puerto Rico", "Qatar", "Reunion", "Romania", "Russian Federation", "Rwanda", "Saint Kitts and Nevis", "Saint Lucia", "Saint Vincent and the Grenadines", "Samoa", "San Marino", "Sao Tome and Principe", "Saudi Arabia", "Senegal", "Seychelles", "Sierra Leone", "Singapore", "Slovakia (Slovak Republic)", "Slovenia", "Solomon Islands", "Somalia", "South Africa", "South Georgia and the South Sandwich Islands", "Spain", "Sri Lanka", "St. Helena", "St. Pierre and Miquelon", "Sudan", "Suriname", "Svalbard and Jan Mayen Islands", "Swaziland", "Sweden", "Switzerland", "Syrian Arab Republic", "Taiwan, Province of China", "Tajikistan", "Tanzania, United Republic of", "Thailand", "Togo", "Tokelau", "Tonga", "Trinidad and Tobago", "Tunisia", "Turkey", "Turkmenistan", "Turks and Caicos Islands", "Tuvalu", "Uganda", "Ukraine", "United Arab Emirates", "United Kingdom", "United States", "United States Minor Outlying Islands", "Uruguay", "Uzbekistan", "Vanuatu", "Venezuela", "Vietnam", "Virgin Islands (British)", "Virgin Islands (U.S.)", "Wallis and Futuna Islands", "Western Sahara", "Yemen", "Yugoslavia", "Zambia", "Zimbabwe" |
|
385 | 385 | ); |
386 | 386 | |
387 | 387 | $countryLength = sizeof($countries); |
388 | 388 | $i = 0; |
389 | - for($i = 0;$i <= $countryLength; $i++) |
|
389 | + for ($i = 0; $i <= $countryLength; $i++) |
|
390 | 390 | { |
391 | 391 | $c = $countries[$i]; |
392 | 392 | if ($c == $_user['country']) |
@@ -399,7 +399,7 @@ discard block |
||
399 | 399 | else |
400 | 400 | { |
401 | 401 | ?> |
402 | - <option value="<?php echo $c;?>"><?php echo $c; ?></option> |
|
402 | + <option value="<?php echo $c; ?>"><?php echo $c; ?></option> |
|
403 | 403 | <?php |
404 | 404 | } |
405 | 405 | } |
@@ -313,14 +313,15 @@ |
||
313 | 313 | for($i = 0;$i <= $countryLength; $i++) |
314 | 314 | { |
315 | 315 | $c = $countries[$i]; |
316 | - if ($c == $_user['country']) |
|
317 | - //country is the same as in database |
|
316 | + if ($c == $_user['country']) { |
|
317 | + //country is the same as in database |
|
318 | 318 | { |
319 | 319 | ?> |
320 | - <option value="<?php echo $c; ?>" selected="selected"><?php echo $c; ?></option> |
|
321 | - <?php |
|
320 | + <option value="<?php echo $c; |
|
322 | 321 | } |
323 | - else |
|
322 | + ?>" selected="selected"><?php echo $c; ?></option> |
|
323 | + <?php |
|
324 | + } else |
|
324 | 325 | { |
325 | 326 | ?> |
326 | 327 | <option value="<?php echo $c;?>"><?php echo $c; ?></option> |
@@ -12,11 +12,13 @@ discard block |
||
12 | 12 | <?php $__db_h = new db_helper(); ?> |
13 | 13 | <?php $__time_h = new time_helper(); ?> |
14 | 14 | <?php |
15 | - if(isset($_SESSION['siteusername'])) |
|
16 | - $_user_hp = $__user_h->fetch_user_username($_SESSION['siteusername']); |
|
15 | + if(isset($_SESSION['siteusername'])) { |
|
16 | + $_user_hp = $__user_h->fetch_user_username($_SESSION['siteusername']); |
|
17 | + } |
|
17 | 18 | |
18 | - if(!$__user_h->user_exists($_GET['n'])) |
|
19 | - header("Location: /?userdoesntexist"); |
|
19 | + if(!$__user_h->user_exists($_GET['n'])) { |
|
20 | + header("Location: /?userdoesntexist"); |
|
21 | + } |
|
20 | 22 | |
21 | 23 | $_user = $__user_h->fetch_user_username($_GET['n']); |
22 | 24 | |
@@ -39,10 +41,11 @@ discard block |
||
39 | 41 | |
40 | 42 | if ( |
41 | 43 | ctype_xdigit($colorCode) && |
42 | - (strlen($colorCode) == 6 || strlen($colorCode) == 3)) |
|
43 | - return true; |
|
44 | - |
|
45 | - else return false; |
|
44 | + (strlen($colorCode) == 6 || strlen($colorCode) == 3)) { |
|
45 | + return true; |
|
46 | + } else { |
|
47 | + return false; |
|
48 | + } |
|
46 | 49 | } |
47 | 50 | |
48 | 51 | $_user['subscribers'] = $__user_h->fetch_subs_count($_user['username']); |
@@ -74,8 +77,9 @@ discard block |
||
74 | 77 | if(!check_valid_colorhex($_user['primary_color_text']) && strlen($_user['primary_color_text']) != 6) { $_user['primary_color_text'] = ""; } |
75 | 78 | if(!check_valid_colorhex($_user['2012_bgcolor']) && strlen($_user['2012_bgcolor']) != 6) { $_user['2012_bgcolor'] = ""; } |
76 | 79 | |
77 | - if(isset($_SESSION['siteusername'])) |
|
78 | - $__user_i->check_view_channel($_user['username'], @$_SESSION['siteusername']); |
|
80 | + if(isset($_SESSION['siteusername'])) { |
|
81 | + $__user_i->check_view_channel($_user['username'], @$_SESSION['siteusername']); |
|
82 | + } |
|
79 | 83 | |
80 | 84 | if($_SERVER['REQUEST_METHOD'] == 'POST') { |
81 | 85 | $error = array(); |
@@ -188,8 +192,9 @@ discard block |
||
188 | 192 | <div class="channel_customization"><?php require($_SERVER['DOCUMENT_ROOT'] . "/s/mod/channel_customization.php"); ?></div> |
189 | 193 | <?php } ?> |
190 | 194 | <?php |
191 | - if(empty(trim($_user['bio']))) |
|
192 | - $_user['bio'] = "This user has no description."; |
|
195 | + if(empty(trim($_user['bio']))) { |
|
196 | + $_user['bio'] = "This user has no description."; |
|
197 | + } |
|
193 | 198 | ?> |
194 | 199 | <div id="content"> |
195 | 200 | <div class="subscription-menu-expandable subscription-menu-expandable-channels3 yt-rounded ytg-wide hid"> |
@@ -272,7 +277,7 @@ discard block |
||
272 | 277 | <div class="header-stats"> |
273 | 278 | <div class="stat-entry"> |
274 | 279 | <span class="stat-value"><?php echo $_user['subscribers']; ?></span> |
275 | - <span class="stat-name"><?php if($_user['subscribers'] == 1){ ?>subscriber<?php }else{ ?>subscribers<?php } ?></span> |
|
280 | + <span class="stat-name"><?php if($_user['subscribers'] == 1){ ?>subscriber<?php } else{ ?>subscribers<?php } ?></span> |
|
276 | 281 | </div> |
277 | 282 | <div class="stat-entry"> |
278 | 283 | <span class="stat-value"><?php echo $_user['views']; ?></span> |
@@ -12,8 +12,8 @@ discard block |
||
12 | 12 | <?php $__db_h = new db_helper(); ?> |
13 | 13 | <?php $__time_h = new time_helper(); ?> |
14 | 14 | <?php |
15 | - if(isset($_SESSION['siteusername'])) |
|
16 | - $_user_hp = $__user_h->fetch_user_username($_SESSION['siteusername']); |
|
15 | + if(isset($_SESSION['siteusername'])) |
|
16 | + $_user_hp = $__user_h->fetch_user_username($_SESSION['siteusername']); |
|
17 | 17 | |
18 | 18 | if(!$__user_h->user_exists($_GET['n'])) |
19 | 19 | header("Location: /?userdoesntexist"); |
@@ -26,21 +26,21 @@ discard block |
||
26 | 26 | return preg_replace('/[^A-Za-z0-9\-]/', '', $string); // Removes special chars. |
27 | 27 | } |
28 | 28 | |
29 | - function addhttp($url) { |
|
30 | - if (!preg_match("~^(?:f|ht)tps?://~i", $url)) { |
|
31 | - $url = "http://" . $url; |
|
32 | - } |
|
33 | - return $url; |
|
34 | - } |
|
29 | + function addhttp($url) { |
|
30 | + if (!preg_match("~^(?:f|ht)tps?://~i", $url)) { |
|
31 | + $url = "http://" . $url; |
|
32 | + } |
|
33 | + return $url; |
|
34 | + } |
|
35 | 35 | |
36 | 36 | function check_valid_colorhex($colorCode) { |
37 | 37 | // If user accidentally passed along the # sign, strip it off |
38 | 38 | $colorCode = ltrim($colorCode, '#'); |
39 | 39 | |
40 | 40 | if ( |
41 | - ctype_xdigit($colorCode) && |
|
41 | + ctype_xdigit($colorCode) && |
|
42 | 42 | (strlen($colorCode) == 6 || strlen($colorCode) == 3)) |
43 | - return true; |
|
43 | + return true; |
|
44 | 44 | |
45 | 45 | else return false; |
46 | 46 | } |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | $_user['2012_bgcolor'] = substr($_user['2012_bgcolor'], 0, 7); |
66 | 66 | |
67 | 67 | $_user['genre'] = strtolower($_user['genre']); |
68 | - $_user['subscribed'] = $__user_h->if_subscribed(@$_SESSION['siteusername'], $_user['username']); |
|
68 | + $_user['subscribed'] = $__user_h->if_subscribed(@$_SESSION['siteusername'], $_user['username']); |
|
69 | 69 | |
70 | 70 | if(!check_valid_colorhex($_user['primary_color']) && strlen($_user['primary_color']) != 6) { $_user['primary_color'] = ""; } |
71 | 71 | if(!check_valid_colorhex($_user['secondary_color']) && strlen($_user['secondary_color']) != 6) { $_user['secondary_color'] = ""; } |
@@ -74,8 +74,8 @@ discard block |
||
74 | 74 | if(!check_valid_colorhex($_user['primary_color_text']) && strlen($_user['primary_color_text']) != 6) { $_user['primary_color_text'] = ""; } |
75 | 75 | if(!check_valid_colorhex($_user['2012_bgcolor']) && strlen($_user['2012_bgcolor']) != 6) { $_user['2012_bgcolor'] = ""; } |
76 | 76 | |
77 | - if(isset($_SESSION['siteusername'])) |
|
78 | - $__user_i->check_view_channel($_user['username'], @$_SESSION['siteusername']); |
|
77 | + if(isset($_SESSION['siteusername'])) |
|
78 | + $__user_i->check_view_channel($_user['username'], @$_SESSION['siteusername']); |
|
79 | 79 | |
80 | 80 | if($_SERVER['REQUEST_METHOD'] == 'POST') { |
81 | 81 | $error = array(); |
@@ -89,11 +89,11 @@ discard block |
||
89 | 89 | //if(ifBlocked(@$_SESSION['siteusername'], $user['username'], $__db)) { $error = "This user has blocked you!"; $error['status'] = true; } |
90 | 90 | |
91 | 91 | if(!isset($error['message'])) { |
92 | - $text = $_POST['comment']; |
|
92 | + $text = $_POST['comment']; |
|
93 | 93 | $stmt = $__db->prepare("INSERT INTO profile_comments (toid, author, comment) VALUES (:id, :username, :comment)"); |
94 | - $stmt->bindParam(":id", $_user['username']); |
|
95 | - $stmt->bindParam(":username", $_SESSION['siteusername']); |
|
96 | - $stmt->bindParam(":comment", $text); |
|
94 | + $stmt->bindParam(":id", $_user['username']); |
|
95 | + $stmt->bindParam(":username", $_SESSION['siteusername']); |
|
96 | + $stmt->bindParam(":comment", $text); |
|
97 | 97 | $stmt->execute(); |
98 | 98 | |
99 | 99 | $_user_update_utils->update_comment_cooldown_time($_SESSION['siteusername']); |
@@ -105,10 +105,10 @@ discard block |
||
105 | 105 | } |
106 | 106 | ?> |
107 | 107 | <?php |
108 | - $__server->page_embeds->page_title = "SubRocks - " . htmlspecialchars($_user['username']); |
|
109 | - $__server->page_embeds->page_description = htmlspecialchars($_user['bio']); |
|
110 | - $__server->page_embeds->page_image = "/dynamic/pfp/" . htmlspecialchars($_user['pfp']); |
|
111 | - $__server->page_embeds->page_url = "https://subrock.rocks/"; |
|
108 | + $__server->page_embeds->page_title = "SubRocks - " . htmlspecialchars($_user['username']); |
|
109 | + $__server->page_embeds->page_description = htmlspecialchars($_user['bio']); |
|
110 | + $__server->page_embeds->page_image = "/dynamic/pfp/" . htmlspecialchars($_user['pfp']); |
|
111 | + $__server->page_embeds->page_url = "https://subrock.rocks/"; |
|
112 | 112 | ?> |
113 | 113 | <!DOCTYPE html> |
114 | 114 | <html dir="ltr" xmlns:og="http://opengraphprotocol.org/schema/" lang="en"> |
@@ -140,27 +140,27 @@ discard block |
||
140 | 140 | background-image: url(/dynamic/banners/<?php echo $_user['2012_bg']; ?>); |
141 | 141 | background-repeat: repeat; |
142 | 142 | <?php |
143 | - switch($_user['2012_bgoption']) { |
|
144 | - case "stretch": |
|
145 | - echo "background-size: cover;"; |
|
146 | - break; |
|
147 | - case "solid": |
|
148 | - echo ""; |
|
149 | - break; |
|
150 | - case "norepeat": |
|
151 | - echo "background-repeat: no-repeat !important;"; |
|
152 | - break; |
|
153 | - case "repeatxy": |
|
154 | - echo "background-repeat: repeat;"; |
|
155 | - break; |
|
156 | - case "repeaty": |
|
157 | - echo "background-repeat: repeat-y;"; |
|
158 | - break; |
|
159 | - case "repeatx": |
|
160 | - echo "background-repeat: repeat-x;"; |
|
161 | - break; |
|
162 | - } |
|
163 | - ?> |
|
143 | + switch($_user['2012_bgoption']) { |
|
144 | + case "stretch": |
|
145 | + echo "background-size: cover;"; |
|
146 | + break; |
|
147 | + case "solid": |
|
148 | + echo ""; |
|
149 | + break; |
|
150 | + case "norepeat": |
|
151 | + echo "background-repeat: no-repeat !important;"; |
|
152 | + break; |
|
153 | + case "repeatxy": |
|
154 | + echo "background-repeat: repeat;"; |
|
155 | + break; |
|
156 | + case "repeaty": |
|
157 | + echo "background-repeat: repeat-y;"; |
|
158 | + break; |
|
159 | + case "repeatx": |
|
160 | + echo "background-repeat: repeat-x;"; |
|
161 | + break; |
|
162 | + } |
|
163 | + ?> |
|
164 | 164 | } |
165 | 165 | </style> |
166 | 166 | <script> |
@@ -188,9 +188,9 @@ discard block |
||
188 | 188 | <div class="channel_customization"><?php require($_SERVER['DOCUMENT_ROOT'] . "/s/mod/channel_customization.php"); ?></div> |
189 | 189 | <?php } ?> |
190 | 190 | <?php |
191 | - if(empty(trim($_user['bio']))) |
|
192 | - $_user['bio'] = "This user has no description."; |
|
193 | - ?> |
|
191 | + if(empty(trim($_user['bio']))) |
|
192 | + $_user['bio'] = "This user has no description."; |
|
193 | + ?> |
|
194 | 194 | <div id="content"> |
195 | 195 | <div class="subscription-menu-expandable subscription-menu-expandable-channels3 yt-rounded ytg-wide hid"> |
196 | 196 | <div class="content" id="recommended-channels-list"></div> |
@@ -12,10 +12,10 @@ discard block |
||
12 | 12 | <?php $__db_h = new db_helper(); ?> |
13 | 13 | <?php $__time_h = new time_helper(); ?> |
14 | 14 | <?php |
15 | - if(isset($_SESSION['siteusername'])) |
|
15 | + if (isset($_SESSION['siteusername'])) |
|
16 | 16 | $_user_hp = $__user_h->fetch_user_username($_SESSION['siteusername']); |
17 | 17 | |
18 | - if(!$__user_h->user_exists($_GET['n'])) |
|
18 | + if (!$__user_h->user_exists($_GET['n'])) |
|
19 | 19 | header("Location: /?userdoesntexist"); |
20 | 20 | |
21 | 21 | $_user = $__user_h->fetch_user_username($_GET['n']); |
@@ -67,28 +67,28 @@ discard block |
||
67 | 67 | $_user['genre'] = strtolower($_user['genre']); |
68 | 68 | $_user['subscribed'] = $__user_h->if_subscribed(@$_SESSION['siteusername'], $_user['username']); |
69 | 69 | |
70 | - if(!check_valid_colorhex($_user['primary_color']) && strlen($_user['primary_color']) != 6) { $_user['primary_color'] = ""; } |
|
71 | - if(!check_valid_colorhex($_user['secondary_color']) && strlen($_user['secondary_color']) != 6) { $_user['secondary_color'] = ""; } |
|
72 | - if(!check_valid_colorhex($_user['third_color']) && strlen($_user['third_color']) != 6) { $_user['third_color'] = ""; } |
|
73 | - if(!check_valid_colorhex($_user['text_color']) && strlen($_user['text_color']) != 6) { $_user['text_color'] = ""; } |
|
74 | - if(!check_valid_colorhex($_user['primary_color_text']) && strlen($_user['primary_color_text']) != 6) { $_user['primary_color_text'] = ""; } |
|
75 | - if(!check_valid_colorhex($_user['2012_bgcolor']) && strlen($_user['2012_bgcolor']) != 6) { $_user['2012_bgcolor'] = ""; } |
|
70 | + if (!check_valid_colorhex($_user['primary_color']) && strlen($_user['primary_color']) != 6) { $_user['primary_color'] = ""; } |
|
71 | + if (!check_valid_colorhex($_user['secondary_color']) && strlen($_user['secondary_color']) != 6) { $_user['secondary_color'] = ""; } |
|
72 | + if (!check_valid_colorhex($_user['third_color']) && strlen($_user['third_color']) != 6) { $_user['third_color'] = ""; } |
|
73 | + if (!check_valid_colorhex($_user['text_color']) && strlen($_user['text_color']) != 6) { $_user['text_color'] = ""; } |
|
74 | + if (!check_valid_colorhex($_user['primary_color_text']) && strlen($_user['primary_color_text']) != 6) { $_user['primary_color_text'] = ""; } |
|
75 | + if (!check_valid_colorhex($_user['2012_bgcolor']) && strlen($_user['2012_bgcolor']) != 6) { $_user['2012_bgcolor'] = ""; } |
|
76 | 76 | |
77 | - if(isset($_SESSION['siteusername'])) |
|
77 | + if (isset($_SESSION['siteusername'])) |
|
78 | 78 | $__user_i->check_view_channel($_user['username'], @$_SESSION['siteusername']); |
79 | 79 | |
80 | - if($_SERVER['REQUEST_METHOD'] == 'POST') { |
|
80 | + if ($_SERVER['REQUEST_METHOD'] == 'POST') { |
|
81 | 81 | $error = array(); |
82 | 82 | |
83 | - if(!isset($_SESSION['siteusername'])){ $error['message'] = "you are not logged in"; $error['status'] = true; } |
|
84 | - if(!$_POST['comment']){ $error['message'] = "your comment cannot be blank"; $error['status'] = true; } |
|
85 | - if(strlen($_POST['comment']) > 1000){ $error['message'] = "your comment must be shorter than 1000 characters"; $error['status'] = true; } |
|
83 | + if (!isset($_SESSION['siteusername'])) { $error['message'] = "you are not logged in"; $error['status'] = true; } |
|
84 | + if (!$_POST['comment']) { $error['message'] = "your comment cannot be blank"; $error['status'] = true; } |
|
85 | + if (strlen($_POST['comment']) > 1000) { $error['message'] = "your comment must be shorter than 1000 characters"; $error['status'] = true; } |
|
86 | 86 | //if(!isset($_POST['g-recaptcha-response'])){ $error['message'] = "captcha validation failed"; $error['status'] = true; } |
87 | 87 | //if(!$_user_insert_utils->validateCaptcha($config['recaptcha_secret'], $_POST['g-recaptcha-response'])) { $error['message'] = "captcha validation failed"; $error['status'] = true; } |
88 | - if($__user_h->if_cooldown($_SESSION['siteusername'])) { $error['message'] = "You are on a cooldown! Wait for a minute before posting another comment."; $error['status'] = true; } |
|
88 | + if ($__user_h->if_cooldown($_SESSION['siteusername'])) { $error['message'] = "You are on a cooldown! Wait for a minute before posting another comment."; $error['status'] = true; } |
|
89 | 89 | //if(ifBlocked(@$_SESSION['siteusername'], $user['username'], $__db)) { $error = "This user has blocked you!"; $error['status'] = true; } |
90 | 90 | |
91 | - if(!isset($error['message'])) { |
|
91 | + if (!isset($error['message'])) { |
|
92 | 92 | $text = $_POST['comment']; |
93 | 93 | $stmt = $__db->prepare("INSERT INTO profile_comments (toid, author, comment) VALUES (:id, :username, :comment)"); |
94 | 94 | $stmt->bindParam(":id", $_user['username']); |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | |
99 | 99 | $_user_update_utils->update_comment_cooldown_time($_SESSION['siteusername']); |
100 | 100 | |
101 | - if(@$_SESSION['siteusername'] != $_user['username']) { |
|
101 | + if (@$_SESSION['siteusername'] != $_user['username']) { |
|
102 | 102 | $_user_insert_utils->send_message($_user['username'], "New comment", 'I commented "' . $_POST['comment'] . '" on your profile!', $_SESSION['siteusername']); |
103 | 103 | } |
104 | 104 | } |
@@ -136,11 +136,11 @@ discard block |
||
136 | 136 | <link rel="stylesheet" href="/yt/cssbin/www-extra.css"> |
137 | 137 | <style> |
138 | 138 | #content-container { |
139 | - background-color: <?php echo $_user['primary_color']; ?>; |
|
139 | + background-color: <?php echo $_user['primary_color']; ?>; |
|
140 | 140 | background-image: url(/dynamic/banners/<?php echo $_user['2012_bg']; ?>); |
141 | 141 | background-repeat: repeat; |
142 | 142 | <?php |
143 | - switch($_user['2012_bgoption']) { |
|
143 | + switch ($_user['2012_bgoption']) { |
|
144 | 144 | case "stretch": |
145 | 145 | echo "background-size: cover;"; |
146 | 146 | break; |
@@ -184,11 +184,11 @@ discard block |
||
184 | 184 | <div id="masthead-container"><?php require($_SERVER['DOCUMENT_ROOT'] . "/s/mod/header.php"); ?></div> |
185 | 185 | <div id="content-container"> |
186 | 186 | <!-- begin content --> |
187 | - <?php if(isset($_SESSION['siteusername']) && $_user['username'] == $_SESSION['siteusername']) { ?> |
|
187 | + <?php if (isset($_SESSION['siteusername']) && $_user['username'] == $_SESSION['siteusername']) { ?> |
|
188 | 188 | <div class="channel_customization"><?php require($_SERVER['DOCUMENT_ROOT'] . "/s/mod/channel_customization.php"); ?></div> |
189 | 189 | <?php } ?> |
190 | 190 | <?php |
191 | - if(empty(trim($_user['bio']))) |
|
191 | + if (empty(trim($_user['bio']))) |
|
192 | 192 | $_user['bio'] = "This user has no description."; |
193 | 193 | ?> |
194 | 194 | <div id="content"> |
@@ -243,7 +243,7 @@ discard block |
||
243 | 243 | <h1><?php echo htmlspecialchars($_user['username']); ?></h1> |
244 | 244 | </div> |
245 | 245 | <div class="upper-left-section enable-fancy-subscribe-button"> |
246 | - <?php if($_user['username'] != @$_SESSION['siteusername']) { ?> |
|
246 | + <?php if ($_user['username'] != @$_SESSION['siteusername']) { ?> |
|
247 | 247 | <div class="yt-subscription-button-hovercard yt-uix-hovercard"> |
248 | 248 | <button |
249 | 249 | href="#" |
@@ -251,7 +251,7 @@ discard block |
||
251 | 251 | title="" |
252 | 252 | id="subscribe-button" |
253 | 253 | type="button" |
254 | - class="yt-subscription-button <?php if($_user['subscribed']) { echo "subscribed "; } ?> yt-uix-button yt-uix-button-subscription yt-uix-tooltip" |
|
254 | + class="yt-subscription-button <?php if ($_user['subscribed']) { echo "subscribed "; } ?> yt-uix-button yt-uix-button-subscription yt-uix-tooltip" |
|
255 | 255 | role="button"><span class="yt-uix-button-icon-wrapper"><img class="yt-uix-button-icon yt-uix-button-icon-subscribe" |
256 | 256 | src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt=""></span><span class="yt-uix-button-content"> <span class="subscribe-label">Subscribe</span> |
257 | 257 | <span class="subscribed-label">Subscribed</span> |
@@ -272,7 +272,7 @@ discard block |
||
272 | 272 | <div class="header-stats"> |
273 | 273 | <div class="stat-entry"> |
274 | 274 | <span class="stat-value"><?php echo $_user['subscribers']; ?></span> |
275 | - <span class="stat-name"><?php if($_user['subscribers'] == 1){ ?>subscriber<?php }else{ ?>subscribers<?php } ?></span> |
|
275 | + <span class="stat-name"><?php if ($_user['subscribers'] == 1) { ?>subscriber<?php } else { ?>subscribers<?php } ?></span> |
|
276 | 276 | </div> |
277 | 277 | <div class="stat-entry"> |
278 | 278 | <span class="stat-value"><?php echo $_user['views']; ?></span> |
@@ -317,7 +317,7 @@ discard block |
||
317 | 317 | </div> |
318 | 318 | </div> |
319 | 319 | </div> |
320 | - <?php if($_user['featured'] != "None") { $video = $__video_h->fetch_video_rid($_user['featured']); } else { $_user['featured'] = false; } ?> |
|
320 | + <?php if ($_user['featured'] != "None") { $video = $__video_h->fetch_video_rid($_user['featured']); } else { $_user['featured'] = false; } ?> |
|
321 | 321 | <div id="branded-page-body"> |
322 | 322 | <?php require($_SERVER['DOCUMENT_ROOT'] . "/s/mod/channel_" . $_user['layout'] . ".php"); ?> |
323 | 323 | </div> |
@@ -39,8 +39,8 @@ |
||
39 | 39 | ?> |
40 | 40 | <div id="browse-side-column" class="ytg-2col ytg-last"> |
41 | 41 | <ol class="navigation-menu"> |
42 | - <?php foreach($__tabs as $_tab) { |
|
43 | - if($_SERVER['REQUEST_URI'] != $_tab->url) |
|
42 | + <?php foreach ($__tabs as $_tab) { |
|
43 | + if ($_SERVER['REQUEST_URI'] != $_tab->url) |
|
44 | 44 | $_tab->selected = true; |
45 | 45 | ?> |
46 | 46 | <li class="menu-item"> |
@@ -40,8 +40,9 @@ |
||
40 | 40 | <div id="browse-side-column" class="ytg-2col ytg-last"> |
41 | 41 | <ol class="navigation-menu"> |
42 | 42 | <?php foreach($__tabs as $_tab) { |
43 | - if($_SERVER['REQUEST_URI'] != $_tab->url) |
|
44 | - $_tab->selected = true; |
|
43 | + if($_SERVER['REQUEST_URI'] != $_tab->url) { |
|
44 | + $_tab->selected = true; |
|
45 | + } |
|
45 | 46 | ?> |
46 | 47 | <li class="menu-item"> |
47 | 48 | <a class="<?php echo $_tab->selected ? true : "selected"; ?>" href="<?php echo $_tab->url; ?>"> |