@@ -52,8 +52,8 @@ discard block |
||
52 | 52 | $stmt->bindParam(":comment_username", $_user['username']); |
53 | 53 | $stmt->bindParam(":videos_username", $_user['username']); |
54 | 54 | $stmt->execute(); |
55 | - while($content = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
56 | - if((int)$content['id']) { |
|
55 | + while ($content = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
56 | + if ((int) $content['id']) { |
|
57 | 57 | $content = $__video_h->fetch_comment_id($content['id']); |
58 | 58 | $content['video'] = $__video_h->fetch_video_rid($content['toid']); |
59 | 59 | $content['type'] = "comment"; |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | $content['type'] = "video"; |
63 | 63 | } |
64 | 64 | |
65 | - if($content['type'] == "video") { |
|
65 | + if ($content['type'] == "video") { |
|
66 | 66 | ?> |
67 | 67 | <div class="feed-item-container" data-channel-key="UCc6W7efUSkd9YYoxOnctlFg"> |
68 | 68 | <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"> |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | </div> |
135 | 135 | </div> |
136 | 136 | <?php } else { |
137 | - if($__video_h->video_exists($content['video']['rid'])) { ?> |
|
137 | + if ($__video_h->video_exists($content['video']['rid'])) { ?> |
|
138 | 138 | <div class="feed-item-container" data-channel-key="UCXf1X2u5gsmuqcuTQlpOGhw"> |
139 | 139 | <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"> |
140 | 140 | <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> |
@@ -240,7 +240,7 @@ discard block |
||
240 | 240 | </div> |
241 | 241 | <hr class="yt-horizontal-rule "> |
242 | 242 | </div> |
243 | - <?php if(!empty($_user['website'])) { ?> |
|
243 | + <?php if (!empty($_user['website'])) { ?> |
|
244 | 244 | <div class="user-profile-item"> |
245 | 245 | <div class="yt-c3-profile-custom-url field-container "> |
246 | 246 | <a href="<?php echo addhttp(htmlspecialchars($_user['website'])); ?>" rel="me nofollow" target="_blank" title="<?php echo htmlspecialchars($_user['website']); ?>" class="yt-uix-redirect-link"> |
@@ -289,7 +289,7 @@ discard block |
||
289 | 289 | <h5>Country</h5> |
290 | 290 | <span class="value"><?php echo htmlspecialchars($_user['country']); ?></span> |
291 | 291 | </div> |
292 | - <?php if($_user['genre'] != "none") { ?> |
|
292 | + <?php if ($_user['genre'] != "none") { ?> |
|
293 | 293 | <div class="user-profile-item "> |
294 | 294 | <h5>Channel Genre</h5> |
295 | 295 | <span class="value"><?php echo htmlspecialchars(ucfirst($_user['genre'])); ?></span> |
@@ -301,16 +301,16 @@ discard block |
||
301 | 301 | </div> |
302 | 302 | <div class="channel-module other-channels yt-uix-c3-module-container other-channels-compact"> |
303 | 303 | <?php $_user['featured_channels'] = explode(",", $_user['featured_channels']); ?> |
304 | - <?php if(count($_user['featured_channels']) != 0) { ?> |
|
304 | + <?php if (count($_user['featured_channels']) != 0) { ?> |
|
305 | 305 | <div class="module-view other-channels-view"> |
306 | - <h2 <?php if(@$_SESSION['siteusername'] == $_user['username']) { ?>style="display: inline-block;position: relative;bottom: 10px;"<?php } ?>>Featured Channels</h2> |
|
307 | - <?php if(@$_SESSION['siteusername'] == $_user['username']) { |
|
306 | + <h2 <?php if (@$_SESSION['siteusername'] == $_user['username']) { ?>style="display: inline-block;position: relative;bottom: 10px;"<?php } ?>>Featured Channels</h2> |
|
307 | + <?php if (@$_SESSION['siteusername'] == $_user['username']) { |
|
308 | 308 | echo "<a href='#' style='float:right;font-size:11px;color:black;' onclick=';open_featured_channels();return false;'>edit</a>"; |
309 | 309 | } ?> |
310 | 310 | <ul class="channel-summary-list "> |
311 | 311 | <?php |
312 | - foreach($_user['featured_channels'] as $user) { |
|
313 | - if($__user_h->user_exists($user)) { |
|
312 | + foreach ($_user['featured_channels'] as $user) { |
|
313 | + if ($__user_h->user_exists($user)) { |
|
314 | 314 | ?> |
315 | 315 | <li class="yt-tile-visible yt-uix-tile"> |
316 | 316 | <div class="channel-summary clearfix channel-summary-compact"> |
@@ -339,13 +339,13 @@ discard block |
||
339 | 339 | $stmt->bindParam(":search", $_user['username']); |
340 | 340 | $stmt->execute(); |
341 | 341 | |
342 | - if($stmt->rowCount() != 0) { |
|
342 | + if ($stmt->rowCount() != 0) { |
|
343 | 343 | ?> |
344 | 344 | <div class="playlists-narrow channel-module yt-uix-c3-module-container"> |
345 | 345 | <div class="module-view gh-featured"> |
346 | 346 | <h2>Featured Playlists</h2> |
347 | 347 | <?php |
348 | - while($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
348 | + while ($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
349 | 349 | $playlist['videos'] = json_decode($playlist['videos']); |
350 | 350 | ?> |
351 | 351 | <div class="playlist yt-tile-visible yt-uix-tile"> |
@@ -2,7 +2,7 @@ discard block |
||
2 | 2 | <div class="channel-tab-content channel-layout-two-column selected blogger-template"> |
3 | 3 | <div class="tab-content-body"> |
4 | 4 | <div class="primary-pane"> |
5 | - <?php if($_user['featured'] != false && $__video_h->video_exists($_user['featured'])) { ?> |
|
5 | + <?php if ($_user['featured'] != false && $__video_h->video_exists($_user['featured'])) { ?> |
|
6 | 6 | <div class="channels-featured-video channel-module yt-uix-c3-module-container has-visible-edge"> |
7 | 7 | <div class="module-view featured-video-view-module"> |
8 | 8 | <div id="watch-video" > |
@@ -54,8 +54,8 @@ discard block |
||
54 | 54 | $stmt->bindParam(":search", $_user['username']); |
55 | 55 | $stmt->execute(); |
56 | 56 | |
57 | - if($stmt->rowCount() != 0) { |
|
58 | - while($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
57 | + if ($stmt->rowCount() != 0) { |
|
58 | + while ($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
59 | 59 | $playlist['videos'] = json_decode($playlist['videos']); |
60 | 60 | ?> |
61 | 61 | <div class="playlist yt-tile-visible yt-uix-tile"> |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | </div> |
127 | 127 | <hr class="yt-horizontal-rule "> |
128 | 128 | </div> |
129 | - <?php if(!empty($_user['website'])) { ?> |
|
129 | + <?php if (!empty($_user['website'])) { ?> |
|
130 | 130 | <div class="user-profile-item"> |
131 | 131 | <div class="yt-c3-profile-custom-url field-container "> |
132 | 132 | <a href="<?php echo addhttp(htmlspecialchars($_user['website'])); ?>" rel="me nofollow" target="_blank" title="<?php echo htmlspecialchars($_user['website']); ?>" class="yt-uix-redirect-link"> |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | <h5>Country</h5> |
176 | 176 | <span class="value"><?php echo htmlspecialchars($_user['country']); ?></span> |
177 | 177 | </div> |
178 | - <?php if($_user['genre'] != "none") { ?> |
|
178 | + <?php if ($_user['genre'] != "none") { ?> |
|
179 | 179 | <div class="user-profile-item "> |
180 | 180 | <h5>Channel Genre</h5> |
181 | 181 | <span class="value"><?php echo htmlspecialchars(ucfirst($_user['genre'])); ?></span> |
@@ -187,16 +187,16 @@ discard block |
||
187 | 187 | </div> |
188 | 188 | <div class="channel-module other-channels yt-uix-c3-module-container other-channels-compact"> |
189 | 189 | <?php $_user['featured_channels'] = explode(",", $_user['featured_channels']); ?> |
190 | - <?php if(count($_user['featured_channels']) != 0) { ?> |
|
190 | + <?php if (count($_user['featured_channels']) != 0) { ?> |
|
191 | 191 | <div class="module-view other-channels-view"> |
192 | - <h2 <?php if(@$_SESSION['siteusername'] == $_user['username']) { ?>style="display: inline-block;position: relative;bottom: 10px;"<?php } ?>>Featured Channels</h2> |
|
193 | - <?php if(@$_SESSION['siteusername'] == $_user['username']) { |
|
192 | + <h2 <?php if (@$_SESSION['siteusername'] == $_user['username']) { ?>style="display: inline-block;position: relative;bottom: 10px;"<?php } ?>>Featured Channels</h2> |
|
193 | + <?php if (@$_SESSION['siteusername'] == $_user['username']) { |
|
194 | 194 | echo "<a href='#' style='float:right;font-size:11px;color:black;' onclick=';open_featured_channels();return false;'>edit</a>"; |
195 | 195 | } ?> |
196 | 196 | <ul class="channel-summary-list "> |
197 | 197 | <?php |
198 | - foreach($_user['featured_channels'] as $user) { |
|
199 | - if($__user_h->user_exists($user)) { |
|
198 | + foreach ($_user['featured_channels'] as $user) { |
|
199 | + if ($__user_h->user_exists($user)) { |
|
200 | 200 | ?> |
201 | 201 | <li class="yt-tile-visible yt-uix-tile"> |
202 | 202 | <div class="channel-summary clearfix channel-summary-compact"> |
@@ -225,13 +225,13 @@ discard block |
||
225 | 225 | $stmt->bindParam(":search", $_user['username']); |
226 | 226 | $stmt->execute(); |
227 | 227 | |
228 | - if($stmt->rowCount() != 0) { |
|
228 | + if ($stmt->rowCount() != 0) { |
|
229 | 229 | ?> |
230 | 230 | <div class="playlists-narrow channel-module yt-uix-c3-module-container"> |
231 | 231 | <div class="module-view gh-featured"> |
232 | 232 | <h2>Featured Playlists</h2> |
233 | 233 | <?php |
234 | - while($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
234 | + while ($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
235 | 235 | $playlist['videos'] = json_decode($playlist['videos']); |
236 | 236 | ?> |
237 | 237 | <div class="playlist yt-tile-visible yt-uix-tile"> |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | |
18 | 18 | if (isset($_POST['submit'])) |
19 | 19 | { |
20 | - header("Location: " . $_SERVER['DOCUMENT_ROOT']. $next); |
|
20 | + header("Location: " . $_SERVER['DOCUMENT_ROOT'] . $next); |
|
21 | 21 | } |
22 | 22 | ?> |
23 | 23 | |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | <div id="page" class=""> |
47 | 47 | <!-- begin pagetop --> |
48 | 48 | |
49 | - <div id="masthead-container"><?php require($_SERVER['DOCUMENT_ROOT'] . "/s/mod/header.php");?> </div> |
|
49 | + <div id="masthead-container"><?php require($_SERVER['DOCUMENT_ROOT'] . "/s/mod/header.php"); ?> </div> |
|
50 | 50 | <!-- end pagetop --> |
51 | 51 | <!-- begin pagemiddle --> |
52 | 52 | <div id="content-container"> |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | |
63 | 63 | <p class="largeText">Sorry for the interruption. We have been receiving a large volume of requests from your network. To continue with your SubRocks experience, please enter the verification code below.</p> |
64 | 64 | |
65 | -<form method="post" action="/das_captcha?next=<?php echo $next;?>"> |
|
65 | +<form method="post" action="/das_captcha?next=<?php echo $next; ?>"> |
|
66 | 66 | <script type="text/javascript" src="/s/captcha.js"></script> |
67 | 67 | <noscript> |
68 | 68 | You need JavaScript to pass the captcha! |
@@ -9,8 +9,8 @@ |
||
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"); } ?> |
|
13 | -<?php if(!$__user_h->if_admin($_SESSION['siteusername'])) { header("Location: /"); } ?> |
|
12 | +<?php if (!isset($_SESSION['siteusername'])) { header("Location: /sign_in"); } ?> |
|
13 | +<?php if (!$__user_h->if_admin($_SESSION['siteusername'])) { header("Location: /"); } ?> |
|
14 | 14 | <?php |
15 | 15 | $__server->page_embeds->page_title = "SubRocks - Ban User"; |
16 | 16 | $__server->page_embeds->page_description = "SubRocks is a site dedicated to bring back the 2012 layout of YouTube."; |
@@ -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,11 +131,11 @@ 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['2012_bg']; ?>); |
136 | 136 | background-repeat: repeat; |
137 | 137 | <?php |
138 | - switch($_user['2012_bgoption']) { |
|
138 | + switch ($_user['2012_bgoption']) { |
|
139 | 139 | case "stretch": |
140 | 140 | echo "background-size: cover;"; |
141 | 141 | break; |
@@ -168,11 +168,11 @@ discard block |
||
168 | 168 | <div id="masthead-container"><?php require($_SERVER['DOCUMENT_ROOT'] . "/s/mod/header.php"); ?></div> |
169 | 169 | <div id="content-container"> |
170 | 170 | <!-- begin content --> |
171 | - <?php if(isset($_SESSION['siteusername']) && $_user['username'] == $_SESSION['siteusername']) { ?> |
|
171 | + <?php if (isset($_SESSION['siteusername']) && $_user['username'] == $_SESSION['siteusername']) { ?> |
|
172 | 172 | <div class="channel_customization"><?php require($_SERVER['DOCUMENT_ROOT'] . "/s/mod/channel_customization.php"); ?></div> |
173 | 173 | <?php } ?> |
174 | 174 | <?php |
175 | - if(empty(trim($_user['bio']))) |
|
175 | + if (empty(trim($_user['bio']))) |
|
176 | 176 | $_user['bio'] = "This user has no description."; |
177 | 177 | ?> |
178 | 178 | <div id="content"> |
@@ -232,7 +232,7 @@ discard block |
||
232 | 232 | </div> |
233 | 233 | </div> |
234 | 234 | <div class="upper-left-section enable-fancy-subscribe-button"> |
235 | - <?php if($_user['username'] != @$_SESSION['siteusername']) { ?> |
|
235 | + <?php if ($_user['username'] != @$_SESSION['siteusername']) { ?> |
|
236 | 236 | <div class="yt-subscription-button-hovercard yt-uix-hovercard"> |
237 | 237 | <button |
238 | 238 | href="#" |
@@ -240,7 +240,7 @@ discard block |
||
240 | 240 | title="" |
241 | 241 | id="subscribe-button" |
242 | 242 | type="button" |
243 | - class="yt-subscription-button <?php if($_user['subscribed']) { echo "subscribed "; } ?> yt-uix-button yt-uix-button-subscription yt-uix-tooltip" |
|
243 | + class="yt-subscription-button <?php if ($_user['subscribed']) { echo "subscribed "; } ?> yt-uix-button yt-uix-button-subscription yt-uix-tooltip" |
|
244 | 244 | role="button"><span class="yt-uix-button-icon-wrapper"><img class="yt-uix-button-icon yt-uix-button-icon-subscribe" |
245 | 245 | src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt=""></span><span class="yt-uix-button-content"> <span class="subscribe-label">Subscribe</span> |
246 | 246 | <span class="subscribed-label">Subscribed</span> |
@@ -274,7 +274,7 @@ discard block |
||
274 | 274 | </div> |
275 | 275 | </div> |
276 | 276 | </div> |
277 | - <?php if($_user['featured'] != "None") { $video = $__video_h->fetch_video_rid($_user['featured']); } else { $_user['featured'] = false; } ?> |
|
277 | + <?php if ($_user['featured'] != "None") { $video = $__video_h->fetch_video_rid($_user['featured']); } else { $_user['featured'] = false; } ?> |
|
278 | 278 | <div id="branded-page-body"> |
279 | 279 | <div class="channel-tab-content channel-layout-two-column selected blogger-template"> |
280 | 280 | <div class="tab-content-body"> |
@@ -308,8 +308,8 @@ discard block |
||
308 | 308 | <?php |
309 | 309 | $_playlist['videos'] = json_decode($_playlist['videos']); |
310 | 310 | $_playlist['count'] = 1; |
311 | - foreach($_playlist['videos'] as $video) { |
|
312 | - if($__video_h->video_exists($video)) { |
|
311 | + foreach ($_playlist['videos'] as $video) { |
|
312 | + if ($__video_h->video_exists($video)) { |
|
313 | 313 | $_video = $__video_h->fetch_video_rid($video); |
314 | 314 | $_video['video_responses'] = $__video_h->get_video_responses($_video['rid']); |
315 | 315 | $_video['age'] = $__time_h->time_elapsed_string($_video['publish']); |
@@ -357,7 +357,7 @@ discard block |
||
357 | 357 | </li> |
358 | 358 | <?php $_playlist['count']++; ?> |
359 | 359 | <?php } } ?> |
360 | - <?php if(count($_playlist['videos']) == 0) { ?> |
|
360 | + <?php if (count($_playlist['videos']) == 0) { ?> |
|
361 | 361 | <h4>This playlist has no videos yet.</h4> |
362 | 362 | <?php } ?> |
363 | 363 | </ol> |
@@ -411,7 +411,7 @@ discard block |
||
411 | 411 | </div> |
412 | 412 | <hr class="yt-horizontal-rule "> |
413 | 413 | </div> |
414 | - <?php if(!empty($_user['website'])) { ?> |
|
414 | + <?php if (!empty($_user['website'])) { ?> |
|
415 | 415 | <div class="user-profile-item"> |
416 | 416 | <div class="yt-c3-profile-custom-url field-container "> |
417 | 417 | <a href="<?php echo addhttp(htmlspecialchars($_user['website'])); ?>" rel="me nofollow" target="_blank" title="<?php echo htmlspecialchars($_user['website']); ?>" class="yt-uix-redirect-link"> |
@@ -460,7 +460,7 @@ discard block |
||
460 | 460 | <h5>Country</h5> |
461 | 461 | <span class="value"><?php echo htmlspecialchars($_user['country']); ?></span> |
462 | 462 | </div> |
463 | - <?php if($_user['genre'] != "none") { ?> |
|
463 | + <?php if ($_user['genre'] != "none") { ?> |
|
464 | 464 | <div class="user-profile-item "> |
465 | 465 | <h5>Channel Genre</h5> |
466 | 466 | <span class="value"><?php echo htmlspecialchars($_user['genre']); ?></span> |
@@ -472,13 +472,13 @@ discard block |
||
472 | 472 | </div> |
473 | 473 | <div class="channel-module other-channels yt-uix-c3-module-container other-channels-compact"> |
474 | 474 | <?php $_user['featured_channels'] = explode(",", $_user['featured_channels']); ?> |
475 | - <?php if(count($_user['featured_channels']) != 0) { ?> |
|
475 | + <?php if (count($_user['featured_channels']) != 0) { ?> |
|
476 | 476 | <div class="module-view other-channels-view"> |
477 | 477 | <h2>Featured Channels</h2> |
478 | 478 | <ul class="channel-summary-list "> |
479 | 479 | <?php |
480 | - foreach($_user['featured_channels'] as $user) { |
|
481 | - if($__user_h->user_exists($user)) { |
|
480 | + foreach ($_user['featured_channels'] as $user) { |
|
481 | + if ($__user_h->user_exists($user)) { |
|
482 | 482 | ?> |
483 | 483 | <li class="yt-tile-visible yt-uix-tile"> |
484 | 484 | <div class="channel-summary clearfix channel-summary-compact"> |
@@ -507,13 +507,13 @@ discard block |
||
507 | 507 | $stmt->bindParam(":search", $_user['username']); |
508 | 508 | $stmt->execute(); |
509 | 509 | |
510 | - if($stmt->rowCount() != 0) { |
|
510 | + if ($stmt->rowCount() != 0) { |
|
511 | 511 | ?> |
512 | 512 | <div class="playlists-narrow channel-module yt-uix-c3-module-container"> |
513 | 513 | <div class="module-view gh-featured"> |
514 | 514 | <h2>Featured Playlists</h2> |
515 | 515 | <?php |
516 | - while($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
516 | + while ($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
517 | 517 | $playlist['videos'] = json_decode($playlist['videos']); |
518 | 518 | ?> |
519 | 519 | <div class="playlist yt-tile-visible yt-uix-tile"> |
@@ -8,7 +8,7 @@ discard block |
||
8 | 8 | <?php $__user_h = new user_helper($__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 - Upload Video"; |
14 | 14 | $__server->page_embeds->page_description = "SubRocks is a site dedicated to bring back the 2012 layout of YouTube."; |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | <div id="content-container"> |
45 | 45 | <!-- begin content --> |
46 | 46 | <div id="content"> |
47 | - <?php if($__user_h->if_upload_cooldown($_SESSION['siteusername'])) { ?> |
|
47 | + <?php if ($__user_h->if_upload_cooldown($_SESSION['siteusername'])) { ?> |
|
48 | 48 | <div id="masthead_child_div"><div class="yt-alert yt-alert-default yt-alert-error "> <div class="yt-alert-icon"> |
49 | 49 | <img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" class="icon master-sprite" alt="Alert icon"> |
50 | 50 | </div> |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | <b>Category</b> <br> |
108 | 108 | <select style="margin-top:5px;" name="category" class="yt-uix-button yt-uix-button-default"> |
109 | 109 | <?php $categories = ["None", "Film & Animation", "Autos & Vehicles", "Music", "Pets & Animals", "Sports", "Travel & Events", "Gaming", "People & Blogs", "Comedy", "Entertainment", "News & Politics", "Howto & Style", "Education", "Science & Technology", "Nonprofits & Activism"]; ?> |
110 | - <?php foreach($categories as $categoryTag) { ?> |
|
110 | + <?php foreach ($categories as $categoryTag) { ?> |
|
111 | 111 | <option value="<?php echo $categoryTag; ?>"><?php echo $categoryTag; ?></option> |
112 | 112 | <?php } ?> |
113 | 113 | </select><br><br> |
@@ -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,11 +133,11 @@ 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['2012_bg']; ?>); |
138 | 138 | background-repeat: repeat; |
139 | 139 | <?php |
140 | - switch($_user['2012_bgoption']) { |
|
140 | + switch ($_user['2012_bgoption']) { |
|
141 | 141 | case "stretch": |
142 | 142 | echo "background-size: cover;"; |
143 | 143 | break; |
@@ -170,11 +170,11 @@ discard block |
||
170 | 170 | <div id="masthead-container"><?php require($_SERVER['DOCUMENT_ROOT'] . "/s/mod/header.php"); ?></div> |
171 | 171 | <div id="content-container"> |
172 | 172 | <!-- begin content --> |
173 | - <?php if(isset($_SESSION['siteusername']) && $_user['username'] == $_SESSION['siteusername']) { ?> |
|
173 | + <?php if (isset($_SESSION['siteusername']) && $_user['username'] == $_SESSION['siteusername']) { ?> |
|
174 | 174 | <div class="channel_customization"><?php require($_SERVER['DOCUMENT_ROOT'] . "/s/mod/channel_customization.php"); ?></div> |
175 | 175 | <?php } ?> |
176 | 176 | <?php |
177 | - if(empty(trim($_user['bio']))) |
|
177 | + if (empty(trim($_user['bio']))) |
|
178 | 178 | $_user['bio'] = "This user has no description."; |
179 | 179 | ?> |
180 | 180 | <div id="content"> |
@@ -229,7 +229,7 @@ discard block |
||
229 | 229 | <h1><?php echo htmlspecialchars($_user['username']); ?></h1> |
230 | 230 | </div> |
231 | 231 | <div class="upper-left-section enable-fancy-subscribe-button"> |
232 | - <?php if($_user['username'] != @$_SESSION['siteusername']) { ?> |
|
232 | + <?php if ($_user['username'] != @$_SESSION['siteusername']) { ?> |
|
233 | 233 | <div class="yt-subscription-button-hovercard yt-uix-hovercard"> |
234 | 234 | <button |
235 | 235 | href="#" |
@@ -237,7 +237,7 @@ discard block |
||
237 | 237 | title="" |
238 | 238 | id="subscribe-button" |
239 | 239 | type="button" |
240 | - class="yt-subscription-button <?php if($_user['subscribed']) { echo "subscribed "; } ?> yt-uix-button yt-uix-button-subscription yt-uix-tooltip" |
|
240 | + class="yt-subscription-button <?php if ($_user['subscribed']) { echo "subscribed "; } ?> yt-uix-button yt-uix-button-subscription yt-uix-tooltip" |
|
241 | 241 | role="button"><span class="yt-uix-button-icon-wrapper"><img class="yt-uix-button-icon yt-uix-button-icon-subscribe" |
242 | 242 | src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt=""></span><span class="yt-uix-button-content"> <span class="subscribe-label">Subscribe</span> |
243 | 243 | <span class="subscribed-label">Subscribed</span> |
@@ -303,7 +303,7 @@ discard block |
||
303 | 303 | </div> |
304 | 304 | </div> |
305 | 305 | </div> |
306 | - <?php if($_user['featured'] != "None") { $video = $__video_h->fetch_video_rid($_user['featured']); } else { $_user['featured'] = false; } ?> |
|
306 | + <?php if ($_user['featured'] != "None") { $video = $__video_h->fetch_video_rid($_user['featured']); } else { $_user['featured'] = false; } ?> |
|
307 | 307 | <div id="branded-page-body"> |
308 | 308 | <div class="channel-tab-content channel-layout-two-column selected blogger-template"><?php require($_SERVER['DOCUMENT_ROOT'] . "/s/mod/channel_feed.php"); ?></div> |
309 | 309 | </div> |
@@ -14,15 +14,15 @@ discard block |
||
14 | 14 | <?php |
15 | 15 | $_video = $__video_h->fetch_video_rid($_SESSION['current_video']); |
16 | 16 | |
17 | -if($_SERVER['REQUEST_METHOD'] == 'POST') { |
|
17 | +if ($_SERVER['REQUEST_METHOD'] == 'POST') { |
|
18 | 18 | $error = array(); |
19 | 19 | |
20 | - if(!isset($_SESSION['siteusername'])){ $error['message'] = "you are not logged in"; $error['status'] = true; } |
|
21 | - if(!$_POST['comment']){ $error['message'] = "your comment cannot be blank"; $error['status'] = true; } |
|
22 | - if(strlen($_POST['comment']) > 1000){ $error['message'] = "your comment must be shorter than 1000 characters"; $error['status'] = true; } |
|
23 | - 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; } |
|
20 | + if (!isset($_SESSION['siteusername'])) { $error['message'] = "you are not logged in"; $error['status'] = true; } |
|
21 | + if (!$_POST['comment']) { $error['message'] = "your comment cannot be blank"; $error['status'] = true; } |
|
22 | + if (strlen($_POST['comment']) > 1000) { $error['message'] = "your comment must be shorter than 1000 characters"; $error['status'] = true; } |
|
23 | + 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; } |
|
24 | 24 | |
25 | - if(!isset($error['message'])) { |
|
25 | + if (!isset($error['message'])) { |
|
26 | 26 | $text = $_POST['comment']; |
27 | 27 | $stmt = $__db->prepare("INSERT INTO comments (toid, author, comment) VALUES (:v, :username, :comment)"); |
28 | 28 | $stmt->bindParam(":v", $_SESSION['current_video']); |
@@ -31,14 +31,14 @@ discard block |
||
31 | 31 | $stmt->execute(); |
32 | 32 | |
33 | 33 | $__user_u->update_cooldown_time($_SESSION['siteusername'], "cooldown_comment"); |
34 | - if(@$_SESSION['siteusername'] != $_video['author']) |
|
34 | + if (@$_SESSION['siteusername'] != $_video['author']) |
|
35 | 35 | $__user_i->send_message($_SESSION['siteusername'], "New comment", $_video['author'], "I commented \"" . $_POST['comment'] . "\" on your video!", $_video['rid'], "nt"); |
36 | 36 | } |
37 | 37 | } |
38 | 38 | |
39 | 39 | header("Content-type: text/xml"); |
40 | 40 | // ugly solution |
41 | -if(!isset($error['status'])) { |
|
41 | +if (!isset($error['status'])) { |
|
42 | 42 | $xml = '<?xml version="1.0" encoding="utf-8"?><root><str_code><![CDATA[OK]]></str_code><html_content><![CDATA[<li class="comment yt-tile-default " data-author-viewing="" data-author-id="-uD01K8FQTeOSS5sniRFzQ" data-id="420" data-score="0"><div class="comment-body"><div class="content-container"><div class="content"><div class="comment-text" dir="ltr"><p>' . $__video_h->shorten_description($_POST['comment'], 2048, true) . '</p></div><p class="metadata"><span class="author "><a href="/user/' . htmlspecialchars($_SESSION['siteusername']) . '" class="yt-uix-sessionlink yt-user-name " data-sessionlink="' . htmlspecialchars($_SESSION['siteusername']) . '" dir="ltr">' . htmlspecialchars($_SESSION['siteusername']) . '</a></span><span class="time" dir="ltr"><span dir="ltr">just now<span></span></span></span></p></div><div class="comment-actions"><span class="yt-uix-button-group"><button type="button" class="start comment-action-vote-up comment-action yt-uix-button yt-uix-button-default yt-uix-tooltip yt-uix-button-empty" onclick=";return false;" title="Vote Up" data-action="vote-up" data-tooltip-show-delay="300" role="button"><span class="yt-uix-button-icon-wrapper"><img class="yt-uix-button-icon yt-uix-button-icon-watch-comment-vote-up" src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Vote Up"><span class="yt-valign-trick"></span></span></button><button type="button" class="end comment-action-vote-down comment-action yt-uix-button yt-uix-button-default yt-uix-tooltip yt-uix-button-empty" onclick=";return false;" title="Vote Down" data-action="vote-down" data-tooltip-show-delay="300" role="button"><span class="yt-uix-button-icon-wrapper"><img class="yt-uix-button-icon yt-uix-button-icon-watch-comment-vote-down" src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Vote Down"><span class="yt-valign-trick"></span></span></button></span><span class="yt-uix-button-group"><!--<button type="button" class="start comment-action yt-uix-button yt-uix-button-default" onclick=";return false;" data-action="reply" role="button"><span class="yt-uix-button-content">Reply </span></button>--><button type="button" class="end flip yt-uix-button yt-uix-button-default yt-uix-button-empty" onclick=";return false;" data-button-has-sibling-menu="true" role="button" aria-pressed="false" aria-expanded="false" aria-haspopup="true" aria-activedescendant=""><img class="yt-uix-button-arrow" src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt=""><div class=" yt-uix-button-menu yt-uix-button-menu-default" style="display: none;"><ul><li class="comment-action" data-action="share"><span class="yt-uix-button-menu-item">Share</span></li><li class="comment-action-remove comment-action" data-action="remove"><span class="yt-uix-button-menu-item">Remove</span></li><li class="comment-action" data-action="flag"><span class="yt-uix-button-menu-item">Flag for spam</span></li><li class="comment-action-block comment-action" data-action="block"><span class="yt-uix-button-menu-item">Block User</span></li><li class="comment-action-unblock comment-action" data-action="unblock"><span class="yt-uix-button-menu-item">Unblock User</span></li></ul></div></button></span></div></div></div></li>]]></html_content><return_code><![CDATA[0]]></return_code></root>'; |
43 | 43 | } else { |
44 | 44 | $xml = '<?xml version="1.0" encoding="utf-8"?><root><str_code><![CDATA[OK]]></str_code><html_content><![CDATA[<div class="yt-alert yt-alert-default yt-alert-error "> <div class="yt-alert-icon"><img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" class="icon master-sprite" alt="Alert icon"></div><div class="yt-alert-buttons"></div><div class="yt-alert-content" role="alert"><span class="yt-alert-vertical-trick"></span><div class="yt-alert-message">You are under a cooldown!</div></div></div>]]></html_content><return_code><![CDATA[0]]></return_code></root>'; |
@@ -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,11 +133,11 @@ 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['2012_bg']; ?>); |
138 | 138 | background-repeat: repeat; |
139 | 139 | <?php |
140 | - switch($_user['2012_bgoption']) { |
|
140 | + switch ($_user['2012_bgoption']) { |
|
141 | 141 | case "stretch": |
142 | 142 | echo "background-size: cover;"; |
143 | 143 | break; |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | <div id="masthead-container"><?php require($_SERVER['DOCUMENT_ROOT'] . "/s/mod/header.php"); ?></div> |
171 | 171 | <div id="content-container"> |
172 | 172 | <!-- begin content --> |
173 | - <?php if(isset($_SESSION['siteusername']) && $_user['username'] == $_SESSION['siteusername']) { ?> |
|
173 | + <?php if (isset($_SESSION['siteusername']) && $_user['username'] == $_SESSION['siteusername']) { ?> |
|
174 | 174 | <div class="channel_customization"><?php require($_SERVER['DOCUMENT_ROOT'] . "/s/mod/channel_customization.php"); ?></div> |
175 | 175 | <?php } ?> |
176 | 176 | <div id="content"> |
@@ -225,7 +225,7 @@ discard block |
||
225 | 225 | <h1><?php echo htmlspecialchars($_user['username']); ?></h1> |
226 | 226 | </div> |
227 | 227 | <div class="upper-left-section enable-fancy-subscribe-button"> |
228 | - <?php if($_user['username'] != @$_SESSION['siteusername']) { ?> |
|
228 | + <?php if ($_user['username'] != @$_SESSION['siteusername']) { ?> |
|
229 | 229 | <div class="yt-subscription-button-hovercard yt-uix-hovercard"> |
230 | 230 | <button |
231 | 231 | href="#" |
@@ -233,7 +233,7 @@ discard block |
||
233 | 233 | title="" |
234 | 234 | id="subscribe-button" |
235 | 235 | type="button" |
236 | - class="yt-subscription-button <?php if($_user['subscribed']) { echo "subscribed "; } ?> yt-uix-button yt-uix-button-subscription yt-uix-tooltip" |
|
236 | + class="yt-subscription-button <?php if ($_user['subscribed']) { echo "subscribed "; } ?> yt-uix-button yt-uix-button-subscription yt-uix-tooltip" |
|
237 | 237 | role="button"><span class="yt-uix-button-icon-wrapper"><img class="yt-uix-button-icon yt-uix-button-icon-subscribe" |
238 | 238 | src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt=""></span><span class="yt-uix-button-content"> <span class="subscribe-label">Subscribe</span> |
239 | 239 | <span class="subscribed-label">Subscribed</span> |
@@ -299,7 +299,7 @@ discard block |
||
299 | 299 | </div> |
300 | 300 | </div> |
301 | 301 | </div> |
302 | - <?php if($_user['featured'] != "None") { $video = $__video_h->fetch_video_rid($_user['featured']); } else { $_user['featured'] = false; } ?> |
|
302 | + <?php if ($_user['featured'] != "None") { $video = $__video_h->fetch_video_rid($_user['featured']); } else { $_user['featured'] = false; } ?> |
|
303 | 303 | <div id="branded-page-body"> |
304 | 304 | <div class="channel-tab-content channel-layout-full-width"> |
305 | 305 | <div class="tab-content-body"> |
@@ -333,7 +333,7 @@ discard block |
||
333 | 333 | $stmt = $__db->prepare("SELECT * FROM videos WHERE author = :username ORDER BY id DESC"); |
334 | 334 | $stmt->bindParam(":username", $_user['username']); |
335 | 335 | $stmt->execute(); |
336 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
336 | + while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
337 | 337 | $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
338 | 338 | $video['duration'] = $__time_h->timestamp($video['duration']); |
339 | 339 | $video['views'] = $__video_h->fetch_video_views($video['rid']); |