@@ -10,22 +10,22 @@ |
||
| 10 | 10 | <?php $__user_u = new user_update($__db); ?> |
| 11 | 11 | <?php $__db_h = new db_helper(); ?> |
| 12 | 12 | <?php $__time_h = new time_helper(); ?> |
| 13 | -<?php if(!$__video_h->video_exists($_GET['v'])) { header("Location: /?error=This video doesn't exist!"); } ?> |
|
| 13 | +<?php if (!$__video_h->video_exists($_GET['v'])) { header("Location: /?error=This video doesn't exist!"); } ?> |
|
| 14 | 14 | <?php $_video = $__video_h->fetch_video_rid($_GET['v']); ?> |
| 15 | 15 | <?php $_video['comments'] = $__video_h->get_comments_from_video($_video['rid']); ?> |
| 16 | 16 | <?php |
| 17 | - if($_SERVER['REQUEST_METHOD'] == 'POST') { |
|
| 17 | + if ($_SERVER['REQUEST_METHOD'] == 'POST') { |
|
| 18 | 18 | $error = array(); |
| 19 | 19 | $request = (object) [ |
| 20 | 20 | "status" => "success" |
| 21 | 21 | ]; |
| 22 | 22 | |
| 23 | - if(!isset($_SESSION['siteusername'])){ $error['message'] = "you are not logged in"; $error['status'] = true; } |
|
| 24 | - if(!$_POST['comment']){ $error['message'] = "your comment cannot be blank"; $error['status'] = true; } |
|
| 25 | - if(strlen($_POST['comment']) > 1000){ $error['message'] = "your comment must be shorter than 1000 characters"; $error['status'] = true; } |
|
| 26 | - if($__user_h->if_cooldown($_SESSION['siteusername'])) { $error['message'] = "You are on a cooldown! Wait for a minute before posting another comment."; $error['status'] = true; } |
|
| 23 | + if (!isset($_SESSION['siteusername'])) { $error['message'] = "you are not logged in"; $error['status'] = true; } |
|
| 24 | + if (!$_POST['comment']) { $error['message'] = "your comment cannot be blank"; $error['status'] = true; } |
|
| 25 | + if (strlen($_POST['comment']) > 1000) { $error['message'] = "your comment must be shorter than 1000 characters"; $error['status'] = true; } |
|
| 26 | + if ($__user_h->if_cooldown($_SESSION['siteusername'])) { $error['message'] = "You are on a cooldown! Wait for a minute before posting another comment."; $error['status'] = true; } |
|
| 27 | 27 | |
| 28 | - if(!isset($error['message'])) { |
|
| 28 | + if (!isset($error['message'])) { |
|
| 29 | 29 | $text = $_POST['comment']; |
| 30 | 30 | $stmt = $__db->prepare("INSERT INTO comments (toid, author, comment) VALUES (:v, :username, :comment)"); |
| 31 | 31 | $stmt->bindParam(":v", $_GET['v']); |
@@ -30,9 +30,9 @@ discard block |
||
| 30 | 30 | <?php require_once($_SERVER['DOCUMENT_ROOT'] . "/s/classes/user_update.php"); ?> |
| 31 | 31 | <?php $__video_h = new video_helper($__db); ?> |
| 32 | 32 | <?php $__db_h = new db_helper(); ?> |
| 33 | -<?php if(!$__video_h->video_exists($_GET['video_id'])) { header("Location: /?error=This video doesn't exist!"); } ?>
|
|
| 33 | +<?php if (!$__video_h->video_exists($_GET['video_id'])) { header("Location: /?error=This video doesn't exist!"); } ?>
|
|
| 34 | 34 | <?php $_video = $__video_h->fetch_video_rid($_GET['video_id']); ?> |
| 35 | -<?php @$_video['fmtPath'] = "/dynamic/videos/".$_video['filename']; ?> |
|
| 35 | +<?php @$_video['fmtPath'] = "/dynamic/videos/" . $_video['filename']; ?> |
|
| 36 | 36 | <?php |
| 37 | 37 | |
| 38 | 38 | // these are all the videos, with their settings, and formats |
@@ -49,8 +49,8 @@ discard block |
||
| 49 | 49 | |
| 50 | 50 | $count = 0; |
| 51 | 51 | $url_encoded_fmt_stream_map; |
| 52 | -foreach($fmt_stream_map as $stream) {
|
|
| 53 | - if($count == 0) |
|
| 52 | +foreach ($fmt_stream_map as $stream) {
|
|
| 53 | + if ($count == 0) |
|
| 54 | 54 | $url_encoded_fmt_stream_map = http_build_query($stream); |
| 55 | 55 | else |
| 56 | 56 | $url_encoded_fmt_stream_map = $url_encoded_fmt_stream_map . "," . http_build_query($stream); |
@@ -10,19 +10,19 @@ discard block |
||
| 10 | 10 | <?php $__user_u = new user_update($__db); ?> |
| 11 | 11 | <?php $__db_h = new db_helper(); ?> |
| 12 | 12 | <?php $__time_h = new time_helper(); ?> |
| 13 | -<?php if(!$__video_h->video_exists($_GET['v'])) { header("Location: /?error=This video doesn't exist!"); } ?> |
|
| 13 | +<?php if (!$__video_h->video_exists($_GET['v'])) { header("Location: /?error=This video doesn't exist!"); } ?> |
|
| 14 | 14 | <?php $_video = $__video_h->fetch_video_rid($_GET['v']); ?> |
| 15 | 15 | <?php $_video['comments'] = $__video_h->get_comments_from_video($_video['rid']); ?> |
| 16 | 16 | <?php |
| 17 | - if($_SERVER['REQUEST_METHOD'] == 'POST') { |
|
| 17 | + if ($_SERVER['REQUEST_METHOD'] == 'POST') { |
|
| 18 | 18 | $error = array(); |
| 19 | 19 | |
| 20 | - if(!isset($_SESSION['siteusername'])){ $error['message'] = "you are not logged in"; $error['status'] = true; } |
|
| 21 | - if(!$_POST['comment']){ $error['message'] = "your comment cannot be blank"; $error['status'] = true; } |
|
| 22 | - if(strlen($_POST['comment']) > 1000){ $error['message'] = "your comment must be shorter than 1000 characters"; $error['status'] = true; } |
|
| 23 | - if($__user_h->if_cooldown($_SESSION['siteusername'])) { $error['message'] = "You are on a cooldown! Wait for a minute before posting another comment."; $error['status'] = true; } |
|
| 20 | + if (!isset($_SESSION['siteusername'])) { $error['message'] = "you are not logged in"; $error['status'] = true; } |
|
| 21 | + if (!$_POST['comment']) { $error['message'] = "your comment cannot be blank"; $error['status'] = true; } |
|
| 22 | + if (strlen($_POST['comment']) > 1000) { $error['message'] = "your comment must be shorter than 1000 characters"; $error['status'] = true; } |
|
| 23 | + if ($__user_h->if_cooldown($_SESSION['siteusername'])) { $error['message'] = "You are on a cooldown! Wait for a minute before posting another comment."; $error['status'] = true; } |
|
| 24 | 24 | |
| 25 | - if(!isset($error['message'])) { |
|
| 25 | + if (!isset($error['message'])) { |
|
| 26 | 26 | $text = $_POST['comment']; |
| 27 | 27 | $stmt = $__db->prepare("INSERT INTO comments (toid, author, comment) VALUES (:v, :username, :comment)"); |
| 28 | 28 | $stmt->bindParam(":v", $_GET['v']); |
@@ -53,20 +53,20 @@ discard block |
||
| 53 | 53 | if (window.yt.timing) {yt.timing.tick("ct");} |
| 54 | 54 | </script> |
| 55 | 55 | <?php |
| 56 | - $_video['dislikes'] = $__video_h->get_video_stars_level($_video['rid'], 1); |
|
| 56 | + $_video['dislikes'] = $__video_h->get_video_stars_level($_video['rid'], 1); |
|
| 57 | 57 | $_video['dislikes'] += $__video_h->get_video_stars_level($_video['rid'], 2); |
| 58 | 58 | |
| 59 | - $_video['likes'] = $__video_h->get_video_stars_level($_video['rid'], 4); |
|
| 60 | - $_video['likes'] += $__video_h->get_video_stars_level($_video['rid'], 5); |
|
| 59 | + $_video['likes'] = $__video_h->get_video_stars_level($_video['rid'], 4); |
|
| 60 | + $_video['likes'] += $__video_h->get_video_stars_level($_video['rid'], 5); |
|
| 61 | 61 | |
| 62 | 62 | $_video['dislikes'] += $__video_h->get_video_likes($_video['rid'], false); |
| 63 | 63 | $_video['likes'] += $__video_h->get_video_likes($_video['rid'], true); |
| 64 | 64 | |
| 65 | - if($_video['likes'] == 0 && $_video['dislikes'] == 0) { |
|
| 65 | + if ($_video['likes'] == 0 && $_video['dislikes'] == 0) { |
|
| 66 | 66 | $_video['likeswidth'] = 50; |
| 67 | 67 | $_video['dislikeswidth'] = 50; |
| 68 | 68 | } else { |
| 69 | - $_video['likeswidth'] = $_video['likes'] / ($_video['likes'] + $_video['dislikes']) * 100; |
|
| 69 | + $_video['likeswidth'] = $_video['likes']/($_video['likes'] + $_video['dislikes'])*100; |
|
| 70 | 70 | $_video['dislikeswidth'] = 100 - $_video['likeswidth']; |
| 71 | 71 | } |
| 72 | 72 | |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | </div> |
| 100 | 100 | <div id="instream_google_companion_ad_div"></div> |
| 101 | 101 | </div> |
| 102 | - <?php if(@$_SESSION['siteusername'] == $_video['author']) { ?> |
|
| 102 | + <?php if (@$_SESSION['siteusername'] == $_video['author']) { ?> |
|
| 103 | 103 | <div id="watch-owner-container"> |
| 104 | 104 | <div id="masthead-subnav" class="yt-nav yt-nav-dark "> |
| 105 | 105 | <ul class="yt-nav-aside"> |
@@ -134,7 +134,7 @@ discard block |
||
| 134 | 134 | title="" |
| 135 | 135 | id="subscribe-button" |
| 136 | 136 | type="button" |
| 137 | - class="<?php if($_video['subscribed']) { echo "subscribed "; } ?>yt-subscription-button yt-uix-button yt-uix-button-subscription yt-uix-tooltip" |
|
| 137 | + class="<?php if ($_video['subscribed']) { echo "subscribed "; } ?>yt-subscription-button yt-uix-button yt-uix-button-subscription yt-uix-tooltip" |
|
| 138 | 138 | role="button"> |
| 139 | 139 | <span class="yt-uix-button-icon-wrapper"> |
| 140 | 140 | <img class="yt-uix-button-icon yt-uix-button-icon-subscribe" src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt=""> |
@@ -226,7 +226,7 @@ discard block |
||
| 226 | 226 | <button onclick=";window.location.href=this.getAttribute('href');return false;" |
| 227 | 227 | title="I like this" |
| 228 | 228 | type="button" |
| 229 | - class="start <?php if($_video['liked']) { echo "liked "; } ?>yt-uix-tooltip-reverse yt-uix-button yt-uix-button-default yt-uix-tooltip" |
|
| 229 | + class="start <?php if ($_video['liked']) { echo "liked "; } ?>yt-uix-tooltip-reverse yt-uix-button yt-uix-button-default yt-uix-tooltip" |
|
| 230 | 230 | id="watch-like" |
| 231 | 231 | href="/get/like_video?v=<?php echo $_video['rid']; ?>" |
| 232 | 232 | role="button"><span class="yt-uix-button-icon-wrapper"> |
@@ -240,7 +240,7 @@ discard block |
||
| 240 | 240 | type="button" |
| 241 | 241 | style="margin-left: -2px;" |
| 242 | 242 | href="/get/dislike_video?v=<?php echo $_video['rid']; ?>" |
| 243 | - 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" |
|
| 243 | + 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" |
|
| 244 | 244 | id="watch-unlike" |
| 245 | 245 | role="button"> |
| 246 | 246 | <span class="yt-uix-button-icon-wrapper"> |
@@ -365,7 +365,7 @@ discard block |
||
| 365 | 365 | $stmt->execute(); |
| 366 | 366 | ?> |
| 367 | 367 | |
| 368 | - <?php if($stmt->rowCount() != 0) { ?> |
|
| 368 | + <?php if ($stmt->rowCount() != 0) { ?> |
|
| 369 | 369 | <div class="comments-section"> |
| 370 | 370 | <a class="comments-section-see-all" href="/video_response_view_all?v=<?php echo htmlspecialchars($_video['rid']); ?>"> |
| 371 | 371 | see all |
@@ -373,8 +373,8 @@ discard block |
||
| 373 | 373 | <h4>Video Responses</h4> |
| 374 | 374 | <ul class="video-list"> |
| 375 | 375 | <?php |
| 376 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
| 377 | - if($__video_h->video_exists($video['video'])) { |
|
| 376 | + while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
| 377 | + if ($__video_h->video_exists($video['video'])) { |
|
| 378 | 378 | $video = $__video_h->fetch_video_rid($video['video']); |
| 379 | 379 | $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
| 380 | 380 | $video['duration'] = $__time_h->timestamp($video['duration']); |
@@ -405,19 +405,19 @@ discard block |
||
| 405 | 405 | </h4> |
| 406 | 406 | </div> |
| 407 | 407 | </div> |
| 408 | - <?php if(!isset($_SESSION['siteusername'])) { ?> |
|
| 408 | + <?php if (!isset($_SESSION['siteusername'])) { ?> |
|
| 409 | 409 | <div class="comments-post-container clearfix"> |
| 410 | 410 | <div class="comments-post-alert"> |
| 411 | 411 | <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> |
| 412 | 412 | </div> |
| 413 | 413 | </div> |
| 414 | - <?php } else if($_video['commenting'] == "d") { ?> |
|
| 414 | + <?php } else if ($_video['commenting'] == "d") { ?> |
|
| 415 | 415 | <div class="comments-post-container clearfix"> |
| 416 | 416 | <div class="comments-post-alert"> |
| 417 | 417 | This video has comemnting disabled! |
| 418 | 418 | </div> |
| 419 | 419 | </div> |
| 420 | - <?php } else if($__user_h->if_blocked($_video['author'], $_SESSION['siteusername'])) { ?> |
|
| 420 | + <?php } else if ($__user_h->if_blocked($_video['author'], $_SESSION['siteusername'])) { ?> |
|
| 421 | 421 | <div class="comments-post-container clearfix"> |
| 422 | 422 | <div class="comments-post-alert"> |
| 423 | 423 | This user has blocked you! |
@@ -471,15 +471,15 @@ discard block |
||
| 471 | 471 | $stmt->execute(); |
| 472 | 472 | |
| 473 | 473 | $number_of_result = $stmt->rowCount(); |
| 474 | - $number_of_page = ceil ($number_of_result / $results_per_page); |
|
| 474 | + $number_of_page = ceil($number_of_result/$results_per_page); |
|
| 475 | 475 | |
| 476 | - if (!isset ($_GET['page']) ) { |
|
| 476 | + if (!isset ($_GET['page'])) { |
|
| 477 | 477 | $page = 1; |
| 478 | 478 | } else { |
| 479 | - $page = (int)$_GET['page']; |
|
| 479 | + $page = (int) $_GET['page']; |
|
| 480 | 480 | } |
| 481 | 481 | |
| 482 | - $page_first_result = ($page - 1) * $results_per_page; |
|
| 482 | + $page_first_result = ($page - 1)*$results_per_page; |
|
| 483 | 483 | |
| 484 | 484 | $stmt = $__db->prepare("SELECT * FROM comments WHERE toid = :rid ORDER BY id DESC LIMIT :pfirst, :pper"); |
| 485 | 485 | $stmt->bindParam(":rid", $_video['rid']); |
@@ -487,7 +487,7 @@ discard block |
||
| 487 | 487 | $stmt->bindParam(":pper", $results_per_page); |
| 488 | 488 | $stmt->execute(); |
| 489 | 489 | |
| 490 | - while($comment = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
| 490 | + while ($comment = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
| 491 | 491 | ?> |
| 492 | 492 | |
| 493 | 493 | <li class="comment yt-tile-default " data-author-viewing="" data-author-id="-uD01K8FQTeOSS5sniRFzQ" data-id="HdQrMeklJ_5hd_uPDRcvtdaMk2pMVS8d9sufcfiGx0U" data-score="0"> |
@@ -569,7 +569,7 @@ discard block |
||
| 569 | 569 | <?php |
| 570 | 570 | $stmt = $__db->prepare("SELECT * FROM videos ORDER BY rand() LIMIT 20"); |
| 571 | 571 | $stmt->execute(); |
| 572 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
| 572 | + while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
| 573 | 573 | $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
| 574 | 574 | $video['duration'] = $__time_h->timestamp($video['duration']); |
| 575 | 575 | $video['views'] = $__video_h->fetch_video_views($video['rid']); |
@@ -17,29 +17,29 @@ discard block |
||
| 17 | 17 | |
| 18 | 18 | $results_per_page = 12; |
| 19 | 19 | $number_of_result = $stmt->rowCount(); |
| 20 | - $number_of_page = ceil ($number_of_result / $results_per_page); |
|
| 20 | + $number_of_page = ceil($number_of_result/$results_per_page); |
|
| 21 | 21 | |
| 22 | - if (!isset ($_GET['page']) ) { |
|
| 22 | + if (!isset ($_GET['page'])) { |
|
| 23 | 23 | $page = 1; |
| 24 | 24 | } else { |
| 25 | - $page = (int)$_GET['page']; |
|
| 25 | + $page = (int) $_GET['page']; |
|
| 26 | 26 | } |
| 27 | 27 | |
| 28 | - $page_first_result = ($page - 1) * $results_per_page; |
|
| 28 | + $page_first_result = ($page - 1)*$results_per_page; |
|
| 29 | 29 | |
| 30 | - if($_GET['filter'] == "notification") { |
|
| 30 | + if ($_GET['filter'] == "notification") { |
|
| 31 | 31 | $stmt6 = $__db->prepare("SELECT * FROM pms WHERE touser = :search AND type = 'nt' ORDER BY id DESC LIMIT :pfirst, :pper"); |
| 32 | 32 | $stmt6->bindParam(":search", $search); |
| 33 | 33 | $stmt6->bindParam(":pfirst", $page_first_result); |
| 34 | 34 | $stmt6->bindParam(":pper", $results_per_page); |
| 35 | 35 | $stmt6->execute(); |
| 36 | - } else if($_GET['filter'] == "sent") { |
|
| 36 | + } else if ($_GET['filter'] == "sent") { |
|
| 37 | 37 | $stmt6 = $__db->prepare("SELECT * FROM pms WHERE owner = :search ORDER BY id DESC LIMIT :pfirst, :pper"); |
| 38 | 38 | $stmt6->bindParam(":search", $search); |
| 39 | 39 | $stmt6->bindParam(":pfirst", $page_first_result); |
| 40 | 40 | $stmt6->bindParam(":pper", $results_per_page); |
| 41 | 41 | $stmt6->execute(); |
| 42 | - } else if($_GET['filter'] == "pm") { |
|
| 42 | + } else if ($_GET['filter'] == "pm") { |
|
| 43 | 43 | $stmt6 = $__db->prepare("SELECT * FROM pms WHERE touser = :search AND type = 'nm' ORDER BY id DESC LIMIT :pfirst, :pper"); |
| 44 | 44 | $stmt6->bindParam(":search", $search); |
| 45 | 45 | $stmt6->bindParam(":pfirst", $page_first_result); |
@@ -68,8 +68,8 @@ discard block |
||
| 68 | 68 | </tr> |
| 69 | 69 | |
| 70 | 70 | <?php |
| 71 | - while($inbox = $stmt6->fetch(PDO::FETCH_ASSOC)) { |
|
| 72 | - if($__video_h->video_exists($inbox['video_attribute'])) { |
|
| 71 | + while ($inbox = $stmt6->fetch(PDO::FETCH_ASSOC)) { |
|
| 72 | + if ($__video_h->video_exists($inbox['video_attribute'])) { |
|
| 73 | 73 | $inbox['video'] = $__video_h->fetch_video_rid($inbox['video_attribute']); |
| 74 | 74 | $inbox['video_attr_exists'] = true; |
| 75 | 75 | |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | ?> |
| 84 | 84 | <tr style="margin-top: 5px;" id="videoslist"> |
| 85 | 85 | <!-- |
| 86 | - <?php if($inbox['readed'] == "n") { ?> |
|
| 86 | + <?php if ($inbox['readed'] == "n") { ?> |
|
| 87 | 87 | <a style="position:relative;top:7px;color: white;text-decoration: none;background-color: #d54343;padding: 7px;padding-left: 10px;margin-right: 12px;display: inline;" href="/inbox/"> |
| 88 | 88 | NEW |
| 89 | 89 | </a> |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | <td class="video-manager-stats" style="background: none;padding-left: 8px;"> |
| 107 | 107 | <h3><?php echo htmlspecialchars($inbox['subject']); ?></h3> |
| 108 | 108 | <?php echo $__video_h->shorten_description($inbox['message'], 300, true); ?> |
| 109 | - <?php if($inbox['video_attr_exists']) { ?> |
|
| 109 | + <?php if ($inbox['video_attr_exists']) { ?> |
|
| 110 | 110 | <hr> |
| 111 | 111 | <ul> |
| 112 | 112 | <li class="video-list-item "><a href="/watch?v=<?php echo $inbox['video']['rid']; ?>" class="video-list-item-link yt-uix-sessionlink" data-sessionlink="ei=CNLr3rbS3rICFSwSIQodSW397Q%3D%3D&feature=g-sptl%26cid%3Dinp-hs-ytg"><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="http://s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="<?php echo $inbox['video']['title']; ?>" data-thumb="/dynamic/thumbs/<?php echo $inbox['video']['thumbnail']; ?>" width="120"><span class="vertical-align"></span></span></span></span><span class="video-time"><?php echo $inbox['video']['duration']; ?></span> |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | $stmt->bindParam(":reciever", $name); |
| 20 | 20 | $stmt->execute(); |
| 21 | 21 | |
| 22 | -if($stmt->rowCount() == 1) { |
|
| 22 | +if ($stmt->rowCount() == 1) { |
|
| 23 | 23 | $_SESSION['error']->message = "You have already favorited this video."; |
| 24 | 24 | header('Location: ' . $_SERVER['HTTP_REFERER']); |
| 25 | 25 | die(); |
@@ -11,7 +11,7 @@ |
||
| 11 | 11 | <?php |
| 12 | 12 | $playlist = $__video_h->fetch_playlist_rid($_GET['playlist']); |
| 13 | 13 | |
| 14 | -if($playlist['author'] == $_SESSION['siteusername']) { |
|
| 14 | +if ($playlist['author'] == $_SESSION['siteusername']) { |
|
| 15 | 15 | $b = json_decode($playlist['videos']); |
| 16 | 16 | array_push($b, $_GET['id']); |
| 17 | 17 | $b = json_encode($b); |
@@ -7,7 +7,7 @@ discard block |
||
| 7 | 7 | <?php $__user_h = new user_helper($__db); ?> |
| 8 | 8 | <?php $__db_h = new db_helper(); ?> |
| 9 | 9 | <?php $__time_h = new time_helper(); ?> |
| 10 | -<?php if(!$__video_h->video_exists($_GET['v'])) { header("Location: /?error=This video doesn't exist!"); } ?> |
|
| 10 | +<?php if (!$__video_h->video_exists($_GET['v'])) { header("Location: /?error=This video doesn't exist!"); } ?> |
|
| 11 | 11 | <?php |
| 12 | 12 | $_video = $__video_h->fetch_video_rid($_GET['v']); |
| 13 | 13 | $_video['video_responses'] = $__video_h->get_video_responses($_video['rid']); |
@@ -80,19 +80,19 @@ discard block |
||
| 80 | 80 | </h4> |
| 81 | 81 | </div> |
| 82 | 82 | </div> |
| 83 | - <?php if(!isset($_SESSION['siteusername'])) { ?> |
|
| 83 | + <?php if (!isset($_SESSION['siteusername'])) { ?> |
|
| 84 | 84 | <div class="comments-post-container clearfix"> |
| 85 | 85 | <div class="comments-post-alert"> |
| 86 | 86 | <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> |
| 87 | 87 | </div> |
| 88 | 88 | </div> |
| 89 | - <?php } else if($_video['commenting'] == "d") { ?> |
|
| 89 | + <?php } else if ($_video['commenting'] == "d") { ?> |
|
| 90 | 90 | <div class="comments-post-container clearfix"> |
| 91 | 91 | <div class="comments-post-alert"> |
| 92 | 92 | This video has comemnting disabled! |
| 93 | 93 | </div> |
| 94 | 94 | </div> |
| 95 | - <?php } else if($__user_h->if_blocked($_video['author'], $_SESSION['siteusername'])) { ?> |
|
| 95 | + <?php } else if ($__user_h->if_blocked($_video['author'], $_SESSION['siteusername'])) { ?> |
|
| 96 | 96 | <div class="comments-post-container clearfix"> |
| 97 | 97 | <div class="comments-post-alert"> |
| 98 | 98 | This user has blocked you! |
@@ -139,15 +139,15 @@ discard block |
||
| 139 | 139 | $stmt->execute(); |
| 140 | 140 | |
| 141 | 141 | $number_of_result = $stmt->rowCount(); |
| 142 | - $number_of_page = ceil ($number_of_result / $results_per_page); |
|
| 142 | + $number_of_page = ceil($number_of_result/$results_per_page); |
|
| 143 | 143 | |
| 144 | - if (!isset ($_GET['page']) ) { |
|
| 144 | + if (!isset ($_GET['page'])) { |
|
| 145 | 145 | $page = 1; |
| 146 | 146 | } else { |
| 147 | - $page = (int)$_GET['page']; |
|
| 147 | + $page = (int) $_GET['page']; |
|
| 148 | 148 | } |
| 149 | 149 | |
| 150 | - $page_first_result = ($page - 1) * $results_per_page; |
|
| 150 | + $page_first_result = ($page - 1)*$results_per_page; |
|
| 151 | 151 | |
| 152 | 152 | $stmt = $__db->prepare("SELECT * FROM comments WHERE toid = :rid ORDER BY id DESC LIMIT :pfirst, :pper"); |
| 153 | 153 | $stmt->bindParam(":rid", $_video['rid']); |
@@ -155,7 +155,7 @@ discard block |
||
| 155 | 155 | $stmt->bindParam(":pper", $results_per_page); |
| 156 | 156 | $stmt->execute(); |
| 157 | 157 | |
| 158 | - while($comment = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
| 158 | + while ($comment = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
| 159 | 159 | ?> |
| 160 | 160 | |
| 161 | 161 | <li class="comment yt-tile-default " data-author-viewing="" data-author-id="-uD01K8FQTeOSS5sniRFzQ" data-id="HdQrMeklJ_5hd_uPDRcvtdaMk2pMVS8d9sufcfiGx0U" data-score="0"> |
@@ -7,7 +7,7 @@ discard block |
||
| 7 | 7 | <?php $__user_h = new user_helper($__db); ?> |
| 8 | 8 | <?php $__db_h = new db_helper(); ?> |
| 9 | 9 | <?php $__time_h = new time_helper(); ?> |
| 10 | -<?php if(!isset($_SESSION['siteusername'])) { header("Location: /sign_in"); } ?> |
|
| 10 | +<?php if (!isset($_SESSION['siteusername'])) { header("Location: /sign_in"); } ?> |
|
| 11 | 11 | <?php |
| 12 | 12 | $__server->page_embeds->page_title = "SubRocks - Subscriptions"; |
| 13 | 13 | $__server->page_embeds->page_description = "SubRocks is a site dedicated to bring back the 2012 layout of YouTube."; |
@@ -163,7 +163,7 @@ discard block |
||
| 163 | 163 | ?> |
| 164 | 164 | |
| 165 | 165 | <div class="my_videos_ajax"> |
| 166 | - <?php while($user = $stmt->fetch(PDO::FETCH_ASSOC)) { ?> |
|
| 166 | + <?php while ($user = $stmt->fetch(PDO::FETCH_ASSOC)) { ?> |
|
| 167 | 167 | <div style="width: 33%;display: inline-block;"> |
| 168 | 168 | <img style="width: 50px;height:50px;" src="/dynamic/pfp/<?php echo $__user_h->fetch_pfp($user['reciever']); ?>"> |
| 169 | 169 | <span style="display: inline-block; vertical-align:top;width: 100px;font-size: 11px;"> |
@@ -13,7 +13,7 @@ discard block |
||
| 13 | 13 | $__server->page_embeds->page_image = "/yt/imgbin/full-size-logo.png"; |
| 14 | 14 | $__server->page_embeds->page_url = "https://subrock.rocks/"; |
| 15 | 15 | ?> |
| 16 | -<?php if(!isset($_SESSION['siteusername'])) { header("Location: /sign_in"); } ?> |
|
| 16 | +<?php if (!isset($_SESSION['siteusername'])) { header("Location: /sign_in"); } ?> |
|
| 17 | 17 | <?php $_video = $__video_h->fetch_video_rid($_GET['id']); ?> |
| 18 | 18 | <!DOCTYPE html> |
| 19 | 19 | <html dir="ltr"> |
@@ -177,7 +177,7 @@ discard block |
||
| 177 | 177 | <b>Category</b> <br> |
| 178 | 178 | <select style="margin-top:5px;" name="category" class="yt-uix-button yt-uix-button-default"> |
| 179 | 179 | <?php $categories = ["None", "Film & Animation", "Autos & Vehicles", "Music", "Pets & Animals", "Sports", "Travel & Events", "Gaming", "People & Blogs", "Comedy", "Entertainment", "News & Politics", "Howto & Style", "Education", "Science & Technology", "Nonprofits & Activism"]; ?> |
| 180 | - <?php foreach($categories as $categoryTag) { ?> |
|
| 180 | + <?php foreach ($categories as $categoryTag) { ?> |
|
| 181 | 181 | <option value="<?php echo $categoryTag; ?>"><?php echo $categoryTag; ?></option> |
| 182 | 182 | <?php } ?> |
| 183 | 183 | </select><br><br> |