@@ -15,28 +15,28 @@ 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 | - $__video_h->check_view($_GET['v'], @$_SERVER["HTTP_CF_CONNECTING_IP"]); |
|
21 | + $__video_h->check_view($_GET['v'], @$_SERVER["HTTP_CF_CONNECTING_IP"]); |
|
22 | 22 | |
23 | - $_SESSION['current_video'] = $_video['rid']; |
|
23 | + $_SESSION['current_video'] = $_video['rid']; |
|
24 | 24 | |
25 | - /* |
|
25 | + /* |
|
26 | 26 | PREPARE EMBEDS CLASS -- function(string $page_title, string $page_description...) |
27 | 27 | Returns a list of arrays for compatibility purposes & but downside is ugly for loop codes |
28 | 28 | Work on this tomorrow or some shit idk lol |
29 | 29 | */ |
30 | 30 | |
31 | - /* |
|
31 | + /* |
|
32 | 32 | USE THE GOD DAMN __CONFIG MORE -- idiot |
33 | 33 | Work on this tomorrow or some shit |
34 | 34 | */ |
35 | 35 | |
36 | - $__server->page_embeds->page_title = htmlspecialchars($_video['title']); |
|
37 | - $__server->page_embeds->page_description = htmlspecialchars($_video['description']); |
|
38 | - $__server->page_embeds->page_image = "/dynamic/thumbs/" . $_video['thumbnail']; |
|
39 | - $__server->page_embeds->page_url = "https://subrock.rocks/watch?v=" . htmlspecialchars($_video['rid']); |
|
36 | + $__server->page_embeds->page_title = htmlspecialchars($_video['title']); |
|
37 | + $__server->page_embeds->page_description = htmlspecialchars($_video['description']); |
|
38 | + $__server->page_embeds->page_image = "/dynamic/thumbs/" . $_video['thumbnail']; |
|
39 | + $__server->page_embeds->page_url = "https://subrock.rocks/watch?v=" . htmlspecialchars($_video['rid']); |
|
40 | 40 | ?> |
41 | 41 | <!DOCTYPE html> |
42 | 42 | <html> |
@@ -66,29 +66,29 @@ discard block |
||
66 | 66 | if (window.yt.timing) {yt.timing.tick("ct");} |
67 | 67 | </script> |
68 | 68 | <?php |
69 | - $_video['dislikes'] = $__video_h->get_video_stars_level($_video['rid'], 1); |
|
70 | - $_video['dislikes'] += $__video_h->get_video_stars_level($_video['rid'], 2); |
|
69 | + $_video['dislikes'] = $__video_h->get_video_stars_level($_video['rid'], 1); |
|
70 | + $_video['dislikes'] += $__video_h->get_video_stars_level($_video['rid'], 2); |
|
71 | 71 | |
72 | - $_video['likes'] = $__video_h->get_video_stars_level($_video['rid'], 4); |
|
73 | - $_video['likes'] += $__video_h->get_video_stars_level($_video['rid'], 5); |
|
72 | + $_video['likes'] = $__video_h->get_video_stars_level($_video['rid'], 4); |
|
73 | + $_video['likes'] += $__video_h->get_video_stars_level($_video['rid'], 5); |
|
74 | 74 | |
75 | - $_video['dislikes'] += $__video_h->get_video_likes($_video['rid'], false); |
|
76 | - $_video['likes'] += $__video_h->get_video_likes($_video['rid'], true); |
|
75 | + $_video['dislikes'] += $__video_h->get_video_likes($_video['rid'], false); |
|
76 | + $_video['likes'] += $__video_h->get_video_likes($_video['rid'], true); |
|
77 | 77 | |
78 | - if($_video['likes'] == 0 && $_video['dislikes'] == 0) { |
|
79 | - $_video['likeswidth'] = 0; |
|
80 | - $_video['dislikeswidth'] = 0; |
|
81 | - } else { |
|
82 | - $_video['likeswidth'] = $_video['likes'] / ($_video['likes'] + $_video['dislikes']) * 100; |
|
83 | - $_video['dislikeswidth'] = 100 - $_video['likeswidth']; |
|
84 | - } |
|
78 | + if($_video['likes'] == 0 && $_video['dislikes'] == 0) { |
|
79 | + $_video['likeswidth'] = 0; |
|
80 | + $_video['dislikeswidth'] = 0; |
|
81 | + } else { |
|
82 | + $_video['likeswidth'] = $_video['likes'] / ($_video['likes'] + $_video['dislikes']) * 100; |
|
83 | + $_video['dislikeswidth'] = 100 - $_video['likeswidth']; |
|
84 | + } |
|
85 | 85 | |
86 | - $_video['liked'] = $__video_h->if_liked(@$_SESSION['siteusername'], $_video['rid'], true); |
|
87 | - $_video['disliked'] = $__video_h->if_liked(@$_SESSION['siteusername'], $_video['rid'], false); |
|
88 | - $_video['author_videos'] = $__video_h->fetch_user_videos($_video['author']); |
|
89 | - $_video['subscribed'] = $__user_h->if_subscribed(@$_SESSION['siteusername'], $_video['author']); |
|
90 | - $_video['favorited'] = $__video_h->if_favorited(@$_SESSION['siteusername'], $_video['rid']); |
|
91 | - ?> |
|
86 | + $_video['liked'] = $__video_h->if_liked(@$_SESSION['siteusername'], $_video['rid'], true); |
|
87 | + $_video['disliked'] = $__video_h->if_liked(@$_SESSION['siteusername'], $_video['rid'], false); |
|
88 | + $_video['author_videos'] = $__video_h->fetch_user_videos($_video['author']); |
|
89 | + $_video['subscribed'] = $__user_h->if_subscribed(@$_SESSION['siteusername'], $_video['author']); |
|
90 | + $_video['favorited'] = $__video_h->if_favorited(@$_SESSION['siteusername'], $_video['rid']); |
|
91 | + ?> |
|
92 | 92 | </head> |
93 | 93 | <body id="" class="date-20120927 en_US ltr ytg-old-clearfix guide-feed-v2 gecko gecko-15" dir="ltr"> |
94 | 94 | <form name="logoutForm" method="POST" action="/logout"> |
@@ -156,21 +156,21 @@ discard block |
||
156 | 156 | |
157 | 157 | <?php $_user = $__user_h->fetch_user_username($_video['author']); ?> |
158 | 158 | <?php |
159 | - $stmt = $__db->prepare("SELECT ip, username FROM users WHERE ip = :ip"); |
|
160 | - $stmt->bindParam(":ip", $_user['ip']); |
|
161 | - $stmt->execute(); |
|
162 | - $alts = $stmt->rowCount(); |
|
159 | + $stmt = $__db->prepare("SELECT ip, username FROM users WHERE ip = :ip"); |
|
160 | + $stmt->bindParam(":ip", $_user['ip']); |
|
161 | + $stmt->execute(); |
|
162 | + $alts = $stmt->rowCount(); |
|
163 | 163 | |
164 | - if($alts != 0) { echo "<span style='font-size:11px;color:grey;'>Alts will pop up below here...</span><br>"; } |
|
164 | + if($alts != 0) { echo "<span style='font-size:11px;color:grey;'>Alts will pop up below here...</span><br>"; } |
|
165 | 165 | |
166 | - while($username = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
167 | - if($username['username'] != $_video['author'] && $username['ip'] != "0.0.0.0") |
|
168 | - echo " |
|
166 | + while($username = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
167 | + if($username['username'] != $_video['author'] && $username['ip'] != "0.0.0.0") |
|
168 | + echo " |
|
169 | 169 | <a style='font-size:10px;' href='/user/" . htmlspecialchars($username['username']) . "'>" . |
170 | - htmlspecialchars($username['username']) |
|
171 | - . "</a><br>"; |
|
172 | - } |
|
173 | - ?> |
|
170 | + htmlspecialchars($username['username']) |
|
171 | + . "</a><br>"; |
|
172 | + } |
|
173 | + ?> |
|
174 | 174 | <hr> |
175 | 175 | <?php } ?> |
176 | 176 | <h1 id="watch-headline-title"> |
@@ -384,21 +384,21 @@ discard block |
||
384 | 384 | <hr><br> |
385 | 385 | <h3>Add to a Playlist</h3> |
386 | 386 | <?php |
387 | - $stmt = $__db->prepare("SELECT * FROM playlists WHERE author = :username ORDER BY id DESC LIMIT 20"); |
|
388 | - $stmt->bindParam(":username", $_SESSION['siteusername']); |
|
389 | - $stmt->execute(); |
|
390 | - while($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
391 | - $buffer = json_decode($playlist['videos']); |
|
392 | - @$rid = $buffer[0]; |
|
393 | - if(!empty($rid)) { |
|
394 | - @$video = $__video_h->fetch_video_rid($rid); |
|
395 | - } else { |
|
396 | - $video['thumbnail'] = ""; |
|
397 | - $video['duration'] = 0; |
|
398 | - } |
|
387 | + $stmt = $__db->prepare("SELECT * FROM playlists WHERE author = :username ORDER BY id DESC LIMIT 20"); |
|
388 | + $stmt->bindParam(":username", $_SESSION['siteusername']); |
|
389 | + $stmt->execute(); |
|
390 | + while($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
391 | + $buffer = json_decode($playlist['videos']); |
|
392 | + @$rid = $buffer[0]; |
|
393 | + if(!empty($rid)) { |
|
394 | + @$video = $__video_h->fetch_video_rid($rid); |
|
395 | + } else { |
|
396 | + $video['thumbnail'] = ""; |
|
397 | + $video['duration'] = 0; |
|
398 | + } |
|
399 | 399 | |
400 | - $videos = count($buffer); |
|
401 | - ?> |
|
400 | + $videos = count($buffer); |
|
401 | + ?> |
|
402 | 402 | <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> |
403 | 403 | <?php } ?> |
404 | 404 | <?php } ?> |
@@ -663,10 +663,10 @@ discard block |
||
663 | 663 | </div> |
664 | 664 | </div> |
665 | 665 | <?php |
666 | - $stmt = $__db->prepare("SELECT * FROM video_response WHERE toid = :v ORDER BY id DESC LIMIT 4"); |
|
667 | - $stmt->bindParam(":v", $_GET['v']); |
|
668 | - $stmt->execute(); |
|
669 | - ?> |
|
666 | + $stmt = $__db->prepare("SELECT * FROM video_response WHERE toid = :v ORDER BY id DESC LIMIT 4"); |
|
667 | + $stmt->bindParam(":v", $_GET['v']); |
|
668 | + $stmt->execute(); |
|
669 | + ?> |
|
670 | 670 | |
671 | 671 | <?php if($stmt->rowCount() != 0) { ?> |
672 | 672 | <div class="comments-section"> |
@@ -676,16 +676,16 @@ discard block |
||
676 | 676 | <h4>Video Responses</h4> |
677 | 677 | <ul class="video-list"> |
678 | 678 | <?php |
679 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
680 | - if($__video_h->video_exists($video['video'])) { |
|
681 | - $video = $__video_h->fetch_video_rid($video['video']); |
|
682 | - $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
|
683 | - $video['duration'] = $__time_h->timestamp($video['duration']); |
|
684 | - $video['views'] = $__video_h->fetch_video_views($video['rid']); |
|
685 | - $video['author'] = htmlspecialchars($video['author']); |
|
686 | - $video['title'] = htmlspecialchars($video['title']); |
|
687 | - $video['description'] = $__video_h->shorten_description($video['description'], 50); |
|
688 | - ?> |
|
679 | + while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
680 | + if($__video_h->video_exists($video['video'])) { |
|
681 | + $video = $__video_h->fetch_video_rid($video['video']); |
|
682 | + $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
|
683 | + $video['duration'] = $__time_h->timestamp($video['duration']); |
|
684 | + $video['views'] = $__video_h->fetch_video_views($video['rid']); |
|
685 | + $video['author'] = htmlspecialchars($video['author']); |
|
686 | + $video['title'] = htmlspecialchars($video['title']); |
|
687 | + $video['description'] = $__video_h->shorten_description($video['description'], 50); |
|
688 | + ?> |
|
689 | 689 | <li class="video-list-item yt-tile-default"> |
690 | 690 | <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> |
691 | 691 | <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"> |
@@ -766,38 +766,38 @@ discard block |
||
766 | 766 | </div> |
767 | 767 | <ul class="comment-list" id="live_comments"> |
768 | 768 | <?php |
769 | - $results_per_page = 20; |
|
769 | + $results_per_page = 20; |
|
770 | 770 | |
771 | - $stmt = $__db->prepare("SELECT * FROM comments WHERE toid = :rid ORDER BY id DESC"); |
|
772 | - $stmt->bindParam(":rid", $_video['rid']); |
|
773 | - $stmt->execute(); |
|
771 | + $stmt = $__db->prepare("SELECT * FROM comments WHERE toid = :rid ORDER BY id DESC"); |
|
772 | + $stmt->bindParam(":rid", $_video['rid']); |
|
773 | + $stmt->execute(); |
|
774 | 774 | |
775 | - $number_of_result = $stmt->rowCount(); |
|
776 | - $number_of_page = ceil ($number_of_result / $results_per_page); |
|
775 | + $number_of_result = $stmt->rowCount(); |
|
776 | + $number_of_page = ceil ($number_of_result / $results_per_page); |
|
777 | 777 | |
778 | - if (!isset ($_GET['page']) ) { |
|
779 | - $page = 1; |
|
780 | - } else { |
|
781 | - $page = (int)$_GET['page']; |
|
782 | - } |
|
778 | + if (!isset ($_GET['page']) ) { |
|
779 | + $page = 1; |
|
780 | + } else { |
|
781 | + $page = (int)$_GET['page']; |
|
782 | + } |
|
783 | 783 | |
784 | - $page_first_result = ($page - 1) * $results_per_page; |
|
784 | + $page_first_result = ($page - 1) * $results_per_page; |
|
785 | 785 | |
786 | - $stmt = $__db->prepare("SELECT * FROM comments WHERE toid = :rid ORDER BY id DESC LIMIT :pfirst, :pper"); |
|
787 | - $stmt->bindParam(":rid", $_video['rid']); |
|
788 | - $stmt->bindParam(":pfirst", $page_first_result); |
|
789 | - $stmt->bindParam(":pper", $results_per_page); |
|
790 | - $stmt->execute(); |
|
786 | + $stmt = $__db->prepare("SELECT * FROM comments WHERE toid = :rid ORDER BY id DESC LIMIT :pfirst, :pper"); |
|
787 | + $stmt->bindParam(":rid", $_video['rid']); |
|
788 | + $stmt->bindParam(":pfirst", $page_first_result); |
|
789 | + $stmt->bindParam(":pper", $results_per_page); |
|
790 | + $stmt->execute(); |
|
791 | 791 | |
792 | - while($comment = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
793 | - if($__video_h->if_comment_liked($comment['id'], $_SESSION['siteusername'], true)) |
|
794 | - $comment['liked'] = true; |
|
795 | - else if($__video_h->if_comment_liked($comment['id'], $_SESSION['siteusername'], false)) |
|
796 | - $comment['disliked'] = true; |
|
792 | + while($comment = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
793 | + if($__video_h->if_comment_liked($comment['id'], $_SESSION['siteusername'], true)) |
|
794 | + $comment['liked'] = true; |
|
795 | + else if($__video_h->if_comment_liked($comment['id'], $_SESSION['siteusername'], false)) |
|
796 | + $comment['disliked'] = true; |
|
797 | 797 | |
798 | - $comment['likes'] = $__video_h->get_comment_likes($comment['id'], true); |
|
799 | - $comment['likes'] -= $__video_h->get_comment_likes($comment['id'], false); |
|
800 | - ?> |
|
798 | + $comment['likes'] = $__video_h->get_comment_likes($comment['id'], true); |
|
799 | + $comment['likes'] -= $__video_h->get_comment_likes($comment['id'], false); |
|
800 | + ?> |
|
801 | 801 | |
802 | 802 | <li class="comment yt-tile-default " data-author-viewing="" data-author-id="-uD01K8FQTeOSS5sniRFzQ" data-id="<?php echo $comment['id']; ?>" data-score="0"> |
803 | 803 | <div class="comment-body"> |
@@ -863,12 +863,12 @@ discard block |
||
863 | 863 | </div> |
864 | 864 | </li> |
865 | 865 | <?php |
866 | - $stmt2 = $__db->prepare("SELECT * FROM comment_reply WHERE toid = :rid ORDER BY id DESC"); |
|
867 | - $stmt2->bindParam(":rid", $comment['id']); |
|
868 | - $stmt2->execute(); |
|
866 | + $stmt2 = $__db->prepare("SELECT * FROM comment_reply WHERE toid = :rid ORDER BY id DESC"); |
|
867 | + $stmt2->bindParam(":rid", $comment['id']); |
|
868 | + $stmt2->execute(); |
|
869 | 869 | |
870 | - while($reply = $stmt2->fetch(PDO::FETCH_ASSOC)) { |
|
871 | - ?> |
|
870 | + while($reply = $stmt2->fetch(PDO::FETCH_ASSOC)) { |
|
871 | + ?> |
|
872 | 872 | <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"> |
873 | 873 | <div class="comment-body"> |
874 | 874 | <div class="content-container"> |
@@ -948,19 +948,19 @@ discard block |
||
948 | 948 | <div id="watch-related-container" class="watch-sidebar-body"> |
949 | 949 | <ul id="watch-related" class="video-list"> |
950 | 950 | <?php |
951 | - $stmt = $__db->prepare("SELECT * FROM playlists ORDER BY rand() LIMIT 2"); |
|
952 | - $stmt->execute(); |
|
953 | - while($_playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
954 | - $_playlist['videos'] = json_decode($_playlist['videos']); |
|
955 | - $_playlist['count'] = 1; |
|
951 | + $stmt = $__db->prepare("SELECT * FROM playlists ORDER BY rand() LIMIT 2"); |
|
952 | + $stmt->execute(); |
|
953 | + while($_playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
954 | + $_playlist['videos'] = json_decode($_playlist['videos']); |
|
955 | + $_playlist['count'] = 1; |
|
956 | 956 | |
957 | - if($__video_h->video_exists($_playlist['videos'][0])) { |
|
958 | - $video = $__video_h->fetch_video_rid($_playlist['videos'][0]); |
|
959 | - } else { |
|
960 | - $video = []; |
|
961 | - $video['thumbnail'] = "default.jpg"; |
|
962 | - } |
|
963 | - ?> |
|
957 | + if($__video_h->video_exists($_playlist['videos'][0])) { |
|
958 | + $video = $__video_h->fetch_video_rid($_playlist['videos'][0]); |
|
959 | + } else { |
|
960 | + $video = []; |
|
961 | + $video['thumbnail'] = "default.jpg"; |
|
962 | + } |
|
963 | + ?> |
|
964 | 964 | <li class="video-list-item"> |
965 | 965 | <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"> |
966 | 966 | <span class="ux-thumb-wrap"> |
@@ -1007,16 +1007,16 @@ discard block |
||
1007 | 1007 | <?php } ?> |
1008 | 1008 | <div id="ppv-container" class="hid"></div> |
1009 | 1009 | <?php |
1010 | - $stmt = $__db->prepare("SELECT * FROM videos WHERE visibility = 'n' ORDER BY rand() LIMIT 20"); |
|
1011 | - $stmt->execute(); |
|
1012 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
1013 | - $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
|
1014 | - $video['duration'] = $__time_h->timestamp($video['duration']); |
|
1015 | - $video['views'] = $__video_h->fetch_video_views($video['rid']); |
|
1016 | - $video['author'] = htmlspecialchars($video['author']); |
|
1017 | - $video['title'] = htmlspecialchars($video['title']); |
|
1018 | - $video['description'] = $__video_h->shorten_description($video['description'], 50); |
|
1019 | - ?> |
|
1010 | + $stmt = $__db->prepare("SELECT * FROM videos WHERE visibility = 'n' ORDER BY rand() LIMIT 20"); |
|
1011 | + $stmt->execute(); |
|
1012 | + while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
1013 | + $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
|
1014 | + $video['duration'] = $__time_h->timestamp($video['duration']); |
|
1015 | + $video['views'] = $__video_h->fetch_video_views($video['rid']); |
|
1016 | + $video['author'] = htmlspecialchars($video['author']); |
|
1017 | + $video['title'] = htmlspecialchars($video['title']); |
|
1018 | + $video['description'] = $__video_h->shorten_description($video['description'], 50); |
|
1019 | + ?> |
|
1020 | 1020 | <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> |
1021 | 1021 | <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"> |
1022 | 1022 | </span><img class="yt-uix-button-arrow" src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt=""></button> |
@@ -11,11 +11,11 @@ discard block |
||
11 | 11 | <?php $__user_u = new user_update($__db); ?> |
12 | 12 | <?php $__db_h = new db_helper(); ?> |
13 | 13 | <?php $__time_h = new time_helper(); ?> |
14 | -<?php if(!$__video_h->video_exists($_GET['v'])) { header("Location: /?error=This video doesn't exist!"); } ?> |
|
14 | +<?php if (!$__video_h->video_exists($_GET['v'])) { header("Location: /?error=This video doesn't exist!"); } ?> |
|
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']) |
|
18 | + if ($_video['visibility'] == "v" && @$_SESSION['siteusername'] != $_video['author']) |
|
19 | 19 | header("Location: /"); |
20 | 20 | |
21 | 21 | $__video_h->check_view($_GET['v'], @$_SERVER["HTTP_CF_CONNECTING_IP"]); |
@@ -66,20 +66,20 @@ discard block |
||
66 | 66 | if (window.yt.timing) {yt.timing.tick("ct");} |
67 | 67 | </script> |
68 | 68 | <?php |
69 | - $_video['dislikes'] = $__video_h->get_video_stars_level($_video['rid'], 1); |
|
69 | + $_video['dislikes'] = $__video_h->get_video_stars_level($_video['rid'], 1); |
|
70 | 70 | $_video['dislikes'] += $__video_h->get_video_stars_level($_video['rid'], 2); |
71 | 71 | |
72 | - $_video['likes'] = $__video_h->get_video_stars_level($_video['rid'], 4); |
|
73 | - $_video['likes'] += $__video_h->get_video_stars_level($_video['rid'], 5); |
|
72 | + $_video['likes'] = $__video_h->get_video_stars_level($_video['rid'], 4); |
|
73 | + $_video['likes'] += $__video_h->get_video_stars_level($_video['rid'], 5); |
|
74 | 74 | |
75 | 75 | $_video['dislikes'] += $__video_h->get_video_likes($_video['rid'], false); |
76 | 76 | $_video['likes'] += $__video_h->get_video_likes($_video['rid'], true); |
77 | 77 | |
78 | - if($_video['likes'] == 0 && $_video['dislikes'] == 0) { |
|
78 | + if ($_video['likes'] == 0 && $_video['dislikes'] == 0) { |
|
79 | 79 | $_video['likeswidth'] = 0; |
80 | 80 | $_video['dislikeswidth'] = 0; |
81 | 81 | } else { |
82 | - $_video['likeswidth'] = $_video['likes'] / ($_video['likes'] + $_video['dislikes']) * 100; |
|
82 | + $_video['likeswidth'] = $_video['likes']/($_video['likes'] + $_video['dislikes'])*100; |
|
83 | 83 | $_video['dislikeswidth'] = 100 - $_video['likeswidth']; |
84 | 84 | } |
85 | 85 | |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | </div> |
114 | 114 | <div id="instream_google_companion_ad_div"></div> |
115 | 115 | </div> |
116 | - <?php if(@$_SESSION['siteusername'] == $_video['author']) { ?> |
|
116 | + <?php if (@$_SESSION['siteusername'] == $_video['author']) { ?> |
|
117 | 117 | <div id="watch-owner-container"> |
118 | 118 | <div id="masthead-subnav" class="yt-nav yt-nav-dark "> |
119 | 119 | <ul class="yt-nav-aside"> |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | </div> |
133 | 133 | </div><br> |
134 | 134 | <?php } ?> |
135 | - <?php if($__user_h->if_admin(@$_SESSION['siteusername']) && @$_SESSION['siteusername'] != $_video['author']) { ?> |
|
135 | + <?php if ($__user_h->if_admin(@$_SESSION['siteusername']) && @$_SESSION['siteusername'] != $_video['author']) { ?> |
|
136 | 136 | <div id="watch-owner-container"> |
137 | 137 | <div id="masthead-subnav" class="yt-nav yt-nav-dark "> |
138 | 138 | <ul class="yt-nav-aside"> |
@@ -161,10 +161,10 @@ discard block |
||
161 | 161 | $stmt->execute(); |
162 | 162 | $alts = $stmt->rowCount(); |
163 | 163 | |
164 | - if($alts != 0) { echo "<span style='font-size:11px;color:grey;'>Alts will pop up below here...</span><br>"; } |
|
164 | + if ($alts != 0) { echo "<span style='font-size:11px;color:grey;'>Alts will pop up below here...</span><br>"; } |
|
165 | 165 | |
166 | - while($username = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
167 | - if($username['username'] != $_video['author'] && $username['ip'] != "0.0.0.0") |
|
166 | + while ($username = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
167 | + if ($username['username'] != $_video['author'] && $username['ip'] != "0.0.0.0") |
|
168 | 168 | echo " |
169 | 169 | <a style='font-size:10px;' href='/user/" . htmlspecialchars($username['username']) . "'>" . |
170 | 170 | htmlspecialchars($username['username']) |
@@ -189,7 +189,7 @@ discard block |
||
189 | 189 | title="" |
190 | 190 | id="subscribe-button" |
191 | 191 | type="button" |
192 | - class="<?php if($_video['subscribed']) { echo "subscribed "; } ?>yt-subscription-button yt-uix-button yt-uix-button-subscription yt-uix-tooltip" |
|
192 | + class="<?php if ($_video['subscribed']) { echo "subscribed "; } ?>yt-subscription-button yt-uix-button yt-uix-button-subscription yt-uix-tooltip" |
|
193 | 193 | role="button"> |
194 | 194 | <span class="yt-uix-button-icon-wrapper"> |
195 | 195 | <img class="yt-uix-button-icon yt-uix-button-icon-subscribe" src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt=""> |
@@ -247,7 +247,7 @@ discard block |
||
247 | 247 | <div id="watch-main-container"> |
248 | 248 | <div id="watch-main"> |
249 | 249 | <div id="watch-panel"> |
250 | - <?php if($_video['featured'] == "v") { ?> |
|
250 | + <?php if ($_video['featured'] == "v") { ?> |
|
251 | 251 | <div id="masthead_child_div"><div class="yt-alert yt-alert-default yt-alert-warn"> <div class="yt-alert-icon"> |
252 | 252 | <img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" class="icon master-sprite" alt="Alert icon"> |
253 | 253 | </div> |
@@ -258,7 +258,7 @@ discard block |
||
258 | 258 | </div></div></div> |
259 | 259 | <?php } ?> |
260 | 260 | |
261 | - <?php if($_video['visibility'] == "u") { ?> |
|
261 | + <?php if ($_video['visibility'] == "u") { ?> |
|
262 | 262 | <div id="masthead_child_div"><div class="yt-alert yt-alert-default yt-alert-warn"> <div class="yt-alert-icon"> |
263 | 263 | <img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" class="icon master-sprite" alt="Alert icon"> |
264 | 264 | </div> |
@@ -267,7 +267,7 @@ discard block |
||
267 | 267 | This video is unlisted. Only people who have the link can view this video. |
268 | 268 | </div> |
269 | 269 | </div></div></div> |
270 | - <?php } else if($_video['visibility'] == "v") { ?> |
|
270 | + <?php } else if ($_video['visibility'] == "v") { ?> |
|
271 | 271 | <div id="masthead_child_div"><div class="yt-alert yt-alert-default yt-alert-error"> <div class="yt-alert-icon"> |
272 | 272 | <img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" class="icon master-sprite" alt="Alert icon"> |
273 | 273 | </div> |
@@ -301,7 +301,7 @@ discard block |
||
301 | 301 | <button onclick=";window.location.href=this.getAttribute('href');return false;" href="/get/like_video?v=<?php echo $_video['rid']; ?>" |
302 | 302 | title="I like this" |
303 | 303 | type="button" |
304 | - class="start <?php if($_video['liked']) { echo "liked "; } ?>yt-uix-tooltip-reverse yt-uix-button yt-uix-button-default yt-uix-tooltip" |
|
304 | + class="start <?php if ($_video['liked']) { echo "liked "; } ?>yt-uix-tooltip-reverse yt-uix-button yt-uix-button-default yt-uix-tooltip" |
|
305 | 305 | id="watch-like" |
306 | 306 | href="/get/like_video?v=<?php echo $_video['rid']; ?>" |
307 | 307 | role="button"><span class="yt-uix-button-icon-wrapper"> |
@@ -315,7 +315,7 @@ discard block |
||
315 | 315 | type="button" |
316 | 316 | style="margin-left: -2px;" |
317 | 317 | href="/get/dislike_video?v=<?php echo $_video['rid']; ?>" |
318 | - class="end yt-uix-tooltip-reverse <?php if($_video['disliked']) { echo "unliked "; } ?> yt-uix-button yt-uix-button-default yt-uix-tooltip yt-uix-button-empty" |
|
318 | + class="end yt-uix-tooltip-reverse <?php if ($_video['disliked']) { echo "unliked "; } ?> yt-uix-button yt-uix-button-default yt-uix-tooltip yt-uix-button-empty" |
|
319 | 319 | id="watch-unlike" |
320 | 320 | role="button"> |
321 | 321 | <span class="yt-uix-button-icon-wrapper"> |
@@ -335,7 +335,7 @@ discard block |
||
335 | 335 | </div> |
336 | 336 | </div> |
337 | 337 | <div id="watch-actions-logged-out" class="watch-actions-panel hid"> |
338 | - <?php if(!isset($_SESSION['siteusername'])) { ?> |
|
338 | + <?php if (!isset($_SESSION['siteusername'])) { ?> |
|
339 | 339 | <div class="yt-alert yt-alert-naked yt-alert-warn "> |
340 | 340 | <div class="yt-alert-icon"> |
341 | 341 | <img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" class="icon master-sprite" alt="Alert icon"> |
@@ -351,7 +351,7 @@ discard block |
||
351 | 351 | <?php } else { ?> |
352 | 352 | <h3>Be friends with the creator</h3> |
353 | 353 | |
354 | - <?php if($_SESSION['siteusername'] != $_video['author']) { ?> |
|
354 | + <?php if ($_SESSION['siteusername'] != $_video['author']) { ?> |
|
355 | 355 | <img style="width: 50px;height:50px;" src="/dynamic/pfp/<?php echo $__user_h->fetch_pfp($_video['author']); ?>"> |
356 | 356 | <span style="display: inline-block; vertical-align:top;width: 100px;font-size:11px;"> |
357 | 357 | <b><a href="/user/<?php echo htmlspecialchars($_video['author']); ?>"><?php echo htmlspecialchars($_video['author']); ?></a></b><br> |
@@ -365,8 +365,8 @@ discard block |
||
365 | 365 | </span><br><br> |
366 | 366 | <?php } ?> |
367 | 367 | |
368 | - <?php if($_SESSION['siteusername'] != $_video['author']) { ?> |
|
369 | - <?php if($_video['friended'] == false) { ?> |
|
368 | + <?php if ($_SESSION['siteusername'] != $_video['author']) { ?> |
|
369 | + <?php if ($_video['friended'] == false) { ?> |
|
370 | 370 | <a href="/friends">Send a friend request</a> |
371 | 371 | <?php } else { ?> |
372 | 372 | Your friend request is pending. |
@@ -376,7 +376,7 @@ discard block |
||
376 | 376 | <?php } ?> |
377 | 377 | <hr><br> |
378 | 378 | <h3>Add to Favorites</h3> |
379 | - <?php if($_video['favorited'] == false) { ?> |
|
379 | + <?php if ($_video['favorited'] == false) { ?> |
|
380 | 380 | <a href="/get/favorite?v=<?php echo $_video['rid']; ?>">Favorite Video</a> |
381 | 381 | <?php } else { ?> |
382 | 382 | <a href="/get/unfavorite?v=<?php echo $_video['rid']; ?>">Unfavorite Video</a> |
@@ -387,10 +387,10 @@ discard block |
||
387 | 387 | $stmt = $__db->prepare("SELECT * FROM playlists WHERE author = :username ORDER BY id DESC LIMIT 20"); |
388 | 388 | $stmt->bindParam(":username", $_SESSION['siteusername']); |
389 | 389 | $stmt->execute(); |
390 | - while($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
390 | + while ($playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
391 | 391 | $buffer = json_decode($playlist['videos']); |
392 | 392 | @$rid = $buffer[0]; |
393 | - if(!empty($rid)) { |
|
393 | + if (!empty($rid)) { |
|
394 | 394 | @$video = $__video_h->fetch_video_rid($rid); |
395 | 395 | } else { |
396 | 396 | $video['thumbnail'] = ""; |
@@ -668,7 +668,7 @@ discard block |
||
668 | 668 | $stmt->execute(); |
669 | 669 | ?> |
670 | 670 | |
671 | - <?php if($stmt->rowCount() != 0) { ?> |
|
671 | + <?php if ($stmt->rowCount() != 0) { ?> |
|
672 | 672 | <div class="comments-section"> |
673 | 673 | <a class="comments-section-see-all" href="/video_response_view_all?v=<?php echo htmlspecialchars($_video['rid']); ?>"> |
674 | 674 | see all |
@@ -676,8 +676,8 @@ discard block |
||
676 | 676 | <h4>Video Responses</h4> |
677 | 677 | <ul class="video-list"> |
678 | 678 | <?php |
679 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
680 | - if($__video_h->video_exists($video['video'])) { |
|
679 | + while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
680 | + if ($__video_h->video_exists($video['video'])) { |
|
681 | 681 | $video = $__video_h->fetch_video_rid($video['video']); |
682 | 682 | $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
683 | 683 | $video['duration'] = $__time_h->timestamp($video['duration']); |
@@ -708,18 +708,18 @@ discard block |
||
708 | 708 | </h4> |
709 | 709 | </div> |
710 | 710 | </div> |
711 | - <?php if(!isset($_SESSION['siteusername'])) { ?> |
|
711 | + <?php if (!isset($_SESSION['siteusername'])) { ?> |
|
712 | 712 | <div class="comments-post-container clearfix"> |
713 | 713 | <div class="comments-post-alert"> |
714 | 714 | <a href="/sign_in">Sign In</a> or <a href="/sign_up">Sign Up</a><span class="comments-post-form-rollover-text"> now to post a comment!</span> |
715 | 715 | </div> |
716 | 716 | </div> |
717 | - <?php } else if($_video['commenting'] == "d") { ?> |
|
717 | + <?php } else if ($_video['commenting'] == "d") { ?> |
|
718 | 718 | <div class="comments-disabled-message"> |
719 | 719 | <img src="http://s.ytimg.com/yt/img/icon_comments_disabled-vflxokpZC.png"> |
720 | 720 | <span>Adding comments has been disabled for this video.</span> |
721 | 721 | </div> |
722 | - <?php } else if($__user_h->if_blocked($_video['author'], $_SESSION['siteusername'])) { ?> |
|
722 | + <?php } else if ($__user_h->if_blocked($_video['author'], $_SESSION['siteusername'])) { ?> |
|
723 | 723 | <div class="comments-post-container clearfix"> |
724 | 724 | <div class="comments-post-alert"> |
725 | 725 | This user has blocked you! |
@@ -773,15 +773,15 @@ discard block |
||
773 | 773 | $stmt->execute(); |
774 | 774 | |
775 | 775 | $number_of_result = $stmt->rowCount(); |
776 | - $number_of_page = ceil ($number_of_result / $results_per_page); |
|
776 | + $number_of_page = ceil($number_of_result/$results_per_page); |
|
777 | 777 | |
778 | - if (!isset ($_GET['page']) ) { |
|
778 | + if (!isset ($_GET['page'])) { |
|
779 | 779 | $page = 1; |
780 | 780 | } else { |
781 | - $page = (int)$_GET['page']; |
|
781 | + $page = (int) $_GET['page']; |
|
782 | 782 | } |
783 | 783 | |
784 | - $page_first_result = ($page - 1) * $results_per_page; |
|
784 | + $page_first_result = ($page - 1)*$results_per_page; |
|
785 | 785 | |
786 | 786 | $stmt = $__db->prepare("SELECT * FROM comments WHERE toid = :rid ORDER BY id DESC LIMIT :pfirst, :pper"); |
787 | 787 | $stmt->bindParam(":rid", $_video['rid']); |
@@ -789,10 +789,10 @@ discard block |
||
789 | 789 | $stmt->bindParam(":pper", $results_per_page); |
790 | 790 | $stmt->execute(); |
791 | 791 | |
792 | - while($comment = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
793 | - if($__video_h->if_comment_liked($comment['id'], $_SESSION['siteusername'], true)) |
|
792 | + while ($comment = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
793 | + if ($__video_h->if_comment_liked($comment['id'], $_SESSION['siteusername'], true)) |
|
794 | 794 | $comment['liked'] = true; |
795 | - else if($__video_h->if_comment_liked($comment['id'], $_SESSION['siteusername'], false)) |
|
795 | + else if ($__video_h->if_comment_liked($comment['id'], $_SESSION['siteusername'], false)) |
|
796 | 796 | $comment['disliked'] = true; |
797 | 797 | |
798 | 798 | $comment['likes'] = $__video_h->get_comment_likes($comment['id'], true); |
@@ -814,7 +814,7 @@ discard block |
||
814 | 814 | <span dir="ltr"><?php echo $__time_h->time_elapsed_string($comment['date']); ?><span> |
815 | 815 | </span> |
816 | 816 | </span></span> |
817 | - <?php if($comment['likes'] != 0) { ?> |
|
817 | + <?php if ($comment['likes'] != 0) { ?> |
|
818 | 818 | <span dir="ltr" class="comments-rating-positive" title="9 up, 1 down"> |
819 | 819 | <?php echo $comment['likes']; ?> |
820 | 820 | <img class="comments-rating-thumbs-up" src="//s.ytimg.com/yts/img/pixel-vfl3z5WfW.gif"> |
@@ -842,7 +842,7 @@ discard block |
||
842 | 842 | </button> |
843 | 843 | </span> |
844 | 844 | </div> |
845 | - <?php if(isset($_SESSION['siteusername'])) { ?> |
|
845 | + <?php if (isset($_SESSION['siteusername'])) { ?> |
|
846 | 846 | <li id="reply_to_<?php echo $comment['id']; ?>" style="display: none;" class="comment yt-tile-default child" data-tag="O" data-author-viewing="" data-id="iRV7EkT9us81mDLFDSB6FAsB156Fdn13HUmTm26C3PE" data-score="34" data-author="<?php echo htmlspecialchars($row['author']); ?>"> |
847 | 847 | |
848 | 848 | <div class="comment-body"> |
@@ -867,7 +867,7 @@ discard block |
||
867 | 867 | $stmt2->bindParam(":rid", $comment['id']); |
868 | 868 | $stmt2->execute(); |
869 | 869 | |
870 | - while($reply = $stmt2->fetch(PDO::FETCH_ASSOC)) { |
|
870 | + while ($reply = $stmt2->fetch(PDO::FETCH_ASSOC)) { |
|
871 | 871 | ?> |
872 | 872 | <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"> |
873 | 873 | <div class="comment-body"> |
@@ -950,11 +950,11 @@ discard block |
||
950 | 950 | <?php |
951 | 951 | $stmt = $__db->prepare("SELECT * FROM playlists ORDER BY rand() LIMIT 2"); |
952 | 952 | $stmt->execute(); |
953 | - while($_playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
953 | + while ($_playlist = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
954 | 954 | $_playlist['videos'] = json_decode($_playlist['videos']); |
955 | 955 | $_playlist['count'] = 1; |
956 | 956 | |
957 | - if($__video_h->video_exists($_playlist['videos'][0])) { |
|
957 | + if ($__video_h->video_exists($_playlist['videos'][0])) { |
|
958 | 958 | $video = $__video_h->fetch_video_rid($_playlist['videos'][0]); |
959 | 959 | } else { |
960 | 960 | $video = []; |
@@ -1009,7 +1009,7 @@ discard block |
||
1009 | 1009 | <?php |
1010 | 1010 | $stmt = $__db->prepare("SELECT * FROM videos WHERE visibility = 'n' ORDER BY rand() LIMIT 20"); |
1011 | 1011 | $stmt->execute(); |
1012 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
1012 | + while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
1013 | 1013 | $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
1014 | 1014 | $video['duration'] = $__time_h->timestamp($video['duration']); |
1015 | 1015 | $video['views'] = $__video_h->fetch_video_views($video['rid']); |
@@ -15,8 +15,9 @@ 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 | |
21 | 22 | $__video_h->check_view($_GET['v'], @$_SERVER["HTTP_CF_CONNECTING_IP"]); |
22 | 23 | |
@@ -164,11 +165,12 @@ discard block |
||
164 | 165 | if($alts != 0) { echo "<span style='font-size:11px;color:grey;'>Alts will pop up below here...</span><br>"; } |
165 | 166 | |
166 | 167 | while($username = $stmt->fetch(PDO::FETCH_ASSOC)) { |
167 | - if($username['username'] != $_video['author'] && $username['ip'] != "0.0.0.0") |
|
168 | - echo " |
|
168 | + if($username['username'] != $_video['author'] && $username['ip'] != "0.0.0.0") { |
|
169 | + echo " |
|
169 | 170 | <a style='font-size:10px;' href='/user/" . htmlspecialchars($username['username']) . "'>" . |
170 | 171 | htmlspecialchars($username['username']) |
171 | 172 | . "</a><br>"; |
173 | + } |
|
172 | 174 | } |
173 | 175 | ?> |
174 | 176 | <hr> |
@@ -790,10 +792,11 @@ discard block |
||
790 | 792 | $stmt->execute(); |
791 | 793 | |
792 | 794 | while($comment = $stmt->fetch(PDO::FETCH_ASSOC)) { |
793 | - if($__video_h->if_comment_liked($comment['id'], $_SESSION['siteusername'], true)) |
|
794 | - $comment['liked'] = true; |
|
795 | - else if($__video_h->if_comment_liked($comment['id'], $_SESSION['siteusername'], false)) |
|
796 | - $comment['disliked'] = true; |
|
795 | + if($__video_h->if_comment_liked($comment['id'], $_SESSION['siteusername'], true)) { |
|
796 | + $comment['liked'] = true; |
|
797 | + } else if($__video_h->if_comment_liked($comment['id'], $_SESSION['siteusername'], false)) { |
|
798 | + $comment['disliked'] = true; |
|
799 | + } |
|
797 | 800 | |
798 | 801 | $comment['likes'] = $__video_h->get_comment_likes($comment['id'], true); |
799 | 802 | $comment['likes'] -= $__video_h->get_comment_likes($comment['id'], false); |