@@ -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"> |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | ?> |
176 | 176 | <?php |
177 | 177 | $stmt6 = $__db->prepare("SELECT * FROM favorite_video WHERE sender = :search ORDER BY id DESC LIMIT :pfirst, :pper"); |
178 | - $stmt6->bindParam(":search", $search); |
|
178 | + $stmt6->bindParam(":search", $search); |
|
179 | 179 | $stmt6->bindParam(":pfirst", $page_first_result); |
180 | 180 | $stmt6->bindParam(":pper", $results_per_page); |
181 | 181 | $stmt6->execute(); |
@@ -192,32 +192,32 @@ discard block |
||
192 | 192 | |
193 | 193 | <?php |
194 | 194 | while($video = $stmt6->fetch(PDO::FETCH_ASSOC)) { |
195 | - if($__video_h->video_exists($video['reciever'])) { |
|
196 | - $_video = $__video_h->fetch_video_rid($video['reciever']); |
|
197 | - $_video['video_responses'] = $__video_h->get_video_responses($_video['rid']); |
|
198 | - $_video['age'] = $__time_h->time_elapsed_string($_video['publish']); |
|
199 | - $_video['duration'] = $__time_h->timestamp($_video['duration']); |
|
200 | - $_video['views'] = $__video_h->fetch_video_views($_video['rid']); |
|
201 | - $_video['author'] = htmlspecialchars($_video['author']); |
|
202 | - $_video['title'] = htmlspecialchars($_video['title']); |
|
203 | - $_video['description'] = $__video_h->shorten_description($_video['description'], 50); |
|
204 | - |
|
205 | - if($_video['thumbnail'] == ".png" && $_video['filename'] == ".mp4") { |
|
206 | - $status = "Corrupted"; |
|
207 | - } else if($_video['visibility'] == "v") { |
|
208 | - $status = "Approved"; |
|
209 | - } else if($_video['visibility'] == "n") { |
|
210 | - $status = "Approved"; |
|
211 | - } else if($_video['visibility'] == "o") { |
|
212 | - $status = "Disapproved"; |
|
213 | - } else { |
|
214 | - $status = "Unknown"; |
|
215 | - } |
|
195 | + if($__video_h->video_exists($video['reciever'])) { |
|
196 | + $_video = $__video_h->fetch_video_rid($video['reciever']); |
|
197 | + $_video['video_responses'] = $__video_h->get_video_responses($_video['rid']); |
|
198 | + $_video['age'] = $__time_h->time_elapsed_string($_video['publish']); |
|
199 | + $_video['duration'] = $__time_h->timestamp($_video['duration']); |
|
200 | + $_video['views'] = $__video_h->fetch_video_views($_video['rid']); |
|
201 | + $_video['author'] = htmlspecialchars($_video['author']); |
|
202 | + $_video['title'] = htmlspecialchars($_video['title']); |
|
203 | + $_video['description'] = $__video_h->shorten_description($_video['description'], 50); |
|
204 | + |
|
205 | + if($_video['thumbnail'] == ".png" && $_video['filename'] == ".mp4") { |
|
206 | + $status = "Corrupted"; |
|
207 | + } else if($_video['visibility'] == "v") { |
|
208 | + $status = "Approved"; |
|
209 | + } else if($_video['visibility'] == "n") { |
|
210 | + $status = "Approved"; |
|
211 | + } else if($_video['visibility'] == "o") { |
|
212 | + $status = "Disapproved"; |
|
213 | + } else { |
|
214 | + $status = "Unknown"; |
|
215 | + } |
|
216 | 216 | |
217 | - if($_video['commenting'] == "a") |
|
218 | - $_video['commentstatus'] = "Commenting allowed"; |
|
219 | - else |
|
220 | - $_video['commentstatus'] = "Commenting disallowed"; |
|
217 | + if($_video['commenting'] == "a") |
|
218 | + $_video['commentstatus'] = "Commenting allowed"; |
|
219 | + else |
|
220 | + $_video['commentstatus'] = "Commenting disallowed"; |
|
221 | 221 | ?> |
222 | 222 | <tr style="margin-top: 5px;" id="videoslist"> |
223 | 223 | <td class="video-manager-left"> |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | <?php $__user_h = new user_helper($__db); ?> |
11 | 11 | <?php $__db_h = new db_helper(); ?> |
12 | 12 | <?php $__time_h = new time_helper(); error_reporting(E_ERROR | E_PARSE); ?> |
13 | -<?php if(!isset($_SESSION['siteusername'])) { header("Location: /sign_in"); } ?> |
|
13 | +<?php if (!isset($_SESSION['siteusername'])) { header("Location: /sign_in"); } ?> |
|
14 | 14 | <!DOCTYPE html> |
15 | 15 | <html dir="ltr"> |
16 | 16 | <head> |
@@ -163,15 +163,15 @@ discard block |
||
163 | 163 | $stmt->execute(); |
164 | 164 | |
165 | 165 | $number_of_result = $stmt->rowCount(); |
166 | - $number_of_page = ceil ($number_of_result / $results_per_page); |
|
166 | + $number_of_page = ceil($number_of_result/$results_per_page); |
|
167 | 167 | |
168 | - if (!isset ($_GET['page']) ) { |
|
168 | + if (!isset ($_GET['page'])) { |
|
169 | 169 | $page = 1; |
170 | 170 | } else { |
171 | - $page = (int)$_GET['page']; |
|
171 | + $page = (int) $_GET['page']; |
|
172 | 172 | } |
173 | 173 | |
174 | - $page_first_result = ($page - 1) * $results_per_page; |
|
174 | + $page_first_result = ($page - 1)*$results_per_page; |
|
175 | 175 | ?> |
176 | 176 | <?php |
177 | 177 | $stmt6 = $__db->prepare("SELECT * FROM favorite_video WHERE sender = :search ORDER BY id DESC LIMIT :pfirst, :pper"); |
@@ -191,8 +191,8 @@ discard block |
||
191 | 191 | </tr> |
192 | 192 | |
193 | 193 | <?php |
194 | - while($video = $stmt6->fetch(PDO::FETCH_ASSOC)) { |
|
195 | - if($__video_h->video_exists($video['reciever'])) { |
|
194 | + while ($video = $stmt6->fetch(PDO::FETCH_ASSOC)) { |
|
195 | + if ($__video_h->video_exists($video['reciever'])) { |
|
196 | 196 | $_video = $__video_h->fetch_video_rid($video['reciever']); |
197 | 197 | $_video['video_responses'] = $__video_h->get_video_responses($_video['rid']); |
198 | 198 | $_video['age'] = $__time_h->time_elapsed_string($_video['publish']); |
@@ -202,19 +202,19 @@ discard block |
||
202 | 202 | $_video['title'] = htmlspecialchars($_video['title']); |
203 | 203 | $_video['description'] = $__video_h->shorten_description($_video['description'], 50); |
204 | 204 | |
205 | - if($_video['thumbnail'] == ".png" && $_video['filename'] == ".mp4") { |
|
205 | + if ($_video['thumbnail'] == ".png" && $_video['filename'] == ".mp4") { |
|
206 | 206 | $status = "Corrupted"; |
207 | - } else if($_video['visibility'] == "v") { |
|
207 | + } else if ($_video['visibility'] == "v") { |
|
208 | 208 | $status = "Approved"; |
209 | - } else if($_video['visibility'] == "n") { |
|
209 | + } else if ($_video['visibility'] == "n") { |
|
210 | 210 | $status = "Approved"; |
211 | - } else if($_video['visibility'] == "o") { |
|
211 | + } else if ($_video['visibility'] == "o") { |
|
212 | 212 | $status = "Disapproved"; |
213 | 213 | } else { |
214 | 214 | $status = "Unknown"; |
215 | 215 | } |
216 | 216 | |
217 | - if($_video['commenting'] == "a") |
|
217 | + if ($_video['commenting'] == "a") |
|
218 | 218 | $_video['commentstatus'] = "Commenting allowed"; |
219 | 219 | else |
220 | 220 | $_video['commentstatus'] = "Commenting disallowed"; |
@@ -260,7 +260,7 @@ discard block |
||
260 | 260 | </div> |
261 | 261 | </center> |
262 | 262 | |
263 | - <?php for($page = 1; $page<= $number_of_page; $page++) { ?> |
|
263 | + <?php for ($page = 1; $page <= $number_of_page; $page++) { ?> |
|
264 | 264 | <button class="yt-uix-button yt-uix-button-default" onclick="ajax_fetch_videomanager(<?php echo $page; ?>)"><?php echo $page; ?></button> |
265 | 265 | <?php } ?> |
266 | 266 | |
@@ -306,7 +306,7 @@ discard block |
||
306 | 306 | </script> |
307 | 307 | |
308 | 308 | <?php |
309 | - if($stmt6->rowCount() == 0) { echo " |
|
309 | + if ($stmt6->rowCount() == 0) { echo " |
|
310 | 310 | <br>Welcome to your Video Manager! You can manage your uploaded videos here.<br> |
311 | 311 | <a href=\"upload_video\"> |
312 | 312 | <button type=\"button\" class=\" yt-uix-button yt-uix-button-default\" role=\"button\"> |
@@ -8,7 +8,7 @@ discard block |
||
8 | 8 | <?php $__user_h = new user_helper($__db); ?> |
9 | 9 | <?php $__db_h = new db_helper(); ?> |
10 | 10 | <?php $__time_h = new time_helper(); ?> |
11 | -<?php if(!isset($_SESSION['siteusername'])) { header("Location: /sign_in"); } ?> |
|
11 | +<?php if (!isset($_SESSION['siteusername'])) { header("Location: /sign_in"); } ?> |
|
12 | 12 | <!DOCTYPE html> |
13 | 13 | <html> |
14 | 14 | <head> |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | <b>Category</b> <br> |
91 | 91 | <select style="margin-top:5px;" name="category" class="yt-uix-button yt-uix-button-default"> |
92 | 92 | <?php $categories = ["None", "Film & Animation", "Autos & Vehicles", "Music", "Pets & Animals", "Sports", "Travel & Events", "Gaming", "People & Blogs", "Comedy", "Entertainment", "News & Politics", "Howto & Style", "Education", "Science & Technology", "Nonprofits & Activism"]; ?> |
93 | - <?php foreach($categories as $categoryTag) { ?> |
|
93 | + <?php foreach ($categories as $categoryTag) { ?> |
|
94 | 94 | <option value="<?php echo $categoryTag; ?>"><?php echo $categoryTag; ?></option> |
95 | 95 | <?php } ?> |
96 | 96 | </select><br><br> |
@@ -138,16 +138,16 @@ 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 = 'Pets & Animals' ORDER BY rand() LIMIT 4"); |
|
142 | - $stmt->execute(); |
|
143 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
144 | - $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
|
145 | - $video['duration'] = $__time_h->timestamp($video['duration']); |
|
146 | - $video['views'] = $__video_h->fetch_video_views($video['rid']); |
|
147 | - $video['author'] = htmlspecialchars($video['author']); |
|
148 | - $video['title'] = htmlspecialchars($video['title']); |
|
149 | - $video['description'] = $__video_h->shorten_description($video['description'], 50); |
|
150 | - ?> |
|
141 | + $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Pets & Animals' ORDER BY rand() LIMIT 4"); |
|
142 | + $stmt->execute(); |
|
143 | + while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
144 | + $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
|
145 | + $video['duration'] = $__time_h->timestamp($video['duration']); |
|
146 | + $video['views'] = $__video_h->fetch_video_views($video['rid']); |
|
147 | + $video['author'] = htmlspecialchars($video['author']); |
|
148 | + $video['title'] = htmlspecialchars($video['title']); |
|
149 | + $video['description'] = $__video_h->shorten_description($video['description'], 50); |
|
150 | + ?> |
|
151 | 151 | <div class="browse-item yt-tile-default "> |
152 | 152 | <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> |
153 | 153 | <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"> |
@@ -173,16 +173,16 @@ discard block |
||
173 | 173 | </div> |
174 | 174 | <div class="browse-item-row ytg-box"> |
175 | 175 | <?php |
176 | - $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Pets & Animals' ORDER BY rand() LIMIT 4"); |
|
177 | - $stmt->execute(); |
|
178 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
179 | - $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
|
180 | - $video['duration'] = $__time_h->timestamp($video['duration']); |
|
181 | - $video['views'] = $__video_h->fetch_video_views($video['rid']); |
|
182 | - $video['author'] = htmlspecialchars($video['author']); |
|
183 | - $video['title'] = htmlspecialchars($video['title']); |
|
184 | - $video['description'] = $__video_h->shorten_description($video['description'], 50); |
|
185 | - ?> |
|
176 | + $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Pets & Animals' ORDER BY rand() LIMIT 4"); |
|
177 | + $stmt->execute(); |
|
178 | + while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
179 | + $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
|
180 | + $video['duration'] = $__time_h->timestamp($video['duration']); |
|
181 | + $video['views'] = $__video_h->fetch_video_views($video['rid']); |
|
182 | + $video['author'] = htmlspecialchars($video['author']); |
|
183 | + $video['title'] = htmlspecialchars($video['title']); |
|
184 | + $video['description'] = $__video_h->shorten_description($video['description'], 50); |
|
185 | + ?> |
|
186 | 186 | <div class="browse-item yt-tile-default "> |
187 | 187 | <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> |
188 | 188 | <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"> |
@@ -208,16 +208,16 @@ discard block |
||
208 | 208 | </div> |
209 | 209 | <div class="browse-item-row ytg-box"> |
210 | 210 | <?php |
211 | - $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Pets & Animals' ORDER BY rand() LIMIT 4"); |
|
212 | - $stmt->execute(); |
|
213 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
214 | - $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
|
215 | - $video['duration'] = $__time_h->timestamp($video['duration']); |
|
216 | - $video['views'] = $__video_h->fetch_video_views($video['rid']); |
|
217 | - $video['author'] = htmlspecialchars($video['author']); |
|
218 | - $video['title'] = htmlspecialchars($video['title']); |
|
219 | - $video['description'] = $__video_h->shorten_description($video['description'], 50); |
|
220 | - ?> |
|
211 | + $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Pets & Animals' ORDER BY rand() LIMIT 4"); |
|
212 | + $stmt->execute(); |
|
213 | + while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
214 | + $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
|
215 | + $video['duration'] = $__time_h->timestamp($video['duration']); |
|
216 | + $video['views'] = $__video_h->fetch_video_views($video['rid']); |
|
217 | + $video['author'] = htmlspecialchars($video['author']); |
|
218 | + $video['title'] = htmlspecialchars($video['title']); |
|
219 | + $video['description'] = $__video_h->shorten_description($video['description'], 50); |
|
220 | + ?> |
|
221 | 221 | <div class="browse-item yt-tile-default "> |
222 | 222 | <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> |
223 | 223 | <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"> |
@@ -243,16 +243,16 @@ discard block |
||
243 | 243 | </div> |
244 | 244 | <div class="browse-item-row ytg-box"> |
245 | 245 | <?php |
246 | - $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Pets & Animals' ORDER BY rand() LIMIT 4"); |
|
247 | - $stmt->execute(); |
|
248 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
249 | - $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
|
250 | - $video['duration'] = $__time_h->timestamp($video['duration']); |
|
251 | - $video['views'] = $__video_h->fetch_video_views($video['rid']); |
|
252 | - $video['author'] = htmlspecialchars($video['author']); |
|
253 | - $video['title'] = htmlspecialchars($video['title']); |
|
254 | - $video['description'] = $__video_h->shorten_description($video['description'], 50); |
|
255 | - ?> |
|
246 | + $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Pets & Animals' ORDER BY rand() LIMIT 4"); |
|
247 | + $stmt->execute(); |
|
248 | + while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
249 | + $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
|
250 | + $video['duration'] = $__time_h->timestamp($video['duration']); |
|
251 | + $video['views'] = $__video_h->fetch_video_views($video['rid']); |
|
252 | + $video['author'] = htmlspecialchars($video['author']); |
|
253 | + $video['title'] = htmlspecialchars($video['title']); |
|
254 | + $video['description'] = $__video_h->shorten_description($video['description'], 50); |
|
255 | + ?> |
|
256 | 256 | <div class="browse-item yt-tile-default "> |
257 | 257 | <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> |
258 | 258 | <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"> |
@@ -278,16 +278,16 @@ discard block |
||
278 | 278 | </div> |
279 | 279 | <div class="browse-item-row ytg-box"> |
280 | 280 | <?php |
281 | - $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Pets & Animals' ORDER BY rand() LIMIT 4"); |
|
282 | - $stmt->execute(); |
|
283 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
284 | - $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
|
285 | - $video['duration'] = $__time_h->timestamp($video['duration']); |
|
286 | - $video['views'] = $__video_h->fetch_video_views($video['rid']); |
|
287 | - $video['author'] = htmlspecialchars($video['author']); |
|
288 | - $video['title'] = htmlspecialchars($video['title']); |
|
289 | - $video['description'] = $__video_h->shorten_description($video['description'], 50); |
|
290 | - ?> |
|
281 | + $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Pets & Animals' ORDER BY rand() LIMIT 4"); |
|
282 | + $stmt->execute(); |
|
283 | + while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
284 | + $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
|
285 | + $video['duration'] = $__time_h->timestamp($video['duration']); |
|
286 | + $video['views'] = $__video_h->fetch_video_views($video['rid']); |
|
287 | + $video['author'] = htmlspecialchars($video['author']); |
|
288 | + $video['title'] = htmlspecialchars($video['title']); |
|
289 | + $video['description'] = $__video_h->shorten_description($video['description'], 50); |
|
290 | + ?> |
|
291 | 291 | <div class="browse-item yt-tile-default "> |
292 | 292 | <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> |
293 | 293 | <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"> |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | <?php |
141 | 141 | $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Pets & Animals' ORDER BY rand() LIMIT 4"); |
142 | 142 | $stmt->execute(); |
143 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
143 | + while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
144 | 144 | $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
145 | 145 | $video['duration'] = $__time_h->timestamp($video['duration']); |
146 | 146 | $video['views'] = $__video_h->fetch_video_views($video['rid']); |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | <?php |
176 | 176 | $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Pets & Animals' ORDER BY rand() LIMIT 4"); |
177 | 177 | $stmt->execute(); |
178 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
178 | + while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
179 | 179 | $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
180 | 180 | $video['duration'] = $__time_h->timestamp($video['duration']); |
181 | 181 | $video['views'] = $__video_h->fetch_video_views($video['rid']); |
@@ -210,7 +210,7 @@ discard block |
||
210 | 210 | <?php |
211 | 211 | $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Pets & Animals' ORDER BY rand() LIMIT 4"); |
212 | 212 | $stmt->execute(); |
213 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
213 | + while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
214 | 214 | $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
215 | 215 | $video['duration'] = $__time_h->timestamp($video['duration']); |
216 | 216 | $video['views'] = $__video_h->fetch_video_views($video['rid']); |
@@ -245,7 +245,7 @@ discard block |
||
245 | 245 | <?php |
246 | 246 | $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Pets & Animals' ORDER BY rand() LIMIT 4"); |
247 | 247 | $stmt->execute(); |
248 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
248 | + while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
249 | 249 | $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
250 | 250 | $video['duration'] = $__time_h->timestamp($video['duration']); |
251 | 251 | $video['views'] = $__video_h->fetch_video_views($video['rid']); |
@@ -280,7 +280,7 @@ discard block |
||
280 | 280 | <?php |
281 | 281 | $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Pets & Animals' ORDER BY rand() LIMIT 4"); |
282 | 282 | $stmt->execute(); |
283 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
283 | + while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
284 | 284 | $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
285 | 285 | $video['duration'] = $__time_h->timestamp($video['duration']); |
286 | 286 | $video['views'] = $__video_h->fetch_video_views($video['rid']); |
@@ -138,16 +138,16 @@ 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 = 'Gaming' ORDER BY rand() LIMIT 4"); |
|
142 | - $stmt->execute(); |
|
143 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
144 | - $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
|
145 | - $video['duration'] = $__time_h->timestamp($video['duration']); |
|
146 | - $video['views'] = $__video_h->fetch_video_views($video['rid']); |
|
147 | - $video['author'] = htmlspecialchars($video['author']); |
|
148 | - $video['title'] = htmlspecialchars($video['title']); |
|
149 | - $video['description'] = $__video_h->shorten_description($video['description'], 50); |
|
150 | - ?> |
|
141 | + $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Gaming' ORDER BY rand() LIMIT 4"); |
|
142 | + $stmt->execute(); |
|
143 | + while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
144 | + $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
|
145 | + $video['duration'] = $__time_h->timestamp($video['duration']); |
|
146 | + $video['views'] = $__video_h->fetch_video_views($video['rid']); |
|
147 | + $video['author'] = htmlspecialchars($video['author']); |
|
148 | + $video['title'] = htmlspecialchars($video['title']); |
|
149 | + $video['description'] = $__video_h->shorten_description($video['description'], 50); |
|
150 | + ?> |
|
151 | 151 | <div class="browse-item yt-tile-default "> |
152 | 152 | <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> |
153 | 153 | <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"> |
@@ -173,16 +173,16 @@ discard block |
||
173 | 173 | </div> |
174 | 174 | <div class="browse-item-row ytg-box"> |
175 | 175 | <?php |
176 | - $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Gaming' ORDER BY rand() LIMIT 4"); |
|
177 | - $stmt->execute(); |
|
178 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
179 | - $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
|
180 | - $video['duration'] = $__time_h->timestamp($video['duration']); |
|
181 | - $video['views'] = $__video_h->fetch_video_views($video['rid']); |
|
182 | - $video['author'] = htmlspecialchars($video['author']); |
|
183 | - $video['title'] = htmlspecialchars($video['title']); |
|
184 | - $video['description'] = $__video_h->shorten_description($video['description'], 50); |
|
185 | - ?> |
|
176 | + $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Gaming' ORDER BY rand() LIMIT 4"); |
|
177 | + $stmt->execute(); |
|
178 | + while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
179 | + $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
|
180 | + $video['duration'] = $__time_h->timestamp($video['duration']); |
|
181 | + $video['views'] = $__video_h->fetch_video_views($video['rid']); |
|
182 | + $video['author'] = htmlspecialchars($video['author']); |
|
183 | + $video['title'] = htmlspecialchars($video['title']); |
|
184 | + $video['description'] = $__video_h->shorten_description($video['description'], 50); |
|
185 | + ?> |
|
186 | 186 | <div class="browse-item yt-tile-default "> |
187 | 187 | <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> |
188 | 188 | <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"> |
@@ -208,16 +208,16 @@ discard block |
||
208 | 208 | </div> |
209 | 209 | <div class="browse-item-row ytg-box"> |
210 | 210 | <?php |
211 | - $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Gaming' ORDER BY rand() LIMIT 4"); |
|
212 | - $stmt->execute(); |
|
213 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
214 | - $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
|
215 | - $video['duration'] = $__time_h->timestamp($video['duration']); |
|
216 | - $video['views'] = $__video_h->fetch_video_views($video['rid']); |
|
217 | - $video['author'] = htmlspecialchars($video['author']); |
|
218 | - $video['title'] = htmlspecialchars($video['title']); |
|
219 | - $video['description'] = $__video_h->shorten_description($video['description'], 50); |
|
220 | - ?> |
|
211 | + $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Gaming' ORDER BY rand() LIMIT 4"); |
|
212 | + $stmt->execute(); |
|
213 | + while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
214 | + $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
|
215 | + $video['duration'] = $__time_h->timestamp($video['duration']); |
|
216 | + $video['views'] = $__video_h->fetch_video_views($video['rid']); |
|
217 | + $video['author'] = htmlspecialchars($video['author']); |
|
218 | + $video['title'] = htmlspecialchars($video['title']); |
|
219 | + $video['description'] = $__video_h->shorten_description($video['description'], 50); |
|
220 | + ?> |
|
221 | 221 | <div class="browse-item yt-tile-default "> |
222 | 222 | <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> |
223 | 223 | <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"> |
@@ -243,16 +243,16 @@ discard block |
||
243 | 243 | </div> |
244 | 244 | <div class="browse-item-row ytg-box"> |
245 | 245 | <?php |
246 | - $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Gaming' ORDER BY rand() LIMIT 4"); |
|
247 | - $stmt->execute(); |
|
248 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
249 | - $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
|
250 | - $video['duration'] = $__time_h->timestamp($video['duration']); |
|
251 | - $video['views'] = $__video_h->fetch_video_views($video['rid']); |
|
252 | - $video['author'] = htmlspecialchars($video['author']); |
|
253 | - $video['title'] = htmlspecialchars($video['title']); |
|
254 | - $video['description'] = $__video_h->shorten_description($video['description'], 50); |
|
255 | - ?> |
|
246 | + $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Gaming' ORDER BY rand() LIMIT 4"); |
|
247 | + $stmt->execute(); |
|
248 | + while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
249 | + $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
|
250 | + $video['duration'] = $__time_h->timestamp($video['duration']); |
|
251 | + $video['views'] = $__video_h->fetch_video_views($video['rid']); |
|
252 | + $video['author'] = htmlspecialchars($video['author']); |
|
253 | + $video['title'] = htmlspecialchars($video['title']); |
|
254 | + $video['description'] = $__video_h->shorten_description($video['description'], 50); |
|
255 | + ?> |
|
256 | 256 | <div class="browse-item yt-tile-default "> |
257 | 257 | <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> |
258 | 258 | <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"> |
@@ -278,16 +278,16 @@ discard block |
||
278 | 278 | </div> |
279 | 279 | <div class="browse-item-row ytg-box"> |
280 | 280 | <?php |
281 | - $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Gaming' ORDER BY rand() LIMIT 4"); |
|
282 | - $stmt->execute(); |
|
283 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
284 | - $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
|
285 | - $video['duration'] = $__time_h->timestamp($video['duration']); |
|
286 | - $video['views'] = $__video_h->fetch_video_views($video['rid']); |
|
287 | - $video['author'] = htmlspecialchars($video['author']); |
|
288 | - $video['title'] = htmlspecialchars($video['title']); |
|
289 | - $video['description'] = $__video_h->shorten_description($video['description'], 50); |
|
290 | - ?> |
|
281 | + $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Gaming' ORDER BY rand() LIMIT 4"); |
|
282 | + $stmt->execute(); |
|
283 | + while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
284 | + $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
|
285 | + $video['duration'] = $__time_h->timestamp($video['duration']); |
|
286 | + $video['views'] = $__video_h->fetch_video_views($video['rid']); |
|
287 | + $video['author'] = htmlspecialchars($video['author']); |
|
288 | + $video['title'] = htmlspecialchars($video['title']); |
|
289 | + $video['description'] = $__video_h->shorten_description($video['description'], 50); |
|
290 | + ?> |
|
291 | 291 | <div class="browse-item yt-tile-default "> |
292 | 292 | <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> |
293 | 293 | <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"> |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | <?php |
141 | 141 | $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Gaming' ORDER BY rand() LIMIT 4"); |
142 | 142 | $stmt->execute(); |
143 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
143 | + while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
144 | 144 | $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
145 | 145 | $video['duration'] = $__time_h->timestamp($video['duration']); |
146 | 146 | $video['views'] = $__video_h->fetch_video_views($video['rid']); |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | <?php |
176 | 176 | $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Gaming' ORDER BY rand() LIMIT 4"); |
177 | 177 | $stmt->execute(); |
178 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
178 | + while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
179 | 179 | $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
180 | 180 | $video['duration'] = $__time_h->timestamp($video['duration']); |
181 | 181 | $video['views'] = $__video_h->fetch_video_views($video['rid']); |
@@ -210,7 +210,7 @@ discard block |
||
210 | 210 | <?php |
211 | 211 | $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Gaming' ORDER BY rand() LIMIT 4"); |
212 | 212 | $stmt->execute(); |
213 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
213 | + while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
214 | 214 | $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
215 | 215 | $video['duration'] = $__time_h->timestamp($video['duration']); |
216 | 216 | $video['views'] = $__video_h->fetch_video_views($video['rid']); |
@@ -245,7 +245,7 @@ discard block |
||
245 | 245 | <?php |
246 | 246 | $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Gaming' ORDER BY rand() LIMIT 4"); |
247 | 247 | $stmt->execute(); |
248 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
248 | + while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
249 | 249 | $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
250 | 250 | $video['duration'] = $__time_h->timestamp($video['duration']); |
251 | 251 | $video['views'] = $__video_h->fetch_video_views($video['rid']); |
@@ -280,7 +280,7 @@ discard block |
||
280 | 280 | <?php |
281 | 281 | $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Gaming' ORDER BY rand() LIMIT 4"); |
282 | 282 | $stmt->execute(); |
283 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
283 | + while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
284 | 284 | $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
285 | 285 | $video['duration'] = $__time_h->timestamp($video['duration']); |
286 | 286 | $video['views'] = $__video_h->fetch_video_views($video['rid']); |
@@ -138,16 +138,16 @@ 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 = 'Travel & Events' ORDER BY rand() LIMIT 4"); |
|
142 | - $stmt->execute(); |
|
143 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
144 | - $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
|
145 | - $video['duration'] = $__time_h->timestamp($video['duration']); |
|
146 | - $video['views'] = $__video_h->fetch_video_views($video['rid']); |
|
147 | - $video['author'] = htmlspecialchars($video['author']); |
|
148 | - $video['title'] = htmlspecialchars($video['title']); |
|
149 | - $video['description'] = $__video_h->shorten_description($video['description'], 50); |
|
150 | - ?> |
|
141 | + $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Travel & Events' ORDER BY rand() LIMIT 4"); |
|
142 | + $stmt->execute(); |
|
143 | + while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
144 | + $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
|
145 | + $video['duration'] = $__time_h->timestamp($video['duration']); |
|
146 | + $video['views'] = $__video_h->fetch_video_views($video['rid']); |
|
147 | + $video['author'] = htmlspecialchars($video['author']); |
|
148 | + $video['title'] = htmlspecialchars($video['title']); |
|
149 | + $video['description'] = $__video_h->shorten_description($video['description'], 50); |
|
150 | + ?> |
|
151 | 151 | <div class="browse-item yt-tile-default "> |
152 | 152 | <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> |
153 | 153 | <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"> |
@@ -173,16 +173,16 @@ discard block |
||
173 | 173 | </div> |
174 | 174 | <div class="browse-item-row ytg-box"> |
175 | 175 | <?php |
176 | - $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Travel & Events' ORDER BY rand() LIMIT 4"); |
|
177 | - $stmt->execute(); |
|
178 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
179 | - $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
|
180 | - $video['duration'] = $__time_h->timestamp($video['duration']); |
|
181 | - $video['views'] = $__video_h->fetch_video_views($video['rid']); |
|
182 | - $video['author'] = htmlspecialchars($video['author']); |
|
183 | - $video['title'] = htmlspecialchars($video['title']); |
|
184 | - $video['description'] = $__video_h->shorten_description($video['description'], 50); |
|
185 | - ?> |
|
176 | + $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Travel & Events' ORDER BY rand() LIMIT 4"); |
|
177 | + $stmt->execute(); |
|
178 | + while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
179 | + $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
|
180 | + $video['duration'] = $__time_h->timestamp($video['duration']); |
|
181 | + $video['views'] = $__video_h->fetch_video_views($video['rid']); |
|
182 | + $video['author'] = htmlspecialchars($video['author']); |
|
183 | + $video['title'] = htmlspecialchars($video['title']); |
|
184 | + $video['description'] = $__video_h->shorten_description($video['description'], 50); |
|
185 | + ?> |
|
186 | 186 | <div class="browse-item yt-tile-default "> |
187 | 187 | <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> |
188 | 188 | <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"> |
@@ -208,16 +208,16 @@ discard block |
||
208 | 208 | </div> |
209 | 209 | <div class="browse-item-row ytg-box"> |
210 | 210 | <?php |
211 | - $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Travel & Events' ORDER BY rand() LIMIT 4"); |
|
212 | - $stmt->execute(); |
|
213 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
214 | - $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
|
215 | - $video['duration'] = $__time_h->timestamp($video['duration']); |
|
216 | - $video['views'] = $__video_h->fetch_video_views($video['rid']); |
|
217 | - $video['author'] = htmlspecialchars($video['author']); |
|
218 | - $video['title'] = htmlspecialchars($video['title']); |
|
219 | - $video['description'] = $__video_h->shorten_description($video['description'], 50); |
|
220 | - ?> |
|
211 | + $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Travel & Events' ORDER BY rand() LIMIT 4"); |
|
212 | + $stmt->execute(); |
|
213 | + while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
214 | + $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
|
215 | + $video['duration'] = $__time_h->timestamp($video['duration']); |
|
216 | + $video['views'] = $__video_h->fetch_video_views($video['rid']); |
|
217 | + $video['author'] = htmlspecialchars($video['author']); |
|
218 | + $video['title'] = htmlspecialchars($video['title']); |
|
219 | + $video['description'] = $__video_h->shorten_description($video['description'], 50); |
|
220 | + ?> |
|
221 | 221 | <div class="browse-item yt-tile-default "> |
222 | 222 | <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> |
223 | 223 | <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"> |
@@ -243,16 +243,16 @@ discard block |
||
243 | 243 | </div> |
244 | 244 | <div class="browse-item-row ytg-box"> |
245 | 245 | <?php |
246 | - $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Travel & Events' ORDER BY rand() LIMIT 4"); |
|
247 | - $stmt->execute(); |
|
248 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
249 | - $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
|
250 | - $video['duration'] = $__time_h->timestamp($video['duration']); |
|
251 | - $video['views'] = $__video_h->fetch_video_views($video['rid']); |
|
252 | - $video['author'] = htmlspecialchars($video['author']); |
|
253 | - $video['title'] = htmlspecialchars($video['title']); |
|
254 | - $video['description'] = $__video_h->shorten_description($video['description'], 50); |
|
255 | - ?> |
|
246 | + $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Travel & Events' ORDER BY rand() LIMIT 4"); |
|
247 | + $stmt->execute(); |
|
248 | + while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
249 | + $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
|
250 | + $video['duration'] = $__time_h->timestamp($video['duration']); |
|
251 | + $video['views'] = $__video_h->fetch_video_views($video['rid']); |
|
252 | + $video['author'] = htmlspecialchars($video['author']); |
|
253 | + $video['title'] = htmlspecialchars($video['title']); |
|
254 | + $video['description'] = $__video_h->shorten_description($video['description'], 50); |
|
255 | + ?> |
|
256 | 256 | <div class="browse-item yt-tile-default "> |
257 | 257 | <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> |
258 | 258 | <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"> |
@@ -278,16 +278,16 @@ discard block |
||
278 | 278 | </div> |
279 | 279 | <div class="browse-item-row ytg-box"> |
280 | 280 | <?php |
281 | - $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Travel & Events' ORDER BY rand() LIMIT 4"); |
|
282 | - $stmt->execute(); |
|
283 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
284 | - $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
|
285 | - $video['duration'] = $__time_h->timestamp($video['duration']); |
|
286 | - $video['views'] = $__video_h->fetch_video_views($video['rid']); |
|
287 | - $video['author'] = htmlspecialchars($video['author']); |
|
288 | - $video['title'] = htmlspecialchars($video['title']); |
|
289 | - $video['description'] = $__video_h->shorten_description($video['description'], 50); |
|
290 | - ?> |
|
281 | + $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Travel & Events' ORDER BY rand() LIMIT 4"); |
|
282 | + $stmt->execute(); |
|
283 | + while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
284 | + $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
|
285 | + $video['duration'] = $__time_h->timestamp($video['duration']); |
|
286 | + $video['views'] = $__video_h->fetch_video_views($video['rid']); |
|
287 | + $video['author'] = htmlspecialchars($video['author']); |
|
288 | + $video['title'] = htmlspecialchars($video['title']); |
|
289 | + $video['description'] = $__video_h->shorten_description($video['description'], 50); |
|
290 | + ?> |
|
291 | 291 | <div class="browse-item yt-tile-default "> |
292 | 292 | <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> |
293 | 293 | <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"> |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | <?php |
141 | 141 | $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Travel & Events' ORDER BY rand() LIMIT 4"); |
142 | 142 | $stmt->execute(); |
143 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
143 | + while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
144 | 144 | $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
145 | 145 | $video['duration'] = $__time_h->timestamp($video['duration']); |
146 | 146 | $video['views'] = $__video_h->fetch_video_views($video['rid']); |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | <?php |
176 | 176 | $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Travel & Events' ORDER BY rand() LIMIT 4"); |
177 | 177 | $stmt->execute(); |
178 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
178 | + while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
179 | 179 | $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
180 | 180 | $video['duration'] = $__time_h->timestamp($video['duration']); |
181 | 181 | $video['views'] = $__video_h->fetch_video_views($video['rid']); |
@@ -210,7 +210,7 @@ discard block |
||
210 | 210 | <?php |
211 | 211 | $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Travel & Events' ORDER BY rand() LIMIT 4"); |
212 | 212 | $stmt->execute(); |
213 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
213 | + while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
214 | 214 | $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
215 | 215 | $video['duration'] = $__time_h->timestamp($video['duration']); |
216 | 216 | $video['views'] = $__video_h->fetch_video_views($video['rid']); |
@@ -245,7 +245,7 @@ discard block |
||
245 | 245 | <?php |
246 | 246 | $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Travel & Events' ORDER BY rand() LIMIT 4"); |
247 | 247 | $stmt->execute(); |
248 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
248 | + while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
249 | 249 | $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
250 | 250 | $video['duration'] = $__time_h->timestamp($video['duration']); |
251 | 251 | $video['views'] = $__video_h->fetch_video_views($video['rid']); |
@@ -280,7 +280,7 @@ discard block |
||
280 | 280 | <?php |
281 | 281 | $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Travel & Events' ORDER BY rand() LIMIT 4"); |
282 | 282 | $stmt->execute(); |
283 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
283 | + while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
284 | 284 | $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
285 | 285 | $video['duration'] = $__time_h->timestamp($video['duration']); |
286 | 286 | $video['views'] = $__video_h->fetch_video_views($video['rid']); |
@@ -24,16 +24,16 @@ discard block |
||
24 | 24 | if($__user_h->if_cooldown($_SESSION['siteusername'])) { $error['message'] = "You are on a cooldown! Wait for a minute before posting another comment."; $error['status'] = true; } |
25 | 25 | |
26 | 26 | if(!isset($error['message'])) { |
27 | - $text = $_POST['comment']; |
|
27 | + $text = $_POST['comment']; |
|
28 | 28 | $stmt = $__db->prepare("INSERT INTO comments (toid, author, comment) VALUES (:v, :username, :comment)"); |
29 | 29 | $stmt->bindParam(":v", $_GET['v']); |
30 | - $stmt->bindParam(":username", $_SESSION['siteusername']); |
|
31 | - $stmt->bindParam(":comment", $text); |
|
30 | + $stmt->bindParam(":username", $_SESSION['siteusername']); |
|
31 | + $stmt->bindParam(":comment", $text); |
|
32 | 32 | $stmt->execute(); |
33 | 33 | |
34 | - $__user_u->update_cooldown_time($_SESSION['siteusername'], "cooldown_comment") |
|
34 | + $__user_u->update_cooldown_time($_SESSION['siteusername'], "cooldown_comment") |
|
35 | 35 | |
36 | - /* |
|
36 | + /* |
|
37 | 37 | if(@$_SESSION['siteusername'] != $_video['author']) { |
38 | 38 | $_user_insert_utils->send_message($_video['author'], "New comment", 'I commented "' . $_POST['comment'] . '" on your video "' . $_video['title'] . '"', $_SESSION['siteusername']); |
39 | 39 | } |
@@ -58,22 +58,22 @@ discard block |
||
58 | 58 | if (window.yt.timing) {yt.timing.tick("ct");} |
59 | 59 | </script> |
60 | 60 | <?php |
61 | - $_video['dislikes'] = $__video_h->get_video_stars_level($_video['rid'], 1); |
|
62 | - $_video['dislikes'] += $__video_h->get_video_stars_level($_video['rid'], 2); |
|
61 | + $_video['dislikes'] = $__video_h->get_video_stars_level($_video['rid'], 1); |
|
62 | + $_video['dislikes'] += $__video_h->get_video_stars_level($_video['rid'], 2); |
|
63 | 63 | |
64 | - $_video['likes'] = $__video_h->get_video_stars_level($_video['rid'], 4); |
|
65 | - $_video['likes'] += $__video_h->get_video_stars_level($_video['rid'], 5); |
|
64 | + $_video['likes'] = $__video_h->get_video_stars_level($_video['rid'], 4); |
|
65 | + $_video['likes'] += $__video_h->get_video_stars_level($_video['rid'], 5); |
|
66 | 66 | |
67 | - if($_video['likes'] == 0 && $_video['dislikes'] == 0) { |
|
68 | - $_video['likeswidth'] = 50; |
|
69 | - $_video['dislikeswidth'] = 50; |
|
70 | - } else { |
|
71 | - $_video['likeswidth'] = $_video['likes'] / ($_video['likes'] + $_video['dislikes']) * 100; |
|
72 | - $_video['dislikeswidth'] = 100 - $_video['likeswidth']; |
|
73 | - } |
|
67 | + if($_video['likes'] == 0 && $_video['dislikes'] == 0) { |
|
68 | + $_video['likeswidth'] = 50; |
|
69 | + $_video['dislikeswidth'] = 50; |
|
70 | + } else { |
|
71 | + $_video['likeswidth'] = $_video['likes'] / ($_video['likes'] + $_video['dislikes']) * 100; |
|
72 | + $_video['dislikeswidth'] = 100 - $_video['likeswidth']; |
|
73 | + } |
|
74 | 74 | |
75 | - $_video['author_videos'] = $__video_h->fetch_user_videos($_video['author']); |
|
76 | - ?> |
|
75 | + $_video['author_videos'] = $__video_h->fetch_user_videos($_video['author']); |
|
76 | + ?> |
|
77 | 77 | </head> |
78 | 78 | <body id="" class="date-20120927 en_US ltr ytg-old-clearfix guide-feed-v2 gecko gecko-15" dir="ltr"> |
79 | 79 | <form name="logoutForm" method="POST" action="/logout"> |
@@ -296,10 +296,10 @@ discard block |
||
296 | 296 | </div> |
297 | 297 | </div> |
298 | 298 | <?php |
299 | - $stmt = $__db->prepare("SELECT * FROM video_response WHERE toid = :v ORDER BY id DESC LIMIT 4"); |
|
300 | - $stmt->bindParam(":v", $_GET['v']); |
|
301 | - $stmt->execute(); |
|
302 | - ?> |
|
299 | + $stmt = $__db->prepare("SELECT * FROM video_response WHERE toid = :v ORDER BY id DESC LIMIT 4"); |
|
300 | + $stmt->bindParam(":v", $_GET['v']); |
|
301 | + $stmt->execute(); |
|
302 | + ?> |
|
303 | 303 | |
304 | 304 | <?php if($stmt->rowCount() != 0) { ?> |
305 | 305 | <div class="comments-section"> |
@@ -309,16 +309,16 @@ discard block |
||
309 | 309 | <h4>Video Responses</h4> |
310 | 310 | <ul class="video-list"> |
311 | 311 | <?php |
312 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
313 | - if($__video_h->video_exists($video['video'])) { |
|
314 | - $video = $__video_h->fetch_video_rid($video['video']); |
|
315 | - $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
|
316 | - $video['duration'] = $__time_h->timestamp($video['duration']); |
|
317 | - $video['views'] = $__video_h->fetch_video_views($video['rid']); |
|
318 | - $video['author'] = htmlspecialchars($video['author']); |
|
319 | - $video['title'] = htmlspecialchars($video['title']); |
|
320 | - $video['description'] = $__video_h->shorten_description($video['description'], 50); |
|
321 | - ?> |
|
312 | + while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
313 | + if($__video_h->video_exists($video['video'])) { |
|
314 | + $video = $__video_h->fetch_video_rid($video['video']); |
|
315 | + $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
|
316 | + $video['duration'] = $__time_h->timestamp($video['duration']); |
|
317 | + $video['views'] = $__video_h->fetch_video_views($video['rid']); |
|
318 | + $video['author'] = htmlspecialchars($video['author']); |
|
319 | + $video['title'] = htmlspecialchars($video['title']); |
|
320 | + $video['description'] = $__video_h->shorten_description($video['description'], 50); |
|
321 | + ?> |
|
322 | 322 | <li class="video-list-item yt-tile-default"> |
323 | 323 | <a href="/watch?v=<?php echo $video['rid']; ?>" class="related-video yt-uix-contextlink yt-uix-sessionlink" data-sessionlink="<?php echo htmlspecialchars($_video['author']); ?>&feature=watch_response"><span class="ux-thumb-wrap contains-addto "><span class="video-thumb ux-thumb yt-thumb-default-120 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="http://s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="<?php echo $video['title']; ?>" data-thumb="/dynamic/thumbs/<?php echo $video['thumbnail']; ?>" width="120"><span class="vertical-align"></span></span></span></span><span class="video-time"><?php echo $video['duration']; ?></span> |
324 | 324 | <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="cjls0QsHOBE" role="button"><span class="yt-uix-button-content"> <img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Watch Later"> |
@@ -400,31 +400,31 @@ discard block |
||
400 | 400 | </div> |
401 | 401 | <ul class="comment-list" id="live_comments"> |
402 | 402 | <?php |
403 | - $results_per_page = 20; |
|
403 | + $results_per_page = 20; |
|
404 | 404 | |
405 | - $stmt = $__db->prepare("SELECT * FROM comments WHERE toid = :rid ORDER BY id DESC"); |
|
406 | - $stmt->bindParam(":rid", $_video['rid']); |
|
407 | - $stmt->execute(); |
|
405 | + $stmt = $__db->prepare("SELECT * FROM comments WHERE toid = :rid ORDER BY id DESC"); |
|
406 | + $stmt->bindParam(":rid", $_video['rid']); |
|
407 | + $stmt->execute(); |
|
408 | 408 | |
409 | - $number_of_result = $stmt->rowCount(); |
|
410 | - $number_of_page = ceil ($number_of_result / $results_per_page); |
|
409 | + $number_of_result = $stmt->rowCount(); |
|
410 | + $number_of_page = ceil ($number_of_result / $results_per_page); |
|
411 | 411 | |
412 | - if (!isset ($_GET['page']) ) { |
|
413 | - $page = 1; |
|
414 | - } else { |
|
415 | - $page = (int)$_GET['page']; |
|
416 | - } |
|
412 | + if (!isset ($_GET['page']) ) { |
|
413 | + $page = 1; |
|
414 | + } else { |
|
415 | + $page = (int)$_GET['page']; |
|
416 | + } |
|
417 | 417 | |
418 | - $page_first_result = ($page - 1) * $results_per_page; |
|
418 | + $page_first_result = ($page - 1) * $results_per_page; |
|
419 | 419 | |
420 | - $stmt = $__db->prepare("SELECT * FROM comments WHERE toid = :rid ORDER BY id DESC LIMIT :pfirst, :pper"); |
|
421 | - $stmt->bindParam(":rid", $_video['rid']); |
|
422 | - $stmt->bindParam(":pfirst", $page_first_result); |
|
423 | - $stmt->bindParam(":pper", $results_per_page); |
|
424 | - $stmt->execute(); |
|
420 | + $stmt = $__db->prepare("SELECT * FROM comments WHERE toid = :rid ORDER BY id DESC LIMIT :pfirst, :pper"); |
|
421 | + $stmt->bindParam(":rid", $_video['rid']); |
|
422 | + $stmt->bindParam(":pfirst", $page_first_result); |
|
423 | + $stmt->bindParam(":pper", $results_per_page); |
|
424 | + $stmt->execute(); |
|
425 | 425 | |
426 | - while($comment = $stmt->fetch(PDO::FETCH_ASSOC))) { |
|
427 | - ?> |
|
426 | + while($comment = $stmt->fetch(PDO::FETCH_ASSOC))) { |
|
427 | + ?> |
|
428 | 428 | |
429 | 429 | <li class="comment yt-tile-default " data-author-viewing="" data-author-id="-uD01K8FQTeOSS5sniRFzQ" data-id="HdQrMeklJ_5hd_uPDRcvtdaMk2pMVS8d9sufcfiGx0U" data-score="0"> |
430 | 430 | <div class="comment-body"> |
@@ -501,16 +501,16 @@ discard block |
||
501 | 501 | <ul id="watch-related" class="video-list"> |
502 | 502 | <div id="ppv-container" class="hid"></div> |
503 | 503 | <?php |
504 | - $stmt = $__db->prepare("SELECT * FROM videos ORDER BY rand() LIMIT 20"); |
|
505 | - $stmt->execute(); |
|
506 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
507 | - $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
|
508 | - $video['duration'] = $__time_h->timestamp($video['duration']); |
|
509 | - $video['views'] = $__video_h->fetch_video_views($video['rid']); |
|
510 | - $video['author'] = htmlspecialchars($video['author']); |
|
511 | - $video['title'] = htmlspecialchars($video['title']); |
|
512 | - $video['description'] = $__video_h->shorten_description($video['description'], 50); |
|
513 | - ?> |
|
504 | + $stmt = $__db->prepare("SELECT * FROM videos ORDER BY rand() LIMIT 20"); |
|
505 | + $stmt->execute(); |
|
506 | + while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
507 | + $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
|
508 | + $video['duration'] = $__time_h->timestamp($video['duration']); |
|
509 | + $video['views'] = $__video_h->fetch_video_views($video['rid']); |
|
510 | + $video['author'] = htmlspecialchars($video['author']); |
|
511 | + $video['title'] = htmlspecialchars($video['title']); |
|
512 | + $video['description'] = $__video_h->shorten_description($video['description'], 50); |
|
513 | + ?> |
|
514 | 514 | <li class="video-list-item"><a href="/watch?v=<?php echo $video['rid']; ?>" class="related-video yt-uix-contextlink yt-uix-sessionlink" data-sessionlink="ved=CAIQzRooAA%3D%3D&<?php echo htmlspecialchars($_video['author']); ?>&feature=relmfu"><span class="ux-thumb-wrap contains-addto "><span class="video-thumb ux-thumb yt-thumb-default-120 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="http://s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="<?php echo $video['title']; ?>" data-thumb="/dynamic/thumbs/<?php echo $video['thumbnail']; ?>" width="120"><span class="vertical-align"></span></span></span></span><span class="video-time"><?php echo $video['duration']; ?></span> |
515 | 515 | <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="gyAaIKF6tSQ" role="button"><span class="yt-uix-button-content"> <img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Watch Later"> |
516 | 516 | </span><img class="yt-uix-button-arrow" src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt=""></button> |
@@ -15,15 +15,15 @@ discard block |
||
15 | 15 | <?php $_video = $__video_h->fetch_video_rid($_GET['v']); ?> |
16 | 16 | <?php $_video['comments'] = $__video_h->get_comments_from_video($_video['rid']); ?> |
17 | 17 | <?php |
18 | - if($_SERVER['REQUEST_METHOD'] == 'POST') { |
|
18 | + if ($_SERVER['REQUEST_METHOD'] == 'POST') { |
|
19 | 19 | $error = array(); |
20 | 20 | |
21 | - if(!isset($_SESSION['siteusername'])){ $error['message'] = "you are not logged in"; $error['status'] = true; } |
|
22 | - if(!$_POST['comment']){ $error['message'] = "your comment cannot be blank"; $error['status'] = true; } |
|
23 | - if(strlen($_POST['comment']) > 1000){ $error['message'] = "your comment must be shorter than 1000 characters"; $error['status'] = true; } |
|
24 | - if($__user_h->if_cooldown($_SESSION['siteusername'])) { $error['message'] = "You are on a cooldown! Wait for a minute before posting another comment."; $error['status'] = true; } |
|
21 | + if (!isset($_SESSION['siteusername'])) { $error['message'] = "you are not logged in"; $error['status'] = true; } |
|
22 | + if (!$_POST['comment']) { $error['message'] = "your comment cannot be blank"; $error['status'] = true; } |
|
23 | + if (strlen($_POST['comment']) > 1000) { $error['message'] = "your comment must be shorter than 1000 characters"; $error['status'] = true; } |
|
24 | + if ($__user_h->if_cooldown($_SESSION['siteusername'])) { $error['message'] = "You are on a cooldown! Wait for a minute before posting another comment."; $error['status'] = true; } |
|
25 | 25 | |
26 | - if(!isset($error['message'])) { |
|
26 | + if (!isset($error['message'])) { |
|
27 | 27 | $text = $_POST['comment']; |
28 | 28 | $stmt = $__db->prepare("INSERT INTO comments (toid, author, comment) VALUES (:v, :username, :comment)"); |
29 | 29 | $stmt->bindParam(":v", $_GET['v']); |
@@ -58,17 +58,17 @@ discard block |
||
58 | 58 | if (window.yt.timing) {yt.timing.tick("ct");} |
59 | 59 | </script> |
60 | 60 | <?php |
61 | - $_video['dislikes'] = $__video_h->get_video_stars_level($_video['rid'], 1); |
|
61 | + $_video['dislikes'] = $__video_h->get_video_stars_level($_video['rid'], 1); |
|
62 | 62 | $_video['dislikes'] += $__video_h->get_video_stars_level($_video['rid'], 2); |
63 | 63 | |
64 | - $_video['likes'] = $__video_h->get_video_stars_level($_video['rid'], 4); |
|
65 | - $_video['likes'] += $__video_h->get_video_stars_level($_video['rid'], 5); |
|
64 | + $_video['likes'] = $__video_h->get_video_stars_level($_video['rid'], 4); |
|
65 | + $_video['likes'] += $__video_h->get_video_stars_level($_video['rid'], 5); |
|
66 | 66 | |
67 | - if($_video['likes'] == 0 && $_video['dislikes'] == 0) { |
|
67 | + if ($_video['likes'] == 0 && $_video['dislikes'] == 0) { |
|
68 | 68 | $_video['likeswidth'] = 50; |
69 | 69 | $_video['dislikeswidth'] = 50; |
70 | 70 | } else { |
71 | - $_video['likeswidth'] = $_video['likes'] / ($_video['likes'] + $_video['dislikes']) * 100; |
|
71 | + $_video['likeswidth'] = $_video['likes']/($_video['likes'] + $_video['dislikes'])*100; |
|
72 | 72 | $_video['dislikeswidth'] = 100 - $_video['likeswidth']; |
73 | 73 | } |
74 | 74 | |
@@ -301,7 +301,7 @@ discard block |
||
301 | 301 | $stmt->execute(); |
302 | 302 | ?> |
303 | 303 | |
304 | - <?php if($stmt->rowCount() != 0) { ?> |
|
304 | + <?php if ($stmt->rowCount() != 0) { ?> |
|
305 | 305 | <div class="comments-section"> |
306 | 306 | <a class="comments-section-see-all" href="/video_response_view_all?v=rLHU-_OhT8g"> |
307 | 307 | see all |
@@ -309,8 +309,8 @@ discard block |
||
309 | 309 | <h4>Video Responses</h4> |
310 | 310 | <ul class="video-list"> |
311 | 311 | <?php |
312 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
313 | - if($__video_h->video_exists($video['video'])) { |
|
312 | + while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
313 | + if ($__video_h->video_exists($video['video'])) { |
|
314 | 314 | $video = $__video_h->fetch_video_rid($video['video']); |
315 | 315 | $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
316 | 316 | $video['duration'] = $__time_h->timestamp($video['duration']); |
@@ -341,19 +341,19 @@ discard block |
||
341 | 341 | </h4> |
342 | 342 | </div> |
343 | 343 | </div> |
344 | - <?php if(!isset($_SESSION['siteusername'])) { ?> |
|
344 | + <?php if (!isset($_SESSION['siteusername'])) { ?> |
|
345 | 345 | <div class="comments-post-container clearfix"> |
346 | 346 | <div class="comments-post-alert"> |
347 | 347 | <a href="/sign_in">Sign In</a> or <a href="/sign_up">Sign Up</a><span class="comments-post-form-rollover-text"> now to post a comment!</span> |
348 | 348 | </div> |
349 | 349 | </div> |
350 | - <?php } else if($_video['commenting'] == "d") { ?> |
|
350 | + <?php } else if ($_video['commenting'] == "d") { ?> |
|
351 | 351 | <div class="comments-post-container clearfix"> |
352 | 352 | <div class="comments-post-alert"> |
353 | 353 | This video has comemnting disabled! |
354 | 354 | </div> |
355 | 355 | </div> |
356 | - <?php } else if($__user_h->if_blocked($_video['author'], $_SESSION['siteusername'])) { ?> |
|
356 | + <?php } else if ($__user_h->if_blocked($_video['author'], $_SESSION['siteusername'])) { ?> |
|
357 | 357 | <div class="comments-post-container clearfix"> |
358 | 358 | <div class="comments-post-alert"> |
359 | 359 | This user has blocked you! |
@@ -407,15 +407,15 @@ discard block |
||
407 | 407 | $stmt->execute(); |
408 | 408 | |
409 | 409 | $number_of_result = $stmt->rowCount(); |
410 | - $number_of_page = ceil ($number_of_result / $results_per_page); |
|
410 | + $number_of_page = ceil($number_of_result/$results_per_page); |
|
411 | 411 | |
412 | - if (!isset ($_GET['page']) ) { |
|
412 | + if (!isset ($_GET['page'])) { |
|
413 | 413 | $page = 1; |
414 | 414 | } else { |
415 | - $page = (int)$_GET['page']; |
|
415 | + $page = (int) $_GET['page']; |
|
416 | 416 | } |
417 | 417 | |
418 | - $page_first_result = ($page - 1) * $results_per_page; |
|
418 | + $page_first_result = ($page - 1)*$results_per_page; |
|
419 | 419 | |
420 | 420 | $stmt = $__db->prepare("SELECT * FROM comments WHERE toid = :rid ORDER BY id DESC LIMIT :pfirst, :pper"); |
421 | 421 | $stmt->bindParam(":rid", $_video['rid']); |
@@ -423,7 +423,7 @@ 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 | <li class="comment yt-tile-default " data-author-viewing="" data-author-id="-uD01K8FQTeOSS5sniRFzQ" data-id="HdQrMeklJ_5hd_uPDRcvtdaMk2pMVS8d9sufcfiGx0U" data-score="0"> |
@@ -503,7 +503,7 @@ discard block |
||
503 | 503 | <?php |
504 | 504 | $stmt = $__db->prepare("SELECT * FROM videos ORDER BY rand() LIMIT 20"); |
505 | 505 | $stmt->execute(); |
506 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
506 | + while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
507 | 507 | $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
508 | 508 | $video['duration'] = $__time_h->timestamp($video['duration']); |
509 | 509 | $video['views'] = $__video_h->fetch_video_views($video['rid']); |
@@ -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 "> |
@@ -56,8 +56,8 @@ discard block |
||
56 | 56 | </div> |
57 | 57 | <div class="guide"> |
58 | 58 | <?php |
59 | - if(isset($_SESSION['siteusername'])) { |
|
60 | - ?> |
|
59 | + if(isset($_SESSION['siteusername'])) { |
|
60 | + ?> |
|
61 | 61 | <div style="/*! margin-top: 0px; *//*! margin-left: 10px; *//*! margin-bottom: 13px; */height: 99px;" class="guide-section feed-header channel first"><img alt="" src="/dynamic/pfp/<?php echo $__user_h->fetch_pfp($_SESSION['siteusername']); ?>" style="height: 88px;position: relative;top: 4px;left: 4px;" class="feed-header-thumb channel-thumb" width="88px"><div id="links" style="/*! margin-left: 5px; */position: relative;left: 13px;top: 7px;"><div style="font-size: 11px;margin-bottom: 6px;" class="metadata"> |
62 | 62 | <a href="/user/<?php echo htmlspecialchars($_SESSION['siteusername']); ?>" style="color: inherit;">My channel |
63 | 63 | <img src="/static/pixel-vfl3z5WfW.gif" class="see-more-arrow" alt=""></a> |
@@ -210,16 +210,16 @@ discard block |
||
210 | 210 | </p> |
211 | 211 | <ul> |
212 | 212 | <?php |
213 | - $stmt = $__db->prepare("SELECT * FROM videos ORDER BY rand() LIMIT 4"); |
|
214 | - $stmt->execute(); |
|
215 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
216 | - $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
|
217 | - $video['duration'] = $__time_h->timestamp($video['duration']); |
|
218 | - $video['views'] = $__video_h->fetch_video_views($video['rid']); |
|
219 | - $video['author'] = htmlspecialchars($video['author']); |
|
220 | - $video['title'] = htmlspecialchars($video['title']); |
|
221 | - $video['description'] = $__video_h->shorten_description($video['description'], 50); |
|
222 | - ?> |
|
213 | + $stmt = $__db->prepare("SELECT * FROM videos ORDER BY rand() LIMIT 4"); |
|
214 | + $stmt->execute(); |
|
215 | + while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
216 | + $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
|
217 | + $video['duration'] = $__time_h->timestamp($video['duration']); |
|
218 | + $video['views'] = $__video_h->fetch_video_views($video['rid']); |
|
219 | + $video['author'] = htmlspecialchars($video['author']); |
|
220 | + $video['title'] = htmlspecialchars($video['title']); |
|
221 | + $video['description'] = $__video_h->shorten_description($video['description'], 50); |
|
222 | + ?> |
|
223 | 223 | <li class="video-list-item "><a href="/watch?v=<?php echo $video['rid']; ?>" class="video-list-item-link yt-uix-sessionlink" data-sessionlink="ei=CNLr3rbS3rICFSwSIQodSW397Q%3D%3D&feature=g-sptl%26cid%3Dinp-hs-ytg"><span class="ux-thumb-wrap contains-addto "><span class="video-thumb ux-thumb yt-thumb-default-120 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="http://s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="<?php echo $video['title']; ?>" data-thumb="/dynamic/thumbs/<?php echo $video['thumbnail']; ?>" width="120"><span class="vertical-align"></span></span></span></span><span class="video-time"><?php echo $video['duration']; ?></span> |
224 | 224 | <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="yuTBQ86r8o0" role="button"><span class="yt-uix-button-content"> <img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Watch Later"> |
225 | 225 | </span><img class="yt-uix-button-arrow" src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt=""></button> |
@@ -233,16 +233,16 @@ discard block |
||
233 | 233 | </h3> |
234 | 234 | <ul> |
235 | 235 | <?php |
236 | - $stmt = $__db->prepare("SELECT * FROM videos WHERE featured = 'v' ORDER BY id DESC LIMIT 4"); |
|
237 | - $stmt->execute(); |
|
238 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
239 | - $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
|
240 | - $video['duration'] = $__time_h->timestamp($video['duration']); |
|
241 | - $video['views'] = $__video_h->fetch_video_views($video['rid']); |
|
242 | - $video['author'] = htmlspecialchars($video['author']); |
|
243 | - $video['title'] = htmlspecialchars($video['title']); |
|
244 | - $video['description'] = $__video_h->shorten_description($video['description'], 50); |
|
245 | - ?> |
|
236 | + $stmt = $__db->prepare("SELECT * FROM videos WHERE featured = 'v' ORDER BY id DESC LIMIT 4"); |
|
237 | + $stmt->execute(); |
|
238 | + while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
239 | + $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
|
240 | + $video['duration'] = $__time_h->timestamp($video['duration']); |
|
241 | + $video['views'] = $__video_h->fetch_video_views($video['rid']); |
|
242 | + $video['author'] = htmlspecialchars($video['author']); |
|
243 | + $video['title'] = htmlspecialchars($video['title']); |
|
244 | + $video['description'] = $__video_h->shorten_description($video['description'], 50); |
|
245 | + ?> |
|
246 | 246 | <li class="video-list-item "><a href="/watch?v=<?php echo $video['rid']; ?>" class="video-list-item-link yt-uix-sessionlink" data-sessionlink="ei=CNLr3rbS3rICFSwSIQodSW397Q%3D%3D&feature=g-sptl%26cid%3Dinp-hs-ytg"><span class="ux-thumb-wrap contains-addto "><span class="video-thumb ux-thumb yt-thumb-default-120 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="http://s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="<?php echo $video['title']; ?>" data-thumb="/dynamic/thumbs/<?php echo $video['thumbnail']; ?>" width="120"><span class="vertical-align"></span></span></span></span><span class="video-time"><?php echo $video['duration']; ?></span> |
247 | 247 | <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="yuTBQ86r8o0" role="button"><span class="yt-uix-button-content"> <img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Watch Later"> |
248 | 248 | </span><img class="yt-uix-button-arrow" src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt=""></button> |
@@ -266,16 +266,16 @@ discard block |
||
266 | 266 | <div class="feed-page"> |
267 | 267 | <ul> |
268 | 268 | <?php |
269 | - $stmt = $__db->prepare("SELECT * FROM videos ORDER BY id DESC LIMIT 20"); |
|
270 | - $stmt->execute(); |
|
271 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
272 | - $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
|
273 | - $video['duration'] = $__time_h->timestamp($video['duration']); |
|
274 | - $video['views'] = $__video_h->fetch_video_views($video['rid']); |
|
275 | - $video['author'] = htmlspecialchars($video['author']); |
|
276 | - $video['title'] = htmlspecialchars($video['title']); |
|
277 | - $video['description'] = $__video_h->shorten_description($video['description'], 50); |
|
278 | - ?> |
|
269 | + $stmt = $__db->prepare("SELECT * FROM videos ORDER BY id DESC LIMIT 20"); |
|
270 | + $stmt->execute(); |
|
271 | + while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
272 | + $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
|
273 | + $video['duration'] = $__time_h->timestamp($video['duration']); |
|
274 | + $video['views'] = $__video_h->fetch_video_views($video['rid']); |
|
275 | + $video['author'] = htmlspecialchars($video['author']); |
|
276 | + $video['title'] = htmlspecialchars($video['title']); |
|
277 | + $video['description'] = $__video_h->shorten_description($video['description'], 50); |
|
278 | + ?> |
|
279 | 279 | <li> |
280 | 280 | <div class="feed-item-container first " data-channel-key="UCR2A9ZNliJfgC66IvIpe-Zw"> |
281 | 281 | <div class="feed-author-bubble-container"> |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | <div id="content"> |
38 | 38 | <div class="guide-layout-container enable-fancy-subscribe-button"> |
39 | 39 | <div class="guide-container"> |
40 | - <?php if(!isset($_SESSION['siteusername'])) { ?> |
|
40 | + <?php if (!isset($_SESSION['siteusername'])) { ?> |
|
41 | 41 | <div id="guide-builder-promo"> |
42 | 42 | <h2> |
43 | 43 | Sign in to add channels to your homepage |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | </div> |
57 | 57 | <div class="guide"> |
58 | 58 | <?php |
59 | - if(isset($_SESSION['siteusername'])) { |
|
59 | + if (isset($_SESSION['siteusername'])) { |
|
60 | 60 | ?> |
61 | 61 | <div style="/*! margin-top: 0px; *//*! margin-left: 10px; *//*! margin-bottom: 13px; */height: 99px;" class="guide-section feed-header channel first"><img alt="" src="/dynamic/pfp/<?php echo $__user_h->fetch_pfp($_SESSION['siteusername']); ?>" style="height: 88px;position: relative;top: 4px;left: 4px;" class="feed-header-thumb channel-thumb" width="88px"><div id="links" style="/*! margin-left: 5px; */position: relative;left: 13px;top: 7px;"><div style="font-size: 11px;margin-bottom: 6px;" class="metadata"> |
62 | 62 | <a href="/user/<?php echo htmlspecialchars($_SESSION['siteusername']); ?>" style="color: inherit;">My channel |
@@ -174,7 +174,7 @@ discard block |
||
174 | 174 | </span> |
175 | 175 | </a> |
176 | 176 | </li> |
177 | - <?php foreach($__server->featured_channels as $channel) { ?> |
|
177 | + <?php foreach ($__server->featured_channels as $channel) { ?> |
|
178 | 178 | <li class="guide-item-container "> |
179 | 179 | <a class="guide-item" data-external-id="<?php echo htmlspecialchars($channel); ?>" data-feed-name="<?php echo htmlspecialchars($channel); ?>" data-feed-type="user"> |
180 | 180 | <span class="thumb"> <span class="video-thumb ux-thumb yt-thumb-square-28 "><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/pfp/<?php echo $__user_h->fetch_pfp($channel); ?>" width="28"><span class="vertical-align"></span></span></span></span> |
@@ -212,7 +212,7 @@ discard block |
||
212 | 212 | <?php |
213 | 213 | $stmt = $__db->prepare("SELECT * FROM videos ORDER BY rand() LIMIT 4"); |
214 | 214 | $stmt->execute(); |
215 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
215 | + while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
216 | 216 | $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
217 | 217 | $video['duration'] = $__time_h->timestamp($video['duration']); |
218 | 218 | $video['views'] = $__video_h->fetch_video_views($video['rid']); |
@@ -235,7 +235,7 @@ discard block |
||
235 | 235 | <?php |
236 | 236 | $stmt = $__db->prepare("SELECT * FROM videos WHERE featured = 'v' ORDER BY id DESC LIMIT 4"); |
237 | 237 | $stmt->execute(); |
238 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
238 | + while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
239 | 239 | $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
240 | 240 | $video['duration'] = $__time_h->timestamp($video['duration']); |
241 | 241 | $video['views'] = $__video_h->fetch_video_views($video['rid']); |
@@ -268,7 +268,7 @@ discard block |
||
268 | 268 | <?php |
269 | 269 | $stmt = $__db->prepare("SELECT * FROM videos ORDER BY id DESC LIMIT 20"); |
270 | 270 | $stmt->execute(); |
271 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
271 | + while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
272 | 272 | $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
273 | 273 | $video['duration'] = $__time_h->timestamp($video['duration']); |
274 | 274 | $video['views'] = $__video_h->fetch_video_views($video['rid']); |
@@ -138,16 +138,16 @@ 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 = 'People & Blogs' ORDER BY rand() LIMIT 4"); |
|
142 | - $stmt->execute(); |
|
143 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
144 | - $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
|
145 | - $video['duration'] = $__time_h->timestamp($video['duration']); |
|
146 | - $video['views'] = $__video_h->fetch_video_views($video['rid']); |
|
147 | - $video['author'] = htmlspecialchars($video['author']); |
|
148 | - $video['title'] = htmlspecialchars($video['title']); |
|
149 | - $video['description'] = $__video_h->shorten_description($video['description'], 50); |
|
150 | - ?> |
|
141 | + $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'People & Blogs' ORDER BY rand() LIMIT 4"); |
|
142 | + $stmt->execute(); |
|
143 | + while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
144 | + $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
|
145 | + $video['duration'] = $__time_h->timestamp($video['duration']); |
|
146 | + $video['views'] = $__video_h->fetch_video_views($video['rid']); |
|
147 | + $video['author'] = htmlspecialchars($video['author']); |
|
148 | + $video['title'] = htmlspecialchars($video['title']); |
|
149 | + $video['description'] = $__video_h->shorten_description($video['description'], 50); |
|
150 | + ?> |
|
151 | 151 | <div class="browse-item yt-tile-default "> |
152 | 152 | <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> |
153 | 153 | <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"> |
@@ -173,16 +173,16 @@ discard block |
||
173 | 173 | </div> |
174 | 174 | <div class="browse-item-row ytg-box"> |
175 | 175 | <?php |
176 | - $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'People & Blogs' ORDER BY rand() LIMIT 4"); |
|
177 | - $stmt->execute(); |
|
178 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
179 | - $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
|
180 | - $video['duration'] = $__time_h->timestamp($video['duration']); |
|
181 | - $video['views'] = $__video_h->fetch_video_views($video['rid']); |
|
182 | - $video['author'] = htmlspecialchars($video['author']); |
|
183 | - $video['title'] = htmlspecialchars($video['title']); |
|
184 | - $video['description'] = $__video_h->shorten_description($video['description'], 50); |
|
185 | - ?> |
|
176 | + $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'People & Blogs' ORDER BY rand() LIMIT 4"); |
|
177 | + $stmt->execute(); |
|
178 | + while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
179 | + $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
|
180 | + $video['duration'] = $__time_h->timestamp($video['duration']); |
|
181 | + $video['views'] = $__video_h->fetch_video_views($video['rid']); |
|
182 | + $video['author'] = htmlspecialchars($video['author']); |
|
183 | + $video['title'] = htmlspecialchars($video['title']); |
|
184 | + $video['description'] = $__video_h->shorten_description($video['description'], 50); |
|
185 | + ?> |
|
186 | 186 | <div class="browse-item yt-tile-default "> |
187 | 187 | <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> |
188 | 188 | <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"> |
@@ -208,16 +208,16 @@ discard block |
||
208 | 208 | </div> |
209 | 209 | <div class="browse-item-row ytg-box"> |
210 | 210 | <?php |
211 | - $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'People & Blogs' ORDER BY rand() LIMIT 4"); |
|
212 | - $stmt->execute(); |
|
213 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
214 | - $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
|
215 | - $video['duration'] = $__time_h->timestamp($video['duration']); |
|
216 | - $video['views'] = $__video_h->fetch_video_views($video['rid']); |
|
217 | - $video['author'] = htmlspecialchars($video['author']); |
|
218 | - $video['title'] = htmlspecialchars($video['title']); |
|
219 | - $video['description'] = $__video_h->shorten_description($video['description'], 50); |
|
220 | - ?> |
|
211 | + $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'People & Blogs' ORDER BY rand() LIMIT 4"); |
|
212 | + $stmt->execute(); |
|
213 | + while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
214 | + $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
|
215 | + $video['duration'] = $__time_h->timestamp($video['duration']); |
|
216 | + $video['views'] = $__video_h->fetch_video_views($video['rid']); |
|
217 | + $video['author'] = htmlspecialchars($video['author']); |
|
218 | + $video['title'] = htmlspecialchars($video['title']); |
|
219 | + $video['description'] = $__video_h->shorten_description($video['description'], 50); |
|
220 | + ?> |
|
221 | 221 | <div class="browse-item yt-tile-default "> |
222 | 222 | <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> |
223 | 223 | <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"> |
@@ -243,16 +243,16 @@ discard block |
||
243 | 243 | </div> |
244 | 244 | <div class="browse-item-row ytg-box"> |
245 | 245 | <?php |
246 | - $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'People & Blogs' ORDER BY rand() LIMIT 4"); |
|
247 | - $stmt->execute(); |
|
248 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
249 | - $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
|
250 | - $video['duration'] = $__time_h->timestamp($video['duration']); |
|
251 | - $video['views'] = $__video_h->fetch_video_views($video['rid']); |
|
252 | - $video['author'] = htmlspecialchars($video['author']); |
|
253 | - $video['title'] = htmlspecialchars($video['title']); |
|
254 | - $video['description'] = $__video_h->shorten_description($video['description'], 50); |
|
255 | - ?> |
|
246 | + $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'People & Blogs' ORDER BY rand() LIMIT 4"); |
|
247 | + $stmt->execute(); |
|
248 | + while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
249 | + $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
|
250 | + $video['duration'] = $__time_h->timestamp($video['duration']); |
|
251 | + $video['views'] = $__video_h->fetch_video_views($video['rid']); |
|
252 | + $video['author'] = htmlspecialchars($video['author']); |
|
253 | + $video['title'] = htmlspecialchars($video['title']); |
|
254 | + $video['description'] = $__video_h->shorten_description($video['description'], 50); |
|
255 | + ?> |
|
256 | 256 | <div class="browse-item yt-tile-default "> |
257 | 257 | <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> |
258 | 258 | <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"> |
@@ -278,16 +278,16 @@ discard block |
||
278 | 278 | </div> |
279 | 279 | <div class="browse-item-row ytg-box"> |
280 | 280 | <?php |
281 | - $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'People & Blogs' ORDER BY rand() LIMIT 4"); |
|
282 | - $stmt->execute(); |
|
283 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
284 | - $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
|
285 | - $video['duration'] = $__time_h->timestamp($video['duration']); |
|
286 | - $video['views'] = $__video_h->fetch_video_views($video['rid']); |
|
287 | - $video['author'] = htmlspecialchars($video['author']); |
|
288 | - $video['title'] = htmlspecialchars($video['title']); |
|
289 | - $video['description'] = $__video_h->shorten_description($video['description'], 50); |
|
290 | - ?> |
|
281 | + $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'People & Blogs' ORDER BY rand() LIMIT 4"); |
|
282 | + $stmt->execute(); |
|
283 | + while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
284 | + $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
|
285 | + $video['duration'] = $__time_h->timestamp($video['duration']); |
|
286 | + $video['views'] = $__video_h->fetch_video_views($video['rid']); |
|
287 | + $video['author'] = htmlspecialchars($video['author']); |
|
288 | + $video['title'] = htmlspecialchars($video['title']); |
|
289 | + $video['description'] = $__video_h->shorten_description($video['description'], 50); |
|
290 | + ?> |
|
291 | 291 | <div class="browse-item yt-tile-default "> |
292 | 292 | <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> |
293 | 293 | <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"> |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | <?php |
141 | 141 | $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'People & Blogs' ORDER BY rand() LIMIT 4"); |
142 | 142 | $stmt->execute(); |
143 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
143 | + while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
144 | 144 | $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
145 | 145 | $video['duration'] = $__time_h->timestamp($video['duration']); |
146 | 146 | $video['views'] = $__video_h->fetch_video_views($video['rid']); |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | <?php |
176 | 176 | $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'People & Blogs' ORDER BY rand() LIMIT 4"); |
177 | 177 | $stmt->execute(); |
178 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
178 | + while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
179 | 179 | $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
180 | 180 | $video['duration'] = $__time_h->timestamp($video['duration']); |
181 | 181 | $video['views'] = $__video_h->fetch_video_views($video['rid']); |
@@ -210,7 +210,7 @@ discard block |
||
210 | 210 | <?php |
211 | 211 | $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'People & Blogs' ORDER BY rand() LIMIT 4"); |
212 | 212 | $stmt->execute(); |
213 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
213 | + while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
214 | 214 | $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
215 | 215 | $video['duration'] = $__time_h->timestamp($video['duration']); |
216 | 216 | $video['views'] = $__video_h->fetch_video_views($video['rid']); |
@@ -245,7 +245,7 @@ discard block |
||
245 | 245 | <?php |
246 | 246 | $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'People & Blogs' ORDER BY rand() LIMIT 4"); |
247 | 247 | $stmt->execute(); |
248 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
248 | + while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
249 | 249 | $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
250 | 250 | $video['duration'] = $__time_h->timestamp($video['duration']); |
251 | 251 | $video['views'] = $__video_h->fetch_video_views($video['rid']); |
@@ -280,7 +280,7 @@ discard block |
||
280 | 280 | <?php |
281 | 281 | $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'People & Blogs' ORDER BY rand() LIMIT 4"); |
282 | 282 | $stmt->execute(); |
283 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
283 | + while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
284 | 284 | $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
285 | 285 | $video['duration'] = $__time_h->timestamp($video['duration']); |
286 | 286 | $video['views'] = $__video_h->fetch_video_views($video['rid']); |
@@ -138,16 +138,16 @@ 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 = 'Comedy' ORDER BY rand() LIMIT 4"); |
|
142 | - $stmt->execute(); |
|
143 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
144 | - $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
|
145 | - $video['duration'] = $__time_h->timestamp($video['duration']); |
|
146 | - $video['views'] = $__video_h->fetch_video_views($video['rid']); |
|
147 | - $video['author'] = htmlspecialchars($video['author']); |
|
148 | - $video['title'] = htmlspecialchars($video['title']); |
|
149 | - $video['description'] = $__video_h->shorten_description($video['description'], 50); |
|
150 | - ?> |
|
141 | + $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Comedy' ORDER BY rand() LIMIT 4"); |
|
142 | + $stmt->execute(); |
|
143 | + while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
144 | + $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
|
145 | + $video['duration'] = $__time_h->timestamp($video['duration']); |
|
146 | + $video['views'] = $__video_h->fetch_video_views($video['rid']); |
|
147 | + $video['author'] = htmlspecialchars($video['author']); |
|
148 | + $video['title'] = htmlspecialchars($video['title']); |
|
149 | + $video['description'] = $__video_h->shorten_description($video['description'], 50); |
|
150 | + ?> |
|
151 | 151 | <div class="browse-item yt-tile-default "> |
152 | 152 | <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> |
153 | 153 | <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"> |
@@ -173,16 +173,16 @@ discard block |
||
173 | 173 | </div> |
174 | 174 | <div class="browse-item-row ytg-box"> |
175 | 175 | <?php |
176 | - $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Comedy' ORDER BY rand() LIMIT 4"); |
|
177 | - $stmt->execute(); |
|
178 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
179 | - $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
|
180 | - $video['duration'] = $__time_h->timestamp($video['duration']); |
|
181 | - $video['views'] = $__video_h->fetch_video_views($video['rid']); |
|
182 | - $video['author'] = htmlspecialchars($video['author']); |
|
183 | - $video['title'] = htmlspecialchars($video['title']); |
|
184 | - $video['description'] = $__video_h->shorten_description($video['description'], 50); |
|
185 | - ?> |
|
176 | + $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Comedy' ORDER BY rand() LIMIT 4"); |
|
177 | + $stmt->execute(); |
|
178 | + while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
179 | + $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
|
180 | + $video['duration'] = $__time_h->timestamp($video['duration']); |
|
181 | + $video['views'] = $__video_h->fetch_video_views($video['rid']); |
|
182 | + $video['author'] = htmlspecialchars($video['author']); |
|
183 | + $video['title'] = htmlspecialchars($video['title']); |
|
184 | + $video['description'] = $__video_h->shorten_description($video['description'], 50); |
|
185 | + ?> |
|
186 | 186 | <div class="browse-item yt-tile-default "> |
187 | 187 | <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> |
188 | 188 | <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"> |
@@ -208,16 +208,16 @@ discard block |
||
208 | 208 | </div> |
209 | 209 | <div class="browse-item-row ytg-box"> |
210 | 210 | <?php |
211 | - $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Comedy' ORDER BY rand() LIMIT 4"); |
|
212 | - $stmt->execute(); |
|
213 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
214 | - $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
|
215 | - $video['duration'] = $__time_h->timestamp($video['duration']); |
|
216 | - $video['views'] = $__video_h->fetch_video_views($video['rid']); |
|
217 | - $video['author'] = htmlspecialchars($video['author']); |
|
218 | - $video['title'] = htmlspecialchars($video['title']); |
|
219 | - $video['description'] = $__video_h->shorten_description($video['description'], 50); |
|
220 | - ?> |
|
211 | + $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Comedy' ORDER BY rand() LIMIT 4"); |
|
212 | + $stmt->execute(); |
|
213 | + while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
214 | + $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
|
215 | + $video['duration'] = $__time_h->timestamp($video['duration']); |
|
216 | + $video['views'] = $__video_h->fetch_video_views($video['rid']); |
|
217 | + $video['author'] = htmlspecialchars($video['author']); |
|
218 | + $video['title'] = htmlspecialchars($video['title']); |
|
219 | + $video['description'] = $__video_h->shorten_description($video['description'], 50); |
|
220 | + ?> |
|
221 | 221 | <div class="browse-item yt-tile-default "> |
222 | 222 | <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> |
223 | 223 | <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"> |
@@ -243,16 +243,16 @@ discard block |
||
243 | 243 | </div> |
244 | 244 | <div class="browse-item-row ytg-box"> |
245 | 245 | <?php |
246 | - $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Comedy' ORDER BY rand() LIMIT 4"); |
|
247 | - $stmt->execute(); |
|
248 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
249 | - $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
|
250 | - $video['duration'] = $__time_h->timestamp($video['duration']); |
|
251 | - $video['views'] = $__video_h->fetch_video_views($video['rid']); |
|
252 | - $video['author'] = htmlspecialchars($video['author']); |
|
253 | - $video['title'] = htmlspecialchars($video['title']); |
|
254 | - $video['description'] = $__video_h->shorten_description($video['description'], 50); |
|
255 | - ?> |
|
246 | + $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Comedy' ORDER BY rand() LIMIT 4"); |
|
247 | + $stmt->execute(); |
|
248 | + while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
249 | + $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
|
250 | + $video['duration'] = $__time_h->timestamp($video['duration']); |
|
251 | + $video['views'] = $__video_h->fetch_video_views($video['rid']); |
|
252 | + $video['author'] = htmlspecialchars($video['author']); |
|
253 | + $video['title'] = htmlspecialchars($video['title']); |
|
254 | + $video['description'] = $__video_h->shorten_description($video['description'], 50); |
|
255 | + ?> |
|
256 | 256 | <div class="browse-item yt-tile-default "> |
257 | 257 | <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> |
258 | 258 | <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"> |
@@ -278,16 +278,16 @@ discard block |
||
278 | 278 | </div> |
279 | 279 | <div class="browse-item-row ytg-box"> |
280 | 280 | <?php |
281 | - $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Comedy' ORDER BY rand() LIMIT 4"); |
|
282 | - $stmt->execute(); |
|
283 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
284 | - $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
|
285 | - $video['duration'] = $__time_h->timestamp($video['duration']); |
|
286 | - $video['views'] = $__video_h->fetch_video_views($video['rid']); |
|
287 | - $video['author'] = htmlspecialchars($video['author']); |
|
288 | - $video['title'] = htmlspecialchars($video['title']); |
|
289 | - $video['description'] = $__video_h->shorten_description($video['description'], 50); |
|
290 | - ?> |
|
281 | + $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Comedy' ORDER BY rand() LIMIT 4"); |
|
282 | + $stmt->execute(); |
|
283 | + while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
284 | + $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
|
285 | + $video['duration'] = $__time_h->timestamp($video['duration']); |
|
286 | + $video['views'] = $__video_h->fetch_video_views($video['rid']); |
|
287 | + $video['author'] = htmlspecialchars($video['author']); |
|
288 | + $video['title'] = htmlspecialchars($video['title']); |
|
289 | + $video['description'] = $__video_h->shorten_description($video['description'], 50); |
|
290 | + ?> |
|
291 | 291 | <div class="browse-item yt-tile-default "> |
292 | 292 | <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> |
293 | 293 | <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"> |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | <?php |
141 | 141 | $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Comedy' ORDER BY rand() LIMIT 4"); |
142 | 142 | $stmt->execute(); |
143 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
143 | + while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
144 | 144 | $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
145 | 145 | $video['duration'] = $__time_h->timestamp($video['duration']); |
146 | 146 | $video['views'] = $__video_h->fetch_video_views($video['rid']); |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | <?php |
176 | 176 | $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Comedy' ORDER BY rand() LIMIT 4"); |
177 | 177 | $stmt->execute(); |
178 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
178 | + while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
179 | 179 | $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
180 | 180 | $video['duration'] = $__time_h->timestamp($video['duration']); |
181 | 181 | $video['views'] = $__video_h->fetch_video_views($video['rid']); |
@@ -210,7 +210,7 @@ discard block |
||
210 | 210 | <?php |
211 | 211 | $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Comedy' ORDER BY rand() LIMIT 4"); |
212 | 212 | $stmt->execute(); |
213 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
213 | + while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
214 | 214 | $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
215 | 215 | $video['duration'] = $__time_h->timestamp($video['duration']); |
216 | 216 | $video['views'] = $__video_h->fetch_video_views($video['rid']); |
@@ -245,7 +245,7 @@ discard block |
||
245 | 245 | <?php |
246 | 246 | $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Comedy' ORDER BY rand() LIMIT 4"); |
247 | 247 | $stmt->execute(); |
248 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
248 | + while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
249 | 249 | $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
250 | 250 | $video['duration'] = $__time_h->timestamp($video['duration']); |
251 | 251 | $video['views'] = $__video_h->fetch_video_views($video['rid']); |
@@ -280,7 +280,7 @@ discard block |
||
280 | 280 | <?php |
281 | 281 | $stmt = $__db->prepare("SELECT * FROM videos WHERE category = 'Comedy' ORDER BY rand() LIMIT 4"); |
282 | 282 | $stmt->execute(); |
283 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
283 | + while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
284 | 284 | $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
285 | 285 | $video['duration'] = $__time_h->timestamp($video['duration']); |
286 | 286 | $video['views'] = $__video_h->fetch_video_views($video['rid']); |