@@ -14,15 +14,15 @@ discard block |
||
14 | 14 | <?php |
15 | 15 | $_video = $__video_h->fetch_video_rid($_SESSION['current_video']); |
16 | 16 | |
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", $_SESSION['current_video']); |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | |
38 | 38 | header("Content-type: text/xml"); |
39 | 39 | // ugly solution |
40 | -if(!isset($error['status'])) { |
|
40 | +if (!isset($error['status'])) { |
|
41 | 41 | $xml = '<?xml version="1.0" encoding="utf-8"?><root><str_code><![CDATA[OK]]></str_code><html_content><![CDATA[<li class="comment yt-tile-default " data-author-viewing="" data-author-id="-uD01K8FQTeOSS5sniRFzQ" data-id="420" data-score="0"><div class="comment-body"><div class="content-container"><div class="content"><div class="comment-text" dir="ltr"><p>' . $__video_h->shorten_description($_POST['comment'], 2048, true) . '</p></div><p class="metadata"><span class="author "><a href="/user/' . htmlspecialchars($_SESSION['siteusername']) . '" class="yt-uix-sessionlink yt-user-name " data-sessionlink="' . htmlspecialchars($_SESSION['siteusername']) . '" dir="ltr">' . htmlspecialchars($_SESSION['siteusername']) . '</a></span><span class="time" dir="ltr"><span dir="ltr">just now<span></span></span></span></p></div><div class="comment-actions"><span class="yt-uix-button-group"><button type="button" class="start comment-action-vote-up comment-action yt-uix-button yt-uix-button-default yt-uix-tooltip yt-uix-button-empty" onclick=";return false;" title="Vote Up" data-action="vote-up" data-tooltip-show-delay="300" role="button"><span class="yt-uix-button-icon-wrapper"><img class="yt-uix-button-icon yt-uix-button-icon-watch-comment-vote-up" src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Vote Up"><span class="yt-valign-trick"></span></span></button><button type="button" class="end comment-action-vote-down comment-action yt-uix-button yt-uix-button-default yt-uix-tooltip yt-uix-button-empty" onclick=";return false;" title="Vote Down" data-action="vote-down" data-tooltip-show-delay="300" role="button"><span class="yt-uix-button-icon-wrapper"><img class="yt-uix-button-icon yt-uix-button-icon-watch-comment-vote-down" src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Vote Down"><span class="yt-valign-trick"></span></span></button></span><span class="yt-uix-button-group"><!--<button type="button" class="start comment-action yt-uix-button yt-uix-button-default" onclick=";return false;" data-action="reply" role="button"><span class="yt-uix-button-content">Reply </span></button>--><button type="button" class="end flip yt-uix-button yt-uix-button-default yt-uix-button-empty" onclick=";return false;" data-button-has-sibling-menu="true" role="button" aria-pressed="false" aria-expanded="false" aria-haspopup="true" aria-activedescendant=""><img class="yt-uix-button-arrow" src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt=""><div class=" yt-uix-button-menu yt-uix-button-menu-default" style="display: none;"><ul><li class="comment-action" data-action="share"><span class="yt-uix-button-menu-item">Share</span></li><li class="comment-action-remove comment-action" data-action="remove"><span class="yt-uix-button-menu-item">Remove</span></li><li class="comment-action" data-action="flag"><span class="yt-uix-button-menu-item">Flag for spam</span></li><li class="comment-action-block comment-action" data-action="block"><span class="yt-uix-button-menu-item">Block User</span></li><li class="comment-action-unblock comment-action" data-action="unblock"><span class="yt-uix-button-menu-item">Unblock User</span></li></ul></div></button></span></div></div></div></li>]]></html_content><return_code><![CDATA[0]]></return_code></root>'; |
42 | 42 | } else { |
43 | 43 | $xml = '<?xml version="1.0" encoding="utf-8"?><root><str_code><![CDATA[OK]]></str_code><html_content><![CDATA[<div class="yt-alert yt-alert-default yt-alert-error "> <div class="yt-alert-icon"><img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" class="icon master-sprite" alt="Alert icon"></div><div class="yt-alert-buttons"></div><div class="yt-alert-content" role="alert"><span class="yt-alert-vertical-trick"></span><div class="yt-alert-message">You are under a cooldown!</div></div></div>]]></html_content><return_code><![CDATA[0]]></return_code></root>'; |
@@ -8,36 +8,36 @@ |
||
8 | 8 | <?php $__db_h = new db_helper(); ?> |
9 | 9 | <?php $__time_h = new time_helper(); ob_start(); ?> |
10 | 10 | <?php |
11 | - $request = (object) [ |
|
12 | - "search_term" => $_SESSION['siteusername'], |
|
13 | - "like_search_term" => "%" . $_SESSION['siteusername'] . "%", |
|
14 | - "search_amount" => 0 /* [fallback] */ |
|
15 | - ]; |
|
11 | + $request = (object) [ |
|
12 | + "search_term" => $_SESSION['siteusername'], |
|
13 | + "like_search_term" => "%" . $_SESSION['siteusername'] . "%", |
|
14 | + "search_amount" => 0 /* [fallback] */ |
|
15 | + ]; |
|
16 | 16 | |
17 | - $stmt = $__db->prepare("SELECT * FROM playlists WHERE lower(author) LIKE lower(:search) "); |
|
18 | - $stmt->bindParam(":search", $request->like_search_term); |
|
19 | - $stmt->execute(); |
|
20 | - $request->search_amount = $stmt->rowCount(); |
|
17 | + $stmt = $__db->prepare("SELECT * FROM playlists WHERE lower(author) LIKE lower(:search) "); |
|
18 | + $stmt->bindParam(":search", $request->like_search_term); |
|
19 | + $stmt->execute(); |
|
20 | + $request->search_amount = $stmt->rowCount(); |
|
21 | 21 | |
22 | - $results_per_page = 12; |
|
23 | - $number_of_result = $request->search_amount; |
|
24 | - $number_of_page = ceil ($number_of_result / $results_per_page); |
|
22 | + $results_per_page = 12; |
|
23 | + $number_of_result = $request->search_amount; |
|
24 | + $number_of_page = ceil ($number_of_result / $results_per_page); |
|
25 | 25 | |
26 | - if (!isset ($_GET['page']) ) { |
|
27 | - $page = 1; |
|
28 | - } else { |
|
29 | - $page = (int)$_GET['page']; |
|
30 | - } |
|
26 | + if (!isset ($_GET['page']) ) { |
|
27 | + $page = 1; |
|
28 | + } else { |
|
29 | + $page = (int)$_GET['page']; |
|
30 | + } |
|
31 | 31 | |
32 | - $page_first_result = ($page - 1) * $results_per_page; |
|
32 | + $page_first_result = ($page - 1) * $results_per_page; |
|
33 | 33 | |
34 | - $stmt6 = $__db->prepare("SELECT * FROM playlists WHERE lower(author) LIKE lower(:search) ORDER BY id DESC LIMIT :pfirst, :pper"); |
|
35 | - $stmt6->bindParam(":search", $request->like_search_term); |
|
36 | - $stmt6->bindParam(":pfirst", $page_first_result); |
|
37 | - $stmt6->bindParam(":pper", $results_per_page); |
|
38 | - $stmt6->execute(); |
|
34 | + $stmt6 = $__db->prepare("SELECT * FROM playlists WHERE lower(author) LIKE lower(:search) ORDER BY id DESC LIMIT :pfirst, :pper"); |
|
35 | + $stmt6->bindParam(":search", $request->like_search_term); |
|
36 | + $stmt6->bindParam(":pfirst", $page_first_result); |
|
37 | + $stmt6->bindParam(":pper", $results_per_page); |
|
38 | + $stmt6->execute(); |
|
39 | 39 | |
40 | - /* TODO :: Easy & Clean Pagination Class PLZ :((( ))) */ |
|
40 | + /* TODO :: Easy & Clean Pagination Class PLZ :((( ))) */ |
|
41 | 41 | ?> |
42 | 42 | <table style="width: 100%;"> |
43 | 43 | <tr> |
@@ -21,15 +21,15 @@ discard block |
||
21 | 21 | |
22 | 22 | $results_per_page = 12; |
23 | 23 | $number_of_result = $request->search_amount; |
24 | - $number_of_page = ceil ($number_of_result / $results_per_page); |
|
24 | + $number_of_page = ceil($number_of_result/$results_per_page); |
|
25 | 25 | |
26 | - if (!isset ($_GET['page']) ) { |
|
26 | + if (!isset ($_GET['page'])) { |
|
27 | 27 | $page = 1; |
28 | 28 | } else { |
29 | - $page = (int)$_GET['page']; |
|
29 | + $page = (int) $_GET['page']; |
|
30 | 30 | } |
31 | 31 | |
32 | - $page_first_result = ($page - 1) * $results_per_page; |
|
32 | + $page_first_result = ($page - 1)*$results_per_page; |
|
33 | 33 | |
34 | 34 | $stmt6 = $__db->prepare("SELECT * FROM playlists WHERE lower(author) LIKE lower(:search) ORDER BY id DESC LIMIT :pfirst, :pper"); |
35 | 35 | $stmt6->bindParam(":search", $request->like_search_term); |
@@ -50,10 +50,10 @@ discard block |
||
50 | 50 | </tr> |
51 | 51 | |
52 | 52 | <?php |
53 | - while($playlist = $stmt6->fetch(PDO::FETCH_ASSOC)) { |
|
53 | + while ($playlist = $stmt6->fetch(PDO::FETCH_ASSOC)) { |
|
54 | 54 | $playlist['videos'] = json_decode($playlist['videos']); |
55 | - if($__video_h->video_exists(@$playlist['videos'][0])) { |
|
56 | - if(count($playlist['videos']) != 0) { |
|
55 | + if ($__video_h->video_exists(@$playlist['videos'][0])) { |
|
56 | + if (count($playlist['videos']) != 0) { |
|
57 | 57 | $video = $__video_h->fetch_video_rid($playlist['videos'][0]); |
58 | 58 | $video['video_responses'] = $__video_h->get_video_responses($video['rid']); |
59 | 59 | $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
@@ -13,7 +13,7 @@ |
||
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 $_playlist = $__video_h->fetch_playlist_rid($_GET['id']); ?> |
18 | 18 | <!DOCTYPE html> |
19 | 19 | <html dir="ltr"> |
@@ -8,10 +8,10 @@ |
||
8 | 8 | <?php $__db_h = new db_helper(); ?> |
9 | 9 | <?php $__time_h = new time_helper(); ?> |
10 | 10 | <?php |
11 | - $__server->page_embeds->page_title = "SubRocks - Edit Playlist"; |
|
12 | - $__server->page_embeds->page_description = "SubRocks is a site dedicated to bring back the 2012 layout of YouTube."; |
|
13 | - $__server->page_embeds->page_image = "/yt/imgbin/full-size-logo.png"; |
|
14 | - $__server->page_embeds->page_url = "https://subrock.rocks/"; |
|
11 | + $__server->page_embeds->page_title = "SubRocks - Edit Playlist"; |
|
12 | + $__server->page_embeds->page_description = "SubRocks is a site dedicated to bring back the 2012 layout of YouTube."; |
|
13 | + $__server->page_embeds->page_image = "/yt/imgbin/full-size-logo.png"; |
|
14 | + $__server->page_embeds->page_url = "https://subrock.rocks/"; |
|
15 | 15 | ?> |
16 | 16 | <?php if(!isset($_SESSION['siteusername'])) { header("Location: /sign_in"); } ?> |
17 | 17 | <?php $_playlist = $__video_h->fetch_playlist_rid($_GET['id']); ?> |
@@ -13,8 +13,8 @@ |
||
13 | 13 | <?php |
14 | 14 | $video = $__video_h->fetch_video_rid($_GET['id']); |
15 | 15 | |
16 | -if($video['author'] == $_SESSION['siteusername']) { |
|
17 | - if($video['commenting'] == "a") { |
|
16 | +if ($video['author'] == $_SESSION['siteusername']) { |
|
17 | + if ($video['commenting'] == "a") { |
|
18 | 18 | $__video_u->update_row($_GET['id'], "commenting", "d"); |
19 | 19 | } else { |
20 | 20 | $__video_u->update_row($_GET['id'], "commenting", "a"); |
@@ -12,11 +12,11 @@ |
||
12 | 12 | <?php |
13 | 13 | |
14 | 14 | if($video['author'] == $_SESSION['siteusername']) { |
15 | - $stmt = $__db->prepare("DELETE FROM videos WHERE rid=:rid AND author=:author"); |
|
16 | - $stmt->execute(array( |
|
15 | + $stmt = $__db->prepare("DELETE FROM videos WHERE rid=:rid AND author=:author"); |
|
16 | + $stmt->execute(array( |
|
17 | 17 | ':author' => $video['author'], |
18 | 18 | ':rid' => $video['rid'], |
19 | - )); |
|
19 | + )); |
|
20 | 20 | } |
21 | 21 | |
22 | 22 | header('Location: /my_videos'); |
@@ -11,7 +11,7 @@ |
||
11 | 11 | <?php $video = $__video_h->fetch_video_rid($_GET['id']); ?> |
12 | 12 | <?php |
13 | 13 | |
14 | -if($video['author'] == $_SESSION['siteusername']) { |
|
14 | +if ($video['author'] == $_SESSION['siteusername']) { |
|
15 | 15 | $stmt = $__db->prepare("DELETE FROM videos WHERE rid=:rid AND author=:author"); |
16 | 16 | $stmt->execute(array( |
17 | 17 | ':author' => $video['author'], |
@@ -12,7 +12,7 @@ |
||
12 | 12 | <?php $__time_h = new time_helper(); ?> |
13 | 13 | <?php |
14 | 14 | $_playlist = $__video_h->fetch_playlist_rid($_GET['v']); |
15 | - if($_playlist['author'] != @$_SESSION['siteusername']) { |
|
15 | + if ($_playlist['author'] != @$_SESSION['siteusername']) { |
|
16 | 16 | die(); |
17 | 17 | } |
18 | 18 |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | <?php $__time_h = new time_helper(); ?> |
13 | 13 | <?php |
14 | 14 | $_video = $__video_h->fetch_video_rid($_GET['v']); |
15 | - if($_video['author'] != @$_SESSION['siteusername']) { |
|
15 | + if ($_video['author'] != @$_SESSION['siteusername']) { |
|
16 | 16 | die(); |
17 | 17 | } |
18 | 18 | |
@@ -37,8 +37,8 @@ discard block |
||
37 | 37 | // $__video_u->update_row($_GET['v'], "thumbnail", $request->thumbnail); |
38 | 38 | $__video_u->update_row($_GET['v'], "category", $request->category); |
39 | 39 | |
40 | - if($_SERVER['REQUEST_METHOD'] == 'POST' && @$_FILES['thumbnail']) { |
|
41 | - if(!empty($_FILES["thumbnail"]["name"])) { |
|
40 | + if ($_SERVER['REQUEST_METHOD'] == 'POST' && @$_FILES['thumbnail']) { |
|
41 | + if (!empty($_FILES["thumbnail"]["name"])) { |
|
42 | 42 | $target_dir = "dynamic/thumbs/"; |
43 | 43 | $imageFileType = strtolower(pathinfo($_FILES["thumbnail"]["name"], PATHINFO_EXTENSION)); |
44 | 44 | $target_name = md5_file($_FILES["thumbnail"]["tmp_name"]) . "." . $imageFileType; |
@@ -48,8 +48,8 @@ discard block |
||
48 | 48 | $uploadOk = true; |
49 | 49 | $movedFile = false; |
50 | 50 | |
51 | - if($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg" |
|
52 | - && $imageFileType != "gif" ) { |
|
51 | + if ($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg" |
|
52 | + && $imageFileType != "gif") { |
|
53 | 53 | $fileerror = 'unsupported file type. must be jpg, png, jpeg, or gif'; |
54 | 54 | $uploadOk = false; |
55 | 55 | goto skip; |
@@ -23,7 +23,7 @@ |
||
23 | 23 | "description" => $_POST['description'], |
24 | 24 | "tags" => $_POST['tags'], |
25 | 25 | "privacy" => $_POST['privacy'], |
26 | - /* |
|
26 | + /* |
|
27 | 27 | Public : n |
28 | 28 | Unlisted : u |
29 | 29 | Private : v |
@@ -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(parse_url($_SERVER["REQUEST_URI"], PHP_URL_PATH) != $_tab->url) |
|
42 | + <?php foreach ($__tabs as $_tab) { |
|
43 | + if (parse_url($_SERVER["REQUEST_URI"], PHP_URL_PATH) != $_tab->url) |
|
44 | 44 | $_tab->selected = true; |
45 | 45 | ?> |
46 | 46 | <li class="menu-item"> |
@@ -40,8 +40,9 @@ |
||
40 | 40 | <div id="browse-side-column" class="ytg-2col ytg-last"> |
41 | 41 | <ol class="navigation-menu"> |
42 | 42 | <?php foreach($__tabs as $_tab) { |
43 | - if(parse_url($_SERVER["REQUEST_URI"], PHP_URL_PATH) != $_tab->url) |
|
44 | - $_tab->selected = true; |
|
43 | + if(parse_url($_SERVER["REQUEST_URI"], PHP_URL_PATH) != $_tab->url) { |
|
44 | + $_tab->selected = true; |
|
45 | + } |
|
45 | 46 | ?> |
46 | 47 | <li class="menu-item"> |
47 | 48 | <a class="<?php echo $_tab->selected ? true : "selected"; ?>" href="<?php echo $_tab->url; ?>"> |
@@ -12,26 +12,26 @@ |
||
12 | 12 | <?php $__db_h = new db_helper(); ?> |
13 | 13 | <?php $__time_h = new time_helper(); ?> |
14 | 14 | <?php |
15 | - if(!$__video_h->video_exists($_GET['v'])) |
|
16 | - header("Location: /?error=Your video has not processed correctly. Try reuploading it with a shorter title, description, or tag."); |
|
15 | + if(!$__video_h->video_exists($_GET['v'])) |
|
16 | + header("Location: /?error=Your video has not processed correctly. Try reuploading it with a shorter title, description, or tag."); |
|
17 | 17 | |
18 | - $_video = $__video_h->fetch_video_rid($_GET['v']); |
|
19 | - $_video['video_responses'] = $__video_h->get_video_responses($_video['rid']); |
|
20 | - $_video['age'] = $__time_h->time_elapsed_string($_video['publish']); |
|
21 | - $_video['duration'] = $__time_h->timestamp($_video['duration']); |
|
22 | - $_video['views'] = $__video_h->fetch_video_views($_video['rid']); |
|
23 | - $_video['author'] = htmlspecialchars($_video['author']); |
|
24 | - $_video['title'] = htmlspecialchars($_video['title']); |
|
25 | - $_video['description'] = $__video_h->shorten_description($_video['description'], 50); |
|
18 | + $_video = $__video_h->fetch_video_rid($_GET['v']); |
|
19 | + $_video['video_responses'] = $__video_h->get_video_responses($_video['rid']); |
|
20 | + $_video['age'] = $__time_h->time_elapsed_string($_video['publish']); |
|
21 | + $_video['duration'] = $__time_h->timestamp($_video['duration']); |
|
22 | + $_video['views'] = $__video_h->fetch_video_views($_video['rid']); |
|
23 | + $_video['author'] = htmlspecialchars($_video['author']); |
|
24 | + $_video['title'] = htmlspecialchars($_video['title']); |
|
25 | + $_video['description'] = $__video_h->shorten_description($_video['description'], 50); |
|
26 | 26 | |
27 | 27 | if($_SESSION['siteusername'] != $_video['author']) |
28 | 28 | header("Location: /"); |
29 | 29 | ?> |
30 | 30 | <?php |
31 | - $__server->page_embeds->page_title = "SubRocks - Uploaded Video"; |
|
32 | - $__server->page_embeds->page_description = "SubRocks is a site dedicated to bring back the 2012 layout of YouTube."; |
|
33 | - $__server->page_embeds->page_image = "/yt/imgbin/full-size-logo.png"; |
|
34 | - $__server->page_embeds->page_url = "https://subrock.rocks/"; |
|
31 | + $__server->page_embeds->page_title = "SubRocks - Uploaded Video"; |
|
32 | + $__server->page_embeds->page_description = "SubRocks is a site dedicated to bring back the 2012 layout of YouTube."; |
|
33 | + $__server->page_embeds->page_image = "/yt/imgbin/full-size-logo.png"; |
|
34 | + $__server->page_embeds->page_url = "https://subrock.rocks/"; |
|
35 | 35 | ?> |
36 | 36 | <!DOCTYPE html> |
37 | 37 | <html> |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | <?php $__db_h = new db_helper(); ?> |
13 | 13 | <?php $__time_h = new time_helper(); ?> |
14 | 14 | <?php |
15 | - if(!$__video_h->video_exists($_GET['v'])) |
|
15 | + if (!$__video_h->video_exists($_GET['v'])) |
|
16 | 16 | header("Location: /?error=Your video has not processed correctly. Try reuploading it with a shorter title, description, or tag."); |
17 | 17 | |
18 | 18 | $_video = $__video_h->fetch_video_rid($_GET['v']); |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | $_video['title'] = htmlspecialchars($_video['title']); |
25 | 25 | $_video['description'] = $__video_h->shorten_description($_video['description'], 50); |
26 | 26 | |
27 | - if($_SESSION['siteusername'] != $_video['author']) |
|
27 | + if ($_SESSION['siteusername'] != $_video['author']) |
|
28 | 28 | header("Location: /"); |
29 | 29 | ?> |
30 | 30 | <?php |
@@ -12,8 +12,9 @@ discard block |
||
12 | 12 | <?php $__db_h = new db_helper(); ?> |
13 | 13 | <?php $__time_h = new time_helper(); ?> |
14 | 14 | <?php |
15 | - if(!$__video_h->video_exists($_GET['v'])) |
|
16 | - header("Location: /?error=Your video has not processed correctly. Try reuploading it with a shorter title, description, or tag."); |
|
15 | + if(!$__video_h->video_exists($_GET['v'])) { |
|
16 | + header("Location: /?error=Your video has not processed correctly. Try reuploading it with a shorter title, description, or tag."); |
|
17 | + } |
|
17 | 18 | |
18 | 19 | $_video = $__video_h->fetch_video_rid($_GET['v']); |
19 | 20 | $_video['video_responses'] = $__video_h->get_video_responses($_video['rid']); |
@@ -24,9 +25,10 @@ discard block |
||
24 | 25 | $_video['title'] = htmlspecialchars($_video['title']); |
25 | 26 | $_video['description'] = $__video_h->shorten_description($_video['description'], 50); |
26 | 27 | |
27 | - if($_SESSION['siteusername'] != $_video['author']) |
|
28 | - header("Location: /"); |
|
29 | -?> |
|
28 | + if($_SESSION['siteusername'] != $_video['author']) { |
|
29 | + header("Location: /"); |
|
30 | + } |
|
31 | + ?> |
|
30 | 32 | <?php |
31 | 33 | $__server->page_embeds->page_title = "SubRocks - Uploaded Video"; |
32 | 34 | $__server->page_embeds->page_description = "SubRocks is a site dedicated to bring back the 2012 layout of YouTube."; |