@@ -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"> |
@@ -13,73 +13,73 @@ |
||
| 13 | 13 | <?php |
| 14 | 14 | if(!isset($_GET['action_load_user_feed'])) { |
| 15 | 15 | switch(@$_GET['chart_name']) { |
| 16 | - case "trending": |
|
| 17 | - $category = 'Trending'; |
|
| 18 | - $diviconn = 'trending'; |
|
| 19 | - break; |
|
| 20 | - case "popular": |
|
| 21 | - $category = 'Popular'; |
|
| 22 | - $diviconn = 'popular'; |
|
| 23 | - break; |
|
| 24 | - case "music": |
|
| 25 | - $category = 'Music'; |
|
| 26 | - $diviconn = 'music'; |
|
| 27 | - break; |
|
| 28 | - case "entertainment": |
|
| 29 | - $category = 'Entertainment'; |
|
| 30 | - $diviconn = 'entertainment'; |
|
| 31 | - break; |
|
| 32 | - case "sports": |
|
| 33 | - $category = 'Sports'; |
|
| 34 | - $diviconn = 'sports'; |
|
| 35 | - break; |
|
| 36 | - case "comedy": |
|
| 37 | - $category = 'Comedy'; |
|
| 38 | - $diviconn = 'comedy'; |
|
| 39 | - break; |
|
| 40 | - case "film": |
|
| 41 | - $category = 'Film & Animation'; |
|
| 42 | - $diviconn = 'film'; |
|
| 43 | - break; |
|
| 44 | - case "gadgets": |
|
| 45 | - $category = 'Gaming'; |
|
| 46 | - $diviconn = 'gadgets'; |
|
| 47 | - break; |
|
| 16 | + case "trending": |
|
| 17 | + $category = 'Trending'; |
|
| 18 | + $diviconn = 'trending'; |
|
| 19 | + break; |
|
| 20 | + case "popular": |
|
| 21 | + $category = 'Popular'; |
|
| 22 | + $diviconn = 'popular'; |
|
| 23 | + break; |
|
| 24 | + case "music": |
|
| 25 | + $category = 'Music'; |
|
| 26 | + $diviconn = 'music'; |
|
| 27 | + break; |
|
| 28 | + case "entertainment": |
|
| 29 | + $category = 'Entertainment'; |
|
| 30 | + $diviconn = 'entertainment'; |
|
| 31 | + break; |
|
| 32 | + case "sports": |
|
| 33 | + $category = 'Sports'; |
|
| 34 | + $diviconn = 'sports'; |
|
| 35 | + break; |
|
| 36 | + case "comedy": |
|
| 37 | + $category = 'Comedy'; |
|
| 38 | + $diviconn = 'comedy'; |
|
| 39 | + break; |
|
| 40 | + case "film": |
|
| 41 | + $category = 'Film & Animation'; |
|
| 42 | + $diviconn = 'film'; |
|
| 43 | + break; |
|
| 44 | + case "gadgets": |
|
| 45 | + $category = 'Gaming'; |
|
| 46 | + $diviconn = 'gadgets'; |
|
| 47 | + break; |
|
| 48 | 48 | } |
| 49 | 49 | |
| 50 | 50 | switch(@$_GET['feed_name']) { |
| 51 | - case "trending": |
|
| 52 | - $category = 'Trending'; |
|
| 53 | - $diviconn = 'trending'; |
|
| 54 | - break; |
|
| 55 | - case "popular": |
|
| 56 | - $category = 'Popular'; |
|
| 57 | - $diviconn = 'popular'; |
|
| 58 | - break; |
|
| 59 | - case "music": |
|
| 60 | - $category = 'Music'; |
|
| 61 | - $diviconn = 'music'; |
|
| 62 | - break; |
|
| 63 | - case "entertainment": |
|
| 64 | - $category = 'Entertainment'; |
|
| 65 | - $diviconn = 'entertainment'; |
|
| 66 | - break; |
|
| 67 | - case "sports": |
|
| 68 | - $category = 'Sports'; |
|
| 69 | - $diviconn = 'sports'; |
|
| 70 | - break; |
|
| 71 | - case "comedy": |
|
| 72 | - $category = 'Comedy'; |
|
| 73 | - $diviconn = 'comedy'; |
|
| 74 | - break; |
|
| 75 | - case "film": |
|
| 76 | - $category = 'Film & Animation'; |
|
| 77 | - $diviconn = 'film'; |
|
| 78 | - break; |
|
| 79 | - case "gadgets": |
|
| 80 | - $category = 'Gaming'; |
|
| 81 | - $diviconn = 'gadgets'; |
|
| 82 | - break; |
|
| 51 | + case "trending": |
|
| 52 | + $category = 'Trending'; |
|
| 53 | + $diviconn = 'trending'; |
|
| 54 | + break; |
|
| 55 | + case "popular": |
|
| 56 | + $category = 'Popular'; |
|
| 57 | + $diviconn = 'popular'; |
|
| 58 | + break; |
|
| 59 | + case "music": |
|
| 60 | + $category = 'Music'; |
|
| 61 | + $diviconn = 'music'; |
|
| 62 | + break; |
|
| 63 | + case "entertainment": |
|
| 64 | + $category = 'Entertainment'; |
|
| 65 | + $diviconn = 'entertainment'; |
|
| 66 | + break; |
|
| 67 | + case "sports": |
|
| 68 | + $category = 'Sports'; |
|
| 69 | + $diviconn = 'sports'; |
|
| 70 | + break; |
|
| 71 | + case "comedy": |
|
| 72 | + $category = 'Comedy'; |
|
| 73 | + $diviconn = 'comedy'; |
|
| 74 | + break; |
|
| 75 | + case "film": |
|
| 76 | + $category = 'Film & Animation'; |
|
| 77 | + $diviconn = 'film'; |
|
| 78 | + break; |
|
| 79 | + case "gadgets": |
|
| 80 | + $category = 'Gaming'; |
|
| 81 | + $diviconn = 'gadgets'; |
|
| 82 | + break; |
|
| 83 | 83 | } |
| 84 | 84 | |
| 85 | 85 | $stmt = $__db->prepare("SELECT * FROM videos WHERE category = :category ORDER BY id DESC LIMIT 20"); |
@@ -33,8 +33,7 @@ |
||
| 33 | 33 | |
| 34 | 34 | $row = $stmt->fetch(PDO::FETCH_ASSOC); |
| 35 | 35 | if(!isset($row['password'])) |
| 36 | - { $request->error->message = "Incorrect username or password!"; $request->error->status = ""; } |
|
| 37 | - else |
|
| 36 | + { $request->error->message = "Incorrect username or password!"; $request->error->status = ""; } else |
|
| 38 | 37 | { $request->returned_password = $row['password']; } |
| 39 | 38 | |
| 40 | 39 | if(!password_verify($request->password, $request->returned_password)) |
@@ -11,8 +11,9 @@ |
||
| 11 | 11 | <?php |
| 12 | 12 | $rid = ""; |
| 13 | 13 | $characters = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_'; |
| 14 | - for ($i = 0; $i < 11; $i++) |
|
| 15 | - $rid .= $characters[mt_rand(0, 63)]; |
|
| 14 | + for ($i = 0; $i < 11; $i++) { |
|
| 15 | + $rid .= $characters[mt_rand(0, 63)]; |
|
| 16 | + } |
|
| 16 | 17 | |
| 17 | 18 | $video_properties = (object) [ |
| 18 | 19 | 'video_rid' => $rid, |
@@ -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; ?>"> |
@@ -10,15 +10,18 @@ |
||
| 10 | 10 | <?php $__time_h = new time_helper(); ?> |
| 11 | 11 | <?php |
| 12 | 12 | |
| 13 | -if($_SESSION['siteusername'] == $_GET['sending']) |
|
| 13 | +if($_SESSION['siteusername'] == $_GET['sending']) { |
|
| 14 | 14 | die("You can't friend yourself!"); |
| 15 | +} |
|
| 15 | 16 | |
| 16 | 17 | $stmt = $conn->prepare("SELECT * FROM friends WHERE sender = ? AND reciever = ?"); |
| 17 | 18 | $stmt->bind_param("ss", $_SESSION['siteusername'], $_GET['sending']); |
| 18 | 19 | $stmt->execute(); |
| 19 | 20 | $result = $stmt->get_result(); |
| 20 | - if($result->num_rows === 1) die('You already sent a friend request to this person'); |
|
| 21 | -$stmt->close(); |
|
| 21 | + if($result->num_rows === 1) { |
|
| 22 | + die('You already sent a friend request to this person'); |
|
| 23 | + } |
|
| 24 | + $stmt->close(); |
|
| 22 | 25 | |
| 23 | 26 | $stmt = $conn->prepare("INSERT INTO friends (sender, reciever, status) VALUES (?, ?, 'u')"); |
| 24 | 27 | $stmt->bind_param("ss", $_SESSION['siteusername'], $_GET['sending']); |
@@ -25,8 +25,10 @@ |
||
| 25 | 25 | $stmt->bind_param("ss", $_SESSION['siteusername'], $name); |
| 26 | 26 | $stmt->execute(); |
| 27 | 27 | $result = $stmt->get_result(); |
| 28 | - if($result->num_rows === 0) die('You haven\'t blocked this person!'); |
|
| 29 | -$stmt->close(); |
|
| 28 | + if($result->num_rows === 0) { |
|
| 29 | + die('You haven\'t blocked this person!'); |
|
| 30 | + } |
|
| 31 | + $stmt->close(); |
|
| 30 | 32 | |
| 31 | 33 | $stmt = $conn->prepare("DELETE FROM block WHERE sender = ? AND reciever = ?"); |
| 32 | 34 | $stmt->bind_param("ss", $_SESSION['siteusername'], $name); |