@@ -253,8 +253,9 @@ |
||
| 253 | 253 | </div> |
| 254 | 254 | </li> |
| 255 | 255 | <?php } ?> |
| 256 | - <?php if($request->search_amount == 0) |
|
| 256 | + <?php if($request->search_amount == 0) { |
|
| 257 | 257 | echo "Your search query has brought no results.<br><br>"; |
| 258 | +} |
|
| 258 | 259 | ?> |
| 259 | 260 | </ol> |
| 260 | 261 | </div> |
@@ -14,11 +14,13 @@ |
||
| 14 | 14 | "action" => "l" /* fallback */ |
| 15 | 15 | ]; |
| 16 | 16 | |
| 17 | -if(!isset($_SESSION['siteusername']) || !isset($_GET['id'])) |
|
| 18 | - header('Location: ' . $_SERVER['HTTP_REFERER']); |
|
| 17 | +if(!isset($_SESSION['siteusername']) || !isset($_GET['id'])) { |
|
| 18 | + header('Location: ' . $_SERVER['HTTP_REFERER']); |
|
| 19 | +} |
|
| 19 | 20 | |
| 20 | -if(isset($_GET['a']) && $_GET['a'] == "-1") |
|
| 21 | +if(isset($_GET['a']) && $_GET['a'] == "-1") { |
|
| 21 | 22 | $request->action = "d"; |
| 23 | +} |
|
| 22 | 24 | |
| 23 | 25 | $stmt = $__db->prepare("SELECT * FROM comment_likes WHERE sender = :username AND reciever = :reciever AND type = 'l'"); |
| 24 | 26 | $stmt->bindParam(":username", $_SESSION['siteusername']); |
@@ -197,8 +197,9 @@ |
||
| 197 | 197 | if(!empty($_POST['solidcolor'])) { |
| 198 | 198 | $__user_u->update_row($_SESSION['siteusername'], "2012_bgoption", $_POST['bgoption']); |
| 199 | 199 | |
| 200 | - if($_POST['bgoption'] == "solid") |
|
| 201 | - $__user_u->update_row($_SESSION['siteusername'], "2009_bg", ""); |
|
| 200 | + if($_POST['bgoption'] == "solid") { |
|
| 201 | + $__user_u->update_row($_SESSION['siteusername'], "2009_bg", ""); |
|
| 202 | + } |
|
| 202 | 203 | |
| 203 | 204 | $__user_u->update_row($_SESSION['siteusername'], "primary_color", $_POST['solidcolor']); |
| 204 | 205 | } |
@@ -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,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."; |
@@ -15,11 +15,13 @@ 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 | - if(isset($_SESSION['siteusername'])) |
|
| 22 | - $__video_h->check_view($_GET['v'], @$_SESSION['siteusername']); |
|
| 22 | + if(isset($_SESSION['siteusername'])) { |
|
| 23 | + $__video_h->check_view($_GET['v'], @$_SESSION['siteusername']); |
|
| 24 | + } |
|
| 23 | 25 | |
| 24 | 26 | $_SESSION['current_video'] = $_video['rid']; |
| 25 | 27 | |
@@ -739,10 +741,11 @@ discard block |
||
| 739 | 741 | $stmt->execute(); |
| 740 | 742 | |
| 741 | 743 | while($comment = $stmt->fetch(PDO::FETCH_ASSOC)) { |
| 742 | - if($__video_h->if_comment_liked($comment['id'], $_SESSION['siteusername'], true)) |
|
| 743 | - $comment['liked'] = true; |
|
| 744 | - else if($__video_h->if_comment_liked($comment['id'], $_SESSION['siteusername'], false)) |
|
| 745 | - $comment['disliked'] = true; |
|
| 744 | + if($__video_h->if_comment_liked($comment['id'], $_SESSION['siteusername'], true)) { |
|
| 745 | + $comment['liked'] = true; |
|
| 746 | + } else if($__video_h->if_comment_liked($comment['id'], $_SESSION['siteusername'], false)) { |
|
| 747 | + $comment['disliked'] = true; |
|
| 748 | + } |
|
| 746 | 749 | |
| 747 | 750 | $comment['likes'] = $__video_h->get_comment_likes($comment['id'], true); |
| 748 | 751 | $comment['likes'] -= $__video_h->get_comment_likes($comment['id'], false); |
@@ -8,8 +8,9 @@ |
||
| 8 | 8 | <?php $__db_h = new db_helper(); ?> |
| 9 | 9 | <?php $__time_h = new time_helper(); ?> |
| 10 | 10 | <?php |
| 11 | -if(!isset($_SESSION['siteusername'])) |
|
| 11 | +if(!isset($_SESSION['siteusername'])) { |
|
| 12 | 12 | header('Location: ' . $_SERVER['HTTP_REFERER'] . '&error=You have to be logged in to report videos.'); |
| 13 | +} |
|
| 13 | 14 | |
| 14 | 15 | $_video = $__video_h->fetch_video_rid($_GET['v']); |
| 15 | 16 | $webhookurl = $__server->discord_webhook; |