@@ -12,21 +12,21 @@ 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"); |
20 | 20 | |
21 | 21 | $_user = $__user_h->fetch_user_username($_GET['n']); |
22 | 22 | |
23 | - $stmt = $__db->prepare("SELECT * FROM bans WHERE username = :username ORDER BY id DESC"); |
|
24 | - $stmt->bindParam(":username", $_user['username']); |
|
25 | - $stmt->execute(); |
|
23 | + $stmt = $__db->prepare("SELECT * FROM bans WHERE username = :username ORDER BY id DESC"); |
|
24 | + $stmt->bindParam(":username", $_user['username']); |
|
25 | + $stmt->execute(); |
|
26 | 26 | |
27 | - while($ban = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
28 | - header("Location: /?error=This user has been terminated for violating SubRock's Community Guidelines."); |
|
29 | - } |
|
27 | + while($ban = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
28 | + header("Location: /?error=This user has been terminated for violating SubRock's Community Guidelines."); |
|
29 | + } |
|
30 | 30 | |
31 | 31 | function clean($string) { |
32 | 32 | $string = str_replace(' ', '-', $string); // Replaces all spaces with hyphens. |
@@ -34,21 +34,21 @@ discard block |
||
34 | 34 | return preg_replace('/[^A-Za-z0-9\-]/', '', $string); // Removes special chars. |
35 | 35 | } |
36 | 36 | |
37 | - function addhttp($url) { |
|
38 | - if (!preg_match("~^(?:f|ht)tps?://~i", $url)) { |
|
39 | - $url = "http://" . $url; |
|
40 | - } |
|
41 | - return $url; |
|
42 | - } |
|
37 | + function addhttp($url) { |
|
38 | + if (!preg_match("~^(?:f|ht)tps?://~i", $url)) { |
|
39 | + $url = "http://" . $url; |
|
40 | + } |
|
41 | + return $url; |
|
42 | + } |
|
43 | 43 | |
44 | 44 | function check_valid_colorhex($colorCode) { |
45 | 45 | // If user accidentally passed along the # sign, strip it off |
46 | 46 | $colorCode = ltrim($colorCode, '#'); |
47 | 47 | |
48 | 48 | if ( |
49 | - ctype_xdigit($colorCode) && |
|
49 | + ctype_xdigit($colorCode) && |
|
50 | 50 | (strlen($colorCode) == 6 || strlen($colorCode) == 3)) |
51 | - return true; |
|
51 | + return true; |
|
52 | 52 | |
53 | 53 | else return false; |
54 | 54 | } |
@@ -83,8 +83,8 @@ discard block |
||
83 | 83 | if(!check_valid_colorhex($_user['primary_color_text']) && strlen($_user['primary_color_text']) != 6) { $_user['primary_color_text'] = ""; } |
84 | 84 | if(!check_valid_colorhex($_user['2009_bgcolor']) && strlen($_user['2009_bgcolor']) != 6) { $_user['2009_bgcolor'] = ""; } |
85 | 85 | |
86 | - if(isset($_SESSION['siteusername'])) |
|
87 | - $__user_i->check_view_channel($_user['username'], @$_SESSION['siteusername']); |
|
86 | + if(isset($_SESSION['siteusername'])) |
|
87 | + $__user_i->check_view_channel($_user['username'], @$_SESSION['siteusername']); |
|
88 | 88 | |
89 | 89 | if($_SERVER['REQUEST_METHOD'] == 'POST') { |
90 | 90 | $error = array(); |
@@ -98,11 +98,11 @@ discard block |
||
98 | 98 | //if(ifBlocked(@$_SESSION['siteusername'], $user['username'], $__db)) { $error = "This user has blocked you!"; $error['status'] = true; } |
99 | 99 | |
100 | 100 | if(!isset($error['message'])) { |
101 | - $text = $_POST['comment']; |
|
101 | + $text = $_POST['comment']; |
|
102 | 102 | $stmt = $__db->prepare("INSERT INTO profile_comments (toid, author, comment) VALUES (:id, :username, :comment)"); |
103 | - $stmt->bindParam(":id", $_user['username']); |
|
104 | - $stmt->bindParam(":username", $_SESSION['siteusername']); |
|
105 | - $stmt->bindParam(":comment", $text); |
|
103 | + $stmt->bindParam(":id", $_user['username']); |
|
104 | + $stmt->bindParam(":username", $_SESSION['siteusername']); |
|
105 | + $stmt->bindParam(":comment", $text); |
|
106 | 106 | $stmt->execute(); |
107 | 107 | |
108 | 108 | $_user_update_utils->update_comment_cooldown_time($_SESSION['siteusername']); |
@@ -114,10 +114,10 @@ discard block |
||
114 | 114 | } |
115 | 115 | ?> |
116 | 116 | <?php |
117 | - $__server->page_embeds->page_title = "SubRocks - " . htmlspecialchars($_user['username']); |
|
118 | - $__server->page_embeds->page_description = htmlspecialchars($_user['bio']); |
|
119 | - $__server->page_embeds->page_image = "/dynamic/pfp/" . htmlspecialchars($_user['pfp']); |
|
120 | - $__server->page_embeds->page_url = "https://subrock.rocks/"; |
|
117 | + $__server->page_embeds->page_title = "SubRocks - " . htmlspecialchars($_user['username']); |
|
118 | + $__server->page_embeds->page_description = htmlspecialchars($_user['bio']); |
|
119 | + $__server->page_embeds->page_image = "/dynamic/pfp/" . htmlspecialchars($_user['pfp']); |
|
120 | + $__server->page_embeds->page_url = "https://subrock.rocks/"; |
|
121 | 121 | ?> |
122 | 122 | <!DOCTYPE html> |
123 | 123 | <html dir="ltr" xmlns:og="http://opengraphprotocol.org/schema/" lang="en"> |
@@ -145,27 +145,27 @@ discard block |
||
145 | 145 | background-image: url(/dynamic/banners/<?php echo $_user['2012_bg']; ?>); |
146 | 146 | background-repeat: repeat; |
147 | 147 | <?php |
148 | - switch($_user['2012_bgoption']) { |
|
149 | - case "stretch": |
|
150 | - echo "background-size: cover;"; |
|
151 | - break; |
|
152 | - case "solid": |
|
153 | - echo ""; |
|
154 | - break; |
|
155 | - case "norepeat": |
|
156 | - echo "background-repeat: no-repeat !important;"; |
|
157 | - break; |
|
158 | - case "repeatxy": |
|
159 | - echo "background-repeat: repeat;"; |
|
160 | - break; |
|
161 | - case "repeaty": |
|
162 | - echo "background-repeat: repeat-y;"; |
|
163 | - break; |
|
164 | - case "repeatx": |
|
165 | - echo "background-repeat: repeat-x;"; |
|
166 | - break; |
|
167 | - } |
|
168 | - ?> |
|
148 | + switch($_user['2012_bgoption']) { |
|
149 | + case "stretch": |
|
150 | + echo "background-size: cover;"; |
|
151 | + break; |
|
152 | + case "solid": |
|
153 | + echo ""; |
|
154 | + break; |
|
155 | + case "norepeat": |
|
156 | + echo "background-repeat: no-repeat !important;"; |
|
157 | + break; |
|
158 | + case "repeatxy": |
|
159 | + echo "background-repeat: repeat;"; |
|
160 | + break; |
|
161 | + case "repeaty": |
|
162 | + echo "background-repeat: repeat-y;"; |
|
163 | + break; |
|
164 | + case "repeatx": |
|
165 | + echo "background-repeat: repeat-x;"; |
|
166 | + break; |
|
167 | + } |
|
168 | + ?> |
|
169 | 169 | } |
170 | 170 | </style> |
171 | 171 | </head> |
@@ -182,9 +182,9 @@ discard block |
||
182 | 182 | <div class="channel_customization"><?php require($_SERVER['DOCUMENT_ROOT'] . "/s/mod/channel_customization.php"); ?></div> |
183 | 183 | <?php } ?> |
184 | 184 | <?php |
185 | - if(empty(trim($_user['bio']))) |
|
186 | - $_user['bio'] = "This user has no description."; |
|
187 | - ?> |
|
185 | + if(empty(trim($_user['bio']))) |
|
186 | + $_user['bio'] = "This user has no description."; |
|
187 | + ?> |
|
188 | 188 | <div id="content"> |
189 | 189 | <div class="subscription-menu-expandable subscription-menu-expandable-channels3 yt-rounded ytg-wide hid"> |
190 | 190 | <div class="content" id="recommended-channels-list"></div> |
@@ -12,21 +12,21 @@ 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"); |
20 | 20 | |
21 | 21 | $_user = $__user_h->fetch_user_username($_GET['n']); |
22 | 22 | |
23 | - $stmt = $__db->prepare("SELECT * FROM bans WHERE username = :username ORDER BY id DESC"); |
|
24 | - $stmt->bindParam(":username", $_user['username']); |
|
25 | - $stmt->execute(); |
|
23 | + $stmt = $__db->prepare("SELECT * FROM bans WHERE username = :username ORDER BY id DESC"); |
|
24 | + $stmt->bindParam(":username", $_user['username']); |
|
25 | + $stmt->execute(); |
|
26 | 26 | |
27 | - while($ban = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
28 | - header("Location: /?error=This user has been terminated for violating SubRock's Community Guidelines."); |
|
29 | - } |
|
27 | + while($ban = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
28 | + header("Location: /?error=This user has been terminated for violating SubRock's Community Guidelines."); |
|
29 | + } |
|
30 | 30 | |
31 | 31 | function clean($string) { |
32 | 32 | $string = str_replace(' ', '-', $string); // Replaces all spaces with hyphens. |
@@ -34,21 +34,21 @@ discard block |
||
34 | 34 | return preg_replace('/[^A-Za-z0-9\-]/', '', $string); // Removes special chars. |
35 | 35 | } |
36 | 36 | |
37 | - function addhttp($url) { |
|
38 | - if (!preg_match("~^(?:f|ht)tps?://~i", $url)) { |
|
39 | - $url = "http://" . $url; |
|
40 | - } |
|
41 | - return $url; |
|
42 | - } |
|
37 | + function addhttp($url) { |
|
38 | + if (!preg_match("~^(?:f|ht)tps?://~i", $url)) { |
|
39 | + $url = "http://" . $url; |
|
40 | + } |
|
41 | + return $url; |
|
42 | + } |
|
43 | 43 | |
44 | 44 | function check_valid_colorhex($colorCode) { |
45 | 45 | // If user accidentally passed along the # sign, strip it off |
46 | 46 | $colorCode = ltrim($colorCode, '#'); |
47 | 47 | |
48 | 48 | if ( |
49 | - ctype_xdigit($colorCode) && |
|
49 | + ctype_xdigit($colorCode) && |
|
50 | 50 | (strlen($colorCode) == 6 || strlen($colorCode) == 3)) |
51 | - return true; |
|
51 | + return true; |
|
52 | 52 | |
53 | 53 | else return false; |
54 | 54 | } |
@@ -83,8 +83,8 @@ discard block |
||
83 | 83 | if(!check_valid_colorhex($_user['primary_color_text']) && strlen($_user['primary_color_text']) != 6) { $_user['primary_color_text'] = ""; } |
84 | 84 | if(!check_valid_colorhex($_user['2009_bgcolor']) && strlen($_user['2009_bgcolor']) != 6) { $_user['2009_bgcolor'] = ""; } |
85 | 85 | |
86 | - if(isset($_SESSION['siteusername'])) |
|
87 | - $__user_i->check_view_channel($_user['username'], @$_SESSION['siteusername']); |
|
86 | + if(isset($_SESSION['siteusername'])) |
|
87 | + $__user_i->check_view_channel($_user['username'], @$_SESSION['siteusername']); |
|
88 | 88 | |
89 | 89 | if($_SERVER['REQUEST_METHOD'] == 'POST') { |
90 | 90 | $error = array(); |
@@ -98,11 +98,11 @@ discard block |
||
98 | 98 | //if(ifBlocked(@$_SESSION['siteusername'], $user['username'], $__db)) { $error = "This user has blocked you!"; $error['status'] = true; } |
99 | 99 | |
100 | 100 | if(!isset($error['message'])) { |
101 | - $text = $_POST['comment']; |
|
101 | + $text = $_POST['comment']; |
|
102 | 102 | $stmt = $__db->prepare("INSERT INTO profile_comments (toid, author, comment) VALUES (:id, :username, :comment)"); |
103 | - $stmt->bindParam(":id", $_user['username']); |
|
104 | - $stmt->bindParam(":username", $_SESSION['siteusername']); |
|
105 | - $stmt->bindParam(":comment", $text); |
|
103 | + $stmt->bindParam(":id", $_user['username']); |
|
104 | + $stmt->bindParam(":username", $_SESSION['siteusername']); |
|
105 | + $stmt->bindParam(":comment", $text); |
|
106 | 106 | $stmt->execute(); |
107 | 107 | |
108 | 108 | $_user_update_utils->update_comment_cooldown_time($_SESSION['siteusername']); |
@@ -114,10 +114,10 @@ discard block |
||
114 | 114 | } |
115 | 115 | ?> |
116 | 116 | <?php |
117 | - $__server->page_embeds->page_title = "SubRocks - " . htmlspecialchars($_user['username']); |
|
118 | - $__server->page_embeds->page_description = htmlspecialchars($_user['bio']); |
|
119 | - $__server->page_embeds->page_image = "/dynamic/pfp/" . htmlspecialchars($_user['pfp']); |
|
120 | - $__server->page_embeds->page_url = "https://subrock.rocks/"; |
|
117 | + $__server->page_embeds->page_title = "SubRocks - " . htmlspecialchars($_user['username']); |
|
118 | + $__server->page_embeds->page_description = htmlspecialchars($_user['bio']); |
|
119 | + $__server->page_embeds->page_image = "/dynamic/pfp/" . htmlspecialchars($_user['pfp']); |
|
120 | + $__server->page_embeds->page_url = "https://subrock.rocks/"; |
|
121 | 121 | ?> |
122 | 122 | <!DOCTYPE html> |
123 | 123 | <html dir="ltr" xmlns:og="http://opengraphprotocol.org/schema/" lang="en"> |
@@ -145,27 +145,27 @@ discard block |
||
145 | 145 | background-image: url(/dynamic/banners/<?php echo $_user['2012_bg']; ?>); |
146 | 146 | background-repeat: repeat; |
147 | 147 | <?php |
148 | - switch($_user['2012_bgoption']) { |
|
149 | - case "stretch": |
|
150 | - echo "background-size: cover;"; |
|
151 | - break; |
|
152 | - case "solid": |
|
153 | - echo ""; |
|
154 | - break; |
|
155 | - case "norepeat": |
|
156 | - echo "background-repeat: no-repeat !important;"; |
|
157 | - break; |
|
158 | - case "repeatxy": |
|
159 | - echo "background-repeat: repeat;"; |
|
160 | - break; |
|
161 | - case "repeaty": |
|
162 | - echo "background-repeat: repeat-y;"; |
|
163 | - break; |
|
164 | - case "repeatx": |
|
165 | - echo "background-repeat: repeat-x;"; |
|
166 | - break; |
|
167 | - } |
|
168 | - ?> |
|
148 | + switch($_user['2012_bgoption']) { |
|
149 | + case "stretch": |
|
150 | + echo "background-size: cover;"; |
|
151 | + break; |
|
152 | + case "solid": |
|
153 | + echo ""; |
|
154 | + break; |
|
155 | + case "norepeat": |
|
156 | + echo "background-repeat: no-repeat !important;"; |
|
157 | + break; |
|
158 | + case "repeatxy": |
|
159 | + echo "background-repeat: repeat;"; |
|
160 | + break; |
|
161 | + case "repeaty": |
|
162 | + echo "background-repeat: repeat-y;"; |
|
163 | + break; |
|
164 | + case "repeatx": |
|
165 | + echo "background-repeat: repeat-x;"; |
|
166 | + break; |
|
167 | + } |
|
168 | + ?> |
|
169 | 169 | } |
170 | 170 | </style> |
171 | 171 | </head> |
@@ -338,17 +338,17 @@ discard block |
||
338 | 338 | <div class="channel-filtered-content"> |
339 | 339 | <ol class="channel-videos-list"> |
340 | 340 | <?php |
341 | - $stmt = $__db->prepare("SELECT * FROM videos WHERE author = :username ORDER BY id DESC"); |
|
342 | - $stmt->bindParam(":username", $_user['username']); |
|
343 | - $stmt->execute(); |
|
344 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
345 | - $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
|
346 | - $video['duration'] = $__time_h->timestamp($video['duration']); |
|
347 | - $video['views'] = $__video_h->fetch_video_views($video['rid']); |
|
348 | - $video['author'] = htmlspecialchars($video['author']); |
|
349 | - $video['title'] = htmlspecialchars($video['title']); |
|
350 | - $video['description'] = $__video_h->shorten_description($video['description'], 50); |
|
351 | - ?> |
|
341 | + $stmt = $__db->prepare("SELECT * FROM videos WHERE author = :username ORDER BY id DESC"); |
|
342 | + $stmt->bindParam(":username", $_user['username']); |
|
343 | + $stmt->execute(); |
|
344 | + while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
345 | + $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
|
346 | + $video['duration'] = $__time_h->timestamp($video['duration']); |
|
347 | + $video['views'] = $__video_h->fetch_video_views($video['rid']); |
|
348 | + $video['author'] = htmlspecialchars($video['author']); |
|
349 | + $video['title'] = htmlspecialchars($video['title']); |
|
350 | + $video['description'] = $__video_h->shorten_description($video['description'], 50); |
|
351 | + ?> |
|
352 | 352 | <li class="yt-c3-grid-item"> |
353 | 353 | <a href="/watch?v=<?php echo htmlspecialchars($video['rid']); ?>" class="ux-thumb-wrap yt-uix-sessionlink yt-uix-contextlink contains-addto " data-sessionlink="feature=plcp&context=C4e80d7cVDvjVQa1PpcFPHxNkhfeSQg8_nJHnhVurQf82C2OenNiw%3D"><span class="video-thumb ux-thumb yt-thumb-default-234 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="/dynamic/thumbs/<?php echo $video['thumbnail']; ?>" alt="Thumbnail" onerror="this.onerror=null;this.src='/dynamic/thumbs/default.jpg';" width="234"><span class="vertical-align"></span></span></span></span><span class="video-time"><?php echo $video['duration']; ?></span> |
354 | 354 | <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="yBlvNSfqAj0" role="button"><span class="yt-uix-button-content"> <img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Watch Later"> |
@@ -10,10 +10,10 @@ |
||
10 | 10 | <?php $__db_h = new db_helper(); ?> |
11 | 11 | <?php $__time_h = new time_helper(); ?> |
12 | 12 | <?php |
13 | - $__server->page_embeds->page_title = "SubRocks - Community Guidelines"; |
|
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 - Community Guidelines"; |
|
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"> |
@@ -10,10 +10,10 @@ |
||
10 | 10 | <?php $__db_h = new db_helper(); ?> |
11 | 11 | <?php $__time_h = new time_helper(); ?> |
12 | 12 | <?php |
13 | - $__server->page_embeds->page_title = "SubRocks - Copyright"; |
|
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 - Copyright"; |
|
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"> |
@@ -10,10 +10,10 @@ |
||
10 | 10 | <?php $__db_h = new db_helper(); ?> |
11 | 11 | <?php $__time_h = new time_helper(); ?> |
12 | 12 | <?php |
13 | - $__server->page_embeds->page_title = "SubRocks - About"; |
|
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 - About"; |
|
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"> |
@@ -10,10 +10,10 @@ |
||
10 | 10 | <?php $__db_h = new db_helper(); ?> |
11 | 11 | <?php $__time_h = new time_helper(); ?> |
12 | 12 | <?php |
13 | - $__server->page_embeds->page_title = "SubRocks - Terms & Conditions"; |
|
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 - Terms & Conditions"; |
|
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"> |
@@ -10,10 +10,10 @@ |
||
10 | 10 | <?php $__db_h = new db_helper(); ?> |
11 | 11 | <?php $__time_h = new time_helper(); ?> |
12 | 12 | <?php |
13 | - $__server->page_embeds->page_title = "SubRocks - Terms & Conditions"; |
|
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 - Terms & Conditions"; |
|
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"> |
@@ -45,20 +45,20 @@ discard block |
||
45 | 45 | ORDER BY |
46 | 46 | `date` DESC LIMIT 10;"); |
47 | 47 | $stmt->bindParam(":comment_username", $_user['username']); |
48 | - $stmt->bindParam(":videos_username", $_user['username']); |
|
48 | + $stmt->bindParam(":videos_username", $_user['username']); |
|
49 | 49 | $stmt->execute(); |
50 | - if($stmt->rowCount() == 0) { echo "<br><span style='color:grey;font-size:11px;'>This user has not done anything yet.</span>"; } |
|
50 | + if($stmt->rowCount() == 0) { echo "<br><span style='color:grey;font-size:11px;'>This user has not done anything yet.</span>"; } |
|
51 | 51 | while($content = $stmt->fetch(PDO::FETCH_ASSOC)) { |
52 | - if((int)$content['id']) { |
|
53 | - $content = $__video_h->fetch_comment_id($content['id']); |
|
54 | - $content['video'] = $__video_h->fetch_video_rid($content['toid']); |
|
55 | - $content['type'] = "comment"; |
|
56 | - } else { |
|
57 | - $content = $__video_h->fetch_video_rid($content['id']); |
|
58 | - $content['type'] = "video"; |
|
59 | - } |
|
52 | + if((int)$content['id']) { |
|
53 | + $content = $__video_h->fetch_comment_id($content['id']); |
|
54 | + $content['video'] = $__video_h->fetch_video_rid($content['toid']); |
|
55 | + $content['type'] = "comment"; |
|
56 | + } else { |
|
57 | + $content = $__video_h->fetch_video_rid($content['id']); |
|
58 | + $content['type'] = "video"; |
|
59 | + } |
|
60 | 60 | |
61 | - if($content['type'] == "video") { |
|
61 | + if($content['type'] == "video") { |
|
62 | 62 | ?> |
63 | 63 | <div class="feed-item-container" data-channel-key="UCc6W7efUSkd9YYoxOnctlFg"> |
64 | 64 | <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"> |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | </div> |
131 | 131 | </div> |
132 | 132 | <?php } else { |
133 | - if($__video_h->video_exists($content['video']['rid'])) { ?> |
|
133 | + if($__video_h->video_exists($content['video']['rid'])) { ?> |
|
134 | 134 | <div class="feed-item-container" data-channel-key="UCXf1X2u5gsmuqcuTQlpOGhw"> |
135 | 135 | <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"> |
136 | 136 | <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> |
@@ -301,13 +301,13 @@ discard block |
||
301 | 301 | <div class="module-view other-channels-view"> |
302 | 302 | <h2 <?php if(@$_SESSION['siteusername'] == $_user['username']) { ?>style="display: inline-block;position: relative;bottom: 10px;"<?php } ?>>Featured Channels</h2> |
303 | 303 | <?php if(@$_SESSION['siteusername'] == $_user['username']) { |
304 | - echo "<a href='#' style='float:right;font-size:11px;color:black;' onclick=';open_featured_channels();return false;'>edit</a>"; |
|
305 | - } ?> |
|
304 | + echo "<a href='#' style='float:right;font-size:11px;color:black;' onclick=';open_featured_channels();return false;'>edit</a>"; |
|
305 | + } ?> |
|
306 | 306 | <ul class="channel-summary-list "> |
307 | 307 | <?php |
308 | - foreach($_user['featured_channels'] as $user) { |
|
309 | - if($__user_h->user_exists($user)) { |
|
310 | - ?> |
|
308 | + foreach($_user['featured_channels'] as $user) { |
|
309 | + if($__user_h->user_exists($user)) { |
|
310 | + ?> |
|
311 | 311 | <li class="yt-tile-visible yt-uix-tile"> |
312 | 312 | <div class="channel-summary clearfix channel-summary-compact"> |
313 | 313 | <div class="channel-summary-thumb"> |
@@ -331,19 +331,19 @@ discard block |
||
331 | 331 | </div> |
332 | 332 | |
333 | 333 | <?php |
334 | - $stmt = $__db->prepare("SELECT * FROM playlists WHERE author = :search ORDER BY id DESC LIMIT 10"); |
|
335 | - $stmt->bindParam(":search", $_user['username']); |
|
336 | - $stmt->execute(); |
|
334 | + $stmt = $__db->prepare("SELECT * FROM playlists WHERE author = :search ORDER BY id DESC LIMIT 10"); |
|
335 | + $stmt->bindParam(":search", $_user['username']); |
|
336 | + $stmt->execute(); |
|
337 | 337 | |
338 | - if($stmt->rowCount() != 0) { |
|
339 | - ?> |
|
338 | + if($stmt->rowCount() != 0) { |
|
339 | + ?> |
|
340 | 340 | <div class="playlists-narrow channel-module yt-uix-c3-module-container"> |
341 | 341 | <div class="module-view gh-featured"> |
342 | 342 | <h2>Featured Playlists</h2> |
343 | 343 | <?php |
344 | - while($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
345 | - $playlist['videos'] = json_decode($playlist['videos']); |
|
346 | - ?> |
|
344 | + while($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
345 | + $playlist['videos'] = json_decode($playlist['videos']); |
|
346 | + ?> |
|
347 | 347 | <div class="playlist yt-tile-visible yt-uix-tile"> |
348 | 348 | <a href="/view_playlist?v=<?php echo $playlist['rid']; ?>"> |
349 | 349 | <span class="playlist-thumb-strip playlist-thumb-strip-252"><span class="videos videos-4 horizontal-cutoff"><span class="clip"><span class="centering-offset"><span class="centering"> |
@@ -8,10 +8,10 @@ |
||
8 | 8 | <?php $__db_h = new db_helper(); ?> |
9 | 9 | <?php $__time_h = new time_helper(); ?> |
10 | 10 | <?php |
11 | - $__server->page_embeds->page_title = "SubRocks"; |
|
12 | - $__server->page_embeds->page_description = "Share your videos with friends, family, and the world"; |
|
13 | - $__server->page_embeds->page_image = "/yt/imgbin/full-size-logo.png"; |
|
14 | - $__server->page_embeds->page_url = "https://subrock.rocks/"; |
|
11 | + $__server->page_embeds->page_title = "SubRocks"; |
|
12 | + $__server->page_embeds->page_description = "Share your videos with friends, family, and the world"; |
|
13 | + $__server->page_embeds->page_image = "/yt/imgbin/full-size-logo.png"; |
|
14 | + $__server->page_embeds->page_url = "https://subrock.rocks/"; |
|
15 | 15 | ?> |
16 | 16 | <html lang="en"> |
17 | 17 | <head> |