@@ -1,10 +1,10 @@ |
||
| 1 | 1 | <?php |
| 2 | - if(isset($_SESSION['siteusername'])) { |
|
| 2 | + if(isset($_SESSION['siteusername'])) { |
|
| 3 | 3 | $stmt = $__db->prepare("UPDATE users SET ip = :ip WHERE username = :username"); |
| 4 | 4 | $stmt->bindParam(":username", $_SESSION['siteusername']); |
| 5 | - $stmt->bindParam(":ip", $_SERVER["HTTP_CF_CONNECTING_IP"]); |
|
| 5 | + $stmt->bindParam(":ip", $_SERVER["HTTP_CF_CONNECTING_IP"]); |
|
| 6 | 6 | $stmt->execute(); |
| 7 | - } |
|
| 7 | + } |
|
| 8 | 8 | ?> |
| 9 | 9 | <!-- begin masthead --> |
| 10 | 10 | <div id="masthead" class="" dir="ltr"> |
@@ -45,20 +45,20 @@ discard block |
||
| 45 | 45 | ORDER BY |
| 46 | 46 | `date` DESC;"); |
| 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"> |
@@ -50,12 +50,12 @@ |
||
| 50 | 50 | |
| 51 | 51 | /* put tis in a better spot */ |
| 52 | 52 | $stmt = $__db->prepare("SELECT * FROM bans WHERE username = :username ORDER BY id DESC"); |
| 53 | - $stmt->bindParam(":username", $_SESSION['siteusername']); |
|
| 54 | - $stmt->execute(); |
|
| 53 | + $stmt->bindParam(":username", $_SESSION['siteusername']); |
|
| 54 | + $stmt->execute(); |
|
| 55 | 55 | |
| 56 | - while($ban = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
| 56 | + while($ban = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
| 57 | 57 | $ban_info = $ban; |
| 58 | 58 | if($_SERVER['REQUEST_URI'] != "/ban") |
| 59 | - header("Location: /ban"); |
|
| 60 | - } |
|
| 59 | + header("Location: /ban"); |
|
| 60 | + } |
|
| 61 | 61 | ?> |
| 62 | 62 | \ No newline at end of file |
@@ -40,8 +40,7 @@ discard block |
||
| 40 | 40 | ] |
| 41 | 41 | ); |
| 42 | 42 | $__server->db_properties->db_connected = true; |
| 43 | - } |
|
| 44 | - catch(PDOException $e) |
|
| 43 | + } catch(PDOException $e) |
|
| 45 | 44 | { |
| 46 | 45 | die("An error occured connecting to the database: ".$e->getMessage()); |
| 47 | 46 | } |
@@ -55,7 +54,8 @@ discard block |
||
| 55 | 54 | |
| 56 | 55 | while($ban = $stmt->fetch(PDO::FETCH_ASSOC)) { |
| 57 | 56 | $ban_info = $ban; |
| 58 | - if($_SERVER['REQUEST_URI'] != "/ban") |
|
| 59 | - header("Location: /ban"); |
|
| 57 | + if($_SERVER['REQUEST_URI'] != "/ban") { |
|
| 58 | + header("Location: /ban"); |
|
| 59 | + } |
|
| 60 | 60 | } |
| 61 | 61 | ?> |
| 62 | 62 | \ No newline at end of file |
@@ -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 - Replace me"; |
|
| 12 | - $__server->page_embeds->page_description = "SubRocks is a site dedicated to bring back the 2012 layout of YouTube."; |
|
| 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 - Replace me"; |
|
| 12 | + $__server->page_embeds->page_description = "SubRocks is a site dedicated to bring back the 2012 layout of YouTube."; |
|
| 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 | <!DOCTYPE html> |
| 17 | 17 | <html> |