@@ -11,8 +11,8 @@ |
||
| 11 | 11 | <?php $__db_h = new db_helper(); ?> |
| 12 | 12 | <?php $__time_h = new time_helper(); ?> |
| 13 | 13 | <?php |
| 14 | - if(!isset($_SESSION['siteusername'])) { die(); } |
|
| 15 | - if(!$__user_h->if_admin($_SESSION['siteusername'])) { die(); } |
|
| 14 | + if (!isset($_SESSION['siteusername'])) { die(); } |
|
| 15 | + if (!$__user_h->if_admin($_SESSION['siteusername'])) { die(); } |
|
| 16 | 16 | |
| 17 | 17 | $request = (object) [ |
| 18 | 18 | "video" => $_GET['v'], |
@@ -16,29 +16,29 @@ discard block |
||
| 16 | 16 | |
| 17 | 17 | $results_per_page = 12; |
| 18 | 18 | $number_of_result = $stmt->rowCount(); |
| 19 | - $number_of_page = ceil ($number_of_result / $results_per_page); |
|
| 19 | + $number_of_page = ceil($number_of_result/$results_per_page); |
|
| 20 | 20 | |
| 21 | - if (!isset ($_GET['page']) ) { |
|
| 21 | + if (!isset ($_GET['page'])) { |
|
| 22 | 22 | $page = 1; |
| 23 | 23 | } else { |
| 24 | - $page = (int)$_GET['page']; |
|
| 24 | + $page = (int) $_GET['page']; |
|
| 25 | 25 | } |
| 26 | 26 | |
| 27 | - $page_first_result = ($page - 1) * $results_per_page; |
|
| 27 | + $page_first_result = ($page - 1)*$results_per_page; |
|
| 28 | 28 | |
| 29 | - if($_GET['filter'] == "notification") { |
|
| 29 | + if ($_GET['filter'] == "notification") { |
|
| 30 | 30 | $stmt6 = $__db->prepare("SELECT * FROM pms WHERE touser = :search AND type = 'nt' AND readed = 'y' ORDER BY id DESC LIMIT :pfirst, :pper"); |
| 31 | 31 | $stmt6->bindParam(":search", $search); |
| 32 | 32 | $stmt6->bindParam(":pfirst", $page_first_result); |
| 33 | 33 | $stmt6->bindParam(":pper", $results_per_page); |
| 34 | 34 | $stmt6->execute(); |
| 35 | - } else if($_GET['filter'] == "sent") { |
|
| 35 | + } else if ($_GET['filter'] == "sent") { |
|
| 36 | 36 | $stmt6 = $__db->prepare("SELECT * FROM pms WHERE owner = :search AND readed = 'y' ORDER BY id DESC LIMIT :pfirst, :pper"); |
| 37 | 37 | $stmt6->bindParam(":search", $search); |
| 38 | 38 | $stmt6->bindParam(":pfirst", $page_first_result); |
| 39 | 39 | $stmt6->bindParam(":pper", $results_per_page); |
| 40 | 40 | $stmt6->execute(); |
| 41 | - } else if($_GET['filter'] == "pm") { |
|
| 41 | + } else if ($_GET['filter'] == "pm") { |
|
| 42 | 42 | $stmt6 = $__db->prepare("SELECT * FROM pms WHERE touser = :search AND type = 'nm' AND readed = 'y' ORDER BY id DESC LIMIT :pfirst, :pper"); |
| 43 | 43 | $stmt6->bindParam(":search", $search); |
| 44 | 44 | $stmt6->bindParam(":pfirst", $page_first_result); |
@@ -67,8 +67,8 @@ discard block |
||
| 67 | 67 | </tr> |
| 68 | 68 | |
| 69 | 69 | <?php |
| 70 | - while($inbox = $stmt6->fetch(PDO::FETCH_ASSOC)) { |
|
| 71 | - if($__video_h->video_exists($inbox['video_attribute'])) { |
|
| 70 | + while ($inbox = $stmt6->fetch(PDO::FETCH_ASSOC)) { |
|
| 71 | + if ($__video_h->video_exists($inbox['video_attribute'])) { |
|
| 72 | 72 | $inbox['video'] = $__video_h->fetch_video_rid($inbox['video_attribute']); |
| 73 | 73 | $inbox['video_attr_exists'] = true; |
| 74 | 74 | |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | ?> |
| 83 | 83 | <tr style="margin-top: 5px;" id="videoslist"> |
| 84 | 84 | <!-- |
| 85 | - <?php if($inbox['readed'] == "n") { ?> |
|
| 85 | + <?php if ($inbox['readed'] == "n") { ?> |
|
| 86 | 86 | <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/"> |
| 87 | 87 | NEW |
| 88 | 88 | </a> |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | <p style="width:475px;"> |
| 114 | 114 | <?php echo $__video_h->shorten_description($inbox['message'], 300, true); ?> |
| 115 | 115 | </p> |
| 116 | - <?php if($inbox['video_attr_exists']) { ?> |
|
| 116 | + <?php if ($inbox['video_attr_exists']) { ?> |
|
| 117 | 117 | <hr> |
| 118 | 118 | <ul> |
| 119 | 119 | <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> |
@@ -8,7 +8,7 @@ discard block |
||
| 8 | 8 | <?php $__user_u = new user_update($__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 | <?php |
| 13 | 13 | $__server->page_embeds->page_title = "SubRocks - Personal Messages"; |
| 14 | 14 | $__server->page_embeds->page_description = "SubRocks is a site dedicated to bring back the 2012 layout of YouTube."; |
@@ -178,15 +178,15 @@ discard block |
||
| 178 | 178 | $stmt->execute(); |
| 179 | 179 | |
| 180 | 180 | $number_of_result = $stmt->rowCount(); |
| 181 | - $number_of_page = ceil ($number_of_result / $results_per_page); |
|
| 181 | + $number_of_page = ceil($number_of_result/$results_per_page); |
|
| 182 | 182 | |
| 183 | - if (!isset ($_GET['page']) ) { |
|
| 183 | + if (!isset ($_GET['page'])) { |
|
| 184 | 184 | $page = 1; |
| 185 | 185 | } else { |
| 186 | - $page = (int)$_GET['page']; |
|
| 186 | + $page = (int) $_GET['page']; |
|
| 187 | 187 | } |
| 188 | 188 | |
| 189 | - $page_first_result = ($page - 1) * $results_per_page; |
|
| 189 | + $page_first_result = ($page - 1)*$results_per_page; |
|
| 190 | 190 | |
| 191 | 191 | $stmt6 = $__db->prepare("SELECT * FROM pms WHERE touser = :search AND type = 'nm' AND readed = 'y' ORDER BY id DESC LIMIT :pfirst, :pper"); |
| 192 | 192 | $stmt6->bindParam(":search", $search); |
@@ -211,8 +211,8 @@ discard block |
||
| 211 | 211 | </tr> |
| 212 | 212 | |
| 213 | 213 | <?php |
| 214 | - while($inbox = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
| 215 | - if($__video_h->video_exists($inbox['video_attribute'])) { |
|
| 214 | + while ($inbox = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
| 215 | + if ($__video_h->video_exists($inbox['video_attribute'])) { |
|
| 216 | 216 | $inbox['video'] = $__video_h->fetch_video_rid($inbox['video_attribute']); |
| 217 | 217 | $inbox['video_attr_exists'] = true; |
| 218 | 218 | |
@@ -226,7 +226,7 @@ discard block |
||
| 226 | 226 | ?> |
| 227 | 227 | <tr style="margin-top: 5px;" id="videoslist"> |
| 228 | 228 | <!-- |
| 229 | - <?php if($inbox['readed'] == "n") { ?> |
|
| 229 | + <?php if ($inbox['readed'] == "n") { ?> |
|
| 230 | 230 | <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/"> |
| 231 | 231 | NEW |
| 232 | 232 | </a> |
@@ -257,7 +257,7 @@ discard block |
||
| 257 | 257 | <p style="width:475px;"> |
| 258 | 258 | <?php echo $__video_h->shorten_description($inbox['message'], 300, true); ?> |
| 259 | 259 | </p> |
| 260 | - <?php if($inbox['video_attr_exists']) { ?> |
|
| 260 | + <?php if ($inbox['video_attr_exists']) { ?> |
|
| 261 | 261 | <hr> |
| 262 | 262 | <ul> |
| 263 | 263 | <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> |
@@ -284,7 +284,7 @@ discard block |
||
| 284 | 284 | </div> |
| 285 | 285 | </center><br> |
| 286 | 286 | |
| 287 | - <?php for($page = 1; $page<= $number_of_page; $page++) { ?> |
|
| 287 | + <?php for ($page = 1; $page <= $number_of_page; $page++) { ?> |
|
| 288 | 288 | <button class="yt-uix-button yt-uix-button-default" onclick="ajax_fetch(<?php echo $page; ?>)"><?php echo $page; ?></button> |
| 289 | 289 | <?php } ?> |
| 290 | 290 | |
@@ -308,7 +308,7 @@ discard block |
||
| 308 | 308 | </script> |
| 309 | 309 | |
| 310 | 310 | <?php |
| 311 | - if($stmt6->rowCount() == 0) { echo " |
|
| 311 | + if ($stmt6->rowCount() == 0) { echo " |
|
| 312 | 312 | You currently have no personal messages in your inbox. |
| 313 | 313 | "; |
| 314 | 314 | } ?> |
@@ -14,7 +14,7 @@ discard block |
||
| 14 | 14 | $__server->page_embeds->page_image = "/yt/imgbin/full-size-logo.png"; |
| 15 | 15 | $__server->page_embeds->page_url = "https://subrock.rocks/"; |
| 16 | 16 | ?> |
| 17 | -<?php if(!isset($_SESSION['siteusername'])) { header("Location: /sign_in"); } ?> |
|
| 17 | +<?php if (!isset($_SESSION['siteusername'])) { header("Location: /sign_in"); } ?> |
|
| 18 | 18 | <!DOCTYPE html> |
| 19 | 19 | <html dir="ltr"> |
| 20 | 20 | <head> |
@@ -178,15 +178,15 @@ discard block |
||
| 178 | 178 | $stmt->execute(); |
| 179 | 179 | |
| 180 | 180 | $number_of_result = $stmt->rowCount(); |
| 181 | - $number_of_page = ceil ($number_of_result / $results_per_page); |
|
| 181 | + $number_of_page = ceil($number_of_result/$results_per_page); |
|
| 182 | 182 | |
| 183 | - if (!isset ($_GET['page']) ) { |
|
| 183 | + if (!isset ($_GET['page'])) { |
|
| 184 | 184 | $page = 1; |
| 185 | 185 | } else { |
| 186 | - $page = (int)$_GET['page']; |
|
| 186 | + $page = (int) $_GET['page']; |
|
| 187 | 187 | } |
| 188 | 188 | |
| 189 | - $page_first_result = ($page - 1) * $results_per_page; |
|
| 189 | + $page_first_result = ($page - 1)*$results_per_page; |
|
| 190 | 190 | |
| 191 | 191 | $stmt6 = $__db->prepare("SELECT * FROM pms WHERE touser = :search AND type = 'nt' AND readed = 'y' ORDER BY id DESC LIMIT :pfirst, :pper"); |
| 192 | 192 | $stmt6->bindParam(":search", $search); |
@@ -211,8 +211,8 @@ discard block |
||
| 211 | 211 | </tr> |
| 212 | 212 | |
| 213 | 213 | <?php |
| 214 | - while($inbox = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
| 215 | - if($__video_h->video_exists($inbox['video_attribute'])) { |
|
| 214 | + while ($inbox = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
| 215 | + if ($__video_h->video_exists($inbox['video_attribute'])) { |
|
| 216 | 216 | $inbox['video'] = $__video_h->fetch_video_rid($inbox['video_attribute']); |
| 217 | 217 | $inbox['video_attr_exists'] = true; |
| 218 | 218 | |
@@ -226,7 +226,7 @@ discard block |
||
| 226 | 226 | ?> |
| 227 | 227 | <tr style="margin-top: 5px;" id="videoslist"> |
| 228 | 228 | <!-- |
| 229 | - <?php if($inbox['readed'] == "n") { ?> |
|
| 229 | + <?php if ($inbox['readed'] == "n") { ?> |
|
| 230 | 230 | <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/"> |
| 231 | 231 | NEW |
| 232 | 232 | </a> |
@@ -257,7 +257,7 @@ discard block |
||
| 257 | 257 | <p style="width:475px;"> |
| 258 | 258 | <?php echo $__video_h->shorten_description($inbox['message'], 300, true); ?> |
| 259 | 259 | </p> |
| 260 | - <?php if($inbox['video_attr_exists']) { ?> |
|
| 260 | + <?php if ($inbox['video_attr_exists']) { ?> |
|
| 261 | 261 | <hr> |
| 262 | 262 | <ul> |
| 263 | 263 | <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> |
@@ -284,7 +284,7 @@ discard block |
||
| 284 | 284 | </div> |
| 285 | 285 | </center><br> |
| 286 | 286 | |
| 287 | - <?php for($page = 1; $page<= $number_of_page; $page++) { ?> |
|
| 287 | + <?php for ($page = 1; $page <= $number_of_page; $page++) { ?> |
|
| 288 | 288 | <button class="yt-uix-button yt-uix-button-default" onclick="ajax_fetch(<?php echo $page; ?>)"><?php echo $page; ?></button> |
| 289 | 289 | <?php } ?> |
| 290 | 290 | |
@@ -308,7 +308,7 @@ discard block |
||
| 308 | 308 | </script> |
| 309 | 309 | |
| 310 | 310 | <?php |
| 311 | - if($stmt6->rowCount() == 0) { echo " |
|
| 311 | + if ($stmt6->rowCount() == 0) { echo " |
|
| 312 | 312 | You currently have no notifications in your inbox. |
| 313 | 313 | "; |
| 314 | 314 | } ?> |
@@ -9,7 +9,7 @@ discard block |
||
| 9 | 9 | <?php $__user_u = new user_update($__db); ?> |
| 10 | 10 | <?php $__db_h = new db_helper(); ?> |
| 11 | 11 | <?php $__time_h = new time_helper(); ?> |
| 12 | -<?php if(!isset($_SESSION['siteusername'])) { header("Location: /sign_in"); } ?> |
|
| 12 | +<?php if (!isset($_SESSION['siteusername'])) { header("Location: /sign_in"); } ?> |
|
| 13 | 13 | <?php |
| 14 | 14 | $__server->page_embeds->page_title = "SubRocks - Inbox"; |
| 15 | 15 | $__server->page_embeds->page_description = "SubRocks is a site dedicated to bring back the 2012 layout of YouTube."; |
@@ -179,15 +179,15 @@ discard block |
||
| 179 | 179 | $stmt->execute(); |
| 180 | 180 | |
| 181 | 181 | $number_of_result = $stmt->rowCount(); |
| 182 | - $number_of_page = ceil ($number_of_result / $results_per_page); |
|
| 182 | + $number_of_page = ceil($number_of_result/$results_per_page); |
|
| 183 | 183 | |
| 184 | - if (!isset ($_GET['page']) ) { |
|
| 184 | + if (!isset ($_GET['page'])) { |
|
| 185 | 185 | $page = 1; |
| 186 | 186 | } else { |
| 187 | - $page = (int)$_GET['page']; |
|
| 187 | + $page = (int) $_GET['page']; |
|
| 188 | 188 | } |
| 189 | 189 | |
| 190 | - $page_first_result = ($page - 1) * $results_per_page; |
|
| 190 | + $page_first_result = ($page - 1)*$results_per_page; |
|
| 191 | 191 | |
| 192 | 192 | $stmt6 = $__db->prepare("SELECT * FROM pms WHERE touser = :search AND readed = 'y' ORDER BY id DESC LIMIT :pfirst, :pper"); |
| 193 | 193 | $stmt6->bindParam(":search", $search); |
@@ -212,8 +212,8 @@ discard block |
||
| 212 | 212 | </tr> |
| 213 | 213 | |
| 214 | 214 | <?php |
| 215 | - while($inbox = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
| 216 | - if($__video_h->video_exists($inbox['video_attribute'])) { |
|
| 215 | + while ($inbox = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
| 216 | + if ($__video_h->video_exists($inbox['video_attribute'])) { |
|
| 217 | 217 | $inbox['video'] = $__video_h->fetch_video_rid($inbox['video_attribute']); |
| 218 | 218 | $inbox['video_attr_exists'] = true; |
| 219 | 219 | |
@@ -227,7 +227,7 @@ discard block |
||
| 227 | 227 | ?> |
| 228 | 228 | <tr style="margin-top: 5px;" id="videoslist"> |
| 229 | 229 | <!-- |
| 230 | - <?php if($inbox['readed'] == "n") { ?> |
|
| 230 | + <?php if ($inbox['readed'] == "n") { ?> |
|
| 231 | 231 | <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/"> |
| 232 | 232 | NEW |
| 233 | 233 | </a> |
@@ -258,7 +258,7 @@ discard block |
||
| 258 | 258 | <p style="width:475px;"> |
| 259 | 259 | <?php echo $__video_h->shorten_description($inbox['message'], 300, true); ?> |
| 260 | 260 | </p> |
| 261 | - <?php if($inbox['video_attr_exists']) { ?> |
|
| 261 | + <?php if ($inbox['video_attr_exists']) { ?> |
|
| 262 | 262 | <hr> |
| 263 | 263 | <ul> |
| 264 | 264 | <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> |
@@ -285,7 +285,7 @@ discard block |
||
| 285 | 285 | </div> |
| 286 | 286 | </center><br> |
| 287 | 287 | |
| 288 | - <?php for($page = 1; $page<= $number_of_page; $page++) { ?> |
|
| 288 | + <?php for ($page = 1; $page <= $number_of_page; $page++) { ?> |
|
| 289 | 289 | <button class="yt-uix-button yt-uix-button-default" onclick="ajax_fetch(<?php echo $page; ?>)"><?php echo $page; ?></button> |
| 290 | 290 | <?php } ?> |
| 291 | 291 | |
@@ -309,7 +309,7 @@ discard block |
||
| 309 | 309 | </script> |
| 310 | 310 | |
| 311 | 311 | <?php |
| 312 | - if($stmt6->rowCount() == 0) { echo " |
|
| 312 | + if ($stmt6->rowCount() == 0) { echo " |
|
| 313 | 313 | You currently have no messages in your inbox. |
| 314 | 314 | "; |
| 315 | 315 | } ?> |
@@ -8,7 +8,7 @@ discard block |
||
| 8 | 8 | <?php $__user_u = new user_update($__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 | <?php |
| 13 | 13 | $__server->page_embeds->page_title = "SubRocks - Sent Messages"; |
| 14 | 14 | $__server->page_embeds->page_description = "SubRocks is a site dedicated to bring back the 2012 layout of YouTube."; |
@@ -178,15 +178,15 @@ discard block |
||
| 178 | 178 | $stmt->execute(); |
| 179 | 179 | |
| 180 | 180 | $number_of_result = $stmt->rowCount(); |
| 181 | - $number_of_page = ceil ($number_of_result / $results_per_page); |
|
| 181 | + $number_of_page = ceil($number_of_result/$results_per_page); |
|
| 182 | 182 | |
| 183 | - if (!isset ($_GET['page']) ) { |
|
| 183 | + if (!isset ($_GET['page'])) { |
|
| 184 | 184 | $page = 1; |
| 185 | 185 | } else { |
| 186 | - $page = (int)$_GET['page']; |
|
| 186 | + $page = (int) $_GET['page']; |
|
| 187 | 187 | } |
| 188 | 188 | |
| 189 | - $page_first_result = ($page - 1) * $results_per_page; |
|
| 189 | + $page_first_result = ($page - 1)*$results_per_page; |
|
| 190 | 190 | |
| 191 | 191 | $stmt6 = $__db->prepare("SELECT * FROM pms WHERE owner = :search AND readed = 'y' ORDER BY id DESC LIMIT :pfirst, :pper"); |
| 192 | 192 | $stmt6->bindParam(":search", $search); |
@@ -211,8 +211,8 @@ discard block |
||
| 211 | 211 | </tr> |
| 212 | 212 | |
| 213 | 213 | <?php |
| 214 | - while($inbox = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
| 215 | - if($__video_h->video_exists($inbox['video_attribute'])) { |
|
| 214 | + while ($inbox = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
| 215 | + if ($__video_h->video_exists($inbox['video_attribute'])) { |
|
| 216 | 216 | $inbox['video'] = $__video_h->fetch_video_rid($inbox['video_attribute']); |
| 217 | 217 | $inbox['video_attr_exists'] = true; |
| 218 | 218 | |
@@ -226,7 +226,7 @@ discard block |
||
| 226 | 226 | ?> |
| 227 | 227 | <tr style="margin-top: 5px;" id="videoslist"> |
| 228 | 228 | <!-- |
| 229 | - <?php if($inbox['readed'] == "n") { ?> |
|
| 229 | + <?php if ($inbox['readed'] == "n") { ?> |
|
| 230 | 230 | <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/"> |
| 231 | 231 | NEW |
| 232 | 232 | </a> |
@@ -257,7 +257,7 @@ discard block |
||
| 257 | 257 | <p style="width:475px;"> |
| 258 | 258 | <?php echo $__video_h->shorten_description($inbox['message'], 300, true); ?> |
| 259 | 259 | </p> |
| 260 | - <?php if($inbox['video_attr_exists']) { ?> |
|
| 260 | + <?php if ($inbox['video_attr_exists']) { ?> |
|
| 261 | 261 | <hr> |
| 262 | 262 | <ul> |
| 263 | 263 | <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> |
@@ -284,7 +284,7 @@ discard block |
||
| 284 | 284 | </div> |
| 285 | 285 | </center><br> |
| 286 | 286 | |
| 287 | - <?php for($page = 1; $page<= $number_of_page; $page++) { ?> |
|
| 287 | + <?php for ($page = 1; $page <= $number_of_page; $page++) { ?> |
|
| 288 | 288 | <button class="yt-uix-button yt-uix-button-default" onclick="ajax_fetch(<?php echo $page; ?>)"><?php echo $page; ?></button> |
| 289 | 289 | <?php } ?> |
| 290 | 290 | |
@@ -308,7 +308,7 @@ discard block |
||
| 308 | 308 | </script> |
| 309 | 309 | |
| 310 | 310 | <?php |
| 311 | - if($stmt6->rowCount() == 0) { echo " |
|
| 311 | + if ($stmt6->rowCount() == 0) { echo " |
|
| 312 | 312 | You currently have no sent messages in your inbox. |
| 313 | 313 | "; |
| 314 | 314 | } ?> |
@@ -11,7 +11,7 @@ |
||
| 11 | 11 | <?php $__db_h = new db_helper(); ?> |
| 12 | 12 | <?php $__time_h = new time_helper(); ?> |
| 13 | 13 | <?php |
| 14 | - if(!isset($_SESSION['siteusername'])) { die(); } |
|
| 14 | + if (!isset($_SESSION['siteusername'])) { die(); } |
|
| 15 | 15 | $request = (object) [ |
| 16 | 16 | "username" => $_SESSION['siteusername'], |
| 17 | 17 | |
@@ -11,7 +11,7 @@ |
||
| 11 | 11 | <?php $__db_h = new db_helper(); ?> |
| 12 | 12 | <?php $__time_h = new time_helper(); ?> |
| 13 | 13 | <?php |
| 14 | - if(!isset($_SESSION['siteusername'])) { die(); } |
|
| 14 | + if (!isset($_SESSION['siteusername'])) { die(); } |
|
| 15 | 15 | |
| 16 | 16 | $request = (object) [ |
| 17 | 17 | "id" => $_GET['id'], |
@@ -12,10 +12,10 @@ discard block |
||
| 12 | 12 | <?php $__db_h = new db_helper(); ?> |
| 13 | 13 | <?php $__time_h = new time_helper(); ?> |
| 14 | 14 | <?php |
| 15 | - if(isset($_SESSION['siteusername'])) |
|
| 15 | + if (isset($_SESSION['siteusername'])) |
|
| 16 | 16 | $_user_hp = $__user_h->fetch_user_username($_SESSION['siteusername']); |
| 17 | 17 | |
| 18 | - if(!$__user_h->user_exists($_GET['n'])) |
|
| 18 | + if (!$__user_h->user_exists($_GET['n'])) |
|
| 19 | 19 | header("Location: /?userdoesntexist"); |
| 20 | 20 | |
| 21 | 21 | $_user = $__user_h->fetch_user_username($_GET['n']); |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | $stmt->bindParam(":username", $_user['username']); |
| 25 | 25 | $stmt->execute(); |
| 26 | 26 | |
| 27 | - while($ban = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
| 27 | + while ($ban = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
| 28 | 28 | header("Location: /?error=This user has been terminated for violating SubRock's Community Guidelines."); |
| 29 | 29 | } |
| 30 | 30 | |
@@ -76,28 +76,28 @@ discard block |
||
| 76 | 76 | $_user['genre'] = strtolower($_user['genre']); |
| 77 | 77 | $_user['subscribed'] = $__user_h->if_subscribed(@$_SESSION['siteusername'], $_user['username']); |
| 78 | 78 | |
| 79 | - if(!check_valid_colorhex($_user['primary_color']) && strlen($_user['primary_color']) != 6) { $_user['primary_color'] = ""; } |
|
| 80 | - if(!check_valid_colorhex($_user['secondary_color']) && strlen($_user['secondary_color']) != 6) { $_user['secondary_color'] = ""; } |
|
| 81 | - if(!check_valid_colorhex($_user['third_color']) && strlen($_user['third_color']) != 6) { $_user['third_color'] = ""; } |
|
| 82 | - if(!check_valid_colorhex($_user['text_color']) && strlen($_user['text_color']) != 6) { $_user['text_color'] = ""; } |
|
| 83 | - if(!check_valid_colorhex($_user['primary_color_text']) && strlen($_user['primary_color_text']) != 6) { $_user['primary_color_text'] = ""; } |
|
| 84 | - if(!check_valid_colorhex($_user['2009_bgcolor']) && strlen($_user['2009_bgcolor']) != 6) { $_user['2009_bgcolor'] = ""; } |
|
| 79 | + if (!check_valid_colorhex($_user['primary_color']) && strlen($_user['primary_color']) != 6) { $_user['primary_color'] = ""; } |
|
| 80 | + if (!check_valid_colorhex($_user['secondary_color']) && strlen($_user['secondary_color']) != 6) { $_user['secondary_color'] = ""; } |
|
| 81 | + if (!check_valid_colorhex($_user['third_color']) && strlen($_user['third_color']) != 6) { $_user['third_color'] = ""; } |
|
| 82 | + if (!check_valid_colorhex($_user['text_color']) && strlen($_user['text_color']) != 6) { $_user['text_color'] = ""; } |
|
| 83 | + if (!check_valid_colorhex($_user['primary_color_text']) && strlen($_user['primary_color_text']) != 6) { $_user['primary_color_text'] = ""; } |
|
| 84 | + if (!check_valid_colorhex($_user['2009_bgcolor']) && strlen($_user['2009_bgcolor']) != 6) { $_user['2009_bgcolor'] = ""; } |
|
| 85 | 85 | |
| 86 | - if(isset($_SESSION['siteusername'])) |
|
| 86 | + if (isset($_SESSION['siteusername'])) |
|
| 87 | 87 | $__user_i->check_view_channel($_user['username'], @$_SESSION['siteusername']); |
| 88 | 88 | |
| 89 | - if($_SERVER['REQUEST_METHOD'] == 'POST') { |
|
| 89 | + if ($_SERVER['REQUEST_METHOD'] == 'POST') { |
|
| 90 | 90 | $error = array(); |
| 91 | 91 | |
| 92 | - if(!isset($_SESSION['siteusername'])){ $error['message'] = "you are not logged in"; $error['status'] = true; } |
|
| 93 | - if(!$_POST['comment']){ $error['message'] = "your comment cannot be blank"; $error['status'] = true; } |
|
| 94 | - if(strlen($_POST['comment']) > 1000){ $error['message'] = "your comment must be shorter than 1000 characters"; $error['status'] = true; } |
|
| 92 | + if (!isset($_SESSION['siteusername'])) { $error['message'] = "you are not logged in"; $error['status'] = true; } |
|
| 93 | + if (!$_POST['comment']) { $error['message'] = "your comment cannot be blank"; $error['status'] = true; } |
|
| 94 | + if (strlen($_POST['comment']) > 1000) { $error['message'] = "your comment must be shorter than 1000 characters"; $error['status'] = true; } |
|
| 95 | 95 | //if(!isset($_POST['g-recaptcha-response'])){ $error['message'] = "captcha validation failed"; $error['status'] = true; } |
| 96 | 96 | //if(!$_user_insert_utils->validateCaptcha($config['recaptcha_secret'], $_POST['g-recaptcha-response'])) { $error['message'] = "captcha validation failed"; $error['status'] = true; } |
| 97 | - 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; } |
|
| 97 | + 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; } |
|
| 98 | 98 | //if(ifBlocked(@$_SESSION['siteusername'], $user['username'], $__db)) { $error = "This user has blocked you!"; $error['status'] = true; } |
| 99 | 99 | |
| 100 | - if(!isset($error['message'])) { |
|
| 100 | + if (!isset($error['message'])) { |
|
| 101 | 101 | $text = $_POST['comment']; |
| 102 | 102 | $stmt = $__db->prepare("INSERT INTO profile_comments (toid, author, comment) VALUES (:id, :username, :comment)"); |
| 103 | 103 | $stmt->bindParam(":id", $_user['username']); |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | |
| 108 | 108 | $_user_update_utils->update_comment_cooldown_time($_SESSION['siteusername']); |
| 109 | 109 | |
| 110 | - if(@$_SESSION['siteusername'] != $_user['username']) { |
|
| 110 | + if (@$_SESSION['siteusername'] != $_user['username']) { |
|
| 111 | 111 | $_user_insert_utils->send_message($_user['username'], "New comment", 'I commented "' . $_POST['comment'] . '" on your profile!', $_SESSION['siteusername']); |
| 112 | 112 | } |
| 113 | 113 | } |
@@ -141,11 +141,11 @@ discard block |
||
| 141 | 141 | <link rel="stylesheet" href="/yt/cssbin/www-extra.css"> |
| 142 | 142 | <style> |
| 143 | 143 | #content-container { |
| 144 | - background-color: <?php echo $_user['primary_color']; ?>; |
|
| 144 | + background-color: <?php echo $_user['primary_color']; ?>; |
|
| 145 | 145 | background-image: url(/dynamic/banners/<?php echo $_user['2012_bg']; ?>); |
| 146 | 146 | background-repeat: repeat; |
| 147 | 147 | <?php |
| 148 | - switch($_user['2012_bgoption']) { |
|
| 148 | + switch ($_user['2012_bgoption']) { |
|
| 149 | 149 | case "stretch": |
| 150 | 150 | echo "background-size: cover;"; |
| 151 | 151 | break; |
@@ -178,11 +178,11 @@ discard block |
||
| 178 | 178 | <div id="masthead-container"><?php require($_SERVER['DOCUMENT_ROOT'] . "/s/mod/header.php"); ?></div> |
| 179 | 179 | <div id="content-container"> |
| 180 | 180 | <!-- begin content --> |
| 181 | - <?php if(isset($_SESSION['siteusername']) && $_user['username'] == $_SESSION['siteusername']) { ?> |
|
| 181 | + <?php if (isset($_SESSION['siteusername']) && $_user['username'] == $_SESSION['siteusername']) { ?> |
|
| 182 | 182 | <div class="channel_customization"><?php require($_SERVER['DOCUMENT_ROOT'] . "/s/mod/channel_customization.php"); ?></div> |
| 183 | 183 | <?php } ?> |
| 184 | 184 | <?php |
| 185 | - if(empty(trim($_user['bio']))) |
|
| 185 | + if (empty(trim($_user['bio']))) |
|
| 186 | 186 | $_user['bio'] = "This user has no description."; |
| 187 | 187 | ?> |
| 188 | 188 | <div id="content"> |
@@ -237,7 +237,7 @@ discard block |
||
| 237 | 237 | <h1><?php echo htmlspecialchars($_user['username']); ?></h1> |
| 238 | 238 | </div> |
| 239 | 239 | <div class="upper-left-section enable-fancy-subscribe-button"> |
| 240 | - <?php if($_user['username'] != @$_SESSION['siteusername']) { ?> |
|
| 240 | + <?php if ($_user['username'] != @$_SESSION['siteusername']) { ?> |
|
| 241 | 241 | <div class="yt-subscription-button-hovercard yt-uix-hovercard"> |
| 242 | 242 | <button |
| 243 | 243 | href="#" |
@@ -245,7 +245,7 @@ discard block |
||
| 245 | 245 | title="" |
| 246 | 246 | id="subscribe-button" |
| 247 | 247 | type="button" |
| 248 | - class="yt-subscription-button <?php if($_user['subscribed']) { echo "subscribed "; } ?> yt-uix-button yt-uix-button-subscription yt-uix-tooltip" |
|
| 248 | + class="yt-subscription-button <?php if ($_user['subscribed']) { echo "subscribed "; } ?> yt-uix-button yt-uix-button-subscription yt-uix-tooltip" |
|
| 249 | 249 | role="button"><span class="yt-uix-button-icon-wrapper"><img class="yt-uix-button-icon yt-uix-button-icon-subscribe" |
| 250 | 250 | src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt=""></span><span class="yt-uix-button-content"> <span class="subscribe-label">Subscribe</span> |
| 251 | 251 | <span class="subscribed-label">Subscribed</span> |
@@ -261,7 +261,7 @@ discard block |
||
| 261 | 261 | <?php } else { ?> |
| 262 | 262 | |
| 263 | 263 | <?php } ?> |
| 264 | - <?php if($__user_h->if_partner($_user['username'])) { ?> |
|
| 264 | + <?php if ($__user_h->if_partner($_user['username'])) { ?> |
|
| 265 | 265 | <img style="width: 29px;vertical-align: middle;margin-left: 10px;" title="This user is a SubRocks partner" src="/yt/imgbin/RenderedImage.png"> |
| 266 | 266 | <?php } ?> |
| 267 | 267 | </div> |
@@ -319,7 +319,7 @@ discard block |
||
| 319 | 319 | </div> |
| 320 | 320 | </div> |
| 321 | 321 | </div> |
| 322 | - <?php if($_user['featured'] != "None") { $video = $__video_h->fetch_video_rid($_user['featured']); } else { $_user['featured'] = false; } ?> |
|
| 322 | + <?php if ($_user['featured'] != "None") { $video = $__video_h->fetch_video_rid($_user['featured']); } else { $_user['featured'] = false; } ?> |
|
| 323 | 323 | <div id="branded-page-body"> |
| 324 | 324 | <div class="channel-tab-content channel-layout-two-column selected blogger-template"><?php require($_SERVER['DOCUMENT_ROOT'] . "/s/mod/channel_discussion.php"); ?></div> |
| 325 | 325 | </div> |