@@ -39,7 +39,7 @@ |
||
| 39 | 39 | $stmt = $__db->prepare("SELECT * FROM videos WHERE author = :username ORDER BY id DESC LIMIT 20"); |
| 40 | 40 | $stmt->bindParam(":username", $_video['author']); |
| 41 | 41 | $stmt->execute(); |
| 42 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
| 42 | + while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
| 43 | 43 | $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
| 44 | 44 | $video['duration'] = $__time_h->timestamp($video['duration']); |
| 45 | 45 | $video['views'] = $__video_h->fetch_video_views($video['rid']); |
@@ -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']); |
@@ -39,8 +39,8 @@ |
||
| 39 | 39 | ?> |
| 40 | 40 | <div id="browse-side-column" class="ytg-2col ytg-last"> |
| 41 | 41 | <ol class="navigation-menu"> |
| 42 | - <?php foreach($__tabs as $_tab) { |
|
| 43 | - if($_SERVER['REQUEST_URI'] != $_tab->url) |
|
| 42 | + <?php foreach ($__tabs as $_tab) { |
|
| 43 | + if ($_SERVER['REQUEST_URI'] != $_tab->url) |
|
| 44 | 44 | $_tab->selected = true; |
| 45 | 45 | ?> |
| 46 | 46 | <li class="menu-item"> |
@@ -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); |
@@ -5,7 +5,7 @@ discard block |
||
| 5 | 5 | <a id="logo-container" href="/" title="SubRocks home"> |
| 6 | 6 | <img id="logo" src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="SubRocks home"> |
| 7 | 7 | </a> |
| 8 | - <?php if(!isset($_SESSION['siteusername'])) { ?> |
|
| 8 | + <?php if (!isset($_SESSION['siteusername'])) { ?> |
|
| 9 | 9 | <div id="yt-masthead-signin"> |
| 10 | 10 | <div id="masthead-user-display"><span id="masthead-user-wrapper"><button href="/sign_in" type="button" id="masthead-user-button" onclick=";window.location.href=this.getAttribute('href');return false;" class=" yt-uix-button yt-uix-button-text" role="button"><span class="yt-uix-button-content"> <span id="masthead-user-image"> |
| 11 | 11 | <span class="clip"> |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | <span id="yt-masthead-user-displayname" dir="ltr" class="yt-valign-container" onclick="yt.www.masthead.toggleExpandedMasthead();"> |
| 24 | 24 | <?php echo htmlspecialchars($_SESSION['siteusername']); ?> |
| 25 | 25 | </span> |
| 26 | - <?php if($__user_h->fetch_unread_pms($_SESSION['siteusername']) != 0) { ?> |
|
| 26 | + <?php if ($__user_h->fetch_unread_pms($_SESSION['siteusername']) != 0) { ?> |
|
| 27 | 27 | <a style="border-radius:2px;font-weight:bold;border:1px solid #CE4D34;position:relative;top:1px;color: white;text-decoration: none;background-color: #E26148;padding: 7px;padding-left: 10px;margin-right: 12px;display: inline;" href="/inbox/"> |
| 28 | 28 | <?php echo $__user_h->fetch_unread_pms($_SESSION['siteusername']); ?> |
| 29 | 29 | </a> |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | </form> |
| 46 | 46 | </div> |
| 47 | 47 | </div></div> |
| 48 | -<?php if(isset($_SESSION['siteusername'])) { ?> |
|
| 48 | +<?php if (isset($_SESSION['siteusername'])) { ?> |
|
| 49 | 49 | <div id="masthead-expanded" class="hid" style="display: none;"> |
| 50 | 50 | <div id="masthead-expanded-container" class="with-sandbar"> |
| 51 | 51 | <div class="yt-uix-slider yt-rounded" id="watch-channel-discoverbox" data-slider-slide-selected="3" data-slider-slides="4" |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | $stmt = $__db->prepare("SELECT * FROM videos WHERE author = :username ORDER BY id DESC LIMIT 20"); |
| 67 | 67 | $stmt->bindParam(":username", $_SESSION['siteusername']); |
| 68 | 68 | $stmt->execute(); |
| 69 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
| 69 | + while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
| 70 | 70 | $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
| 71 | 71 | $video['duration'] = $__time_h->timestamp($video['duration']); |
| 72 | 72 | $video['views'] = $__video_h->fetch_video_views($video['rid']); |
@@ -210,7 +210,7 @@ discard block |
||
| 210 | 210 | <?php } ?> |
| 211 | 211 | </div> |
| 212 | 212 | <div id="alerts"> |
| 213 | - <?php if(isset($error['status'])) { ?> |
|
| 213 | + <?php if (isset($error['status'])) { ?> |
|
| 214 | 214 | <div id="masthead_child_div"><div class="yt-alert yt-alert-default yt-alert-error yt-alert-player"> <div class="yt-alert-icon"> |
| 215 | 215 | <img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" class="icon master-sprite" alt="Alert icon"> |
| 216 | 216 | </div> |
@@ -220,7 +220,7 @@ discard block |
||
| 220 | 220 | </div> |
| 221 | 221 | </div></div></div> |
| 222 | 222 | <?php } ?> |
| 223 | - <?php if(isset($_GET['error'])) { ?> |
|
| 223 | + <?php if (isset($_GET['error'])) { ?> |
|
| 224 | 224 | <div id="masthead_child_div"><div class="yt-alert yt-alert-default yt-alert-error "> <div class="yt-alert-icon"> |
| 225 | 225 | <img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" class="icon master-sprite" alt="Alert icon"> |
| 226 | 226 | </div> |
@@ -230,7 +230,7 @@ discard block |
||
| 230 | 230 | </div> |
| 231 | 231 | </div></div></div> |
| 232 | 232 | <?php } ?> |
| 233 | - <?php if(isset($_GET['success'])) { ?> |
|
| 233 | + <?php if (isset($_GET['success'])) { ?> |
|
| 234 | 234 | <div id="masthead_child_div"><div class="yt-alert yt-alert-default yt-alert-success "> <div class="yt-alert-icon"> |
| 235 | 235 | <img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" class="icon master-sprite" alt="Alert icon"> |
| 236 | 236 | </div> |
@@ -240,7 +240,7 @@ discard block |
||
| 240 | 240 | </div> |
| 241 | 241 | </div></div></div> |
| 242 | 242 | <?php } ?> |
| 243 | - <?php if(isset($_SESSION['error'])) { ?> |
|
| 243 | + <?php if (isset($_SESSION['error'])) { ?> |
|
| 244 | 244 | <div id="masthead_child_div"><div class="yt-alert yt-alert-default yt-alert-error"> <div class="yt-alert-icon"> |
| 245 | 245 | <img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" class="icon master-sprite" alt="Alert icon"> |
| 246 | 246 | </div> |