@@ -10,9 +10,9 @@ |
||
| 10 | 10 | class video_helper { |
| 11 | 11 | public $__db; |
| 12 | 12 | |
| 13 | - public function __construct($conn){ |
|
| 13 | + public function __construct($conn){ |
|
| 14 | 14 | $this->__db = $conn; |
| 15 | - } |
|
| 15 | + } |
|
| 16 | 16 | |
| 17 | 17 | function fetch_video_views(string $id) { |
| 18 | 18 | $stmt = $this->__db->prepare("SELECT * FROM views WHERE videoid = ?"); |
@@ -10,7 +10,7 @@ discard block |
||
| 10 | 10 | class video_helper { |
| 11 | 11 | public $__db; |
| 12 | 12 | |
| 13 | - public function __construct($conn){ |
|
| 13 | + public function __construct($conn) { |
|
| 14 | 14 | $this->__db = $conn; |
| 15 | 15 | } |
| 16 | 16 | |
@@ -35,12 +35,12 @@ discard block |
||
| 35 | 35 | |
| 36 | 36 | function shorten_description(string $description, int $limit, bool $newlines = false) { |
| 37 | 37 | $description = trim($description); |
| 38 | - if(strlen($description) >= $limit) { |
|
| 38 | + if (strlen($description) >= $limit) { |
|
| 39 | 39 | $description = substr($description, 0, $limit) . "..."; |
| 40 | 40 | } |
| 41 | 41 | |
| 42 | 42 | $description = htmlspecialchars($description); |
| 43 | - if($newlines) { $description = str_replace(PHP_EOL, "<br>", $description); } |
|
| 43 | + if ($newlines) { $description = str_replace(PHP_EOL, "<br>", $description); } |
|
| 44 | 44 | return $description; |
| 45 | 45 | } |
| 46 | 46 | |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | $result = $stmt->get_result(); |
| 63 | 63 | $video = $result->fetch_assoc(); |
| 64 | 64 | |
| 65 | - if($result->num_rows === 0) |
|
| 65 | + if ($result->num_rows === 0) |
|
| 66 | 66 | return 0; |
| 67 | 67 | else |
| 68 | 68 | return $video; |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | $stmt->execute(); |
| 88 | 88 | $result = $stmt->get_result(); |
| 89 | 89 | $user = $result->fetch_assoc(); |
| 90 | - if($result->num_rows === 1) { return true; } else { return false; } |
|
| 90 | + if ($result->num_rows === 1) { return true; } else { return false; } |
|
| 91 | 91 | $stmt->close(); |
| 92 | 92 | |
| 93 | 93 | return $user; |
@@ -62,10 +62,11 @@ |
||
| 62 | 62 | $result = $stmt->get_result(); |
| 63 | 63 | $video = $result->fetch_assoc(); |
| 64 | 64 | |
| 65 | - if($result->num_rows === 0) |
|
| 66 | - return 0; |
|
| 67 | - else |
|
| 68 | - return $video; |
|
| 65 | + if($result->num_rows === 0) { |
|
| 66 | + return 0; |
|
| 67 | + } else { |
|
| 68 | + return $video; |
|
| 69 | + } |
|
| 69 | 70 | |
| 70 | 71 | $stmt->close(); |
| 71 | 72 | } |
@@ -25,9 +25,9 @@ |
||
| 25 | 25 | |
| 26 | 26 | // sorry pdo doesnt cworkd i cant get it 2 work |
| 27 | 27 | $__db = new mysqli($__server->db_properties->db_host, |
| 28 | - $__server->db_properties->db_user, |
|
| 29 | - $__server->db_properties->db_password, |
|
| 30 | - $__server->db_properties->db_database); |
|
| 28 | + $__server->db_properties->db_user, |
|
| 29 | + $__server->db_properties->db_password, |
|
| 30 | + $__server->db_properties->db_database); |
|
| 31 | 31 | |
| 32 | 32 | if(!$__db->connect_error) { |
| 33 | 33 | $__server->db_properties->db_connected = true; |
@@ -17,10 +17,10 @@ discard block |
||
| 17 | 17 | "db_connected" => false, |
| 18 | 18 | ], |
| 19 | 19 | |
| 20 | - "video_properties" => (object) [ "status" => "unloaded" ], |
|
| 21 | - "user_properties" => (object) [ "status" => "unloaded" ], |
|
| 22 | - "group_properties" => (object) [ "status" => "unloaded" ], |
|
| 23 | - "forum_properties" => (object) [ "status" => "unloaded" ], |
|
| 20 | + "video_properties" => (object) ["status" => "unloaded"], |
|
| 21 | + "user_properties" => (object) ["status" => "unloaded"], |
|
| 22 | + "group_properties" => (object) ["status" => "unloaded"], |
|
| 23 | + "forum_properties" => (object) ["status" => "unloaded"], |
|
| 24 | 24 | ]; |
| 25 | 25 | |
| 26 | 26 | // sorry pdo doesnt cworkd i cant get it 2 work |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | $__server->db_properties->db_password, |
| 30 | 30 | $__server->db_properties->db_database); |
| 31 | 31 | |
| 32 | - if(!$__db->connect_error) { |
|
| 32 | + if (!$__db->connect_error) { |
|
| 33 | 33 | $__server->db_properties->db_connected = true; |
| 34 | 34 | } |
| 35 | 35 | mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT); |
@@ -39,8 +39,8 @@ |
||
| 39 | 39 | ?> |
| 40 | 40 | <div id="browse-side-column" class="ytg-2col ytg-last"> |
| 41 | 41 | <ol class="navigation-menu"> |
| 42 | - <?php foreach($__tabs as $_tab) { |
|
| 43 | - if($_SERVER['REQUEST_URI'] != $_tab->url) |
|
| 42 | + <?php foreach ($__tabs as $_tab) { |
|
| 43 | + if ($_SERVER['REQUEST_URI'] != $_tab->url) |
|
| 44 | 44 | $_tab->selected = true; |
| 45 | 45 | ?> |
| 46 | 46 | <li class="menu-item"> |
@@ -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; ?>"> |
@@ -5,7 +5,7 @@ discard block |
||
| 5 | 5 | <a id="logo-container" href="/" title="YouTube home"> |
| 6 | 6 | <img id="logo" src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="YouTube home"> |
| 7 | 7 | </a> |
| 8 | - <?php if(!isset($_SESSION['siteusername'])) { ?> |
|
| 8 | + <?php if (!isset($_SESSION['siteusername'])) { ?> |
|
| 9 | 9 | <div id="yt-masthead-signin"> |
| 10 | 10 | <a style="color: white; text-decoration: none;" href="/sign_in"> |
| 11 | 11 | <button type="button" class=" yt-uix-button yt-uix-button-primary yt-uix-button-size-default" href="/sign_up" role="button"> |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | <span id="yt-masthead-user-displayname" dir="ltr" class="yt-valign-container" onclick="yt.www.masthead.toggleExpandedMasthead();"> |
| 21 | 21 | <?php echo htmlspecialchars($_SESSION['siteusername']); ?> |
| 22 | 22 | </span> |
| 23 | - <?php if($__user_h->fetch_unread_pms($_SESSION['siteusername']) != 0) { ?> |
|
| 23 | + <?php if ($__user_h->fetch_unread_pms($_SESSION['siteusername']) != 0) { ?> |
|
| 24 | 24 | <a style="position:relative;top:1px;color: white;text-decoration: none;background-color: #d54343;padding: 7px;padding-left: 10px;margin-right: 12px;display: inline;" href="/inbox/"> |
| 25 | 25 | <?php echo $__user_h->fetch_unread_pms($_SESSION['siteusername']); ?> |
| 26 | 26 | </a> |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | </div> |
| 58 | 58 | </div> |
| 59 | 59 | </div> |
| 60 | -<?php if(isset($_SESSION['siteusername'])) { ?> |
|
| 60 | +<?php if (isset($_SESSION['siteusername'])) { ?> |
|
| 61 | 61 | <div id="masthead-expanded" class="hid" style="display: none;"> |
| 62 | 62 | <div id="masthead-expanded-container" class="with-sandbar"> |
| 63 | 63 | <div id="masthead-expanded-menus-container"> |
@@ -179,7 +179,7 @@ discard block |
||
| 179 | 179 | <?php } ?> |
| 180 | 180 | </div> |
| 181 | 181 | <div id="alerts"> |
| 182 | - <?php if(isset($error['status'])) { ?> |
|
| 182 | + <?php if (isset($error['status'])) { ?> |
|
| 183 | 183 | <div id="masthead_child_div"><div class="yt-alert yt-alert-default yt-alert-error yt-alert-player"> <div class="yt-alert-icon"> |
| 184 | 184 | <img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" class="icon master-sprite" alt="Alert icon"> |
| 185 | 185 | </div> |
@@ -189,7 +189,7 @@ discard block |
||
| 189 | 189 | </div> |
| 190 | 190 | </div></div></div> |
| 191 | 191 | <?php } ?> |
| 192 | - <?php if(isset($error_legacy)) { ?> |
|
| 192 | + <?php if (isset($error_legacy)) { ?> |
|
| 193 | 193 | <div id="masthead_child_div"><div class="yt-alert yt-alert-default yt-alert-error yt-alert-player"> <div class="yt-alert-icon"> |
| 194 | 194 | <img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" class="icon master-sprite" alt="Alert icon"> |
| 195 | 195 | </div> |
@@ -184,7 +184,7 @@ discard block |
||
| 184 | 184 | <!--<button class="yt-uix-button yt-uix-button-default" id="av-uplod">Select File</button>--> |
| 185 | 185 | </div><br><br> |
| 186 | 186 | <img src="/d/pfp/<?php echo $_user['pfp']; ?>" style="width:100px;height:100px;"><br> |
| 187 | - <?php if($_user['pfp'] != "default.png") { ?> |
|
| 187 | + <?php if ($_user['pfp'] != "default.png") { ?> |
|
| 188 | 188 | <a href="/get/remove_profile_pic">Remove Profile Picture</a><br> |
| 189 | 189 | <?php } ?> |
| 190 | 190 | <br><hr class="thin-line-darker" style="width:unset;"> |
@@ -193,7 +193,7 @@ discard block |
||
| 193 | 193 | <input style="width: 169px;position: relative;top: 10px;" type="file" name="videopagebanner" id="avatar-upload"> |
| 194 | 194 | <!--<button class="yt-uix-button yt-uix-button-default" id="av-uplod">Select File</button>--> |
| 195 | 195 | </div><br> |
| 196 | - <?php if(!empty($_user['subbutton'])) { ?> |
|
| 196 | + <?php if (!empty($_user['subbutton'])) { ?> |
|
| 197 | 197 | <a href="/get/remove_watch_banner">Remove Watch Page Banner</a><br> |
| 198 | 198 | <?php } ?><br><hr class="thin-line-darker" style="width:unset;"> |
| 199 | 199 | |
@@ -213,12 +213,12 @@ discard block |
||
| 213 | 213 | |
| 214 | 214 | <b>Featured Vid</b> |
| 215 | 215 | <div class="customization-module" id="featuredvid" action="/d/post/channel_update" enctype="multipart/form-data" style="display: inline-block;float:right;position: relative;bottom: 6px;"> |
| 216 | - <input style="padding: 5px;background-color: white;border: 1px solid #999;width: 291px;height: 12px;" id="biomd" placeholder="Video ID" value="<?php echo htmlspecialchars($_user['featured']);?>" name="videoid"> |
|
| 216 | + <input style="padding: 5px;background-color: white;border: 1px solid #999;width: 291px;height: 12px;" id="biomd" placeholder="Video ID" value="<?php echo htmlspecialchars($_user['featured']); ?>" name="videoid"> |
|
| 217 | 217 | </div><br><br><hr class="thin-line-darker" style="width:unset;"> |
| 218 | 218 | |
| 219 | 219 | <b>Website</b> |
| 220 | 220 | <div class="customization-module" id="featuredvid" action="/d/post/channel_update" enctype="multipart/form-data" style="float: right;position: relative;top: -7px;"> |
| 221 | - <input style="padding: 5px;background-color: white;border: 1px solid #999;width: 291px;height: 12px;" id="biomd" placeholder="Website URL" value="<?php echo htmlspecialchars($_user['website']);?>" name="website"> |
|
| 221 | + <input style="padding: 5px;background-color: white;border: 1px solid #999;width: 291px;height: 12px;" id="biomd" placeholder="Website URL" value="<?php echo htmlspecialchars($_user['website']); ?>" name="website"> |
|
| 222 | 222 | |
| 223 | 223 | </div><br><br><hr class="thin-line-darker" style="width:unset;"> |
| 224 | 224 | |
@@ -227,7 +227,7 @@ discard block |
||
| 227 | 227 | <span style="font-size: 11px;" class="grey-text">This will show what type of channel you are to other users.</span> |
| 228 | 228 | <div class="customization-module" id="channellayout" action="/d/post/channel_update" enctype="multipart/form-data" style="float: right;position: relative;top: -19px;"> |
| 229 | 229 | <select style="background: transparent url(/yt/imgbin/spritesheet_main.png) repeat-x scroll 0 -800px;border: 1px solid #333;position:relative;top:6px;" name="genre"> |
| 230 | - <?php foreach($categories as $category) { ?> |
|
| 230 | + <?php foreach ($categories as $category) { ?> |
|
| 231 | 231 | <option value="<?php echo $category; ?>"><?php echo $category; ?></option> |
| 232 | 232 | <?php } ?> |
| 233 | 233 | </select> |
@@ -138,17 +138,17 @@ discard block |
||
| 138 | 138 | </div> |
| 139 | 139 | <div class="browse-item-row ytg-box"> |
| 140 | 140 | <?php |
| 141 | - $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Autos & Vehicles' ORDER BY rand() LIMIT 4"); |
|
| 142 | - $stmt->execute(); |
|
| 143 | - $result = $stmt->get_result(); |
|
| 144 | - while($video = $result->fetch_assoc()) { |
|
| 145 | - $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
|
| 146 | - $video['duration'] = $__time_h->timestamp($video['duration']); |
|
| 147 | - $video['views'] = $__video_h->fetch_video_views($video['rid']); |
|
| 148 | - $video['author'] = htmlspecialchars($video['author']); |
|
| 149 | - $video['title'] = htmlspecialchars($video['title']); |
|
| 150 | - $video['description'] = $__video_h->shorten_description($video['description'], 50); |
|
| 151 | - ?> |
|
| 141 | + $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Autos & Vehicles' ORDER BY rand() LIMIT 4"); |
|
| 142 | + $stmt->execute(); |
|
| 143 | + $result = $stmt->get_result(); |
|
| 144 | + while($video = $result->fetch_assoc()) { |
|
| 145 | + $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
|
| 146 | + $video['duration'] = $__time_h->timestamp($video['duration']); |
|
| 147 | + $video['views'] = $__video_h->fetch_video_views($video['rid']); |
|
| 148 | + $video['author'] = htmlspecialchars($video['author']); |
|
| 149 | + $video['title'] = htmlspecialchars($video['title']); |
|
| 150 | + $video['description'] = $__video_h->shorten_description($video['description'], 50); |
|
| 151 | + ?> |
|
| 152 | 152 | <div class="browse-item yt-tile-default "> |
| 153 | 153 | <a href="/watch?v=<?php echo $video['rid']; ?>" class="ux-thumb-wrap yt-uix-sessionlink yt-uix-contextlink contains-addto " data-sessionlink="ei=CPjwu5ji3bICFS4RIQod9j-M-A%3D%3D&feature=b-mv"><span class="video-thumb ux-thumb yt-thumb-default-194 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="http://s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Thumbnail" data-thumb="/dynamic/thumbs/<?php echo $video['thumbnail']; ?>" width="194"><span class="vertical-align"></span></span></span></span><span class="video-time"><?php echo $video['duration']; ?></span> |
| 154 | 154 | <button onclick=";return false;" title="Watch Later" type="button" class="addto-button video-actions addto-watch-later-button-sign-in yt-uix-button yt-uix-button-default yt-uix-button-short yt-uix-tooltip" data-button-menu-id="shared-addto-watch-later-login" data-video-ids="rLHU-_OhT8g" role="button"><span class="yt-uix-button-content"> <img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Watch Later"> |
@@ -174,17 +174,17 @@ discard block |
||
| 174 | 174 | </div> |
| 175 | 175 | <div class="browse-item-row ytg-box"> |
| 176 | 176 | <?php |
| 177 | - $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Autos & Vehicles' ORDER BY rand() LIMIT 4"); |
|
| 178 | - $stmt->execute(); |
|
| 179 | - $result = $stmt->get_result(); |
|
| 180 | - while($video = $result->fetch_assoc()) { |
|
| 181 | - $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
|
| 182 | - $video['duration'] = $__time_h->timestamp($video['duration']); |
|
| 183 | - $video['views'] = $__video_h->fetch_video_views($video['rid']); |
|
| 184 | - $video['author'] = htmlspecialchars($video['author']); |
|
| 185 | - $video['title'] = htmlspecialchars($video['title']); |
|
| 186 | - $video['description'] = $__video_h->shorten_description($video['description'], 50); |
|
| 187 | - ?> |
|
| 177 | + $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Autos & Vehicles' ORDER BY rand() LIMIT 4"); |
|
| 178 | + $stmt->execute(); |
|
| 179 | + $result = $stmt->get_result(); |
|
| 180 | + while($video = $result->fetch_assoc()) { |
|
| 181 | + $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
|
| 182 | + $video['duration'] = $__time_h->timestamp($video['duration']); |
|
| 183 | + $video['views'] = $__video_h->fetch_video_views($video['rid']); |
|
| 184 | + $video['author'] = htmlspecialchars($video['author']); |
|
| 185 | + $video['title'] = htmlspecialchars($video['title']); |
|
| 186 | + $video['description'] = $__video_h->shorten_description($video['description'], 50); |
|
| 187 | + ?> |
|
| 188 | 188 | <div class="browse-item yt-tile-default "> |
| 189 | 189 | <a href="/watch?v=<?php echo $video['rid']; ?>" class="ux-thumb-wrap yt-uix-sessionlink yt-uix-contextlink contains-addto " data-sessionlink="ei=CPjwu5ji3bICFS4RIQod9j-M-A%3D%3D&feature=b-mv"><span class="video-thumb ux-thumb yt-thumb-default-194 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="http://s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Thumbnail" data-thumb="/dynamic/thumbs/<?php echo $video['thumbnail']; ?>" width="194"><span class="vertical-align"></span></span></span></span><span class="video-time"><?php echo $video['duration']; ?></span> |
| 190 | 190 | <button onclick=";return false;" title="Watch Later" type="button" class="addto-button video-actions addto-watch-later-button-sign-in yt-uix-button yt-uix-button-default yt-uix-button-short yt-uix-tooltip" data-button-menu-id="shared-addto-watch-later-login" data-video-ids="rLHU-_OhT8g" role="button"><span class="yt-uix-button-content"> <img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Watch Later"> |
@@ -210,17 +210,17 @@ discard block |
||
| 210 | 210 | </div> |
| 211 | 211 | <div class="browse-item-row ytg-box"> |
| 212 | 212 | <?php |
| 213 | - $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Autos & Vehicles' ORDER BY rand() LIMIT 4"); |
|
| 214 | - $stmt->execute(); |
|
| 215 | - $result = $stmt->get_result(); |
|
| 216 | - while($video = $result->fetch_assoc()) { |
|
| 217 | - $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
|
| 218 | - $video['duration'] = $__time_h->timestamp($video['duration']); |
|
| 219 | - $video['views'] = $__video_h->fetch_video_views($video['rid']); |
|
| 220 | - $video['author'] = htmlspecialchars($video['author']); |
|
| 221 | - $video['title'] = htmlspecialchars($video['title']); |
|
| 222 | - $video['description'] = $__video_h->shorten_description($video['description'], 50); |
|
| 223 | - ?> |
|
| 213 | + $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Autos & Vehicles' ORDER BY rand() LIMIT 4"); |
|
| 214 | + $stmt->execute(); |
|
| 215 | + $result = $stmt->get_result(); |
|
| 216 | + while($video = $result->fetch_assoc()) { |
|
| 217 | + $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
|
| 218 | + $video['duration'] = $__time_h->timestamp($video['duration']); |
|
| 219 | + $video['views'] = $__video_h->fetch_video_views($video['rid']); |
|
| 220 | + $video['author'] = htmlspecialchars($video['author']); |
|
| 221 | + $video['title'] = htmlspecialchars($video['title']); |
|
| 222 | + $video['description'] = $__video_h->shorten_description($video['description'], 50); |
|
| 223 | + ?> |
|
| 224 | 224 | <div class="browse-item yt-tile-default "> |
| 225 | 225 | <a href="/watch?v=<?php echo $video['rid']; ?>" class="ux-thumb-wrap yt-uix-sessionlink yt-uix-contextlink contains-addto " data-sessionlink="ei=CPjwu5ji3bICFS4RIQod9j-M-A%3D%3D&feature=b-mv"><span class="video-thumb ux-thumb yt-thumb-default-194 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="http://s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Thumbnail" data-thumb="/dynamic/thumbs/<?php echo $video['thumbnail']; ?>" width="194"><span class="vertical-align"></span></span></span></span><span class="video-time"><?php echo $video['duration']; ?></span> |
| 226 | 226 | <button onclick=";return false;" title="Watch Later" type="button" class="addto-button video-actions addto-watch-later-button-sign-in yt-uix-button yt-uix-button-default yt-uix-button-short yt-uix-tooltip" data-button-menu-id="shared-addto-watch-later-login" data-video-ids="rLHU-_OhT8g" role="button"><span class="yt-uix-button-content"> <img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Watch Later"> |
@@ -246,17 +246,17 @@ discard block |
||
| 246 | 246 | </div> |
| 247 | 247 | <div class="browse-item-row ytg-box"> |
| 248 | 248 | <?php |
| 249 | - $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Autos & Vehicles' ORDER BY rand() LIMIT 4"); |
|
| 250 | - $stmt->execute(); |
|
| 251 | - $result = $stmt->get_result(); |
|
| 252 | - while($video = $result->fetch_assoc()) { |
|
| 253 | - $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
|
| 254 | - $video['duration'] = $__time_h->timestamp($video['duration']); |
|
| 255 | - $video['views'] = $__video_h->fetch_video_views($video['rid']); |
|
| 256 | - $video['author'] = htmlspecialchars($video['author']); |
|
| 257 | - $video['title'] = htmlspecialchars($video['title']); |
|
| 258 | - $video['description'] = $__video_h->shorten_description($video['description'], 50); |
|
| 259 | - ?> |
|
| 249 | + $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Autos & Vehicles' ORDER BY rand() LIMIT 4"); |
|
| 250 | + $stmt->execute(); |
|
| 251 | + $result = $stmt->get_result(); |
|
| 252 | + while($video = $result->fetch_assoc()) { |
|
| 253 | + $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
|
| 254 | + $video['duration'] = $__time_h->timestamp($video['duration']); |
|
| 255 | + $video['views'] = $__video_h->fetch_video_views($video['rid']); |
|
| 256 | + $video['author'] = htmlspecialchars($video['author']); |
|
| 257 | + $video['title'] = htmlspecialchars($video['title']); |
|
| 258 | + $video['description'] = $__video_h->shorten_description($video['description'], 50); |
|
| 259 | + ?> |
|
| 260 | 260 | <div class="browse-item yt-tile-default "> |
| 261 | 261 | <a href="/watch?v=<?php echo $video['rid']; ?>" class="ux-thumb-wrap yt-uix-sessionlink yt-uix-contextlink contains-addto " data-sessionlink="ei=CPjwu5ji3bICFS4RIQod9j-M-A%3D%3D&feature=b-mv"><span class="video-thumb ux-thumb yt-thumb-default-194 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="http://s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Thumbnail" data-thumb="/dynamic/thumbs/<?php echo $video['thumbnail']; ?>" width="194"><span class="vertical-align"></span></span></span></span><span class="video-time"><?php echo $video['duration']; ?></span> |
| 262 | 262 | <button onclick=";return false;" title="Watch Later" type="button" class="addto-button video-actions addto-watch-later-button-sign-in yt-uix-button yt-uix-button-default yt-uix-button-short yt-uix-tooltip" data-button-menu-id="shared-addto-watch-later-login" data-video-ids="rLHU-_OhT8g" role="button"><span class="yt-uix-button-content"> <img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Watch Later"> |
@@ -282,17 +282,17 @@ discard block |
||
| 282 | 282 | </div> |
| 283 | 283 | <div class="browse-item-row ytg-box"> |
| 284 | 284 | <?php |
| 285 | - $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Autos & Vehicles' ORDER BY rand() LIMIT 4"); |
|
| 286 | - $stmt->execute(); |
|
| 287 | - $result = $stmt->get_result(); |
|
| 288 | - while($video = $result->fetch_assoc()) { |
|
| 289 | - $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
|
| 290 | - $video['duration'] = $__time_h->timestamp($video['duration']); |
|
| 291 | - $video['views'] = $__video_h->fetch_video_views($video['rid']); |
|
| 292 | - $video['author'] = htmlspecialchars($video['author']); |
|
| 293 | - $video['title'] = htmlspecialchars($video['title']); |
|
| 294 | - $video['description'] = $__video_h->shorten_description($video['description'], 50); |
|
| 295 | - ?> |
|
| 285 | + $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Autos & Vehicles' ORDER BY rand() LIMIT 4"); |
|
| 286 | + $stmt->execute(); |
|
| 287 | + $result = $stmt->get_result(); |
|
| 288 | + while($video = $result->fetch_assoc()) { |
|
| 289 | + $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
|
| 290 | + $video['duration'] = $__time_h->timestamp($video['duration']); |
|
| 291 | + $video['views'] = $__video_h->fetch_video_views($video['rid']); |
|
| 292 | + $video['author'] = htmlspecialchars($video['author']); |
|
| 293 | + $video['title'] = htmlspecialchars($video['title']); |
|
| 294 | + $video['description'] = $__video_h->shorten_description($video['description'], 50); |
|
| 295 | + ?> |
|
| 296 | 296 | <div class="browse-item yt-tile-default "> |
| 297 | 297 | <a href="/watch?v=<?php echo $video['rid']; ?>" class="ux-thumb-wrap yt-uix-sessionlink yt-uix-contextlink contains-addto " data-sessionlink="ei=CPjwu5ji3bICFS4RIQod9j-M-A%3D%3D&feature=b-mv"><span class="video-thumb ux-thumb yt-thumb-default-194 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="http://s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Thumbnail" data-thumb="/dynamic/thumbs/<?php echo $video['thumbnail']; ?>" width="194"><span class="vertical-align"></span></span></span></span><span class="video-time"><?php echo $video['duration']; ?></span> |
| 298 | 298 | <button onclick=";return false;" title="Watch Later" type="button" class="addto-button video-actions addto-watch-later-button-sign-in yt-uix-button yt-uix-button-default yt-uix-button-short yt-uix-tooltip" data-button-menu-id="shared-addto-watch-later-login" data-video-ids="rLHU-_OhT8g" role="button"><span class="yt-uix-button-content"> <img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Watch Later"> |
@@ -141,7 +141,7 @@ discard block |
||
| 141 | 141 | $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Autos & Vehicles' ORDER BY rand() LIMIT 4"); |
| 142 | 142 | $stmt->execute(); |
| 143 | 143 | $result = $stmt->get_result(); |
| 144 | - while($video = $result->fetch_assoc()) { |
|
| 144 | + while ($video = $result->fetch_assoc()) { |
|
| 145 | 145 | $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
| 146 | 146 | $video['duration'] = $__time_h->timestamp($video['duration']); |
| 147 | 147 | $video['views'] = $__video_h->fetch_video_views($video['rid']); |
@@ -177,7 +177,7 @@ discard block |
||
| 177 | 177 | $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Autos & Vehicles' ORDER BY rand() LIMIT 4"); |
| 178 | 178 | $stmt->execute(); |
| 179 | 179 | $result = $stmt->get_result(); |
| 180 | - while($video = $result->fetch_assoc()) { |
|
| 180 | + while ($video = $result->fetch_assoc()) { |
|
| 181 | 181 | $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
| 182 | 182 | $video['duration'] = $__time_h->timestamp($video['duration']); |
| 183 | 183 | $video['views'] = $__video_h->fetch_video_views($video['rid']); |
@@ -213,7 +213,7 @@ discard block |
||
| 213 | 213 | $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Autos & Vehicles' ORDER BY rand() LIMIT 4"); |
| 214 | 214 | $stmt->execute(); |
| 215 | 215 | $result = $stmt->get_result(); |
| 216 | - while($video = $result->fetch_assoc()) { |
|
| 216 | + while ($video = $result->fetch_assoc()) { |
|
| 217 | 217 | $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
| 218 | 218 | $video['duration'] = $__time_h->timestamp($video['duration']); |
| 219 | 219 | $video['views'] = $__video_h->fetch_video_views($video['rid']); |
@@ -249,7 +249,7 @@ discard block |
||
| 249 | 249 | $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Autos & Vehicles' ORDER BY rand() LIMIT 4"); |
| 250 | 250 | $stmt->execute(); |
| 251 | 251 | $result = $stmt->get_result(); |
| 252 | - while($video = $result->fetch_assoc()) { |
|
| 252 | + while ($video = $result->fetch_assoc()) { |
|
| 253 | 253 | $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
| 254 | 254 | $video['duration'] = $__time_h->timestamp($video['duration']); |
| 255 | 255 | $video['views'] = $__video_h->fetch_video_views($video['rid']); |
@@ -285,7 +285,7 @@ discard block |
||
| 285 | 285 | $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Autos & Vehicles' ORDER BY rand() LIMIT 4"); |
| 286 | 286 | $stmt->execute(); |
| 287 | 287 | $result = $stmt->get_result(); |
| 288 | - while($video = $result->fetch_assoc()) { |
|
| 288 | + while ($video = $result->fetch_assoc()) { |
|
| 289 | 289 | $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
| 290 | 290 | $video['duration'] = $__time_h->timestamp($video['duration']); |
| 291 | 291 | $video['views'] = $__video_h->fetch_video_views($video['rid']); |
@@ -199,32 +199,32 @@ |
||
| 199 | 199 | |
| 200 | 200 | <?php |
| 201 | 201 | while($video = $result6->fetch_assoc()) { |
| 202 | - if($__video_h->video_exists($video['reciever'])) { |
|
| 203 | - $_video = $__video_h->fetch_video_rid($video['reciever']); |
|
| 204 | - $_video['video_responses'] = $__video_h->get_video_responses($_video['rid']); |
|
| 205 | - $_video['age'] = $__time_h->time_elapsed_string($_video['publish']); |
|
| 206 | - $_video['duration'] = $__time_h->timestamp($_video['duration']); |
|
| 207 | - $_video['views'] = $__video_h->fetch_video_views($_video['rid']); |
|
| 208 | - $_video['author'] = htmlspecialchars($_video['author']); |
|
| 209 | - $_video['title'] = htmlspecialchars($_video['title']); |
|
| 210 | - $_video['description'] = $__video_h->shorten_description($_video['description'], 50); |
|
| 211 | - |
|
| 212 | - if($_video['thumbnail'] == ".png" && $_video['filename'] == ".mp4") { |
|
| 213 | - $status = "Corrupted"; |
|
| 214 | - } else if($_video['visibility'] == "v") { |
|
| 215 | - $status = "Approved"; |
|
| 216 | - } else if($_video['visibility'] == "n") { |
|
| 217 | - $status = "Approved"; |
|
| 218 | - } else if($_video['visibility'] == "o") { |
|
| 219 | - $status = "Disapproved"; |
|
| 220 | - } else { |
|
| 221 | - $status = "Unknown"; |
|
| 222 | - } |
|
| 202 | + if($__video_h->video_exists($video['reciever'])) { |
|
| 203 | + $_video = $__video_h->fetch_video_rid($video['reciever']); |
|
| 204 | + $_video['video_responses'] = $__video_h->get_video_responses($_video['rid']); |
|
| 205 | + $_video['age'] = $__time_h->time_elapsed_string($_video['publish']); |
|
| 206 | + $_video['duration'] = $__time_h->timestamp($_video['duration']); |
|
| 207 | + $_video['views'] = $__video_h->fetch_video_views($_video['rid']); |
|
| 208 | + $_video['author'] = htmlspecialchars($_video['author']); |
|
| 209 | + $_video['title'] = htmlspecialchars($_video['title']); |
|
| 210 | + $_video['description'] = $__video_h->shorten_description($_video['description'], 50); |
|
| 211 | + |
|
| 212 | + if($_video['thumbnail'] == ".png" && $_video['filename'] == ".mp4") { |
|
| 213 | + $status = "Corrupted"; |
|
| 214 | + } else if($_video['visibility'] == "v") { |
|
| 215 | + $status = "Approved"; |
|
| 216 | + } else if($_video['visibility'] == "n") { |
|
| 217 | + $status = "Approved"; |
|
| 218 | + } else if($_video['visibility'] == "o") { |
|
| 219 | + $status = "Disapproved"; |
|
| 220 | + } else { |
|
| 221 | + $status = "Unknown"; |
|
| 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 | <tr style="margin-top: 5px;" id="videoslist"> |
| 230 | 230 | <td class="video-manager-left"> |
@@ -169,15 +169,15 @@ discard block |
||
| 169 | 169 | $results = $result->num_rows; |
| 170 | 170 | |
| 171 | 171 | $number_of_result = $result->num_rows; |
| 172 | - $number_of_page = ceil ($number_of_result / $results_per_page); |
|
| 172 | + $number_of_page = ceil($number_of_result/$results_per_page); |
|
| 173 | 173 | |
| 174 | - if (!isset ($_GET['page']) ) { |
|
| 174 | + if (!isset ($_GET['page'])) { |
|
| 175 | 175 | $page = 1; |
| 176 | 176 | } else { |
| 177 | - $page = (int)$_GET['page']; |
|
| 177 | + $page = (int) $_GET['page']; |
|
| 178 | 178 | } |
| 179 | 179 | |
| 180 | - $page_first_result = ($page - 1) * $results_per_page; |
|
| 180 | + $page_first_result = ($page - 1)*$results_per_page; |
|
| 181 | 181 | |
| 182 | 182 | $stmt->close(); |
| 183 | 183 | ?> |
@@ -198,8 +198,8 @@ discard block |
||
| 198 | 198 | </tr> |
| 199 | 199 | |
| 200 | 200 | <?php |
| 201 | - while($video = $result6->fetch_assoc()) { |
|
| 202 | - if($__video_h->video_exists($video['reciever'])) { |
|
| 201 | + while ($video = $result6->fetch_assoc()) { |
|
| 202 | + if ($__video_h->video_exists($video['reciever'])) { |
|
| 203 | 203 | $_video = $__video_h->fetch_video_rid($video['reciever']); |
| 204 | 204 | $_video['video_responses'] = $__video_h->get_video_responses($_video['rid']); |
| 205 | 205 | $_video['age'] = $__time_h->time_elapsed_string($_video['publish']); |
@@ -209,19 +209,19 @@ discard block |
||
| 209 | 209 | $_video['title'] = htmlspecialchars($_video['title']); |
| 210 | 210 | $_video['description'] = $__video_h->shorten_description($_video['description'], 50); |
| 211 | 211 | |
| 212 | - if($_video['thumbnail'] == ".png" && $_video['filename'] == ".mp4") { |
|
| 212 | + if ($_video['thumbnail'] == ".png" && $_video['filename'] == ".mp4") { |
|
| 213 | 213 | $status = "Corrupted"; |
| 214 | - } else if($_video['visibility'] == "v") { |
|
| 214 | + } else if ($_video['visibility'] == "v") { |
|
| 215 | 215 | $status = "Approved"; |
| 216 | - } else if($_video['visibility'] == "n") { |
|
| 216 | + } else if ($_video['visibility'] == "n") { |
|
| 217 | 217 | $status = "Approved"; |
| 218 | - } else if($_video['visibility'] == "o") { |
|
| 218 | + } else if ($_video['visibility'] == "o") { |
|
| 219 | 219 | $status = "Disapproved"; |
| 220 | 220 | } else { |
| 221 | 221 | $status = "Unknown"; |
| 222 | 222 | } |
| 223 | 223 | |
| 224 | - if($_video['commenting'] == "a") |
|
| 224 | + if ($_video['commenting'] == "a") |
|
| 225 | 225 | $_video['commentstatus'] = "Commenting allowed"; |
| 226 | 226 | else |
| 227 | 227 | $_video['commentstatus'] = "Commenting disallowed"; |
@@ -267,7 +267,7 @@ discard block |
||
| 267 | 267 | </div> |
| 268 | 268 | </center> |
| 269 | 269 | |
| 270 | - <?php for($page = 1; $page<= $number_of_page; $page++) { ?> |
|
| 270 | + <?php for ($page = 1; $page <= $number_of_page; $page++) { ?> |
|
| 271 | 271 | <button class="yt-uix-button yt-uix-button-default" onclick="ajax_fetch_videomanager(<?php echo $page; ?>)"><?php echo $page; ?></button> |
| 272 | 272 | <?php } ?> |
| 273 | 273 | |
@@ -313,7 +313,7 @@ discard block |
||
| 313 | 313 | </script> |
| 314 | 314 | |
| 315 | 315 | <?php |
| 316 | - if($result6->num_rows == 0) { echo " |
|
| 316 | + if ($result6->num_rows == 0) { echo " |
|
| 317 | 317 | <br>Welcome to your Video Manager! You can manage your uploaded videos here.<br> |
| 318 | 318 | <a href=\"upload_video\"> |
| 319 | 319 | <button type=\"button\" class=\" yt-uix-button yt-uix-button-default\" role=\"button\"> |
@@ -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"> |
@@ -95,7 +95,7 @@ |
||
| 95 | 95 | $stmt->execute(); |
| 96 | 96 | $result = $stmt->get_result(); |
| 97 | 97 | } |
| 98 | - ?> |
|
| 98 | + ?> |
|
| 99 | 99 | {'paging': null, 'feed_html': ` |
| 100 | 100 | <div class=\'feed-header no-metadata\'> |
| 101 | 101 | <div class=\'feed-header-thumb\'> |
@@ -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 = ? ORDER BY id DESC LIMIT 20"); |
@@ -11,8 +11,8 @@ discard block |
||
| 11 | 11 | <?php $__time_h = new time_helper(); ?> |
| 12 | 12 | <?php header('Content-Type: application/json'); ?> |
| 13 | 13 | <?php |
| 14 | - if(!isset($_GET['action_load_user_feed'])) { |
|
| 15 | - switch(@$_GET['chart_name']) { |
|
| 14 | + if (!isset($_GET['action_load_user_feed'])) { |
|
| 15 | + switch (@$_GET['chart_name']) { |
|
| 16 | 16 | case "trending": |
| 17 | 17 | $category = 'Trending'; |
| 18 | 18 | $diviconn = 'trending'; |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | break; |
| 48 | 48 | } |
| 49 | 49 | |
| 50 | - switch(@$_GET['feed_name']) { |
|
| 50 | + switch (@$_GET['feed_name']) { |
|
| 51 | 51 | case "trending": |
| 52 | 52 | $category = 'Trending'; |
| 53 | 53 | $diviconn = 'trending'; |
@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | <div class=\'feed-page\'> |
| 110 | 110 | <ul> |
| 111 | 111 | <?php |
| 112 | - while($video = $result->fetch_assoc()) { |
|
| 112 | + while ($video = $result->fetch_assoc()) { |
|
| 113 | 113 | $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
| 114 | 114 | $video['duration'] = $__time_h->timestamp($video['duration']); |
| 115 | 115 | $video['views'] = $__video_h->fetch_video_views($video['rid']); |