@@ -13,11 +13,13 @@ discard block |
||
| 13 | 13 | <?php $__db_h = new db_helper(); ?> |
| 14 | 14 | <?php $__time_h = new time_helper(); ?> |
| 15 | 15 | <?php |
| 16 | - if(isset($_SESSION['siteusername'])) |
|
| 17 | - $_user_hp = $__user_h->fetch_user_username($_SESSION['siteusername']); |
|
| 16 | + if(isset($_SESSION['siteusername'])) { |
|
| 17 | + $_user_hp = $__user_h->fetch_user_username($_SESSION['siteusername']); |
|
| 18 | + } |
|
| 18 | 19 | |
| 19 | - if(!$__user_h->user_exists($_GET['n'])) |
|
| 20 | - header("Location: /?userdoesntexist"); |
|
| 20 | + if(!$__user_h->user_exists($_GET['n'])) { |
|
| 21 | + header("Location: /?userdoesntexist"); |
|
| 22 | + } |
|
| 21 | 23 | |
| 22 | 24 | $_user = $__user_h->fetch_user_username($_GET['n']); |
| 23 | 25 | |
@@ -40,10 +42,11 @@ discard block |
||
| 40 | 42 | |
| 41 | 43 | if ( |
| 42 | 44 | ctype_xdigit($colorCode) && |
| 43 | - (strlen($colorCode) == 6 || strlen($colorCode) == 3)) |
|
| 44 | - return true; |
|
| 45 | - |
|
| 46 | - else return false; |
|
| 45 | + (strlen($colorCode) == 6 || strlen($colorCode) == 3)) { |
|
| 46 | + return true; |
|
| 47 | + } else { |
|
| 48 | + return false; |
|
| 49 | + } |
|
| 47 | 50 | } |
| 48 | 51 | |
| 49 | 52 | $_user['subscribers'] = $__user_h->fetch_subs_count($_user['username']); |
@@ -75,8 +78,9 @@ discard block |
||
| 75 | 78 | if(!check_valid_colorhex($_user['primary_color_text']) && strlen($_user['primary_color_text']) != 6) { $_user['primary_color_text'] = ""; } |
| 76 | 79 | if(!check_valid_colorhex($_user['2009_bgcolor']) && strlen($_user['2009_bgcolor']) != 6) { $_user['2009_bgcolor'] = ""; } |
| 77 | 80 | |
| 78 | - if(isset($_SESSION['siteusername'])) |
|
| 79 | - $__user_i->check_view_channel($_user['username'], @$_SESSION['siteusername']); |
|
| 81 | + if(isset($_SESSION['siteusername'])) { |
|
| 82 | + $__user_i->check_view_channel($_user['username'], @$_SESSION['siteusername']); |
|
| 83 | + } |
|
| 80 | 84 | |
| 81 | 85 | if($_SERVER['REQUEST_METHOD'] == 'POST') { |
| 82 | 86 | $error = array(); |
@@ -146,8 +150,9 @@ discard block |
||
| 146 | 150 | <div class="channel_customization"><?php require($_SERVER['DOCUMENT_ROOT'] . "/s/mod/channel_customization.php"); ?></div> |
| 147 | 151 | <?php } ?> |
| 148 | 152 | <?php |
| 149 | - if(empty(trim($_user['bio']))) |
|
| 150 | - $_user['bio'] = "This user has no description."; |
|
| 153 | + if(empty(trim($_user['bio']))) { |
|
| 154 | + $_user['bio'] = "This user has no description."; |
|
| 155 | + } |
|
| 151 | 156 | ?> |
| 152 | 157 | <div id="content"> |
| 153 | 158 | <div class="subscription-menu-expandable subscription-menu-expandable-channels3 yt-rounded ytg-wide hid"> |
@@ -13,11 +13,13 @@ discard block |
||
| 13 | 13 | <?php $__db_h = new db_helper(); ?> |
| 14 | 14 | <?php $__time_h = new time_helper(); ?> |
| 15 | 15 | <?php |
| 16 | - if(isset($_SESSION['siteusername'])) |
|
| 17 | - $_user_hp = $__user_h->fetch_user_username($_SESSION['siteusername']); |
|
| 16 | + if(isset($_SESSION['siteusername'])) { |
|
| 17 | + $_user_hp = $__user_h->fetch_user_username($_SESSION['siteusername']); |
|
| 18 | + } |
|
| 18 | 19 | |
| 19 | - if(!$__user_h->user_exists($_GET['n'])) |
|
| 20 | - header("Location: /?userdoesntexist"); |
|
| 20 | + if(!$__user_h->user_exists($_GET['n'])) { |
|
| 21 | + header("Location: /?userdoesntexist"); |
|
| 22 | + } |
|
| 21 | 23 | |
| 22 | 24 | $_user = $__user_h->fetch_user_username($_GET['n']); |
| 23 | 25 | |
@@ -40,10 +42,11 @@ discard block |
||
| 40 | 42 | |
| 41 | 43 | if ( |
| 42 | 44 | ctype_xdigit($colorCode) && |
| 43 | - (strlen($colorCode) == 6 || strlen($colorCode) == 3)) |
|
| 44 | - return true; |
|
| 45 | - |
|
| 46 | - else return false; |
|
| 45 | + (strlen($colorCode) == 6 || strlen($colorCode) == 3)) { |
|
| 46 | + return true; |
|
| 47 | + } else { |
|
| 48 | + return false; |
|
| 49 | + } |
|
| 47 | 50 | } |
| 48 | 51 | |
| 49 | 52 | $_user['subscribed'] = $__user_h->if_subscribed(@$_SESSION['siteusername'], $_user['username']); |
@@ -76,8 +79,9 @@ discard block |
||
| 76 | 79 | if(!check_valid_colorhex($_user['primary_color_text']) && strlen($_user['primary_color_text']) != 6) { $_user['primary_color_text'] = ""; } |
| 77 | 80 | if(!check_valid_colorhex($_user['2009_bgcolor']) && strlen($_user['2009_bgcolor']) != 6) { $_user['2009_bgcolor'] = ""; } |
| 78 | 81 | |
| 79 | - if(isset($_SESSION['siteusername'])) |
|
| 80 | - $__user_i->check_view_channel($_user['username'], @$_SESSION['siteusername']); |
|
| 82 | + if(isset($_SESSION['siteusername'])) { |
|
| 83 | + $__user_i->check_view_channel($_user['username'], @$_SESSION['siteusername']); |
|
| 84 | + } |
|
| 81 | 85 | |
| 82 | 86 | if($_SERVER['REQUEST_METHOD'] == 'POST') { |
| 83 | 87 | $error = array(); |
@@ -146,8 +150,9 @@ discard block |
||
| 146 | 150 | <div class="channel_customization"><?php require($_SERVER['DOCUMENT_ROOT'] . "/s/mod/channel_customization.php"); ?></div> |
| 147 | 151 | <?php } ?> |
| 148 | 152 | <?php |
| 149 | - if(empty(trim($_user['bio']))) |
|
| 150 | - $_user['bio'] = "This user has no description."; |
|
| 153 | + if(empty(trim($_user['bio']))) { |
|
| 154 | + $_user['bio'] = "This user has no description."; |
|
| 155 | + } |
|
| 151 | 156 | ?> |
| 152 | 157 | <div id="content"> |
| 153 | 158 | <div class="subscription-menu-expandable subscription-menu-expandable-channels3 yt-rounded ytg-wide hid"> |