@@ -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."; |
@@ -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; |
@@ -313,14 +313,15 @@ |
||
| 313 | 313 | for($i = 0;$i <= $countryLength; $i++) |
| 314 | 314 | { |
| 315 | 315 | $c = $countries[$i]; |
| 316 | - if ($c == $_user['country']) |
|
| 317 | - //country is the same as in database |
|
| 316 | + if ($c == $_user['country']) { |
|
| 317 | + //country is the same as in database |
|
| 318 | 318 | { |
| 319 | 319 | ?> |
| 320 | - <option value="<?php echo $c; ?>" selected="selected"><?php echo $c; ?></option> |
|
| 321 | - <?php |
|
| 320 | + <option value="<?php echo $c; |
|
| 322 | 321 | } |
| 323 | - else |
|
| 322 | + ?>" selected="selected"><?php echo $c; ?></option> |
|
| 323 | + <?php |
|
| 324 | + } else |
|
| 324 | 325 | { |
| 325 | 326 | ?> |
| 326 | 327 | <option value="<?php echo $c;?>"><?php echo $c; ?></option> |
@@ -12,11 +12,13 @@ discard block |
||
| 12 | 12 | <?php $__db_h = new db_helper(); ?> |
| 13 | 13 | <?php $__time_h = new time_helper(); ?> |
| 14 | 14 | <?php |
| 15 | - if(isset($_SESSION['siteusername'])) |
|
| 16 | - $_user_hp = $__user_h->fetch_user_username($_SESSION['siteusername']); |
|
| 15 | + if(isset($_SESSION['siteusername'])) { |
|
| 16 | + $_user_hp = $__user_h->fetch_user_username($_SESSION['siteusername']); |
|
| 17 | + } |
|
| 17 | 18 | |
| 18 | - if(!$__user_h->user_exists($_GET['n'])) |
|
| 19 | - header("Location: /?userdoesntexist"); |
|
| 19 | + if(!$__user_h->user_exists($_GET['n'])) { |
|
| 20 | + header("Location: /?userdoesntexist"); |
|
| 21 | + } |
|
| 20 | 22 | |
| 21 | 23 | $_user = $__user_h->fetch_user_username($_GET['n']); |
| 22 | 24 | |
@@ -39,10 +41,11 @@ discard block |
||
| 39 | 41 | |
| 40 | 42 | if ( |
| 41 | 43 | ctype_xdigit($colorCode) && |
| 42 | - (strlen($colorCode) == 6 || strlen($colorCode) == 3)) |
|
| 43 | - return true; |
|
| 44 | - |
|
| 45 | - else return false; |
|
| 44 | + (strlen($colorCode) == 6 || strlen($colorCode) == 3)) { |
|
| 45 | + return true; |
|
| 46 | + } else { |
|
| 47 | + return false; |
|
| 48 | + } |
|
| 46 | 49 | } |
| 47 | 50 | |
| 48 | 51 | $_user['subscribers'] = $__user_h->fetch_subs_count($_user['username']); |
@@ -74,8 +77,9 @@ discard block |
||
| 74 | 77 | if(!check_valid_colorhex($_user['primary_color_text']) && strlen($_user['primary_color_text']) != 6) { $_user['primary_color_text'] = ""; } |
| 75 | 78 | if(!check_valid_colorhex($_user['2012_bgcolor']) && strlen($_user['2012_bgcolor']) != 6) { $_user['2012_bgcolor'] = ""; } |
| 76 | 79 | |
| 77 | - if(isset($_SESSION['siteusername'])) |
|
| 78 | - $__user_i->check_view_channel($_user['username'], @$_SESSION['siteusername']); |
|
| 80 | + if(isset($_SESSION['siteusername'])) { |
|
| 81 | + $__user_i->check_view_channel($_user['username'], @$_SESSION['siteusername']); |
|
| 82 | + } |
|
| 79 | 83 | |
| 80 | 84 | if($_SERVER['REQUEST_METHOD'] == 'POST') { |
| 81 | 85 | $error = array(); |
@@ -188,8 +192,9 @@ discard block |
||
| 188 | 192 | <div class="channel_customization"><?php require($_SERVER['DOCUMENT_ROOT'] . "/s/mod/channel_customization.php"); ?></div> |
| 189 | 193 | <?php } ?> |
| 190 | 194 | <?php |
| 191 | - if(empty(trim($_user['bio']))) |
|
| 192 | - $_user['bio'] = "This user has no description."; |
|
| 195 | + if(empty(trim($_user['bio']))) { |
|
| 196 | + $_user['bio'] = "This user has no description."; |
|
| 197 | + } |
|
| 193 | 198 | ?> |
| 194 | 199 | <div id="content"> |
| 195 | 200 | <div class="subscription-menu-expandable subscription-menu-expandable-channels3 yt-rounded ytg-wide hid"> |
@@ -272,7 +277,7 @@ discard block |
||
| 272 | 277 | <div class="header-stats"> |
| 273 | 278 | <div class="stat-entry"> |
| 274 | 279 | <span class="stat-value"><?php echo $_user['subscribers']; ?></span> |
| 275 | - <span class="stat-name"><?php if($_user['subscribers'] == 1){ ?>subscriber<?php }else{ ?>subscribers<?php } ?></span> |
|
| 280 | + <span class="stat-name"><?php if($_user['subscribers'] == 1){ ?>subscriber<?php } else{ ?>subscribers<?php } ?></span> |
|
| 276 | 281 | </div> |
| 277 | 282 | <div class="stat-entry"> |
| 278 | 283 | <span class="stat-value"><?php echo $_user['views']; ?></span> |
@@ -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($_SERVER['REQUEST_URI'] != $_tab->url) |
|
| 44 | - $_tab->selected = true; |
|
| 43 | + if($_SERVER['REQUEST_URI'] != $_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; ?>"> |
@@ -174,8 +174,9 @@ discard block |
||
| 174 | 174 | if(!empty($_POST['solidcolor'])) { |
| 175 | 175 | $__user_u->update_row($_SESSION['siteusername'], "2012_bgoption", $_POST['bgoption']); |
| 176 | 176 | |
| 177 | - if($_POST['bgoption'] == "solid") |
|
| 178 | - $__user_u->update_row($_SESSION['siteusername'], "2012_bg", ""); |
|
| 177 | + if($_POST['bgoption'] == "solid") { |
|
| 178 | + $__user_u->update_row($_SESSION['siteusername'], "2012_bg", ""); |
|
| 179 | + } |
|
| 179 | 180 | |
| 180 | 181 | $__user_u->update_row($_SESSION['siteusername'], "primary_color", $_POST['solidcolor']); |
| 181 | 182 | } |
@@ -225,8 +226,9 @@ discard block |
||
| 225 | 226 | } |
| 226 | 227 | |
| 227 | 228 | if(!empty($_POST['layout_channel'])) { |
| 228 | - if($_POST['layout_channel'] == "feed" || $_POST['layout_channel'] == "featured" || $_POST['layout_channel'] == "playlists") |
|
| 229 | - $__user_u->update_row($_SESSION['siteusername'], "layout", $_POST['layout_channel']); |
|
| 229 | + if($_POST['layout_channel'] == "feed" || $_POST['layout_channel'] == "featured" || $_POST['layout_channel'] == "playlists") { |
|
| 230 | + $__user_u->update_row($_SESSION['siteusername'], "layout", $_POST['layout_channel']); |
|
| 231 | + } |
|
| 230 | 232 | } |
| 231 | 233 | |
| 232 | 234 | if(!empty($_POST['bgoptionset'])) { |
@@ -9,8 +9,7 @@ |
||
| 9 | 9 | if (isset($_GET['next'])) |
| 10 | 10 | { |
| 11 | 11 | $next = $_GET['next']; |
| 12 | -} |
|
| 13 | -else |
|
| 12 | +} else |
|
| 14 | 13 | { |
| 15 | 14 | $next = "/"; |
| 16 | 15 | } |
@@ -31,8 +31,9 @@ |
||
| 31 | 31 | $stmt->execute(); |
| 32 | 32 | |
| 33 | 33 | $__user_u->update_cooldown_time($_SESSION['siteusername'], "cooldown_comment"); |
| 34 | - if(@$_SESSION['siteusername'] != $_video['author']) |
|
| 35 | - $__user_i->send_message($_SESSION['siteusername'], "New comment", $_video['author'], "I commented \"" . $_POST['comment'] . "\" on your video!", $_video['rid'], "nt"); |
|
| 34 | + if(@$_SESSION['siteusername'] != $_video['author']) { |
|
| 35 | + $__user_i->send_message($_SESSION['siteusername'], "New comment", $_video['author'], "I commented \"" . $_POST['comment'] . "\" on your video!", $_video['rid'], "nt"); |
|
| 36 | + } |
|
| 36 | 37 | } |
| 37 | 38 | } |
| 38 | 39 | |
@@ -26,7 +26,9 @@ |
||
| 26 | 26 | $dif['idle'] = $info2[3] - $info1[3]; |
| 27 | 27 | $total = array_sum($dif); |
| 28 | 28 | $cpu = array(); |
| 29 | - foreach($dif as $x=>$y) $cpu[$x] = round($y / $total * 100, 1); |
|
| 29 | + foreach($dif as $x=>$y) { |
|
| 30 | + $cpu[$x] = round($y / $total * 100, 1); |
|
| 31 | + } |
|
| 30 | 32 | |
| 31 | 33 | return $cpu; |
| 32 | 34 | } |