@@ -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 | } ?> |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | $stmt->bindParam(":reciever", $name); |
| 20 | 20 | $stmt->execute(); |
| 21 | 21 | |
| 22 | -if($stmt->rowCount() == 1) { |
|
| 22 | +if ($stmt->rowCount() == 1) { |
|
| 23 | 23 | $_SESSION['error']->message = "You have already favorited this video."; |
| 24 | 24 | header('Location: ' . $_SERVER['HTTP_REFERER']); |
| 25 | 25 | die(); |
@@ -11,7 +11,7 @@ |
||
| 11 | 11 | <?php |
| 12 | 12 | $playlist = $__video_h->fetch_playlist_rid($_GET['playlist']); |
| 13 | 13 | |
| 14 | -if($playlist['author'] == $_SESSION['siteusername']) { |
|
| 14 | +if ($playlist['author'] == $_SESSION['siteusername']) { |
|
| 15 | 15 | $b = json_decode($playlist['videos']); |
| 16 | 16 | array_push($b, $_GET['id']); |
| 17 | 17 | $b = json_encode($b); |
@@ -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,8 +167,8 @@ discard block |
||
| 167 | 167 | </span> |
| 168 | 168 | </a> |
| 169 | 169 | </li> |
| 170 | - <?php if(!isset($_SESSION['siteusername'])) { ?> |
|
| 171 | - <?php foreach($__server->featured_channels as $channel) { ?> |
|
| 170 | + <?php if (!isset($_SESSION['siteusername'])) { ?> |
|
| 171 | + <?php foreach ($__server->featured_channels as $channel) { ?> |
|
| 172 | 172 | <li class="guide-item-container "> |
| 173 | 173 | <a class="guide-item" data-external-id="<?php echo htmlspecialchars($channel); ?>" data-feed-name="<?php echo htmlspecialchars($channel); ?>" data-feed-type="user"> |
| 174 | 174 | <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> |
@@ -183,7 +183,7 @@ discard block |
||
| 183 | 183 | $stmt = $__db->prepare("SELECT * FROM subscribers WHERE sender = :username ORDER BY id DESC LIMIT 20"); |
| 184 | 184 | $stmt->bindParam(":username", $_SESSION['siteusername']); |
| 185 | 185 | $stmt->execute(); |
| 186 | - while($channel = $stmt->fetch(PDO::FETCH_ASSOC)) { $channel = $channel['reciever']; ?> |
|
| 186 | + while ($channel = $stmt->fetch(PDO::FETCH_ASSOC)) { $channel = $channel['reciever']; ?> |
|
| 187 | 187 | <li class="guide-item-container "> |
| 188 | 188 | <a class="guide-item" data-external-id="<?php echo htmlspecialchars($channel); ?>" data-feed-name="<?php echo htmlspecialchars($channel); ?>" data-feed-type="user"> |
| 189 | 189 | <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> |
@@ -222,7 +222,7 @@ discard block |
||
| 222 | 222 | <?php |
| 223 | 223 | $stmt = $__db->prepare("SELECT * FROM videos ORDER BY rand() LIMIT 4"); |
| 224 | 224 | $stmt->execute(); |
| 225 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
| 225 | + while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
| 226 | 226 | $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
| 227 | 227 | $video['duration'] = $__time_h->timestamp($video['duration']); |
| 228 | 228 | $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 featured = 'v' ORDER BY id DESC 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']); |
@@ -278,7 +278,7 @@ discard block |
||
| 278 | 278 | <?php |
| 279 | 279 | $stmt = $__db->prepare("SELECT * FROM videos ORDER BY id DESC LIMIT 20"); |
| 280 | 280 | $stmt->execute(); |
| 281 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
| 281 | + while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
| 282 | 282 | $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
| 283 | 283 | $video['duration'] = $__time_h->timestamp($video['duration']); |
| 284 | 284 | $video['views'] = $__video_h->fetch_video_views($video['rid']); |
@@ -5,7 +5,7 @@ discard block |
||
| 5 | 5 | <a id="logo-container" href="/" title="SubRocks home"> |
| 6 | 6 | <img id="logo" src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="SubRocks home"> |
| 7 | 7 | </a> |
| 8 | - <?php if(!isset($_SESSION['siteusername'])) { ?> |
|
| 8 | + <?php if (!isset($_SESSION['siteusername'])) { ?> |
|
| 9 | 9 | <div id="yt-masthead-signin"> |
| 10 | 10 | <div id="masthead-user-display"><span id="masthead-user-wrapper"><button href="/sign_in" type="button" id="masthead-user-button" onclick=";window.location.href=this.getAttribute('href');return false;" class=" yt-uix-button yt-uix-button-text" role="button"><span class="yt-uix-button-content"> <span id="masthead-user-image"> |
| 11 | 11 | <span class="clip"> |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | <span id="yt-masthead-user-displayname" dir="ltr" class="yt-valign-container" onclick="yt.www.masthead.toggleExpandedMasthead();"> |
| 24 | 24 | <?php echo htmlspecialchars($_SESSION['siteusername']); ?> |
| 25 | 25 | </span> |
| 26 | - <?php if($__user_h->fetch_unread_pms($_SESSION['siteusername']) != 0) { ?> |
|
| 26 | + <?php if ($__user_h->fetch_unread_pms($_SESSION['siteusername']) != 0) { ?> |
|
| 27 | 27 | <a style="border-radius:2px;font-weight:bold;border:1px solid #CE4D34;position:relative;top:1px;color: white;text-decoration: none;background-color: #E26148;padding: 7px;padding-left: 10px;margin-right: 12px;display: inline;" href="/inbox/"> |
| 28 | 28 | <?php echo $__user_h->fetch_unread_pms($_SESSION['siteusername']); ?> |
| 29 | 29 | </a> |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | </form> |
| 46 | 46 | </div> |
| 47 | 47 | </div></div> |
| 48 | -<?php if(isset($_SESSION['siteusername'])) { ?> |
|
| 48 | +<?php if (isset($_SESSION['siteusername'])) { ?> |
|
| 49 | 49 | <div id="masthead-expanded" class="hid" style="display: none;"> |
| 50 | 50 | <div id="masthead-expanded-container" class="with-sandbar"> |
| 51 | 51 | <div class="yt-uix-slider yt-rounded" id="watch-channel-discoverbox" data-slider-slide-selected="3" data-slider-slides="4" |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | $stmt = $__db->prepare("SELECT * FROM videos WHERE author = :username ORDER BY id DESC LIMIT 20"); |
| 67 | 67 | $stmt->bindParam(":username", $_SESSION['siteusername']); |
| 68 | 68 | $stmt->execute(); |
| 69 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
| 69 | + while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
| 70 | 70 | $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
| 71 | 71 | $video['duration'] = $__time_h->timestamp($video['duration']); |
| 72 | 72 | $video['views'] = $__video_h->fetch_video_views($video['rid']); |
@@ -210,7 +210,7 @@ discard block |
||
| 210 | 210 | <?php } ?> |
| 211 | 211 | </div> |
| 212 | 212 | <div id="alerts"> |
| 213 | - <?php if(isset($error['status'])) { ?> |
|
| 213 | + <?php if (isset($error['status'])) { ?> |
|
| 214 | 214 | <div id="masthead_child_div"><div class="yt-alert yt-alert-default yt-alert-error yt-alert-player"> <div class="yt-alert-icon"> |
| 215 | 215 | <img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" class="icon master-sprite" alt="Alert icon"> |
| 216 | 216 | </div> |
@@ -220,7 +220,7 @@ discard block |
||
| 220 | 220 | </div> |
| 221 | 221 | </div></div></div> |
| 222 | 222 | <?php } ?> |
| 223 | - <?php if(isset($_GET['error'])) { ?> |
|
| 223 | + <?php if (isset($_GET['error'])) { ?> |
|
| 224 | 224 | <div id="masthead_child_div"><div class="yt-alert yt-alert-default yt-alert-error "> <div class="yt-alert-icon"> |
| 225 | 225 | <img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" class="icon master-sprite" alt="Alert icon"> |
| 226 | 226 | </div> |
@@ -230,7 +230,7 @@ discard block |
||
| 230 | 230 | </div> |
| 231 | 231 | </div></div></div> |
| 232 | 232 | <?php } ?> |
| 233 | - <?php if(isset($_GET['success'])) { ?> |
|
| 233 | + <?php if (isset($_GET['success'])) { ?> |
|
| 234 | 234 | <div id="masthead_child_div"><div class="yt-alert yt-alert-default yt-alert-success "> <div class="yt-alert-icon"> |
| 235 | 235 | <img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" class="icon master-sprite" alt="Alert icon"> |
| 236 | 236 | </div> |
@@ -240,7 +240,7 @@ discard block |
||
| 240 | 240 | </div> |
| 241 | 241 | </div></div></div> |
| 242 | 242 | <?php } ?> |
| 243 | - <?php if(isset($_SESSION['error'])) { ?> |
|
| 243 | + <?php if (isset($_SESSION['error'])) { ?> |
|
| 244 | 244 | <div id="masthead_child_div"><div class="yt-alert yt-alert-default yt-alert-error"> <div class="yt-alert-icon"> |
| 245 | 245 | <img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" class="icon master-sprite" alt="Alert icon"> |
| 246 | 246 | </div> |
@@ -7,7 +7,7 @@ discard block |
||
| 7 | 7 | <?php $__user_h = new user_helper($__db); ?> |
| 8 | 8 | <?php $__db_h = new db_helper(); ?> |
| 9 | 9 | <?php $__time_h = new time_helper(); error_reporting(E_ERROR | E_PARSE); ?> |
| 10 | -<?php if(!isset($_SESSION['siteusername'])) { header("Location: /sign_in"); } ?> |
|
| 10 | +<?php if (!isset($_SESSION['siteusername'])) { header("Location: /sign_in"); } ?> |
|
| 11 | 11 | <!DOCTYPE html> |
| 12 | 12 | <html dir="ltr"> |
| 13 | 13 | <head> |
@@ -160,15 +160,15 @@ discard block |
||
| 160 | 160 | $stmt->execute(); |
| 161 | 161 | |
| 162 | 162 | $number_of_result = $stmt->rowCount(); |
| 163 | - $number_of_page = ceil ($number_of_result / $results_per_page); |
|
| 163 | + $number_of_page = ceil($number_of_result/$results_per_page); |
|
| 164 | 164 | |
| 165 | - if (!isset ($_GET['page']) ) { |
|
| 165 | + if (!isset ($_GET['page'])) { |
|
| 166 | 166 | $page = 1; |
| 167 | 167 | } else { |
| 168 | - $page = (int)$_GET['page']; |
|
| 168 | + $page = (int) $_GET['page']; |
|
| 169 | 169 | } |
| 170 | 170 | |
| 171 | - $page_first_result = ($page - 1) * $results_per_page; |
|
| 171 | + $page_first_result = ($page - 1)*$results_per_page; |
|
| 172 | 172 | ?> |
| 173 | 173 | <?php |
| 174 | 174 | $stmt6 = $__db->prepare("SELECT * FROM favorite_video WHERE sender = :search ORDER BY id DESC LIMIT :pfirst, :pper"); |
@@ -188,8 +188,8 @@ discard block |
||
| 188 | 188 | </tr> |
| 189 | 189 | |
| 190 | 190 | <?php |
| 191 | - while($video = $stmt6->fetch(PDO::FETCH_ASSOC)) { |
|
| 192 | - if($__video_h->video_exists($video['reciever'])) { |
|
| 191 | + while ($video = $stmt6->fetch(PDO::FETCH_ASSOC)) { |
|
| 192 | + if ($__video_h->video_exists($video['reciever'])) { |
|
| 193 | 193 | $_video = $__video_h->fetch_video_rid($video['reciever']); |
| 194 | 194 | $_video['video_responses'] = $__video_h->get_video_responses($_video['rid']); |
| 195 | 195 | $_video['age'] = $__time_h->time_elapsed_string($_video['publish']); |
@@ -199,19 +199,19 @@ discard block |
||
| 199 | 199 | $_video['title'] = htmlspecialchars($_video['title']); |
| 200 | 200 | $_video['description'] = $__video_h->shorten_description($_video['description'], 50); |
| 201 | 201 | |
| 202 | - if($_video['thumbnail'] == ".png" && $_video['filename'] == ".mp4") { |
|
| 202 | + if ($_video['thumbnail'] == ".png" && $_video['filename'] == ".mp4") { |
|
| 203 | 203 | $status = "Corrupted"; |
| 204 | - } else if($_video['visibility'] == "v") { |
|
| 204 | + } else if ($_video['visibility'] == "v") { |
|
| 205 | 205 | $status = "Approved"; |
| 206 | - } else if($_video['visibility'] == "n") { |
|
| 206 | + } else if ($_video['visibility'] == "n") { |
|
| 207 | 207 | $status = "Approved"; |
| 208 | - } else if($_video['visibility'] == "o") { |
|
| 208 | + } else if ($_video['visibility'] == "o") { |
|
| 209 | 209 | $status = "Disapproved"; |
| 210 | 210 | } else { |
| 211 | 211 | $status = "Unknown"; |
| 212 | 212 | } |
| 213 | 213 | |
| 214 | - if($_video['commenting'] == "a") |
|
| 214 | + if ($_video['commenting'] == "a") |
|
| 215 | 215 | $_video['commentstatus'] = "Commenting allowed"; |
| 216 | 216 | else |
| 217 | 217 | $_video['commentstatus'] = "Commenting disallowed"; |
@@ -257,7 +257,7 @@ discard block |
||
| 257 | 257 | </div> |
| 258 | 258 | </center> |
| 259 | 259 | |
| 260 | - <?php for($page = 1; $page<= $number_of_page; $page++) { ?> |
|
| 260 | + <?php for ($page = 1; $page <= $number_of_page; $page++) { ?> |
|
| 261 | 261 | <button class="yt-uix-button yt-uix-button-default" onclick="ajax_fetch_videomanager(<?php echo $page; ?>)"><?php echo $page; ?></button> |
| 262 | 262 | <?php } ?> |
| 263 | 263 | |
@@ -303,7 +303,7 @@ discard block |
||
| 303 | 303 | </script> |
| 304 | 304 | |
| 305 | 305 | <?php |
| 306 | - if($stmt6->rowCount() == 0) { echo " |
|
| 306 | + if ($stmt6->rowCount() == 0) { echo " |
|
| 307 | 307 | <br>Welcome to your favorite videos page.<br> |
| 308 | 308 | You can add videos that you like and the video will be added here! |
| 309 | 309 | "; |
@@ -21,15 +21,15 @@ discard block |
||
| 21 | 21 | "db_connected" => false, |
| 22 | 22 | ], |
| 23 | 23 | |
| 24 | - "video_properties" => (object) [ "status" => "unloaded" ], |
|
| 25 | - "user_properties" => (object) [ "status" => "unloaded" ], |
|
| 26 | - "group_properties" => (object) [ "status" => "unloaded" ], |
|
| 27 | - "forum_properties" => (object) [ "status" => "unloaded" ], |
|
| 24 | + "video_properties" => (object) ["status" => "unloaded"], |
|
| 25 | + "user_properties" => (object) ["status" => "unloaded"], |
|
| 26 | + "group_properties" => (object) ["status" => "unloaded"], |
|
| 27 | + "forum_properties" => (object) ["status" => "unloaded"], |
|
| 28 | 28 | ]; |
| 29 | 29 | |
| 30 | 30 | try |
| 31 | 31 | { |
| 32 | - $__db = new PDO("mysql:host=".$__server->db_properties->db_host.";dbname=".$__server->db_properties->db_database.";charset=utf8mb4", |
|
| 32 | + $__db = new PDO("mysql:host=" . $__server->db_properties->db_host . ";dbname=" . $__server->db_properties->db_database . ";charset=utf8mb4", |
|
| 33 | 33 | $__server->db_properties->db_user, |
| 34 | 34 | $__server->db_properties->db_password, |
| 35 | 35 | [ |
@@ -39,9 +39,9 @@ discard block |
||
| 39 | 39 | ); |
| 40 | 40 | $__server->db_properties->db_connected = true; |
| 41 | 41 | } |
| 42 | - catch(PDOException $e) |
|
| 42 | + catch (PDOException $e) |
|
| 43 | 43 | { |
| 44 | - die("An error occured connecting to the database: ".$e->getMessage()); |
|
| 44 | + die("An error occured connecting to the database: " . $e->getMessage()); |
|
| 45 | 45 | } |
| 46 | 46 | |
| 47 | 47 | session_start(); |
@@ -7,7 +7,7 @@ discard block |
||
| 7 | 7 | <?php $__user_h = new user_helper($__db); ?> |
| 8 | 8 | <?php $__db_h = new db_helper(); ?> |
| 9 | 9 | <?php $__time_h = new time_helper(); ?> |
| 10 | -<?php if(!$__video_h->video_exists($_GET['v'])) { header("Location: /?error=This video doesn't exist!"); } ?> |
|
| 10 | +<?php if (!$__video_h->video_exists($_GET['v'])) { header("Location: /?error=This video doesn't exist!"); } ?> |
|
| 11 | 11 | <?php |
| 12 | 12 | $_video = $__video_h->fetch_video_rid($_GET['v']); |
| 13 | 13 | $_video['video_responses'] = $__video_h->get_video_responses($_video['rid']); |
@@ -80,19 +80,19 @@ discard block |
||
| 80 | 80 | </h4> |
| 81 | 81 | </div> |
| 82 | 82 | </div> |
| 83 | - <?php if(!isset($_SESSION['siteusername'])) { ?> |
|
| 83 | + <?php if (!isset($_SESSION['siteusername'])) { ?> |
|
| 84 | 84 | <div class="comments-post-container clearfix"> |
| 85 | 85 | <div class="comments-post-alert"> |
| 86 | 86 | <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> |
| 87 | 87 | </div> |
| 88 | 88 | </div> |
| 89 | - <?php } else if($_video['commenting'] == "d") { ?> |
|
| 89 | + <?php } else if ($_video['commenting'] == "d") { ?> |
|
| 90 | 90 | <div class="comments-post-container clearfix"> |
| 91 | 91 | <div class="comments-post-alert"> |
| 92 | 92 | This video has comemnting disabled! |
| 93 | 93 | </div> |
| 94 | 94 | </div> |
| 95 | - <?php } else if($__user_h->if_blocked($_video['author'], $_SESSION['siteusername'])) { ?> |
|
| 95 | + <?php } else if ($__user_h->if_blocked($_video['author'], $_SESSION['siteusername'])) { ?> |
|
| 96 | 96 | <div class="comments-post-container clearfix"> |
| 97 | 97 | <div class="comments-post-alert"> |
| 98 | 98 | This user has blocked you! |
@@ -139,15 +139,15 @@ discard block |
||
| 139 | 139 | $stmt->execute(); |
| 140 | 140 | |
| 141 | 141 | $number_of_result = $stmt->rowCount(); |
| 142 | - $number_of_page = ceil ($number_of_result / $results_per_page); |
|
| 142 | + $number_of_page = ceil($number_of_result/$results_per_page); |
|
| 143 | 143 | |
| 144 | - if (!isset ($_GET['page']) ) { |
|
| 144 | + if (!isset ($_GET['page'])) { |
|
| 145 | 145 | $page = 1; |
| 146 | 146 | } else { |
| 147 | - $page = (int)$_GET['page']; |
|
| 147 | + $page = (int) $_GET['page']; |
|
| 148 | 148 | } |
| 149 | 149 | |
| 150 | - $page_first_result = ($page - 1) * $results_per_page; |
|
| 150 | + $page_first_result = ($page - 1)*$results_per_page; |
|
| 151 | 151 | |
| 152 | 152 | $stmt = $__db->prepare("SELECT * FROM comments WHERE toid = :rid ORDER BY id DESC LIMIT :pfirst, :pper"); |
| 153 | 153 | $stmt->bindParam(":rid", $_video['rid']); |
@@ -155,7 +155,7 @@ discard block |
||
| 155 | 155 | $stmt->bindParam(":pper", $results_per_page); |
| 156 | 156 | $stmt->execute(); |
| 157 | 157 | |
| 158 | - while($comment = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
| 158 | + while ($comment = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
| 159 | 159 | ?> |
| 160 | 160 | |
| 161 | 161 | <li class="comment yt-tile-default " data-author-viewing="" data-author-id="-uD01K8FQTeOSS5sniRFzQ" data-id="HdQrMeklJ_5hd_uPDRcvtdaMk2pMVS8d9sufcfiGx0U" data-score="0"> |