@@ -15,11 +15,13 @@ discard block |
||
| 15 | 15 | <?php $__db_h = new db_helper(); ?> |
| 16 | 16 | <?php $__time_h = new time_helper(); ?> |
| 17 | 17 | <?php |
| 18 | - if(isset($_SESSION['siteusername'])) |
|
| 19 | - $_user_hp = $__user_h->fetch_user_username($_SESSION['siteusername']); |
|
| 18 | + if(isset($_SESSION['siteusername'])) { |
|
| 19 | + $_user_hp = $__user_h->fetch_user_username($_SESSION['siteusername']); |
|
| 20 | + } |
|
| 20 | 21 | |
| 21 | - if(!$__user_h->user_exists($_GET['n'])) |
|
| 22 | - header("Location: /?userdoesntexist"); |
|
| 22 | + if(!$__user_h->user_exists($_GET['n'])) { |
|
| 23 | + header("Location: /?userdoesntexist"); |
|
| 24 | + } |
|
| 23 | 25 | |
| 24 | 26 | $_user = $__user_h->fetch_user_username($_GET['n']); |
| 25 | 27 | |
@@ -42,10 +44,11 @@ discard block |
||
| 42 | 44 | |
| 43 | 45 | if ( |
| 44 | 46 | ctype_xdigit($colorCode) && |
| 45 | - (strlen($colorCode) == 6 || strlen($colorCode) == 3)) |
|
| 46 | - return true; |
|
| 47 | - |
|
| 48 | - else return false; |
|
| 47 | + (strlen($colorCode) == 6 || strlen($colorCode) == 3)) { |
|
| 48 | + return true; |
|
| 49 | + } else { |
|
| 50 | + return false; |
|
| 51 | + } |
|
| 49 | 52 | } |
| 50 | 53 | |
| 51 | 54 | $_user['subscribed'] = $__user_h->if_subscribed(@$_SESSION['siteusername'], $_user['username']); |
@@ -77,8 +80,9 @@ discard block |
||
| 77 | 80 | if(!check_valid_colorhex($_user['primary_color_text']) && strlen($_user['primary_color_text']) != 6) { $_user['primary_color_text'] = ""; } |
| 78 | 81 | if(!check_valid_colorhex($_user['2009_bgcolor']) && strlen($_user['2009_bgcolor']) != 6) { $_user['2009_bgcolor'] = ""; } |
| 79 | 82 | |
| 80 | - if(isset($_SESSION['siteusername'])) |
|
| 81 | - $__user_i->check_view_channel($_user['username'], @$_SESSION['siteusername']); |
|
| 83 | + if(isset($_SESSION['siteusername'])) { |
|
| 84 | + $__user_i->check_view_channel($_user['username'], @$_SESSION['siteusername']); |
|
| 85 | + } |
|
| 82 | 86 | |
| 83 | 87 | if($_SERVER['REQUEST_METHOD'] == 'POST') { |
| 84 | 88 | $error = array(); |
@@ -85,10 +85,11 @@ |
||
| 85 | 85 | $status = "Unknown"; |
| 86 | 86 | } |
| 87 | 87 | |
| 88 | - if($video['commenting'] == "a") |
|
| 89 | - $video['commentstatus'] = "Commenting allowed"; |
|
| 90 | - else |
|
| 91 | - $video['commentstatus'] = "Commenting disallowed"; |
|
| 88 | + if($video['commenting'] == "a") { |
|
| 89 | + $video['commentstatus'] = "Commenting allowed"; |
|
| 90 | + } else { |
|
| 91 | + $video['commentstatus'] = "Commenting disallowed"; |
|
| 92 | + } |
|
| 92 | 93 | ?> |
| 93 | 94 | <tr style="margin-top: 5px;" id="videoslist"> |
| 94 | 95 | <td class="video-manager-left"> |
@@ -224,10 +224,11 @@ |
||
| 224 | 224 | $status = "Unknown"; |
| 225 | 225 | } |
| 226 | 226 | |
| 227 | - if($video['commenting'] == "a") |
|
| 228 | - $video['commentstatus'] = "Commenting allowed"; |
|
| 229 | - else |
|
| 230 | - $video['commentstatus'] = "Commenting disallowed"; |
|
| 227 | + if($video['commenting'] == "a") { |
|
| 228 | + $video['commentstatus'] = "Commenting allowed"; |
|
| 229 | + } else { |
|
| 230 | + $video['commentstatus'] = "Commenting disallowed"; |
|
| 231 | + } |
|
| 231 | 232 | ?> |
| 232 | 233 | <tr style="margin-top: 5px;" id="videoslist"> |
| 233 | 234 | <td class="video-manager-left"> |
@@ -83,10 +83,11 @@ |
||
| 83 | 83 | $status = "Unknown"; |
| 84 | 84 | } |
| 85 | 85 | |
| 86 | - if($_video['commenting'] == "a") |
|
| 87 | - $_video['commentstatus'] = "Commenting allowed"; |
|
| 88 | - else |
|
| 89 | - $_video['commentstatus'] = "Commenting disallowed"; |
|
| 86 | + if($_video['commenting'] == "a") { |
|
| 87 | + $_video['commentstatus'] = "Commenting allowed"; |
|
| 88 | + } else { |
|
| 89 | + $_video['commentstatus'] = "Commenting disallowed"; |
|
| 90 | + } |
|
| 90 | 91 | ?> |
| 91 | 92 | <tr style="margin-top: 5px;" id="videoslist"> |
| 92 | 93 | <td class="video-manager-left"> |
@@ -58,10 +58,14 @@ |
||
| 58 | 58 | } |
| 59 | 59 | |
| 60 | 60 | if(!isset($cLang)) { |
| 61 | - if (!$full) $string = array_slice($string, 0, 1); |
|
| 61 | + if (!$full) { |
|
| 62 | + $string = array_slice($string, 0, 1); |
|
| 63 | + } |
|
| 62 | 64 | return $string ? implode(', ', $string) . ' ago' : 'just now'; |
| 63 | 65 | } else { |
| 64 | - if (!$full) $string = array_slice($string, 0, 1); |
|
| 66 | + if (!$full) { |
|
| 67 | + $string = array_slice($string, 0, 1); |
|
| 68 | + } |
|
| 65 | 69 | return $string ? implode($cLang['agoLeft'], $string) . " " . " " . $cLang['agoRight'] : $cLang['justNow']; |
| 66 | 70 | } |
| 67 | 71 | } |
@@ -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; ?>"> |
@@ -221,10 +221,11 @@ |
||
| 221 | 221 | $status = "Unknown"; |
| 222 | 222 | } |
| 223 | 223 | |
| 224 | - if($_video['commenting'] == "a") |
|
| 225 | - $_video['commentstatus'] = "Commenting allowed"; |
|
| 226 | - else |
|
| 227 | - $_video['commentstatus'] = "Commenting disallowed"; |
|
| 224 | + if($_video['commenting'] == "a") { |
|
| 225 | + $_video['commentstatus'] = "Commenting allowed"; |
|
| 226 | + } else { |
|
| 227 | + $_video['commentstatus'] = "Commenting disallowed"; |
|
| 228 | + } |
|
| 228 | 229 | ?> |
| 229 | 230 | <tr style="margin-top: 5px;" id="videoslist"> |
| 230 | 231 | <td class="video-manager-left"> |
@@ -423,7 +423,8 @@ discard block |
||
| 423 | 423 | $stmt->bindParam(":pper", $results_per_page); |
| 424 | 424 | $stmt->execute(); |
| 425 | 425 | |
| 426 | - while($comment = $stmt->fetch(PDO::FETCH_ASSOC))) { |
|
| 426 | + while($comment = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
| 427 | + ) { |
|
| 427 | 428 | ?> |
| 428 | 429 | |
| 429 | 430 | <li class="comment yt-tile-default " data-author-viewing="" data-author-id="-uD01K8FQTeOSS5sniRFzQ" data-id="HdQrMeklJ_5hd_uPDRcvtdaMk2pMVS8d9sufcfiGx0U" data-score="0"> |
@@ -431,7 +432,9 @@ discard block |
||
| 431 | 432 | <div class="content-container"> |
| 432 | 433 | <div class="content"> |
| 433 | 434 | <div class="comment-text" dir="ltr"> |
| 434 | - <p><?php echo $__video_h->shorten_description($comment['comment'], 3000, true); ?></p> |
|
| 435 | + <p><?php echo $__video_h->shorten_description($comment['comment'], 3000, true); |
|
| 436 | + } |
|
| 437 | + ?></p> |
|
| 435 | 438 | </div> |
| 436 | 439 | <p class="metadata"> |
| 437 | 440 | <span class="author "> |
@@ -27,8 +27,9 @@ |
||
| 27 | 27 | $stmt->bindParam(":username", $_SESSION['siteusername']); |
| 28 | 28 | $characters = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_'; |
| 29 | 29 | $result = ''; |
| 30 | - for ($i = 0; $i < 11; $i++) |
|
| 31 | - $rid .= $characters[mt_rand(0, 63)]; |
|
| 30 | + for ($i = 0; $i < 11; $i++) { |
|
| 31 | + $rid .= $characters[mt_rand(0, 63)]; |
|
| 32 | + } |
|
| 32 | 33 | $text = htmlspecialchars($_POST['comment']); |
| 33 | 34 | $stmt->execute(); |
| 34 | 35 | $__user_u->update_cooldown_time($_SESSION['siteusername'], "cooldown_comment"); |