@@ -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']); |
@@ -68,28 +68,28 @@ discard block |
||
68 | 68 | $_user['genre'] = strtolower($_user['genre']); |
69 | 69 | $_user['subscribed'] = $__user_h->if_subscribed(@$_SESSION['siteusername'], $_user['username']); |
70 | 70 | |
71 | - if(!check_valid_colorhex($_user['primary_color']) && strlen($_user['primary_color']) != 6) { $_user['primary_color'] = ""; } |
|
72 | - if(!check_valid_colorhex($_user['secondary_color']) && strlen($_user['secondary_color']) != 6) { $_user['secondary_color'] = ""; } |
|
73 | - if(!check_valid_colorhex($_user['third_color']) && strlen($_user['third_color']) != 6) { $_user['third_color'] = ""; } |
|
74 | - if(!check_valid_colorhex($_user['text_color']) && strlen($_user['text_color']) != 6) { $_user['text_color'] = ""; } |
|
75 | - if(!check_valid_colorhex($_user['primary_color_text']) && strlen($_user['primary_color_text']) != 6) { $_user['primary_color_text'] = ""; } |
|
76 | - if(!check_valid_colorhex($_user['2009_bgcolor']) && strlen($_user['2009_bgcolor']) != 6) { $_user['2009_bgcolor'] = ""; } |
|
71 | + if (!check_valid_colorhex($_user['primary_color']) && strlen($_user['primary_color']) != 6) { $_user['primary_color'] = ""; } |
|
72 | + if (!check_valid_colorhex($_user['secondary_color']) && strlen($_user['secondary_color']) != 6) { $_user['secondary_color'] = ""; } |
|
73 | + if (!check_valid_colorhex($_user['third_color']) && strlen($_user['third_color']) != 6) { $_user['third_color'] = ""; } |
|
74 | + if (!check_valid_colorhex($_user['text_color']) && strlen($_user['text_color']) != 6) { $_user['text_color'] = ""; } |
|
75 | + if (!check_valid_colorhex($_user['primary_color_text']) && strlen($_user['primary_color_text']) != 6) { $_user['primary_color_text'] = ""; } |
|
76 | + if (!check_valid_colorhex($_user['2009_bgcolor']) && strlen($_user['2009_bgcolor']) != 6) { $_user['2009_bgcolor'] = ""; } |
|
77 | 77 | |
78 | - if(isset($_SESSION['siteusername'])) |
|
78 | + if (isset($_SESSION['siteusername'])) |
|
79 | 79 | $__user_i->check_view_channel($_user['username'], @$_SESSION['siteusername']); |
80 | 80 | |
81 | - if($_SERVER['REQUEST_METHOD'] == 'POST') { |
|
81 | + if ($_SERVER['REQUEST_METHOD'] == 'POST') { |
|
82 | 82 | $error = array(); |
83 | 83 | |
84 | - if(!isset($_SESSION['siteusername'])){ $error['message'] = "you are not logged in"; $error['status'] = true; } |
|
85 | - if(!$_POST['comment']){ $error['message'] = "your comment cannot be blank"; $error['status'] = true; } |
|
86 | - if(strlen($_POST['comment']) > 1000){ $error['message'] = "your comment must be shorter than 1000 characters"; $error['status'] = true; } |
|
84 | + if (!isset($_SESSION['siteusername'])) { $error['message'] = "you are not logged in"; $error['status'] = true; } |
|
85 | + if (!$_POST['comment']) { $error['message'] = "your comment cannot be blank"; $error['status'] = true; } |
|
86 | + if (strlen($_POST['comment']) > 1000) { $error['message'] = "your comment must be shorter than 1000 characters"; $error['status'] = true; } |
|
87 | 87 | //if(!isset($_POST['g-recaptcha-response'])){ $error['message'] = "captcha validation failed"; $error['status'] = true; } |
88 | 88 | //if(!$_user_insert_utils->validateCaptcha($config['recaptcha_secret'], $_POST['g-recaptcha-response'])) { $error['message'] = "captcha validation failed"; $error['status'] = true; } |
89 | - 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 | + 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; } |
|
90 | 90 | //if(ifBlocked(@$_SESSION['siteusername'], $user['username'], $__db)) { $error = "This user has blocked you!"; $error['status'] = true; } |
91 | 91 | |
92 | - if(!isset($error['message'])) { |
|
92 | + if (!isset($error['message'])) { |
|
93 | 93 | $text = $_POST['comment']; |
94 | 94 | $stmt = $__db->prepare("INSERT INTO profile_comments (toid, author, comment) VALUES (:id, :username, :comment)"); |
95 | 95 | $stmt->bindParam(":id", $_user['username']); |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | |
100 | 100 | $_user_update_utils->update_comment_cooldown_time($_SESSION['siteusername']); |
101 | 101 | |
102 | - if(@$_SESSION['siteusername'] != $_user['username']) { |
|
102 | + if (@$_SESSION['siteusername'] != $_user['username']) { |
|
103 | 103 | $_user_insert_utils->send_message($_user['username'], "New comment", 'I commented "' . $_POST['comment'] . '" on your profile!', $_SESSION['siteusername']); |
104 | 104 | } |
105 | 105 | } |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | <link rel="stylesheet" href="/yt/cssbin/www-extra.css"> |
134 | 134 | <style> |
135 | 135 | #content-container { |
136 | - background-color: <?php echo $_user['primary_color']; ?>; |
|
136 | + background-color: <?php echo $_user['primary_color']; ?>; |
|
137 | 137 | background-image: url(/dynamic/banners/<?php echo $_user['2009_bg']; ?>); |
138 | 138 | background-repeat: repeat; |
139 | 139 | background-position: center top; |
@@ -149,11 +149,11 @@ discard block |
||
149 | 149 | <div id="masthead-container"><?php require($_SERVER['DOCUMENT_ROOT'] . "/s/mod/header.php"); ?></div> |
150 | 150 | <div id="content-container"> |
151 | 151 | <!-- begin content --> |
152 | - <?php if(isset($_SESSION['siteusername']) && $_user['username'] == $_SESSION['siteusername']) { ?> |
|
152 | + <?php if (isset($_SESSION['siteusername']) && $_user['username'] == $_SESSION['siteusername']) { ?> |
|
153 | 153 | <div class="channel_customization"><?php require($_SERVER['DOCUMENT_ROOT'] . "/s/mod/channel_customization.php"); ?></div> |
154 | 154 | <?php } ?> |
155 | 155 | <?php |
156 | - if(empty(trim($_user['bio']))) |
|
156 | + if (empty(trim($_user['bio']))) |
|
157 | 157 | $_user['bio'] = "This user has no description."; |
158 | 158 | ?> |
159 | 159 | <div id="content"> |
@@ -208,7 +208,7 @@ discard block |
||
208 | 208 | <h1><?php echo htmlspecialchars($_user['username']); ?></h1> |
209 | 209 | </div> |
210 | 210 | <div class="upper-left-section enable-fancy-subscribe-button"> |
211 | - <?php if($_user['username'] != @$_SESSION['siteusername']) { ?> |
|
211 | + <?php if ($_user['username'] != @$_SESSION['siteusername']) { ?> |
|
212 | 212 | <div class="yt-subscription-button-hovercard yt-uix-hovercard"> |
213 | 213 | <button |
214 | 214 | href="#" |
@@ -216,7 +216,7 @@ discard block |
||
216 | 216 | title="" |
217 | 217 | id="subscribe-button" |
218 | 218 | type="button" |
219 | - class="yt-subscription-button <?php if($_user['subscribed']) { echo "subscribed "; } ?> yt-uix-button yt-uix-button-subscription yt-uix-tooltip" |
|
219 | + class="yt-subscription-button <?php if ($_user['subscribed']) { echo "subscribed "; } ?> yt-uix-button yt-uix-button-subscription yt-uix-tooltip" |
|
220 | 220 | role="button"><span class="yt-uix-button-icon-wrapper"><img class="yt-uix-button-icon yt-uix-button-icon-subscribe" |
221 | 221 | src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt=""></span><span class="yt-uix-button-content"> <span class="subscribe-label">Subscribe</span> |
222 | 222 | <span class="subscribed-label">Subscribed</span> |
@@ -282,7 +282,7 @@ discard block |
||
282 | 282 | </div> |
283 | 283 | </div> |
284 | 284 | </div> |
285 | - <?php if($_user['featured'] != "None") { $video = $__video_h->fetch_video_rid($_user['featured']); } else { $_user['featured'] = false; } ?> |
|
285 | + <?php if ($_user['featured'] != "None") { $video = $__video_h->fetch_video_rid($_user['featured']); } else { $_user['featured'] = false; } ?> |
|
286 | 286 | <div id="branded-page-body"> |
287 | 287 | <div class="channel-tab-content channel-layout-two-column selected blogger-template"> |
288 | 288 | <div class="tab-content-body"> |
@@ -337,8 +337,8 @@ discard block |
||
337 | 337 | $stmt->bindParam(":comment_username", $_user['username']); |
338 | 338 | $stmt->bindParam(":videos_username", $_user['username']); |
339 | 339 | $stmt->execute(); |
340 | - while($content = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
341 | - if((int)$content['id']) { |
|
340 | + while ($content = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
341 | + if ((int) $content['id']) { |
|
342 | 342 | $content = $__video_h->fetch_comment_id($content['id']); |
343 | 343 | $content['video'] = $__video_h->fetch_video_rid($content['toid']); |
344 | 344 | $content['type'] = "comment"; |
@@ -347,7 +347,7 @@ discard block |
||
347 | 347 | $content['type'] = "video"; |
348 | 348 | } |
349 | 349 | |
350 | - if($content['type'] == "video") { |
|
350 | + if ($content['type'] == "video") { |
|
351 | 351 | ?> |
352 | 352 | <div class="feed-item-container" data-channel-key="UCc6W7efUSkd9YYoxOnctlFg"> |
353 | 353 | <a href="/user/<?php echo htmlspecialchars($content['author']); ?>?feature=plcp" class="feed-author-bubble " title="<?php echo htmlspecialchars($content['author']); ?>"> <span class="feed-item-author"> |
@@ -419,7 +419,7 @@ discard block |
||
419 | 419 | </div> |
420 | 420 | </div> |
421 | 421 | <?php } else { |
422 | - if($__video_h->video_exists($content['video']['rid'])) { ?> |
|
422 | + if ($__video_h->video_exists($content['video']['rid'])) { ?> |
|
423 | 423 | <div class="feed-item-container" data-channel-key="UCXf1X2u5gsmuqcuTQlpOGhw"> |
424 | 424 | <a href="/user/<?php echo htmlspecialchars($content['author']); ?>?feature=plcp" class="feed-author-bubble " title="<?php echo htmlspecialchars($content['author']); ?>"> <span class="feed-item-author"> |
425 | 425 | <span class="video-thumb ux-thumb yt-thumb-square-28 "><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 htmlspecialchars($content['author']); ?>" data-thumb="/dynamic/pfp/<?php echo $__user_h->fetch_pfp($content['author']); ?>" width="28"><span class="vertical-align"></span></span></span></span> |
@@ -525,7 +525,7 @@ discard block |
||
525 | 525 | </div> |
526 | 526 | <hr class="yt-horizontal-rule "> |
527 | 527 | </div> |
528 | - <?php if(!empty($_user['website'])) { ?> |
|
528 | + <?php if (!empty($_user['website'])) { ?> |
|
529 | 529 | <div class="user-profile-item"> |
530 | 530 | <div class="yt-c3-profile-custom-url field-container "> |
531 | 531 | <a href="<?php echo addhttp(htmlspecialchars($_user['website'])); ?>" rel="me nofollow" target="_blank" title="<?php echo htmlspecialchars($_user['website']); ?>" class="yt-uix-redirect-link"> |
@@ -574,7 +574,7 @@ discard block |
||
574 | 574 | <h5>Country</h5> |
575 | 575 | <span class="value"><?php echo htmlspecialchars($_user['country']); ?></span> |
576 | 576 | </div> |
577 | - <?php if($_user['genre'] != "none") { ?> |
|
577 | + <?php if ($_user['genre'] != "none") { ?> |
|
578 | 578 | <div class="user-profile-item "> |
579 | 579 | <h5>Channel Genre</h5> |
580 | 580 | <span class="value"><?php echo htmlspecialchars($_user['genre']); ?></span> |
@@ -586,13 +586,13 @@ discard block |
||
586 | 586 | </div> |
587 | 587 | <div class="channel-module other-channels yt-uix-c3-module-container other-channels-compact"> |
588 | 588 | <?php $_user['featured_channels'] = explode(",", $_user['featured_channels']); ?> |
589 | - <?php if(count($_user['featured_channels']) != 0) { ?> |
|
589 | + <?php if (count($_user['featured_channels']) != 0) { ?> |
|
590 | 590 | <div class="module-view other-channels-view"> |
591 | 591 | <h2>Featured Channels</h2> |
592 | 592 | <ul class="channel-summary-list "> |
593 | 593 | <?php |
594 | - foreach($_user['featured_channels'] as $user) { |
|
595 | - if($__user_h->user_exists($user)) { |
|
594 | + foreach ($_user['featured_channels'] as $user) { |
|
595 | + if ($__user_h->user_exists($user)) { |
|
596 | 596 | ?> |
597 | 597 | <li class="yt-tile-visible yt-uix-tile"> |
598 | 598 | <div class="channel-summary clearfix channel-summary-compact"> |
@@ -621,13 +621,13 @@ discard block |
||
621 | 621 | $stmt->bindParam(":search", $_user['username']); |
622 | 622 | $stmt->execute(); |
623 | 623 | |
624 | - if($stmt->rowCount() != 0) { |
|
624 | + if ($stmt->rowCount() != 0) { |
|
625 | 625 | ?> |
626 | 626 | <div class="playlists-narrow channel-module yt-uix-c3-module-container"> |
627 | 627 | <div class="module-view gh-featured"> |
628 | 628 | <h2>Featured Playlists</h2> |
629 | 629 | <?php |
630 | - while($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
630 | + while ($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
631 | 631 | $playlist['videos'] = json_decode($playlist['videos']); |
632 | 632 | ?> |
633 | 633 | <div class="playlist yt-tile-visible yt-uix-tile"> |
@@ -21,15 +21,15 @@ discard block |
||
21 | 21 | |
22 | 22 | $results_per_page = 12; |
23 | 23 | $number_of_result = $request->search_amount; |
24 | - $number_of_page = ceil ($number_of_result / $results_per_page); |
|
24 | + $number_of_page = ceil($number_of_result/$results_per_page); |
|
25 | 25 | |
26 | - if (!isset ($_GET['page']) ) { |
|
26 | + if (!isset ($_GET['page'])) { |
|
27 | 27 | $page = 1; |
28 | 28 | } else { |
29 | - $page = (int)$_GET['page']; |
|
29 | + $page = (int) $_GET['page']; |
|
30 | 30 | } |
31 | 31 | |
32 | - $page_first_result = ($page - 1) * $results_per_page; |
|
32 | + $page_first_result = ($page - 1)*$results_per_page; |
|
33 | 33 | |
34 | 34 | $stmt6 = $__db->prepare("SELECT * FROM playlists WHERE lower(author) LIKE lower(:search) ORDER BY id DESC LIMIT :pfirst, :pper"); |
35 | 35 | $stmt6->bindParam(":search", $request->like_search_term); |
@@ -50,10 +50,10 @@ discard block |
||
50 | 50 | </tr> |
51 | 51 | |
52 | 52 | <?php |
53 | - while($playlist = $stmt6->fetch(PDO::FETCH_ASSOC)) { |
|
53 | + while ($playlist = $stmt6->fetch(PDO::FETCH_ASSOC)) { |
|
54 | 54 | $playlist['videos'] = json_decode($playlist['videos']); |
55 | - if($__video_h->video_exists(@$playlist['videos'][0])) { |
|
56 | - if(count($playlist['videos']) != 0) { |
|
55 | + if ($__video_h->video_exists(@$playlist['videos'][0])) { |
|
56 | + if (count($playlist['videos']) != 0) { |
|
57 | 57 | $video = $__video_h->fetch_video_rid($playlist['videos'][0]); |
58 | 58 | $video['video_responses'] = $__video_h->get_video_responses($video['rid']); |
59 | 59 | $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
@@ -13,7 +13,7 @@ |
||
13 | 13 | $__server->page_embeds->page_image = "/yt/imgbin/full-size-logo.png"; |
14 | 14 | $__server->page_embeds->page_url = "https://subrock.rocks/"; |
15 | 15 | ?> |
16 | -<?php if(!isset($_SESSION['siteusername'])) { header("Location: /sign_in"); } ?> |
|
16 | +<?php if (!isset($_SESSION['siteusername'])) { header("Location: /sign_in"); } ?> |
|
17 | 17 | <?php $_playlist = $__video_h->fetch_playlist_rid($_GET['id']); ?> |
18 | 18 | <!DOCTYPE html> |
19 | 19 | <html dir="ltr"> |
@@ -13,8 +13,8 @@ |
||
13 | 13 | <?php |
14 | 14 | $video = $__video_h->fetch_video_rid($_GET['id']); |
15 | 15 | |
16 | -if($video['author'] == $_SESSION['siteusername']) { |
|
17 | - if($video['commenting'] == "a") { |
|
16 | +if ($video['author'] == $_SESSION['siteusername']) { |
|
17 | + if ($video['commenting'] == "a") { |
|
18 | 18 | $__video_u->update_row($_GET['id'], "commenting", "d"); |
19 | 19 | } else { |
20 | 20 | $__video_u->update_row($_GET['id'], "commenting", "a"); |
@@ -11,7 +11,7 @@ |
||
11 | 11 | <?php $video = $__video_h->fetch_video_rid($_GET['id']); ?> |
12 | 12 | <?php |
13 | 13 | |
14 | -if($video['author'] == $_SESSION['siteusername']) { |
|
14 | +if ($video['author'] == $_SESSION['siteusername']) { |
|
15 | 15 | $stmt = $__db->prepare("DELETE FROM videos WHERE rid=:rid AND author=:author"); |
16 | 16 | $stmt->execute(array( |
17 | 17 | ':author' => $video['author'], |
@@ -12,7 +12,7 @@ |
||
12 | 12 | <?php $__time_h = new time_helper(); ?> |
13 | 13 | <?php |
14 | 14 | $_playlist = $__video_h->fetch_playlist_rid($_GET['v']); |
15 | - if($_playlist['author'] != @$_SESSION['siteusername']) { |
|
15 | + if ($_playlist['author'] != @$_SESSION['siteusername']) { |
|
16 | 16 | die(); |
17 | 17 | } |
18 | 18 |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | <?php $__time_h = new time_helper(); ?> |
13 | 13 | <?php |
14 | 14 | $_video = $__video_h->fetch_video_rid($_GET['v']); |
15 | - if($_video['author'] != @$_SESSION['siteusername']) { |
|
15 | + if ($_video['author'] != @$_SESSION['siteusername']) { |
|
16 | 16 | die(); |
17 | 17 | } |
18 | 18 | |
@@ -37,8 +37,8 @@ discard block |
||
37 | 37 | // $__video_u->update_row($_GET['v'], "thumbnail", $request->thumbnail); |
38 | 38 | $__video_u->update_row($_GET['v'], "category", $request->category); |
39 | 39 | |
40 | - if($_SERVER['REQUEST_METHOD'] == 'POST' && @$_FILES['thumbnail']) { |
|
41 | - if(!empty($_FILES["thumbnail"]["name"])) { |
|
40 | + if ($_SERVER['REQUEST_METHOD'] == 'POST' && @$_FILES['thumbnail']) { |
|
41 | + if (!empty($_FILES["thumbnail"]["name"])) { |
|
42 | 42 | $target_dir = "dynamic/thumbs/"; |
43 | 43 | $imageFileType = strtolower(pathinfo($_FILES["thumbnail"]["name"], PATHINFO_EXTENSION)); |
44 | 44 | $target_name = md5_file($_FILES["thumbnail"]["tmp_name"]) . "." . $imageFileType; |
@@ -48,8 +48,8 @@ discard block |
||
48 | 48 | $uploadOk = true; |
49 | 49 | $movedFile = false; |
50 | 50 | |
51 | - if($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg" |
|
52 | - && $imageFileType != "gif" ) { |
|
51 | + if ($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg" |
|
52 | + && $imageFileType != "gif") { |
|
53 | 53 | $fileerror = 'unsupported file type. must be jpg, png, jpeg, or gif'; |
54 | 54 | $uploadOk = false; |
55 | 55 | goto skip; |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | <?php |
15 | 15 | $_playlist = $__video_h->fetch_playlist_rid($_GET['v']); |
16 | 16 | |
17 | - if(!$__user_h->user_exists($_playlist['author'])) |
|
17 | + if (!$__user_h->user_exists($_playlist['author'])) |
|
18 | 18 | header("Location: /?userdoesntexist"); |
19 | 19 | |
20 | 20 | $_user = $__user_h->fetch_user_username($_playlist['author']); |
@@ -66,28 +66,28 @@ discard block |
||
66 | 66 | $_user['genre'] = strtolower($_user['genre']); |
67 | 67 | $_user['subscribed'] = $__user_h->if_subscribed(@$_SESSION['siteusername'], $_user['username']); |
68 | 68 | |
69 | - if(!check_valid_colorhex($_user['primary_color']) && strlen($_user['primary_color']) != 6) { $_user['primary_color'] = ""; } |
|
70 | - if(!check_valid_colorhex($_user['secondary_color']) && strlen($_user['secondary_color']) != 6) { $_user['secondary_color'] = ""; } |
|
71 | - if(!check_valid_colorhex($_user['third_color']) && strlen($_user['third_color']) != 6) { $_user['third_color'] = ""; } |
|
72 | - if(!check_valid_colorhex($_user['text_color']) && strlen($_user['text_color']) != 6) { $_user['text_color'] = ""; } |
|
73 | - if(!check_valid_colorhex($_user['primary_color_text']) && strlen($_user['primary_color_text']) != 6) { $_user['primary_color_text'] = ""; } |
|
74 | - if(!check_valid_colorhex($_user['2009_bgcolor']) && strlen($_user['2009_bgcolor']) != 6) { $_user['2009_bgcolor'] = ""; } |
|
69 | + if (!check_valid_colorhex($_user['primary_color']) && strlen($_user['primary_color']) != 6) { $_user['primary_color'] = ""; } |
|
70 | + if (!check_valid_colorhex($_user['secondary_color']) && strlen($_user['secondary_color']) != 6) { $_user['secondary_color'] = ""; } |
|
71 | + if (!check_valid_colorhex($_user['third_color']) && strlen($_user['third_color']) != 6) { $_user['third_color'] = ""; } |
|
72 | + if (!check_valid_colorhex($_user['text_color']) && strlen($_user['text_color']) != 6) { $_user['text_color'] = ""; } |
|
73 | + if (!check_valid_colorhex($_user['primary_color_text']) && strlen($_user['primary_color_text']) != 6) { $_user['primary_color_text'] = ""; } |
|
74 | + if (!check_valid_colorhex($_user['2009_bgcolor']) && strlen($_user['2009_bgcolor']) != 6) { $_user['2009_bgcolor'] = ""; } |
|
75 | 75 | |
76 | - if(isset($_SESSION['siteusername'])) |
|
76 | + if (isset($_SESSION['siteusername'])) |
|
77 | 77 | $__user_i->check_view_channel($_user['username'], @$_SESSION['siteusername']); |
78 | 78 | |
79 | - if($_SERVER['REQUEST_METHOD'] == 'POST') { |
|
79 | + if ($_SERVER['REQUEST_METHOD'] == 'POST') { |
|
80 | 80 | $error = array(); |
81 | 81 | |
82 | - if(!isset($_SESSION['siteusername'])){ $error['message'] = "you are not logged in"; $error['status'] = true; } |
|
83 | - if(!$_POST['comment']){ $error['message'] = "your comment cannot be blank"; $error['status'] = true; } |
|
84 | - if(strlen($_POST['comment']) > 1000){ $error['message'] = "your comment must be shorter than 1000 characters"; $error['status'] = true; } |
|
82 | + if (!isset($_SESSION['siteusername'])) { $error['message'] = "you are not logged in"; $error['status'] = true; } |
|
83 | + if (!$_POST['comment']) { $error['message'] = "your comment cannot be blank"; $error['status'] = true; } |
|
84 | + if (strlen($_POST['comment']) > 1000) { $error['message'] = "your comment must be shorter than 1000 characters"; $error['status'] = true; } |
|
85 | 85 | //if(!isset($_POST['g-recaptcha-response'])){ $error['message'] = "captcha validation failed"; $error['status'] = true; } |
86 | 86 | //if(!$_user_insert_utils->validateCaptcha($config['recaptcha_secret'], $_POST['g-recaptcha-response'])) { $error['message'] = "captcha validation failed"; $error['status'] = true; } |
87 | - 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; } |
|
87 | + 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 | 88 | //if(ifBlocked(@$_SESSION['siteusername'], $user['username'], $__db)) { $error = "This user has blocked you!"; $error['status'] = true; } |
89 | 89 | |
90 | - if(!isset($error['message'])) { |
|
90 | + if (!isset($error['message'])) { |
|
91 | 91 | $text = $_POST['comment']; |
92 | 92 | $stmt = $__db->prepare("INSERT INTO profile_comments (toid, author, comment) VALUES (:id, :username, :comment)"); |
93 | 93 | $stmt->bindParam(":id", $_user['username']); |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | |
98 | 98 | $_user_update_utils->update_comment_cooldown_time($_SESSION['siteusername']); |
99 | 99 | |
100 | - if(@$_SESSION['siteusername'] != $_user['username']) { |
|
100 | + if (@$_SESSION['siteusername'] != $_user['username']) { |
|
101 | 101 | $_user_insert_utils->send_message($_user['username'], "New comment", 'I commented "' . $_POST['comment'] . '" on your profile!', $_SESSION['siteusername']); |
102 | 102 | } |
103 | 103 | } |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | <link rel="stylesheet" href="/yt/cssbin/www-extra.css"> |
132 | 132 | <style> |
133 | 133 | #content-container { |
134 | - background-color: <?php echo $_user['primary_color']; ?>; |
|
134 | + background-color: <?php echo $_user['primary_color']; ?>; |
|
135 | 135 | background-image: url(/dynamic/banners/<?php echo $_user['2009_bg']; ?>); |
136 | 136 | background-repeat: repeat; |
137 | 137 | background-position: center top; |
@@ -147,11 +147,11 @@ discard block |
||
147 | 147 | <div id="masthead-container"><?php require($_SERVER['DOCUMENT_ROOT'] . "/s/mod/header.php"); ?></div> |
148 | 148 | <div id="content-container"> |
149 | 149 | <!-- begin content --> |
150 | - <?php if(isset($_SESSION['siteusername']) && $_user['username'] == $_SESSION['siteusername']) { ?> |
|
150 | + <?php if (isset($_SESSION['siteusername']) && $_user['username'] == $_SESSION['siteusername']) { ?> |
|
151 | 151 | <div class="channel_customization"><?php require($_SERVER['DOCUMENT_ROOT'] . "/s/mod/channel_customization.php"); ?></div> |
152 | 152 | <?php } ?> |
153 | 153 | <?php |
154 | - if(empty(trim($_user['bio']))) |
|
154 | + if (empty(trim($_user['bio']))) |
|
155 | 155 | $_user['bio'] = "This user has no description."; |
156 | 156 | ?> |
157 | 157 | <div id="content"> |
@@ -211,7 +211,7 @@ discard block |
||
211 | 211 | </div> |
212 | 212 | </div> |
213 | 213 | <div class="upper-left-section enable-fancy-subscribe-button"> |
214 | - <?php if($_user['username'] != @$_SESSION['siteusername']) { ?> |
|
214 | + <?php if ($_user['username'] != @$_SESSION['siteusername']) { ?> |
|
215 | 215 | <div class="yt-subscription-button-hovercard yt-uix-hovercard"> |
216 | 216 | <button |
217 | 217 | href="#" |
@@ -219,7 +219,7 @@ discard block |
||
219 | 219 | title="" |
220 | 220 | id="subscribe-button" |
221 | 221 | type="button" |
222 | - class="yt-subscription-button <?php if($_user['subscribed']) { echo "subscribed "; } ?> yt-uix-button yt-uix-button-subscription yt-uix-tooltip" |
|
222 | + class="yt-subscription-button <?php if ($_user['subscribed']) { echo "subscribed "; } ?> yt-uix-button yt-uix-button-subscription yt-uix-tooltip" |
|
223 | 223 | role="button"><span class="yt-uix-button-icon-wrapper"><img class="yt-uix-button-icon yt-uix-button-icon-subscribe" |
224 | 224 | src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt=""></span><span class="yt-uix-button-content"> <span class="subscribe-label">Subscribe</span> |
225 | 225 | <span class="subscribed-label">Subscribed</span> |
@@ -253,7 +253,7 @@ discard block |
||
253 | 253 | </div> |
254 | 254 | </div> |
255 | 255 | </div> |
256 | - <?php if($_user['featured'] != "None") { $video = $__video_h->fetch_video_rid($_user['featured']); } else { $_user['featured'] = false; } ?> |
|
256 | + <?php if ($_user['featured'] != "None") { $video = $__video_h->fetch_video_rid($_user['featured']); } else { $_user['featured'] = false; } ?> |
|
257 | 257 | <div id="branded-page-body"> |
258 | 258 | <div class="channel-tab-content channel-layout-two-column selected blogger-template"> |
259 | 259 | <div class="tab-content-body"> |
@@ -287,8 +287,8 @@ discard block |
||
287 | 287 | <?php |
288 | 288 | $_playlist['videos'] = json_decode($_playlist['videos']); |
289 | 289 | $_playlist['count'] = 1; |
290 | - foreach($_playlist['videos'] as $video) { |
|
291 | - if($__video_h->video_exists($video)) { |
|
290 | + foreach ($_playlist['videos'] as $video) { |
|
291 | + if ($__video_h->video_exists($video)) { |
|
292 | 292 | $_video = $__video_h->fetch_video_rid($video); |
293 | 293 | $_video['video_responses'] = $__video_h->get_video_responses($_video['rid']); |
294 | 294 | $_video['age'] = $__time_h->time_elapsed_string($_video['publish']); |
@@ -336,7 +336,7 @@ discard block |
||
336 | 336 | </li> |
337 | 337 | <?php $_playlist['count']++; ?> |
338 | 338 | <?php } } ?> |
339 | - <?php if(count($_playlist['videos']) == 0) { ?> |
|
339 | + <?php if (count($_playlist['videos']) == 0) { ?> |
|
340 | 340 | <h4>This playlist has no videos yet.</h4> |
341 | 341 | <?php } ?> |
342 | 342 | </ol> |
@@ -390,7 +390,7 @@ discard block |
||
390 | 390 | </div> |
391 | 391 | <hr class="yt-horizontal-rule "> |
392 | 392 | </div> |
393 | - <?php if(!empty($_user['website'])) { ?> |
|
393 | + <?php if (!empty($_user['website'])) { ?> |
|
394 | 394 | <div class="user-profile-item"> |
395 | 395 | <div class="yt-c3-profile-custom-url field-container "> |
396 | 396 | <a href="<?php echo addhttp(htmlspecialchars($_user['website'])); ?>" rel="me nofollow" target="_blank" title="<?php echo htmlspecialchars($_user['website']); ?>" class="yt-uix-redirect-link"> |
@@ -439,7 +439,7 @@ discard block |
||
439 | 439 | <h5>Country</h5> |
440 | 440 | <span class="value"><?php echo htmlspecialchars($_user['country']); ?></span> |
441 | 441 | </div> |
442 | - <?php if($_user['genre'] != "none") { ?> |
|
442 | + <?php if ($_user['genre'] != "none") { ?> |
|
443 | 443 | <div class="user-profile-item "> |
444 | 444 | <h5>Channel Genre</h5> |
445 | 445 | <span class="value"><?php echo htmlspecialchars($_user['genre']); ?></span> |
@@ -451,13 +451,13 @@ discard block |
||
451 | 451 | </div> |
452 | 452 | <div class="channel-module other-channels yt-uix-c3-module-container other-channels-compact"> |
453 | 453 | <?php $_user['featured_channels'] = explode(",", $_user['featured_channels']); ?> |
454 | - <?php if(count($_user['featured_channels']) != 0) { ?> |
|
454 | + <?php if (count($_user['featured_channels']) != 0) { ?> |
|
455 | 455 | <div class="module-view other-channels-view"> |
456 | 456 | <h2>Featured Channels</h2> |
457 | 457 | <ul class="channel-summary-list "> |
458 | 458 | <?php |
459 | - foreach($_user['featured_channels'] as $user) { |
|
460 | - if($__user_h->user_exists($user)) { |
|
459 | + foreach ($_user['featured_channels'] as $user) { |
|
460 | + if ($__user_h->user_exists($user)) { |
|
461 | 461 | ?> |
462 | 462 | <li class="yt-tile-visible yt-uix-tile"> |
463 | 463 | <div class="channel-summary clearfix channel-summary-compact"> |
@@ -486,13 +486,13 @@ discard block |
||
486 | 486 | $stmt->bindParam(":search", $_user['username']); |
487 | 487 | $stmt->execute(); |
488 | 488 | |
489 | - if($stmt->rowCount() != 0) { |
|
489 | + if ($stmt->rowCount() != 0) { |
|
490 | 490 | ?> |
491 | 491 | <div class="playlists-narrow channel-module yt-uix-c3-module-container"> |
492 | 492 | <div class="module-view gh-featured"> |
493 | 493 | <h2>Featured Playlists</h2> |
494 | 494 | <?php |
495 | - while($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
495 | + while ($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
496 | 496 | $playlist['videos'] = json_decode($playlist['videos']); |
497 | 497 | ?> |
498 | 498 | <div class="playlist yt-tile-visible yt-uix-tile"> |
@@ -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(parse_url($_SERVER["REQUEST_URI"], PHP_URL_PATH) != $_tab->url) |
|
42 | + <?php foreach ($__tabs as $_tab) { |
|
43 | + if (parse_url($_SERVER["REQUEST_URI"], PHP_URL_PATH) != $_tab->url) |
|
44 | 44 | $_tab->selected = true; |
45 | 45 | ?> |
46 | 46 | <li class="menu-item"> |