@@ -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="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" class="see-more-arrow" alt=""></a> |
@@ -203,16 +203,16 @@ discard block |
||
| 203 | 203 | </p> |
| 204 | 204 | <ul> |
| 205 | 205 | <?php |
| 206 | - $stmt = $__db->prepare("SELECT * FROM videos ORDER BY rand() LIMIT 4"); |
|
| 207 | - $stmt->execute(); |
|
| 208 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
| 209 | - $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
|
| 210 | - $video['duration'] = $__time_h->timestamp($video['duration']); |
|
| 211 | - $video['views'] = $__video_h->fetch_video_views($video['rid']); |
|
| 212 | - $video['author'] = htmlspecialchars($video['author']); |
|
| 213 | - $video['title'] = htmlspecialchars($video['title']); |
|
| 214 | - $video['description'] = $__video_h->shorten_description($video['description'], 50); |
|
| 215 | - ?> |
|
| 206 | + $stmt = $__db->prepare("SELECT * FROM videos ORDER BY rand() LIMIT 4"); |
|
| 207 | + $stmt->execute(); |
|
| 208 | + while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
| 209 | + $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
|
| 210 | + $video['duration'] = $__time_h->timestamp($video['duration']); |
|
| 211 | + $video['views'] = $__video_h->fetch_video_views($video['rid']); |
|
| 212 | + $video['author'] = htmlspecialchars($video['author']); |
|
| 213 | + $video['title'] = htmlspecialchars($video['title']); |
|
| 214 | + $video['description'] = $__video_h->shorten_description($video['description'], 50); |
|
| 215 | + ?> |
|
| 216 | 216 | <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> |
| 217 | 217 | <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"> |
| 218 | 218 | </span><img class="yt-uix-button-arrow" src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt=""></button> |
@@ -226,16 +226,16 @@ discard block |
||
| 226 | 226 | </h3> |
| 227 | 227 | <ul> |
| 228 | 228 | <?php |
| 229 | - $stmt = $__db->prepare("SELECT * FROM videos WHERE featured = 'v' ORDER BY id DESC LIMIT 4"); |
|
| 230 | - $stmt->execute(); |
|
| 231 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
| 232 | - $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
|
| 233 | - $video['duration'] = $__time_h->timestamp($video['duration']); |
|
| 234 | - $video['views'] = $__video_h->fetch_video_views($video['rid']); |
|
| 235 | - $video['author'] = htmlspecialchars($video['author']); |
|
| 236 | - $video['title'] = htmlspecialchars($video['title']); |
|
| 237 | - $video['description'] = $__video_h->shorten_description($video['description'], 50); |
|
| 238 | - ?> |
|
| 229 | + $stmt = $__db->prepare("SELECT * FROM videos WHERE featured = 'v' ORDER BY id DESC LIMIT 4"); |
|
| 230 | + $stmt->execute(); |
|
| 231 | + while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
| 232 | + $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
|
| 233 | + $video['duration'] = $__time_h->timestamp($video['duration']); |
|
| 234 | + $video['views'] = $__video_h->fetch_video_views($video['rid']); |
|
| 235 | + $video['author'] = htmlspecialchars($video['author']); |
|
| 236 | + $video['title'] = htmlspecialchars($video['title']); |
|
| 237 | + $video['description'] = $__video_h->shorten_description($video['description'], 50); |
|
| 238 | + ?> |
|
| 239 | 239 | <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> |
| 240 | 240 | <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"> |
| 241 | 241 | </span><img class="yt-uix-button-arrow" src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt=""></button> |
@@ -259,16 +259,16 @@ discard block |
||
| 259 | 259 | <div class="feed-page"> |
| 260 | 260 | <ul> |
| 261 | 261 | <?php |
| 262 | - $stmt = $__db->prepare("SELECT * FROM videos ORDER BY id DESC LIMIT 20"); |
|
| 263 | - $stmt->execute(); |
|
| 264 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
| 265 | - $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
|
| 266 | - $video['duration'] = $__time_h->timestamp($video['duration']); |
|
| 267 | - $video['views'] = $__video_h->fetch_video_views($video['rid']); |
|
| 268 | - $video['author'] = htmlspecialchars($video['author']); |
|
| 269 | - $video['title'] = htmlspecialchars($video['title']); |
|
| 270 | - $video['description'] = $__video_h->shorten_description($video['description'], 50); |
|
| 271 | - ?> |
|
| 262 | + $stmt = $__db->prepare("SELECT * FROM videos ORDER BY id DESC LIMIT 20"); |
|
| 263 | + $stmt->execute(); |
|
| 264 | + while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
| 265 | + $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
|
| 266 | + $video['duration'] = $__time_h->timestamp($video['duration']); |
|
| 267 | + $video['views'] = $__video_h->fetch_video_views($video['rid']); |
|
| 268 | + $video['author'] = htmlspecialchars($video['author']); |
|
| 269 | + $video['title'] = htmlspecialchars($video['title']); |
|
| 270 | + $video['description'] = $__video_h->shorten_description($video['description'], 50); |
|
| 271 | + ?> |
|
| 272 | 272 | <li> |
| 273 | 273 | <div class="feed-item-container first " data-channel-key="UCR2A9ZNliJfgC66IvIpe-Zw"> |
| 274 | 274 | <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 |
@@ -167,7 +167,7 @@ discard block |
||
| 167 | 167 | </span> |
| 168 | 168 | </a> |
| 169 | 169 | </li> |
| 170 | - <?php foreach($__server->featured_channels as $channel) { ?> |
|
| 170 | + <?php foreach ($__server->featured_channels as $channel) { ?> |
|
| 171 | 171 | <li class="guide-item-container "> |
| 172 | 172 | <a class="guide-item" data-external-id="<?php echo htmlspecialchars($channel); ?>" data-feed-name="<?php echo htmlspecialchars($channel); ?>" data-feed-type="user"> |
| 173 | 173 | <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" onerror="this.onerror=null;this.src='/dynamic/thumbs/default.jpg';" data-thumb="/dynamic/pfp/<?php echo $__user_h->fetch_pfp($channel); ?>" width="28"><span class="vertical-align"></span></span></span></span> |
@@ -205,7 +205,7 @@ discard block |
||
| 205 | 205 | <?php |
| 206 | 206 | $stmt = $__db->prepare("SELECT * FROM videos ORDER BY rand() LIMIT 4"); |
| 207 | 207 | $stmt->execute(); |
| 208 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
| 208 | + while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
| 209 | 209 | $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
| 210 | 210 | $video['duration'] = $__time_h->timestamp($video['duration']); |
| 211 | 211 | $video['views'] = $__video_h->fetch_video_views($video['rid']); |
@@ -228,7 +228,7 @@ discard block |
||
| 228 | 228 | <?php |
| 229 | 229 | $stmt = $__db->prepare("SELECT * FROM videos WHERE featured = 'v' ORDER BY id DESC LIMIT 4"); |
| 230 | 230 | $stmt->execute(); |
| 231 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
| 231 | + while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
| 232 | 232 | $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
| 233 | 233 | $video['duration'] = $__time_h->timestamp($video['duration']); |
| 234 | 234 | $video['views'] = $__video_h->fetch_video_views($video['rid']); |
@@ -261,7 +261,7 @@ discard block |
||
| 261 | 261 | <?php |
| 262 | 262 | $stmt = $__db->prepare("SELECT * FROM videos ORDER BY id DESC LIMIT 20"); |
| 263 | 263 | $stmt->execute(); |
| 264 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
| 264 | + while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
| 265 | 265 | $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
| 266 | 266 | $video['duration'] = $__time_h->timestamp($video['duration']); |
| 267 | 267 | $video['views'] = $__video_h->fetch_video_views($video['rid']); |
@@ -39,8 +39,8 @@ |
||
| 39 | 39 | ?> |
| 40 | 40 | <div id="browse-side-column" class="ytg-2col ytg-last"> |
| 41 | 41 | <ol class="navigation-menu"> |
| 42 | - <?php foreach($__tabs as $_tab) { |
|
| 43 | - if($_SERVER['REQUEST_URI'] != $_tab->url) |
|
| 42 | + <?php foreach ($__tabs as $_tab) { |
|
| 43 | + if ($_SERVER['REQUEST_URI'] != $_tab->url) |
|
| 44 | 44 | $_tab->selected = true; |
| 45 | 45 | ?> |
| 46 | 46 | <li class="menu-item"> |
@@ -40,8 +40,9 @@ |
||
| 40 | 40 | <div id="browse-side-column" class="ytg-2col ytg-last"> |
| 41 | 41 | <ol class="navigation-menu"> |
| 42 | 42 | <?php foreach($__tabs as $_tab) { |
| 43 | - if($_SERVER['REQUEST_URI'] != $_tab->url) |
|
| 44 | - $_tab->selected = true; |
|
| 43 | + if($_SERVER['REQUEST_URI'] != $_tab->url) { |
|
| 44 | + $_tab->selected = true; |
|
| 45 | + } |
|
| 45 | 46 | ?> |
| 46 | 47 | <li class="menu-item"> |
| 47 | 48 | <a class="<?php echo $_tab->selected ? true : "selected"; ?>" href="<?php echo $_tab->url; ?>"> |
@@ -17,29 +17,29 @@ discard block |
||
| 17 | 17 | |
| 18 | 18 | $results_per_page = 12; |
| 19 | 19 | $number_of_result = $stmt->rowCount(); |
| 20 | - $number_of_page = ceil ($number_of_result / $results_per_page); |
|
| 20 | + $number_of_page = ceil($number_of_result/$results_per_page); |
|
| 21 | 21 | |
| 22 | - if (!isset ($_GET['page']) ) { |
|
| 22 | + if (!isset ($_GET['page'])) { |
|
| 23 | 23 | $page = 1; |
| 24 | 24 | } else { |
| 25 | - $page = (int)$_GET['page']; |
|
| 25 | + $page = (int) $_GET['page']; |
|
| 26 | 26 | } |
| 27 | 27 | |
| 28 | - $page_first_result = ($page - 1) * $results_per_page; |
|
| 28 | + $page_first_result = ($page - 1)*$results_per_page; |
|
| 29 | 29 | |
| 30 | - if($_GET['filter'] == "notification") { |
|
| 30 | + if ($_GET['filter'] == "notification") { |
|
| 31 | 31 | $stmt6 = $__db->prepare("SELECT * FROM pms WHERE touser = :search AND type = 'nt' ORDER BY id DESC LIMIT :pfirst, :pper"); |
| 32 | 32 | $stmt6->bindParam(":search", $search); |
| 33 | 33 | $stmt6->bindParam(":pfirst", $page_first_result); |
| 34 | 34 | $stmt6->bindParam(":pper", $results_per_page); |
| 35 | 35 | $stmt6->execute(); |
| 36 | - } else if($_GET['filter'] == "sent") { |
|
| 36 | + } else if ($_GET['filter'] == "sent") { |
|
| 37 | 37 | $stmt6 = $__db->prepare("SELECT * FROM pms WHERE owner = :search ORDER BY id DESC LIMIT :pfirst, :pper"); |
| 38 | 38 | $stmt6->bindParam(":search", $search); |
| 39 | 39 | $stmt6->bindParam(":pfirst", $page_first_result); |
| 40 | 40 | $stmt6->bindParam(":pper", $results_per_page); |
| 41 | 41 | $stmt6->execute(); |
| 42 | - } else if($_GET['filter'] == "pm") { |
|
| 42 | + } else if ($_GET['filter'] == "pm") { |
|
| 43 | 43 | $stmt6 = $__db->prepare("SELECT * FROM pms WHERE touser = :search AND type = 'nm' ORDER BY id DESC LIMIT :pfirst, :pper"); |
| 44 | 44 | $stmt6->bindParam(":search", $search); |
| 45 | 45 | $stmt6->bindParam(":pfirst", $page_first_result); |
@@ -68,8 +68,8 @@ discard block |
||
| 68 | 68 | </tr> |
| 69 | 69 | |
| 70 | 70 | <?php |
| 71 | - while($inbox = $stmt6->fetch(PDO::FETCH_ASSOC)) { |
|
| 72 | - if($__video_h->video_exists($inbox['video_attribute'])) { |
|
| 71 | + while ($inbox = $stmt6->fetch(PDO::FETCH_ASSOC)) { |
|
| 72 | + if ($__video_h->video_exists($inbox['video_attribute'])) { |
|
| 73 | 73 | $inbox['video'] = $__video_h->fetch_video_rid($inbox['video_attribute']); |
| 74 | 74 | $inbox['video_attr_exists'] = true; |
| 75 | 75 | |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | ?> |
| 84 | 84 | <tr style="margin-top: 5px;" id="videoslist"> |
| 85 | 85 | <!-- |
| 86 | - <?php if($inbox['readed'] == "n") { ?> |
|
| 86 | + <?php if ($inbox['readed'] == "n") { ?> |
|
| 87 | 87 | <a style="position:relative;top:7px;color: white;text-decoration: none;background-color: #d54343;padding: 7px;padding-left: 10px;margin-right: 12px;display: inline;" href="/inbox/"> |
| 88 | 88 | NEW |
| 89 | 89 | </a> |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | <td class="video-manager-stats" style="background: none;padding-left: 8px;"> |
| 107 | 107 | <h3><?php echo htmlspecialchars($inbox['subject']); ?></h3> |
| 108 | 108 | <?php echo $__video_h->shorten_description($inbox['message'], 300, true); ?> |
| 109 | - <?php if($inbox['video_attr_exists']) { ?> |
|
| 109 | + <?php if ($inbox['video_attr_exists']) { ?> |
|
| 110 | 110 | <hr> |
| 111 | 111 | <ul> |
| 112 | 112 | <li class="video-list-item "><a href="/watch?v=<?php echo $inbox['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 $inbox['video']['title']; ?>" data-thumb="/dynamic/thumbs/<?php echo $inbox['video']['thumbnail']; ?>" width="120"><span class="vertical-align"></span></span></span></span><span class="video-time"><?php echo $inbox['video']['duration']; ?></span> |
@@ -10,18 +10,18 @@ |
||
| 10 | 10 | <?php $__user_u = new user_update($__db); ?> |
| 11 | 11 | <?php $__db_h = new db_helper(); ?> |
| 12 | 12 | <?php $__time_h = new time_helper(); ?> |
| 13 | -<?php if(!isset($_SESSION['siteusername'])) { header("Location: /sign_in"); } ?> |
|
| 13 | +<?php if (!isset($_SESSION['siteusername'])) { header("Location: /sign_in"); } ?> |
|
| 14 | 14 | <?php |
| 15 | - if($_SERVER['REQUEST_METHOD'] == 'POST') { |
|
| 15 | + if ($_SERVER['REQUEST_METHOD'] == 'POST') { |
|
| 16 | 16 | $error = array(); |
| 17 | 17 | |
| 18 | - if(!isset($_SESSION['siteusername'])){ $error['message'] = "You are not logged in"; $error['status'] = true; } |
|
| 19 | - if(!$_POST['contents']){ $error['message'] = "Your description cannot be blank"; $error['status'] = true; } |
|
| 20 | - if(empty(trim($_POST['subject']))){ $error['message'] = "Your subject cannot be blank"; $error['status'] = true; } |
|
| 21 | - if(strlen($_POST['contents']) > 1000){ $error['message'] = "Your description must be shorter than 1000 characters"; $error['status'] = true; } |
|
| 22 | - if($__user_h->if_cooldown($_SESSION['siteusername'])) { $error['message'] = "You are on a cooldown! Wait for a minute before sending a private message."; $error['status'] = true; } |
|
| 18 | + if (!isset($_SESSION['siteusername'])) { $error['message'] = "You are not logged in"; $error['status'] = true; } |
|
| 19 | + if (!$_POST['contents']) { $error['message'] = "Your description cannot be blank"; $error['status'] = true; } |
|
| 20 | + if (empty(trim($_POST['subject']))) { $error['message'] = "Your subject cannot be blank"; $error['status'] = true; } |
|
| 21 | + if (strlen($_POST['contents']) > 1000) { $error['message'] = "Your description must be shorter than 1000 characters"; $error['status'] = true; } |
|
| 22 | + if ($__user_h->if_cooldown($_SESSION['siteusername'])) { $error['message'] = "You are on a cooldown! Wait for a minute before sending a private message."; $error['status'] = true; } |
|
| 23 | 23 | |
| 24 | - if(!isset($error['message'])) { |
|
| 24 | + if (!isset($error['message'])) { |
|
| 25 | 25 | $stmt = $__db->prepare("INSERT INTO pms (touser, subject, message, owner) VALUES (:touser, :subject, :message, :owner)"); |
| 26 | 26 | $stmt->bindParam(":subject", $_POST['subject']); |
| 27 | 27 | $stmt->bindParam(":message", $_POST['contents']); |
@@ -10,7 +10,7 @@ discard block |
||
| 10 | 10 | <?php $__user_u = new user_update($__db); ?> |
| 11 | 11 | <?php $__db_h = new db_helper(); ?> |
| 12 | 12 | <?php $__time_h = new time_helper(); ?> |
| 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> |
@@ -165,15 +165,15 @@ discard block |
||
| 165 | 165 | $stmt->execute(); |
| 166 | 166 | |
| 167 | 167 | $number_of_result = $stmt->rowCount(); |
| 168 | - $number_of_page = ceil ($number_of_result / $results_per_page); |
|
| 168 | + $number_of_page = ceil($number_of_result/$results_per_page); |
|
| 169 | 169 | |
| 170 | - if (!isset ($_GET['page']) ) { |
|
| 170 | + if (!isset ($_GET['page'])) { |
|
| 171 | 171 | $page = 1; |
| 172 | 172 | } else { |
| 173 | - $page = (int)$_GET['page']; |
|
| 173 | + $page = (int) $_GET['page']; |
|
| 174 | 174 | } |
| 175 | 175 | |
| 176 | - $page_first_result = ($page - 1) * $results_per_page; |
|
| 176 | + $page_first_result = ($page - 1)*$results_per_page; |
|
| 177 | 177 | |
| 178 | 178 | $stmt6 = $__db->prepare("SELECT * FROM pms WHERE touser = :search AND type = 'nt' ORDER BY id DESC LIMIT :pfirst, :pper"); |
| 179 | 179 | $stmt6->bindParam(":search", $search); |
@@ -198,8 +198,8 @@ discard block |
||
| 198 | 198 | </tr> |
| 199 | 199 | |
| 200 | 200 | <?php |
| 201 | - while($inbox = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
| 202 | - if($__video_h->video_exists($inbox['video_attribute'])) { |
|
| 201 | + while ($inbox = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
| 202 | + if ($__video_h->video_exists($inbox['video_attribute'])) { |
|
| 203 | 203 | $inbox['video'] = $__video_h->fetch_video_rid($inbox['video_attribute']); |
| 204 | 204 | $inbox['video_attr_exists'] = true; |
| 205 | 205 | |
@@ -213,7 +213,7 @@ discard block |
||
| 213 | 213 | ?> |
| 214 | 214 | <tr style="margin-top: 5px;" id="videoslist"> |
| 215 | 215 | <!-- |
| 216 | - <?php if($inbox['readed'] == "n") { ?> |
|
| 216 | + <?php if ($inbox['readed'] == "n") { ?> |
|
| 217 | 217 | <a style="position:relative;top:7px;color: white;text-decoration: none;background-color: #d54343;padding: 7px;padding-left: 10px;margin-right: 12px;display: inline;" href="/inbox/"> |
| 218 | 218 | NEW |
| 219 | 219 | </a> |
@@ -236,7 +236,7 @@ discard block |
||
| 236 | 236 | <td class="video-manager-stats" style="background: none;padding-left: 8px;"> |
| 237 | 237 | <h3><?php echo htmlspecialchars($inbox['subject']); ?></h3> |
| 238 | 238 | <?php echo $__video_h->shorten_description($inbox['message'], 300, true); ?> |
| 239 | - <?php if($inbox['video_attr_exists']) { ?> |
|
| 239 | + <?php if ($inbox['video_attr_exists']) { ?> |
|
| 240 | 240 | <hr> |
| 241 | 241 | <ul> |
| 242 | 242 | <li class="video-list-item "><a href="/watch?v=<?php echo $inbox['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 $inbox['video']['title']; ?>" data-thumb="/dynamic/thumbs/<?php echo $inbox['video']['thumbnail']; ?>" width="120"><span class="vertical-align"></span></span></span></span><span class="video-time"><?php echo $inbox['video']['duration']; ?></span> |
@@ -263,7 +263,7 @@ discard block |
||
| 263 | 263 | </div> |
| 264 | 264 | </center><br> |
| 265 | 265 | |
| 266 | - <?php for($page = 1; $page<= $number_of_page; $page++) { ?> |
|
| 266 | + <?php for ($page = 1; $page <= $number_of_page; $page++) { ?> |
|
| 267 | 267 | <button class="yt-uix-button yt-uix-button-default" onclick="ajax_fetch(<?php echo $page; ?>)"><?php echo $page; ?></button> |
| 268 | 268 | <?php } ?> |
| 269 | 269 | |
@@ -287,7 +287,7 @@ discard block |
||
| 287 | 287 | </script> |
| 288 | 288 | |
| 289 | 289 | <?php |
| 290 | - if($stmt6->rowCount() == 0) { echo " |
|
| 290 | + if ($stmt6->rowCount() == 0) { echo " |
|
| 291 | 291 | You currently have no notifications in your inbox. |
| 292 | 292 | "; |
| 293 | 293 | } ?> |
@@ -10,7 +10,7 @@ discard block |
||
| 10 | 10 | <?php $__user_u = new user_update($__db); ?> |
| 11 | 11 | <?php $__db_h = new db_helper(); ?> |
| 12 | 12 | <?php $__time_h = new time_helper(); ?> |
| 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> |
@@ -165,15 +165,15 @@ discard block |
||
| 165 | 165 | $stmt->execute(); |
| 166 | 166 | |
| 167 | 167 | $number_of_result = $stmt->rowCount(); |
| 168 | - $number_of_page = ceil ($number_of_result / $results_per_page); |
|
| 168 | + $number_of_page = ceil($number_of_result/$results_per_page); |
|
| 169 | 169 | |
| 170 | - if (!isset ($_GET['page']) ) { |
|
| 170 | + if (!isset ($_GET['page'])) { |
|
| 171 | 171 | $page = 1; |
| 172 | 172 | } else { |
| 173 | - $page = (int)$_GET['page']; |
|
| 173 | + $page = (int) $_GET['page']; |
|
| 174 | 174 | } |
| 175 | 175 | |
| 176 | - $page_first_result = ($page - 1) * $results_per_page; |
|
| 176 | + $page_first_result = ($page - 1)*$results_per_page; |
|
| 177 | 177 | |
| 178 | 178 | $stmt6 = $__db->prepare("SELECT * FROM pms WHERE touser = :search ORDER BY id DESC LIMIT :pfirst, :pper"); |
| 179 | 179 | $stmt6->bindParam(":search", $search); |
@@ -198,8 +198,8 @@ discard block |
||
| 198 | 198 | </tr> |
| 199 | 199 | |
| 200 | 200 | <?php |
| 201 | - while($inbox = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
| 202 | - if($__video_h->video_exists($inbox['video_attribute'])) { |
|
| 201 | + while ($inbox = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
| 202 | + if ($__video_h->video_exists($inbox['video_attribute'])) { |
|
| 203 | 203 | $inbox['video'] = $__video_h->fetch_video_rid($inbox['video_attribute']); |
| 204 | 204 | $inbox['video_attr_exists'] = true; |
| 205 | 205 | |
@@ -213,7 +213,7 @@ discard block |
||
| 213 | 213 | ?> |
| 214 | 214 | <tr style="margin-top: 5px;" id="videoslist"> |
| 215 | 215 | <!-- |
| 216 | - <?php if($inbox['readed'] == "n") { ?> |
|
| 216 | + <?php if ($inbox['readed'] == "n") { ?> |
|
| 217 | 217 | <a style="position:relative;top:7px;color: white;text-decoration: none;background-color: #d54343;padding: 7px;padding-left: 10px;margin-right: 12px;display: inline;" href="/inbox/"> |
| 218 | 218 | NEW |
| 219 | 219 | </a> |
@@ -236,7 +236,7 @@ discard block |
||
| 236 | 236 | <td class="video-manager-stats" style="background: none;padding-left: 8px;"> |
| 237 | 237 | <h3><?php echo htmlspecialchars($inbox['subject']); ?></h3> |
| 238 | 238 | <?php echo $__video_h->shorten_description($inbox['message'], 300, true); ?> |
| 239 | - <?php if($inbox['video_attr_exists']) { ?> |
|
| 239 | + <?php if ($inbox['video_attr_exists']) { ?> |
|
| 240 | 240 | <hr> |
| 241 | 241 | <ul> |
| 242 | 242 | <li class="video-list-item "><a href="/watch?v=<?php echo $inbox['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 $inbox['video']['title']; ?>" data-thumb="/dynamic/thumbs/<?php echo $inbox['video']['thumbnail']; ?>" width="120"><span class="vertical-align"></span></span></span></span><span class="video-time"><?php echo $inbox['video']['duration']; ?></span> |
@@ -263,7 +263,7 @@ discard block |
||
| 263 | 263 | </div> |
| 264 | 264 | </center><br> |
| 265 | 265 | |
| 266 | - <?php for($page = 1; $page<= $number_of_page; $page++) { ?> |
|
| 266 | + <?php for ($page = 1; $page <= $number_of_page; $page++) { ?> |
|
| 267 | 267 | <button class="yt-uix-button yt-uix-button-default" onclick="ajax_fetch(<?php echo $page; ?>)"><?php echo $page; ?></button> |
| 268 | 268 | <?php } ?> |
| 269 | 269 | |
@@ -287,7 +287,7 @@ discard block |
||
| 287 | 287 | </script> |
| 288 | 288 | |
| 289 | 289 | <?php |
| 290 | - if($stmt6->rowCount() == 0) { echo " |
|
| 290 | + if ($stmt6->rowCount() == 0) { echo " |
|
| 291 | 291 | You currently have no messages in your inbox. |
| 292 | 292 | "; |
| 293 | 293 | } ?> |
@@ -10,7 +10,7 @@ discard block |
||
| 10 | 10 | <?php $__user_u = new user_update($__db); ?> |
| 11 | 11 | <?php $__db_h = new db_helper(); ?> |
| 12 | 12 | <?php $__time_h = new time_helper(); ?> |
| 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> |
@@ -165,15 +165,15 @@ discard block |
||
| 165 | 165 | $stmt->execute(); |
| 166 | 166 | |
| 167 | 167 | $number_of_result = $stmt->rowCount(); |
| 168 | - $number_of_page = ceil ($number_of_result / $results_per_page); |
|
| 168 | + $number_of_page = ceil($number_of_result/$results_per_page); |
|
| 169 | 169 | |
| 170 | - if (!isset ($_GET['page']) ) { |
|
| 170 | + if (!isset ($_GET['page'])) { |
|
| 171 | 171 | $page = 1; |
| 172 | 172 | } else { |
| 173 | - $page = (int)$_GET['page']; |
|
| 173 | + $page = (int) $_GET['page']; |
|
| 174 | 174 | } |
| 175 | 175 | |
| 176 | - $page_first_result = ($page - 1) * $results_per_page; |
|
| 176 | + $page_first_result = ($page - 1)*$results_per_page; |
|
| 177 | 177 | |
| 178 | 178 | $stmt6 = $__db->prepare("SELECT * FROM pms WHERE owner = :search ORDER BY id DESC LIMIT :pfirst, :pper"); |
| 179 | 179 | $stmt6->bindParam(":search", $search); |
@@ -198,8 +198,8 @@ discard block |
||
| 198 | 198 | </tr> |
| 199 | 199 | |
| 200 | 200 | <?php |
| 201 | - while($inbox = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
| 202 | - if($__video_h->video_exists($inbox['video_attribute'])) { |
|
| 201 | + while ($inbox = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
| 202 | + if ($__video_h->video_exists($inbox['video_attribute'])) { |
|
| 203 | 203 | $inbox['video'] = $__video_h->fetch_video_rid($inbox['video_attribute']); |
| 204 | 204 | $inbox['video_attr_exists'] = true; |
| 205 | 205 | |
@@ -213,7 +213,7 @@ discard block |
||
| 213 | 213 | ?> |
| 214 | 214 | <tr style="margin-top: 5px;" id="videoslist"> |
| 215 | 215 | <!-- |
| 216 | - <?php if($inbox['readed'] == "n") { ?> |
|
| 216 | + <?php if ($inbox['readed'] == "n") { ?> |
|
| 217 | 217 | <a style="position:relative;top:7px;color: white;text-decoration: none;background-color: #d54343;padding: 7px;padding-left: 10px;margin-right: 12px;display: inline;" href="/inbox/"> |
| 218 | 218 | NEW |
| 219 | 219 | </a> |
@@ -236,7 +236,7 @@ discard block |
||
| 236 | 236 | <td class="video-manager-stats" style="background: none;padding-left: 8px;"> |
| 237 | 237 | <h3><?php echo htmlspecialchars($inbox['subject']); ?></h3> |
| 238 | 238 | <?php echo $__video_h->shorten_description($inbox['message'], 300, true); ?> |
| 239 | - <?php if($inbox['video_attr_exists']) { ?> |
|
| 239 | + <?php if ($inbox['video_attr_exists']) { ?> |
|
| 240 | 240 | <hr> |
| 241 | 241 | <ul> |
| 242 | 242 | <li class="video-list-item "><a href="/watch?v=<?php echo $inbox['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 $inbox['video']['title']; ?>" data-thumb="/dynamic/thumbs/<?php echo $inbox['video']['thumbnail']; ?>" width="120"><span class="vertical-align"></span></span></span></span><span class="video-time"><?php echo $inbox['video']['duration']; ?></span> |
@@ -263,7 +263,7 @@ discard block |
||
| 263 | 263 | </div> |
| 264 | 264 | </center><br> |
| 265 | 265 | |
| 266 | - <?php for($page = 1; $page<= $number_of_page; $page++) { ?> |
|
| 266 | + <?php for ($page = 1; $page <= $number_of_page; $page++) { ?> |
|
| 267 | 267 | <button class="yt-uix-button yt-uix-button-default" onclick="ajax_fetch(<?php echo $page; ?>)"><?php echo $page; ?></button> |
| 268 | 268 | <?php } ?> |
| 269 | 269 | |
@@ -287,7 +287,7 @@ discard block |
||
| 287 | 287 | </script> |
| 288 | 288 | |
| 289 | 289 | <?php |
| 290 | - if($stmt6->rowCount() == 0) { echo " |
|
| 290 | + if ($stmt6->rowCount() == 0) { echo " |
|
| 291 | 291 | You currently have no sent messages in your inbox. |
| 292 | 292 | "; |
| 293 | 293 | } ?> |
@@ -10,7 +10,7 @@ discard block |
||
| 10 | 10 | <?php $__user_u = new user_update($__db); ?> |
| 11 | 11 | <?php $__db_h = new db_helper(); ?> |
| 12 | 12 | <?php $__time_h = new time_helper(); ?> |
| 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> |
@@ -165,15 +165,15 @@ discard block |
||
| 165 | 165 | $stmt->execute(); |
| 166 | 166 | |
| 167 | 167 | $number_of_result = $stmt->rowCount(); |
| 168 | - $number_of_page = ceil ($number_of_result / $results_per_page); |
|
| 168 | + $number_of_page = ceil($number_of_result/$results_per_page); |
|
| 169 | 169 | |
| 170 | - if (!isset ($_GET['page']) ) { |
|
| 170 | + if (!isset ($_GET['page'])) { |
|
| 171 | 171 | $page = 1; |
| 172 | 172 | } else { |
| 173 | - $page = (int)$_GET['page']; |
|
| 173 | + $page = (int) $_GET['page']; |
|
| 174 | 174 | } |
| 175 | 175 | |
| 176 | - $page_first_result = ($page - 1) * $results_per_page; |
|
| 176 | + $page_first_result = ($page - 1)*$results_per_page; |
|
| 177 | 177 | |
| 178 | 178 | $stmt6 = $__db->prepare("SELECT * FROM pms WHERE touser = :search AND type = 'nm' ORDER BY id DESC LIMIT :pfirst, :pper"); |
| 179 | 179 | $stmt6->bindParam(":search", $search); |
@@ -198,8 +198,8 @@ discard block |
||
| 198 | 198 | </tr> |
| 199 | 199 | |
| 200 | 200 | <?php |
| 201 | - while($inbox = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
| 202 | - if($__video_h->video_exists($inbox['video_attribute'])) { |
|
| 201 | + while ($inbox = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
| 202 | + if ($__video_h->video_exists($inbox['video_attribute'])) { |
|
| 203 | 203 | $inbox['video'] = $__video_h->fetch_video_rid($inbox['video_attribute']); |
| 204 | 204 | $inbox['video_attr_exists'] = true; |
| 205 | 205 | |
@@ -213,7 +213,7 @@ discard block |
||
| 213 | 213 | ?> |
| 214 | 214 | <tr style="margin-top: 5px;" id="videoslist"> |
| 215 | 215 | <!-- |
| 216 | - <?php if($inbox['readed'] == "n") { ?> |
|
| 216 | + <?php if ($inbox['readed'] == "n") { ?> |
|
| 217 | 217 | <a style="position:relative;top:7px;color: white;text-decoration: none;background-color: #d54343;padding: 7px;padding-left: 10px;margin-right: 12px;display: inline;" href="/inbox/"> |
| 218 | 218 | NEW |
| 219 | 219 | </a> |
@@ -236,7 +236,7 @@ discard block |
||
| 236 | 236 | <td class="video-manager-stats" style="background: none;padding-left: 8px;"> |
| 237 | 237 | <h3><?php echo htmlspecialchars($inbox['subject']); ?></h3> |
| 238 | 238 | <?php echo $__video_h->shorten_description($inbox['message'], 300, true); ?> |
| 239 | - <?php if($inbox['video_attr_exists']) { ?> |
|
| 239 | + <?php if ($inbox['video_attr_exists']) { ?> |
|
| 240 | 240 | <hr> |
| 241 | 241 | <ul> |
| 242 | 242 | <li class="video-list-item "><a href="/watch?v=<?php echo $inbox['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 $inbox['video']['title']; ?>" data-thumb="/dynamic/thumbs/<?php echo $inbox['video']['thumbnail']; ?>" width="120"><span class="vertical-align"></span></span></span></span><span class="video-time"><?php echo $inbox['video']['duration']; ?></span> |
@@ -263,7 +263,7 @@ discard block |
||
| 263 | 263 | </div> |
| 264 | 264 | </center><br> |
| 265 | 265 | |
| 266 | - <?php for($page = 1; $page<= $number_of_page; $page++) { ?> |
|
| 266 | + <?php for ($page = 1; $page <= $number_of_page; $page++) { ?> |
|
| 267 | 267 | <button class="yt-uix-button yt-uix-button-default" onclick="ajax_fetch(<?php echo $page; ?>)"><?php echo $page; ?></button> |
| 268 | 268 | <?php } ?> |
| 269 | 269 | |
@@ -287,7 +287,7 @@ discard block |
||
| 287 | 287 | </script> |
| 288 | 288 | |
| 289 | 289 | <?php |
| 290 | - if($stmt6->rowCount() == 0) { echo " |
|
| 290 | + if ($stmt6->rowCount() == 0) { echo " |
|
| 291 | 291 | You currently have no personal messages in your inbox. |
| 292 | 292 | "; |
| 293 | 293 | } ?> |
@@ -26,8 +26,8 @@ |
||
| 26 | 26 | |
| 27 | 27 | $stmt = $__db->prepare("DELETE FROM favorite_video WHERE sender = :sender AND reciever = :reciever"); |
| 28 | 28 | $stmt->execute(array( |
| 29 | - ':sender' => $_SESSION['siteusername'], |
|
| 30 | - ':reciever' => $name, |
|
| 29 | + ':sender' => $_SESSION['siteusername'], |
|
| 30 | + ':reciever' => $name, |
|
| 31 | 31 | )); |
| 32 | 32 | |
| 33 | 33 | header('Location: ' . $_SERVER['HTTP_REFERER']); |