@@ -15,29 +15,29 @@ discard block |
||
| 15 | 15 | <?php $_video = $__video_h->fetch_video_rid($_GET['v']); ?> |
| 16 | 16 | <?php $_video['comments'] = $__video_h->get_comments_from_video($_video['rid']); ?> |
| 17 | 17 | <?php |
| 18 | - if($_video['visibility'] == "v" && @$_SESSION['siteusername'] != $_video['author']) |
|
| 19 | - header("Location: /"); |
|
| 18 | + if($_video['visibility'] == "v" && @$_SESSION['siteusername'] != $_video['author']) |
|
| 19 | + header("Location: /"); |
|
| 20 | 20 | |
| 21 | - if(isset($_SESSION['siteusername'])) |
|
| 22 | - $__video_h->check_view($_GET['v'], @$_SERVER["HTTP_CF_CONNECTING_IP"]); |
|
| 21 | + if(isset($_SESSION['siteusername'])) |
|
| 22 | + $__video_h->check_view($_GET['v'], @$_SERVER["HTTP_CF_CONNECTING_IP"]); |
|
| 23 | 23 | |
| 24 | - $_SESSION['current_video'] = $_video['rid']; |
|
| 24 | + $_SESSION['current_video'] = $_video['rid']; |
|
| 25 | 25 | |
| 26 | - /* |
|
| 26 | + /* |
|
| 27 | 27 | PREPARE EMBEDS CLASS -- function(string $page_title, string $page_description...) |
| 28 | 28 | Returns a list of arrays for compatibility purposes & but downside is ugly for loop codes |
| 29 | 29 | Work on this tomorrow or some shit idk lol |
| 30 | 30 | */ |
| 31 | 31 | |
| 32 | - /* |
|
| 32 | + /* |
|
| 33 | 33 | USE THE GOD DAMN __CONFIG MORE -- idiot |
| 34 | 34 | Work on this tomorrow or some shit |
| 35 | 35 | */ |
| 36 | 36 | |
| 37 | - $__server->page_embeds->page_title = htmlspecialchars($_video['title']); |
|
| 38 | - $__server->page_embeds->page_description = htmlspecialchars($_video['description']); |
|
| 39 | - $__server->page_embeds->page_image = "/dynamic/thumbs/" . $_video['thumbnail']; |
|
| 40 | - $__server->page_embeds->page_url = "https://subrock.rocks/watch?v=" . htmlspecialchars($_video['rid']); |
|
| 37 | + $__server->page_embeds->page_title = htmlspecialchars($_video['title']); |
|
| 38 | + $__server->page_embeds->page_description = htmlspecialchars($_video['description']); |
|
| 39 | + $__server->page_embeds->page_image = "/dynamic/thumbs/" . $_video['thumbnail']; |
|
| 40 | + $__server->page_embeds->page_url = "https://subrock.rocks/watch?v=" . htmlspecialchars($_video['rid']); |
|
| 41 | 41 | ?> |
| 42 | 42 | <!DOCTYPE html> |
| 43 | 43 | <html> |
@@ -67,29 +67,29 @@ discard block |
||
| 67 | 67 | if (window.yt.timing) {yt.timing.tick("ct");} |
| 68 | 68 | </script> |
| 69 | 69 | <?php |
| 70 | - $_video['dislikes'] = $__video_h->get_video_stars_level($_video['rid'], 1); |
|
| 71 | - $_video['dislikes'] += $__video_h->get_video_stars_level($_video['rid'], 2); |
|
| 70 | + $_video['dislikes'] = $__video_h->get_video_stars_level($_video['rid'], 1); |
|
| 71 | + $_video['dislikes'] += $__video_h->get_video_stars_level($_video['rid'], 2); |
|
| 72 | 72 | |
| 73 | - $_video['likes'] = $__video_h->get_video_stars_level($_video['rid'], 4); |
|
| 74 | - $_video['likes'] += $__video_h->get_video_stars_level($_video['rid'], 5); |
|
| 73 | + $_video['likes'] = $__video_h->get_video_stars_level($_video['rid'], 4); |
|
| 74 | + $_video['likes'] += $__video_h->get_video_stars_level($_video['rid'], 5); |
|
| 75 | 75 | |
| 76 | - $_video['dislikes'] += $__video_h->get_video_likes($_video['rid'], false); |
|
| 77 | - $_video['likes'] += $__video_h->get_video_likes($_video['rid'], true); |
|
| 76 | + $_video['dislikes'] += $__video_h->get_video_likes($_video['rid'], false); |
|
| 77 | + $_video['likes'] += $__video_h->get_video_likes($_video['rid'], true); |
|
| 78 | 78 | |
| 79 | - if($_video['likes'] == 0 && $_video['dislikes'] == 0) { |
|
| 80 | - $_video['likeswidth'] = 0; |
|
| 81 | - $_video['dislikeswidth'] = 0; |
|
| 82 | - } else { |
|
| 83 | - $_video['likeswidth'] = $_video['likes'] / ($_video['likes'] + $_video['dislikes']) * 100; |
|
| 84 | - $_video['dislikeswidth'] = 100 - $_video['likeswidth']; |
|
| 85 | - } |
|
| 79 | + if($_video['likes'] == 0 && $_video['dislikes'] == 0) { |
|
| 80 | + $_video['likeswidth'] = 0; |
|
| 81 | + $_video['dislikeswidth'] = 0; |
|
| 82 | + } else { |
|
| 83 | + $_video['likeswidth'] = $_video['likes'] / ($_video['likes'] + $_video['dislikes']) * 100; |
|
| 84 | + $_video['dislikeswidth'] = 100 - $_video['likeswidth']; |
|
| 85 | + } |
|
| 86 | 86 | |
| 87 | - $_video['liked'] = $__video_h->if_liked(@$_SESSION['siteusername'], $_video['rid'], true); |
|
| 88 | - $_video['disliked'] = $__video_h->if_liked(@$_SESSION['siteusername'], $_video['rid'], false); |
|
| 89 | - $_video['author_videos'] = $__video_h->fetch_user_videos($_video['author']); |
|
| 90 | - $_video['subscribed'] = $__user_h->if_subscribed(@$_SESSION['siteusername'], $_video['author']); |
|
| 91 | - $_video['favorited'] = $__video_h->if_favorited(@$_SESSION['siteusername'], $_video['rid']); |
|
| 92 | - ?> |
|
| 87 | + $_video['liked'] = $__video_h->if_liked(@$_SESSION['siteusername'], $_video['rid'], true); |
|
| 88 | + $_video['disliked'] = $__video_h->if_liked(@$_SESSION['siteusername'], $_video['rid'], false); |
|
| 89 | + $_video['author_videos'] = $__video_h->fetch_user_videos($_video['author']); |
|
| 90 | + $_video['subscribed'] = $__user_h->if_subscribed(@$_SESSION['siteusername'], $_video['author']); |
|
| 91 | + $_video['favorited'] = $__video_h->if_favorited(@$_SESSION['siteusername'], $_video['rid']); |
|
| 92 | + ?> |
|
| 93 | 93 | </head> |
| 94 | 94 | <body id="" class="date-20120927 en_US ltr ytg-old-clearfix guide-feed-v2 gecko gecko-15" dir="ltr"> |
| 95 | 95 | <form name="logoutForm" method="POST" action="/logout"> |
@@ -157,21 +157,21 @@ discard block |
||
| 157 | 157 | |
| 158 | 158 | <?php $_user = $__user_h->fetch_user_username($_video['author']); ?> |
| 159 | 159 | <?php |
| 160 | - $stmt = $__db->prepare("SELECT ip, username FROM users WHERE ip = :ip"); |
|
| 161 | - $stmt->bindParam(":ip", $_user['ip']); |
|
| 162 | - $stmt->execute(); |
|
| 163 | - $alts = $stmt->rowCount(); |
|
| 160 | + $stmt = $__db->prepare("SELECT ip, username FROM users WHERE ip = :ip"); |
|
| 161 | + $stmt->bindParam(":ip", $_user['ip']); |
|
| 162 | + $stmt->execute(); |
|
| 163 | + $alts = $stmt->rowCount(); |
|
| 164 | 164 | |
| 165 | - if($alts != 0) { echo "<span style='font-size:11px;color:grey;'>Alts will pop up below here...</span><br>"; } |
|
| 165 | + if($alts != 0) { echo "<span style='font-size:11px;color:grey;'>Alts will pop up below here...</span><br>"; } |
|
| 166 | 166 | |
| 167 | - while($username = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
| 168 | - if($username['username'] != $_video['author'] && $username['ip'] != "0.0.0.0") |
|
| 169 | - echo " |
|
| 167 | + while($username = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
| 168 | + if($username['username'] != $_video['author'] && $username['ip'] != "0.0.0.0") |
|
| 169 | + echo " |
|
| 170 | 170 | <a style='font-size:10px;' href='/user/" . htmlspecialchars($username['username']) . "'>" . |
| 171 | - htmlspecialchars($username['username']) |
|
| 172 | - . "</a><br>"; |
|
| 173 | - } |
|
| 174 | - ?> |
|
| 171 | + htmlspecialchars($username['username']) |
|
| 172 | + . "</a><br>"; |
|
| 173 | + } |
|
| 174 | + ?> |
|
| 175 | 175 | <hr> |
| 176 | 176 | <?php } ?> |
| 177 | 177 | <h1 id="watch-headline-title"> |
@@ -385,21 +385,21 @@ discard block |
||
| 385 | 385 | <hr><br> |
| 386 | 386 | <h3>Add to a Playlist</h3> |
| 387 | 387 | <?php |
| 388 | - $stmt = $__db->prepare("SELECT * FROM playlists WHERE author = :username ORDER BY id DESC LIMIT 20"); |
|
| 389 | - $stmt->bindParam(":username", $_SESSION['siteusername']); |
|
| 390 | - $stmt->execute(); |
|
| 391 | - while($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
| 392 | - $buffer = json_decode($playlist['videos']); |
|
| 393 | - @$rid = $buffer[0]; |
|
| 394 | - if(!empty($rid)) { |
|
| 395 | - @$video = $__video_h->fetch_video_rid($rid); |
|
| 396 | - } else { |
|
| 397 | - $video['thumbnail'] = ""; |
|
| 398 | - $video['duration'] = 0; |
|
| 399 | - } |
|
| 388 | + $stmt = $__db->prepare("SELECT * FROM playlists WHERE author = :username ORDER BY id DESC LIMIT 20"); |
|
| 389 | + $stmt->bindParam(":username", $_SESSION['siteusername']); |
|
| 390 | + $stmt->execute(); |
|
| 391 | + while($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
| 392 | + $buffer = json_decode($playlist['videos']); |
|
| 393 | + @$rid = $buffer[0]; |
|
| 394 | + if(!empty($rid)) { |
|
| 395 | + @$video = $__video_h->fetch_video_rid($rid); |
|
| 396 | + } else { |
|
| 397 | + $video['thumbnail'] = ""; |
|
| 398 | + $video['duration'] = 0; |
|
| 399 | + } |
|
| 400 | 400 | |
| 401 | - $videos = count($buffer); |
|
| 402 | - ?> |
|
| 401 | + $videos = count($buffer); |
|
| 402 | + ?> |
|
| 403 | 403 | <a href="/get/add_to_playlist?id=<?php echo $_video['rid']; ?>&playlist=<?php echo $playlist['rid']; ?>">Add to <?php echo htmlspecialchars($playlist['title']); ?></a><br> |
| 404 | 404 | <?php } ?> |
| 405 | 405 | <?php } ?> |
@@ -664,10 +664,10 @@ discard block |
||
| 664 | 664 | </div> |
| 665 | 665 | </div> |
| 666 | 666 | <?php |
| 667 | - $stmt = $__db->prepare("SELECT * FROM video_response WHERE toid = :v ORDER BY id DESC LIMIT 4"); |
|
| 668 | - $stmt->bindParam(":v", $_GET['v']); |
|
| 669 | - $stmt->execute(); |
|
| 670 | - ?> |
|
| 667 | + $stmt = $__db->prepare("SELECT * FROM video_response WHERE toid = :v ORDER BY id DESC LIMIT 4"); |
|
| 668 | + $stmt->bindParam(":v", $_GET['v']); |
|
| 669 | + $stmt->execute(); |
|
| 670 | + ?> |
|
| 671 | 671 | |
| 672 | 672 | <?php if($stmt->rowCount() != 0) { ?> |
| 673 | 673 | <div class="comments-section"> |
@@ -677,16 +677,16 @@ discard block |
||
| 677 | 677 | <h4>Video Responses</h4> |
| 678 | 678 | <ul class="video-list"> |
| 679 | 679 | <?php |
| 680 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
| 681 | - if($__video_h->video_exists($video['video'])) { |
|
| 682 | - $video = $__video_h->fetch_video_rid($video['video']); |
|
| 683 | - $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
|
| 684 | - $video['duration'] = $__time_h->timestamp($video['duration']); |
|
| 685 | - $video['views'] = $__video_h->fetch_video_views($video['rid']); |
|
| 686 | - $video['author'] = htmlspecialchars($video['author']); |
|
| 687 | - $video['title'] = htmlspecialchars($video['title']); |
|
| 688 | - $video['description'] = $__video_h->shorten_description($video['description'], 50); |
|
| 689 | - ?> |
|
| 680 | + while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
| 681 | + if($__video_h->video_exists($video['video'])) { |
|
| 682 | + $video = $__video_h->fetch_video_rid($video['video']); |
|
| 683 | + $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
|
| 684 | + $video['duration'] = $__time_h->timestamp($video['duration']); |
|
| 685 | + $video['views'] = $__video_h->fetch_video_views($video['rid']); |
|
| 686 | + $video['author'] = htmlspecialchars($video['author']); |
|
| 687 | + $video['title'] = htmlspecialchars($video['title']); |
|
| 688 | + $video['description'] = $__video_h->shorten_description($video['description'], 50); |
|
| 689 | + ?> |
|
| 690 | 690 | <li class="video-list-item yt-tile-default"> |
| 691 | 691 | <a href="/watch?v=<?php echo $video['rid']; ?>" class="related-video yt-uix-contextlink yt-uix-sessionlink" data-sessionlink="<?php echo htmlspecialchars($_video['author']); ?>&feature=watch_response"><span class="ux-thumb-wrap contains-addto "><span class="video-thumb ux-thumb yt-thumb-default-120 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="<?php echo $video['title']; ?>" data-thumb="/dynamic/thumbs/<?php echo $video['thumbnail']; ?>" width="120"><span class="vertical-align"></span></span></span></span><span class="video-time"><?php echo $video['duration']; ?></span> |
| 692 | 692 | <button onclick=";return false;" title="Watch Later" type="button" class="addto-button video-actions addto-watch-later-button-sign-in yt-uix-button yt-uix-button-default yt-uix-button-short yt-uix-tooltip" data-button-menu-id="shared-addto-watch-later-login" data-video-ids="cjls0QsHOBE" role="button"><span class="yt-uix-button-content"> <img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Watch Later"> |
@@ -767,38 +767,38 @@ discard block |
||
| 767 | 767 | </div> |
| 768 | 768 | <ul class="comment-list" id="live_comments"> |
| 769 | 769 | <?php |
| 770 | - $results_per_page = 20; |
|
| 770 | + $results_per_page = 20; |
|
| 771 | 771 | |
| 772 | - $stmt = $__db->prepare("SELECT * FROM comments WHERE toid = :rid ORDER BY id DESC"); |
|
| 773 | - $stmt->bindParam(":rid", $_video['rid']); |
|
| 774 | - $stmt->execute(); |
|
| 772 | + $stmt = $__db->prepare("SELECT * FROM comments WHERE toid = :rid ORDER BY id DESC"); |
|
| 773 | + $stmt->bindParam(":rid", $_video['rid']); |
|
| 774 | + $stmt->execute(); |
|
| 775 | 775 | |
| 776 | - $number_of_result = $stmt->rowCount(); |
|
| 777 | - $number_of_page = ceil ($number_of_result / $results_per_page); |
|
| 776 | + $number_of_result = $stmt->rowCount(); |
|
| 777 | + $number_of_page = ceil ($number_of_result / $results_per_page); |
|
| 778 | 778 | |
| 779 | - if (!isset ($_GET['page']) ) { |
|
| 780 | - $page = 1; |
|
| 781 | - } else { |
|
| 782 | - $page = (int)$_GET['page']; |
|
| 783 | - } |
|
| 779 | + if (!isset ($_GET['page']) ) { |
|
| 780 | + $page = 1; |
|
| 781 | + } else { |
|
| 782 | + $page = (int)$_GET['page']; |
|
| 783 | + } |
|
| 784 | 784 | |
| 785 | - $page_first_result = ($page - 1) * $results_per_page; |
|
| 785 | + $page_first_result = ($page - 1) * $results_per_page; |
|
| 786 | 786 | |
| 787 | - $stmt = $__db->prepare("SELECT * FROM comments WHERE toid = :rid ORDER BY id DESC LIMIT :pfirst, :pper"); |
|
| 788 | - $stmt->bindParam(":rid", $_video['rid']); |
|
| 789 | - $stmt->bindParam(":pfirst", $page_first_result); |
|
| 790 | - $stmt->bindParam(":pper", $results_per_page); |
|
| 791 | - $stmt->execute(); |
|
| 787 | + $stmt = $__db->prepare("SELECT * FROM comments WHERE toid = :rid ORDER BY id DESC LIMIT :pfirst, :pper"); |
|
| 788 | + $stmt->bindParam(":rid", $_video['rid']); |
|
| 789 | + $stmt->bindParam(":pfirst", $page_first_result); |
|
| 790 | + $stmt->bindParam(":pper", $results_per_page); |
|
| 791 | + $stmt->execute(); |
|
| 792 | 792 | |
| 793 | - while($comment = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
| 794 | - if($__video_h->if_comment_liked($comment['id'], $_SESSION['siteusername'], true)) |
|
| 795 | - $comment['liked'] = true; |
|
| 796 | - else if($__video_h->if_comment_liked($comment['id'], $_SESSION['siteusername'], false)) |
|
| 797 | - $comment['disliked'] = true; |
|
| 793 | + while($comment = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
| 794 | + if($__video_h->if_comment_liked($comment['id'], $_SESSION['siteusername'], true)) |
|
| 795 | + $comment['liked'] = true; |
|
| 796 | + else if($__video_h->if_comment_liked($comment['id'], $_SESSION['siteusername'], false)) |
|
| 797 | + $comment['disliked'] = true; |
|
| 798 | 798 | |
| 799 | - $comment['likes'] = $__video_h->get_comment_likes($comment['id'], true); |
|
| 800 | - $comment['likes'] -= $__video_h->get_comment_likes($comment['id'], false); |
|
| 801 | - ?> |
|
| 799 | + $comment['likes'] = $__video_h->get_comment_likes($comment['id'], true); |
|
| 800 | + $comment['likes'] -= $__video_h->get_comment_likes($comment['id'], false); |
|
| 801 | + ?> |
|
| 802 | 802 | |
| 803 | 803 | <li class="comment yt-tile-default " data-author-viewing="" data-author-id="-uD01K8FQTeOSS5sniRFzQ" data-id="<?php echo $comment['id']; ?>" data-score="0"> |
| 804 | 804 | <div class="comment-body"> |
@@ -864,12 +864,12 @@ discard block |
||
| 864 | 864 | </div> |
| 865 | 865 | </li> |
| 866 | 866 | <?php |
| 867 | - $stmt2 = $__db->prepare("SELECT * FROM comment_reply WHERE toid = :rid ORDER BY id DESC"); |
|
| 868 | - $stmt2->bindParam(":rid", $comment['id']); |
|
| 869 | - $stmt2->execute(); |
|
| 867 | + $stmt2 = $__db->prepare("SELECT * FROM comment_reply WHERE toid = :rid ORDER BY id DESC"); |
|
| 868 | + $stmt2->bindParam(":rid", $comment['id']); |
|
| 869 | + $stmt2->execute(); |
|
| 870 | 870 | |
| 871 | - while($reply = $stmt2->fetch(PDO::FETCH_ASSOC)) { |
|
| 872 | - ?> |
|
| 871 | + while($reply = $stmt2->fetch(PDO::FETCH_ASSOC)) { |
|
| 872 | + ?> |
|
| 873 | 873 | <li class="comment yt-tile-default " style="margin-left: 30px;" data-author-viewing="" data-author-id="-uD01K8FQTeOSS5sniRFzQ" data-id="<?php echo $reply['id']; ?>" data-score="0"> |
| 874 | 874 | <div class="comment-body"> |
| 875 | 875 | <div class="content-container"> |
@@ -949,19 +949,19 @@ discard block |
||
| 949 | 949 | <div id="watch-related-container" class="watch-sidebar-body"> |
| 950 | 950 | <ul id="watch-related" class="video-list"> |
| 951 | 951 | <?php |
| 952 | - $stmt = $__db->prepare("SELECT * FROM playlists ORDER BY rand() LIMIT 2"); |
|
| 953 | - $stmt->execute(); |
|
| 954 | - while($_playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
| 955 | - $_playlist['videos'] = json_decode($_playlist['videos']); |
|
| 956 | - $_playlist['count'] = 1; |
|
| 952 | + $stmt = $__db->prepare("SELECT * FROM playlists ORDER BY rand() LIMIT 2"); |
|
| 953 | + $stmt->execute(); |
|
| 954 | + while($_playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
| 955 | + $_playlist['videos'] = json_decode($_playlist['videos']); |
|
| 956 | + $_playlist['count'] = 1; |
|
| 957 | 957 | |
| 958 | - if($__video_h->video_exists($_playlist['videos'][0])) { |
|
| 959 | - $video = $__video_h->fetch_video_rid($_playlist['videos'][0]); |
|
| 960 | - } else { |
|
| 961 | - $video = []; |
|
| 962 | - $video['thumbnail'] = "default.jpg"; |
|
| 963 | - } |
|
| 964 | - ?> |
|
| 958 | + if($__video_h->video_exists($_playlist['videos'][0])) { |
|
| 959 | + $video = $__video_h->fetch_video_rid($_playlist['videos'][0]); |
|
| 960 | + } else { |
|
| 961 | + $video = []; |
|
| 962 | + $video['thumbnail'] = "default.jpg"; |
|
| 963 | + } |
|
| 964 | + ?> |
|
| 965 | 965 | <li class="video-list-item"> |
| 966 | 966 | <a href="/view_playlist?v=<?php echo $_playlist['rid']; ?>" class="related-playlist yt-uix-contextlink yt-uix-sessionlink" data-sessionlink="ved=CAMQzhooAA%3D%3D&ei=CKf4md_r7rMCFYMfRAodLGlRiA%3D%3D&feature=list_other"> |
| 967 | 967 | <span class="ux-thumb-wrap"> |
@@ -1008,16 +1008,16 @@ discard block |
||
| 1008 | 1008 | <?php } ?> |
| 1009 | 1009 | <div id="ppv-container" class="hid"></div> |
| 1010 | 1010 | <?php |
| 1011 | - $stmt = $__db->prepare("SELECT * FROM videos WHERE visibility = 'n' ORDER BY rand() LIMIT 20"); |
|
| 1012 | - $stmt->execute(); |
|
| 1013 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
| 1014 | - $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
|
| 1015 | - $video['duration'] = $__time_h->timestamp($video['duration']); |
|
| 1016 | - $video['views'] = $__video_h->fetch_video_views($video['rid']); |
|
| 1017 | - $video['author'] = htmlspecialchars($video['author']); |
|
| 1018 | - $video['title'] = htmlspecialchars($video['title']); |
|
| 1019 | - $video['description'] = $__video_h->shorten_description($video['description'], 50); |
|
| 1020 | - ?> |
|
| 1011 | + $stmt = $__db->prepare("SELECT * FROM videos WHERE visibility = 'n' ORDER BY rand() LIMIT 20"); |
|
| 1012 | + $stmt->execute(); |
|
| 1013 | + while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
| 1014 | + $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
|
| 1015 | + $video['duration'] = $__time_h->timestamp($video['duration']); |
|
| 1016 | + $video['views'] = $__video_h->fetch_video_views($video['rid']); |
|
| 1017 | + $video['author'] = htmlspecialchars($video['author']); |
|
| 1018 | + $video['title'] = htmlspecialchars($video['title']); |
|
| 1019 | + $video['description'] = $__video_h->shorten_description($video['description'], 50); |
|
| 1020 | + ?> |
|
| 1021 | 1021 | <li class="video-list-item"><a href="/watch?v=<?php echo $video['rid']; ?>" class="related-video yt-uix-contextlink yt-uix-sessionlink" data-sessionlink="ved=CAIQzRooAA%3D%3D&<?php echo htmlspecialchars($_video['author']); ?>&feature=relmfu"><span class="ux-thumb-wrap contains-addto "><span class="video-thumb ux-thumb yt-thumb-default-120 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="<?php echo $video['title']; ?>" onerror=";this.src='/dynamic/thumbs/default.jpg';" data-thumb="/dynamic/thumbs/<?php echo $video['thumbnail']; ?>" width="120"><span class="vertical-align"></span></span></span></span><span class="video-time"><?php echo $video['duration']; ?></span> |
| 1022 | 1022 | <button onclick=";return false;" title="Watch Later" type="button" class="addto-button video-actions addto-watch-later-button-sign-in yt-uix-button yt-uix-button-default yt-uix-button-short yt-uix-tooltip" data-button-menu-id="shared-addto-watch-later-login" data-video-ids="gyAaIKF6tSQ" role="button"><span class="yt-uix-button-content"> <img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Watch Later"> |
| 1023 | 1023 | </span><img class="yt-uix-button-arrow" src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt=""></button> |