Test Failed
Pull Request — main (#24)
by
unknown
02:55
created
web/public/watch_2.php 2 patches
Indentation   +65 added lines, -65 removed lines patch added patch discarded remove patch
@@ -23,14 +23,14 @@  discard block
 block discarded – undo
23 23
         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; }
24 24
 
25 25
         if(!isset($error['message'])) {
26
-			$text = $_POST['comment'];
26
+            $text = $_POST['comment'];
27 27
             $stmt = $__db->prepare("INSERT INTO comments (toid, author, comment) VALUES (:v, :username, :comment)");
28 28
             $stmt->bindParam(":v", $_GET['v']);
29
-			$stmt->bindParam(":username", $_SESSION['siteusername']);
30
-			$stmt->bindParam(":comment", $text);
29
+            $stmt->bindParam(":username", $_SESSION['siteusername']);
30
+            $stmt->bindParam(":comment", $text);
31 31
             $stmt->execute();
32 32
 
33
-			$__user_u->update_cooldown_time($_SESSION['siteusername'], "cooldown_comment");
33
+            $__user_u->update_cooldown_time($_SESSION['siteusername'], "cooldown_comment");
34 34
         }
35 35
     }
36 36
 ?>
@@ -53,28 +53,28 @@  discard block
 block discarded – undo
53 53
 			if (window.yt.timing) {yt.timing.tick("ct");}    
54 54
 		</script>
55 55
 		<?php
56
-			$_video['dislikes'] =  $__video_h->get_video_stars_level($_video['rid'], 1);
57
-			$_video['dislikes'] += $__video_h->get_video_stars_level($_video['rid'], 2);
56
+            $_video['dislikes'] =  $__video_h->get_video_stars_level($_video['rid'], 1);
57
+            $_video['dislikes'] += $__video_h->get_video_stars_level($_video['rid'], 2);
58 58
 
59
-			$_video['likes'] =     $__video_h->get_video_stars_level($_video['rid'], 4);
60
-			$_video['likes'] +=    $__video_h->get_video_stars_level($_video['rid'], 5);
59
+            $_video['likes'] =     $__video_h->get_video_stars_level($_video['rid'], 4);
60
+            $_video['likes'] +=    $__video_h->get_video_stars_level($_video['rid'], 5);
61 61
 
62
-			$_video['dislikes'] += $__video_h->get_video_likes($_video['rid'], false);
63
-			$_video['likes'] += $__video_h->get_video_likes($_video['rid'], true);
62
+            $_video['dislikes'] += $__video_h->get_video_likes($_video['rid'], false);
63
+            $_video['likes'] += $__video_h->get_video_likes($_video['rid'], true);
64 64
 
65
-			if($_video['likes'] == 0 && $_video['dislikes'] == 0) {
66
-				$_video['likeswidth'] = 50;
67
-				$_video['dislikeswidth'] = 50;
68
-			} else {
69
-				$_video['likeswidth'] = $_video['likes'] / ($_video['likes'] + $_video['dislikes']) * 100;
70
-				$_video['dislikeswidth'] = 100 - $_video['likeswidth'];
71
-			}
65
+            if($_video['likes'] == 0 && $_video['dislikes'] == 0) {
66
+                $_video['likeswidth'] = 50;
67
+                $_video['dislikeswidth'] = 50;
68
+            } else {
69
+                $_video['likeswidth'] = $_video['likes'] / ($_video['likes'] + $_video['dislikes']) * 100;
70
+                $_video['dislikeswidth'] = 100 - $_video['likeswidth'];
71
+            }
72 72
 
73
-			$_video['liked'] = $__video_h->if_liked(@$_SESSION['siteusername'], $_video['rid'], true);
74
-			$_video['disliked'] = $__video_h->if_liked(@$_SESSION['siteusername'], $_video['rid'], false);
75
-			$_video['author_videos'] = $__video_h->fetch_user_videos($_video['author']);
76
-			$_video['subscribed'] = $__user_h->if_subscribed(@$_SESSION['siteusername'], $_video['author']);
77
-		?>
73
+            $_video['liked'] = $__video_h->if_liked(@$_SESSION['siteusername'], $_video['rid'], true);
74
+            $_video['disliked'] = $__video_h->if_liked(@$_SESSION['siteusername'], $_video['rid'], false);
75
+            $_video['author_videos'] = $__video_h->fetch_user_videos($_video['author']);
76
+            $_video['subscribed'] = $__user_h->if_subscribed(@$_SESSION['siteusername'], $_video['author']);
77
+        ?>
78 78
 	</head>
79 79
 	<body id="" class="date-20120927 en_US ltr   ytg-old-clearfix guide-feed-v2 gecko gecko-15" dir="ltr">
80 80
 		<form name="logoutForm" method="POST" action="/logout">
@@ -360,10 +360,10 @@  discard block
 block discarded – undo
360 360
 												</div>
361 361
 											</div>
362 362
 											<?php 
363
-												$stmt = $__db->prepare("SELECT * FROM video_response WHERE toid = :v ORDER BY id DESC LIMIT 4");
364
-												$stmt->bindParam(":v", $_GET['v']);
365
-												$stmt->execute();
366
-											?>
363
+                                                $stmt = $__db->prepare("SELECT * FROM video_response WHERE toid = :v ORDER BY id DESC LIMIT 4");
364
+                                                $stmt->bindParam(":v", $_GET['v']);
365
+                                                $stmt->execute();
366
+                                            ?>
367 367
 
368 368
 											<?php if($stmt->rowCount() != 0) { ?>
369 369
 												<div class="comments-section">
@@ -373,16 +373,16 @@  discard block
 block discarded – undo
373 373
 													<h4>Video Responses</h4>
374 374
 													<ul class="video-list">
375 375
 													<?php 
376
-														while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { 
377
-															if($__video_h->video_exists($video['video'])) { 
378
-																$video = $__video_h->fetch_video_rid($video['video']);
379
-																$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
380
-																$video['duration'] = $__time_h->timestamp($video['duration']);
381
-																$video['views'] = $__video_h->fetch_video_views($video['rid']);
382
-																$video['author'] = htmlspecialchars($video['author']);		
383
-																$video['title'] = htmlspecialchars($video['title']);
384
-																$video['description'] = $__video_h->shorten_description($video['description'], 50);
385
-													?>
376
+                                                        while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { 
377
+                                                            if($__video_h->video_exists($video['video'])) { 
378
+                                                                $video = $__video_h->fetch_video_rid($video['video']);
379
+                                                                $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
380
+                                                                $video['duration'] = $__time_h->timestamp($video['duration']);
381
+                                                                $video['views'] = $__video_h->fetch_video_views($video['rid']);
382
+                                                                $video['author'] = htmlspecialchars($video['author']);		
383
+                                                                $video['title'] = htmlspecialchars($video['title']);
384
+                                                                $video['description'] = $__video_h->shorten_description($video['description'], 50);
385
+                                                    ?>
386 386
 														<li class="video-list-item yt-tile-default">
387 387
 															<a href="/watch?v=<?php echo $video['rid']; ?>" class="related-video yt-uix-contextlink  yt-uix-sessionlink" data-sessionlink="<?php echo htmlspecialchars($_video['author']); ?>&amp;feature=watch_response"><span class="ux-thumb-wrap contains-addto "><span class="video-thumb ux-thumb yt-thumb-default-120 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="http://s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="<?php echo $video['title']; ?>" data-thumb="/dynamic/thumbs/<?php echo $video['thumbnail']; ?>" width="120"><span class="vertical-align"></span></span></span></span><span class="video-time"><?php echo $video['duration']; ?></span>
388 388
 															<button onclick=";return false;" title="Watch Later" type="button" class="addto-button video-actions addto-watch-later-button-sign-in yt-uix-button yt-uix-button-default yt-uix-button-short yt-uix-tooltip" data-button-menu-id="shared-addto-watch-later-login" data-video-ids="cjls0QsHOBE" role="button"><span class="yt-uix-button-content">  <img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Watch Later">
@@ -464,31 +464,31 @@  discard block
 block discarded – undo
464 464
 												</div>
465 465
 												<ul class="comment-list" id="live_comments">
466 466
 														<?php
467
-														$results_per_page = 20;
467
+                                                        $results_per_page = 20;
468 468
 
469
-														$stmt = $__db->prepare("SELECT * FROM comments WHERE toid = :rid ORDER BY id DESC");
470
-														$stmt->bindParam(":rid", $_video['rid']);
471
-														$stmt->execute();
469
+                                                        $stmt = $__db->prepare("SELECT * FROM comments WHERE toid = :rid ORDER BY id DESC");
470
+                                                        $stmt->bindParam(":rid", $_video['rid']);
471
+                                                        $stmt->execute();
472 472
 
473
-														$number_of_result = $stmt->rowCount();
474
-														$number_of_page = ceil ($number_of_result / $results_per_page);  
473
+                                                        $number_of_result = $stmt->rowCount();
474
+                                                        $number_of_page = ceil ($number_of_result / $results_per_page);  
475 475
 
476
-														if (!isset ($_GET['page']) ) {  
477
-															$page = 1;  
478
-														} else {  
479
-															$page = (int)$_GET['page'];  
480
-														}  
476
+                                                        if (!isset ($_GET['page']) ) {  
477
+                                                            $page = 1;  
478
+                                                        } else {  
479
+                                                            $page = (int)$_GET['page'];  
480
+                                                        }  
481 481
 
482
-														$page_first_result = ($page - 1) * $results_per_page;  
482
+                                                        $page_first_result = ($page - 1) * $results_per_page;  
483 483
 
484
-														$stmt = $__db->prepare("SELECT * FROM comments WHERE toid = :rid ORDER BY id DESC LIMIT :pfirst, :pper");
485
-														$stmt->bindParam(":rid", $_video['rid']);
486
-														$stmt->bindParam(":pfirst", $page_first_result);
487
-														$stmt->bindParam(":pper", $results_per_page);
488
-														$stmt->execute();
484
+                                                        $stmt = $__db->prepare("SELECT * FROM comments WHERE toid = :rid ORDER BY id DESC LIMIT :pfirst, :pper");
485
+                                                        $stmt->bindParam(":rid", $_video['rid']);
486
+                                                        $stmt->bindParam(":pfirst", $page_first_result);
487
+                                                        $stmt->bindParam(":pper", $results_per_page);
488
+                                                        $stmt->execute();
489 489
 
490
-														while($comment = $stmt->fetch(PDO::FETCH_ASSOC)) { 
491
-													?>
490
+                                                        while($comment = $stmt->fetch(PDO::FETCH_ASSOC)) { 
491
+                                                    ?>
492 492
 
493 493
 													<li class="comment yt-tile-default " data-author-viewing="" data-author-id="-uD01K8FQTeOSS5sniRFzQ" data-id="HdQrMeklJ_5hd_uPDRcvtdaMk2pMVS8d9sufcfiGx0U" data-score="0">
494 494
 														<div class="comment-body">
@@ -567,16 +567,16 @@  discard block
 block discarded – undo
567 567
 											<ul id="watch-related" class="video-list">
568 568
 												<div id="ppv-container" class="hid"></div>
569 569
 												<?php
570
-													$stmt = $__db->prepare("SELECT * FROM videos ORDER BY rand() LIMIT 20");
571
-													$stmt->execute();
572
-													while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
573
-														$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
574
-														$video['duration'] = $__time_h->timestamp($video['duration']);
575
-														$video['views'] = $__video_h->fetch_video_views($video['rid']);
576
-														$video['author'] = htmlspecialchars($video['author']);		
577
-														$video['title'] = htmlspecialchars($video['title']);
578
-														$video['description'] = $__video_h->shorten_description($video['description'], 50);
579
-												?>
570
+                                                    $stmt = $__db->prepare("SELECT * FROM videos ORDER BY rand() LIMIT 20");
571
+                                                    $stmt->execute();
572
+                                                    while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
573
+                                                        $video['age'] = $__time_h->time_elapsed_string($video['publish']);		
574
+                                                        $video['duration'] = $__time_h->timestamp($video['duration']);
575
+                                                        $video['views'] = $__video_h->fetch_video_views($video['rid']);
576
+                                                        $video['author'] = htmlspecialchars($video['author']);		
577
+                                                        $video['title'] = htmlspecialchars($video['title']);
578
+                                                        $video['description'] = $__video_h->shorten_description($video['description'], 50);
579
+                                                ?>
580 580
 												<li class="video-list-item"><a href="/watch?v=<?php echo $video['rid']; ?>" class="related-video yt-uix-contextlink  yt-uix-sessionlink" data-sessionlink="ved=CAIQzRooAA%3D%3D&amp;<?php echo htmlspecialchars($_video['author']); ?>&amp;feature=relmfu"><span class="ux-thumb-wrap contains-addto "><span class="video-thumb ux-thumb yt-thumb-default-120 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="http://s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="<?php echo $video['title']; ?>" data-thumb="/dynamic/thumbs/<?php echo $video['thumbnail']; ?>" width="120"><span class="vertical-align"></span></span></span></span><span class="video-time"><?php echo $video['duration']; ?></span>
581 581
 													<button onclick=";return false;" title="Watch Later" type="button" class="addto-button video-actions addto-watch-later-button-sign-in yt-uix-button yt-uix-button-default yt-uix-button-short yt-uix-tooltip" data-button-menu-id="shared-addto-watch-later-login" data-video-ids="gyAaIKF6tSQ" role="button"><span class="yt-uix-button-content">  <img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Watch Later">
582 582
 													</span><img class="yt-uix-button-arrow" src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt=""></button>
Please login to merge, or discard this patch.
Spacing   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -10,19 +10,19 @@  discard block
 block discarded – undo
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(!$__video_h->video_exists($_GET['v'])) { header("Location: /?error=This video doesn't exist!"); } ?>
13
+<?php if (!$__video_h->video_exists($_GET['v'])) { header("Location: /?error=This video doesn't exist!"); } ?>
14 14
 <?php $_video = $__video_h->fetch_video_rid($_GET['v']); ?>
15 15
 <?php $_video['comments'] = $__video_h->get_comments_from_video($_video['rid']); ?>
16 16
 <?php
17
-    if($_SERVER['REQUEST_METHOD'] == 'POST') {
17
+    if ($_SERVER['REQUEST_METHOD'] == 'POST') {
18 18
         $error = array();
19 19
 
20
-        if(!isset($_SESSION['siteusername'])){ $error['message'] = "you are not logged in"; $error['status'] = true; }
21
-        if(!$_POST['comment']){ $error['message'] = "your comment cannot be blank"; $error['status'] = true; }
22
-        if(strlen($_POST['comment']) > 1000){ $error['message'] = "your comment must be shorter than 1000 characters"; $error['status'] = true; }
23
-        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; }
20
+        if (!isset($_SESSION['siteusername'])) { $error['message'] = "you are not logged in"; $error['status'] = true; }
21
+        if (!$_POST['comment']) { $error['message'] = "your comment cannot be blank"; $error['status'] = true; }
22
+        if (strlen($_POST['comment']) > 1000) { $error['message'] = "your comment must be shorter than 1000 characters"; $error['status'] = true; }
23
+        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; }
24 24
 
25
-        if(!isset($error['message'])) {
25
+        if (!isset($error['message'])) {
26 26
 			$text = $_POST['comment'];
27 27
             $stmt = $__db->prepare("INSERT INTO comments (toid, author, comment) VALUES (:v, :username, :comment)");
28 28
             $stmt->bindParam(":v", $_GET['v']);
@@ -53,20 +53,20 @@  discard block
 block discarded – undo
53 53
 			if (window.yt.timing) {yt.timing.tick("ct");}    
54 54
 		</script>
55 55
 		<?php
56
-			$_video['dislikes'] =  $__video_h->get_video_stars_level($_video['rid'], 1);
56
+			$_video['dislikes'] = $__video_h->get_video_stars_level($_video['rid'], 1);
57 57
 			$_video['dislikes'] += $__video_h->get_video_stars_level($_video['rid'], 2);
58 58
 
59
-			$_video['likes'] =     $__video_h->get_video_stars_level($_video['rid'], 4);
60
-			$_video['likes'] +=    $__video_h->get_video_stars_level($_video['rid'], 5);
59
+			$_video['likes'] = $__video_h->get_video_stars_level($_video['rid'], 4);
60
+			$_video['likes'] += $__video_h->get_video_stars_level($_video['rid'], 5);
61 61
 
62 62
 			$_video['dislikes'] += $__video_h->get_video_likes($_video['rid'], false);
63 63
 			$_video['likes'] += $__video_h->get_video_likes($_video['rid'], true);
64 64
 
65
-			if($_video['likes'] == 0 && $_video['dislikes'] == 0) {
65
+			if ($_video['likes'] == 0 && $_video['dislikes'] == 0) {
66 66
 				$_video['likeswidth'] = 50;
67 67
 				$_video['dislikeswidth'] = 50;
68 68
 			} else {
69
-				$_video['likeswidth'] = $_video['likes'] / ($_video['likes'] + $_video['dislikes']) * 100;
69
+				$_video['likeswidth'] = $_video['likes']/($_video['likes'] + $_video['dislikes'])*100;
70 70
 				$_video['dislikeswidth'] = 100 - $_video['likeswidth'];
71 71
 			}
72 72
 
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 									</div>
100 100
 									<div id="instream_google_companion_ad_div"></div>
101 101
 								</div>
102
-								<?php if(@$_SESSION['siteusername'] == $_video['author']) { ?>
102
+								<?php if (@$_SESSION['siteusername'] == $_video['author']) { ?>
103 103
 									<div id="watch-owner-container">
104 104
 										<div id="masthead-subnav" class="yt-nav yt-nav-dark ">
105 105
 											<ul class="yt-nav-aside">
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
 											title="" 
135 135
 											id="subscribe-button"
136 136
 											type="button" 
137
-											class="<?php if($_video['subscribed']) { echo "subscribed "; } ?>yt-subscription-button  yt-uix-button yt-uix-button-subscription yt-uix-tooltip" 
137
+											class="<?php if ($_video['subscribed']) { echo "subscribed "; } ?>yt-subscription-button  yt-uix-button yt-uix-button-subscription yt-uix-tooltip" 
138 138
 											role="button">
139 139
 											<span class="yt-uix-button-icon-wrapper">
140 140
 												<img class="yt-uix-button-icon yt-uix-button-icon-subscribe" src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="">
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
 											<button onclick=";window.location.href=this.getAttribute('href');return false;"
227 227
 											title="I like this" 
228 228
 											type="button" 
229
-											class="start <?php if($_video['liked']) { echo "liked "; } ?>yt-uix-tooltip-reverse  yt-uix-button yt-uix-button-default yt-uix-tooltip" 
229
+											class="start <?php if ($_video['liked']) { echo "liked "; } ?>yt-uix-tooltip-reverse  yt-uix-button yt-uix-button-default yt-uix-tooltip" 
230 230
 											id="watch-like"  
231 231
 											href="/get/like_video?v=<?php echo $_video['rid']; ?>"
232 232
 											role="button"><span class="yt-uix-button-icon-wrapper">
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
 											type="button" 
241 241
 											style="margin-left: -2px;"
242 242
 											href="/get/dislike_video?v=<?php echo $_video['rid']; ?>"
243
-											class="end yt-uix-tooltip-reverse <?php if($_video['disliked']) { echo "unliked "; } ?>  yt-uix-button yt-uix-button-default yt-uix-tooltip yt-uix-button-empty" 
243
+											class="end yt-uix-tooltip-reverse <?php if ($_video['disliked']) { echo "unliked "; } ?>  yt-uix-button yt-uix-button-default yt-uix-tooltip yt-uix-button-empty" 
244 244
 											id="watch-unlike" 
245 245
 											role="button">
246 246
 												<span class="yt-uix-button-icon-wrapper">
@@ -365,7 +365,7 @@  discard block
 block discarded – undo
365 365
 												$stmt->execute();
366 366
 											?>
367 367
 
368
-											<?php if($stmt->rowCount() != 0) { ?>
368
+											<?php if ($stmt->rowCount() != 0) { ?>
369 369
 												<div class="comments-section">
370 370
 													<a class="comments-section-see-all" href="/video_response_view_all?v=<?php echo htmlspecialchars($_video['rid']); ?>">
371 371
 													see all
@@ -373,8 +373,8 @@  discard block
 block discarded – undo
373 373
 													<h4>Video Responses</h4>
374 374
 													<ul class="video-list">
375 375
 													<?php 
376
-														while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { 
377
-															if($__video_h->video_exists($video['video'])) { 
376
+														while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) { 
377
+															if ($__video_h->video_exists($video['video'])) { 
378 378
 																$video = $__video_h->fetch_video_rid($video['video']);
379 379
 																$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
380 380
 																$video['duration'] = $__time_h->timestamp($video['duration']);
@@ -405,19 +405,19 @@  discard block
 block discarded – undo
405 405
 														</h4>
406 406
 													</div>
407 407
 												</div>
408
-												<?php if(!isset($_SESSION['siteusername'])) { ?>
408
+												<?php if (!isset($_SESSION['siteusername'])) { ?>
409 409
 													<div class="comments-post-container clearfix">
410 410
 														<div class="comments-post-alert">
411 411
 															<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>
412 412
 														</div>
413 413
 													</div>
414
-												<?php } else if($_video['commenting'] == "d") { ?>
414
+												<?php } else if ($_video['commenting'] == "d") { ?>
415 415
 													<div class="comments-post-container clearfix">
416 416
 														<div class="comments-post-alert">
417 417
 															This video has comemnting disabled!
418 418
 														</div>
419 419
 													</div>
420
-												<?php } else if($__user_h->if_blocked($_video['author'], $_SESSION['siteusername'])) { ?>
420
+												<?php } else if ($__user_h->if_blocked($_video['author'], $_SESSION['siteusername'])) { ?>
421 421
 													<div class="comments-post-container clearfix">
422 422
 														<div class="comments-post-alert">
423 423
 															This user has blocked you!
@@ -471,15 +471,15 @@  discard block
 block discarded – undo
471 471
 														$stmt->execute();
472 472
 
473 473
 														$number_of_result = $stmt->rowCount();
474
-														$number_of_page = ceil ($number_of_result / $results_per_page);  
474
+														$number_of_page = ceil($number_of_result/$results_per_page);  
475 475
 
476
-														if (!isset ($_GET['page']) ) {  
476
+														if (!isset ($_GET['page'])) {  
477 477
 															$page = 1;  
478 478
 														} else {  
479
-															$page = (int)$_GET['page'];  
479
+															$page = (int) $_GET['page'];  
480 480
 														}  
481 481
 
482
-														$page_first_result = ($page - 1) * $results_per_page;  
482
+														$page_first_result = ($page - 1)*$results_per_page;  
483 483
 
484 484
 														$stmt = $__db->prepare("SELECT * FROM comments WHERE toid = :rid ORDER BY id DESC LIMIT :pfirst, :pper");
485 485
 														$stmt->bindParam(":rid", $_video['rid']);
@@ -487,7 +487,7 @@  discard block
 block discarded – undo
487 487
 														$stmt->bindParam(":pper", $results_per_page);
488 488
 														$stmt->execute();
489 489
 
490
-														while($comment = $stmt->fetch(PDO::FETCH_ASSOC)) { 
490
+														while ($comment = $stmt->fetch(PDO::FETCH_ASSOC)) { 
491 491
 													?>
492 492
 
493 493
 													<li class="comment yt-tile-default " data-author-viewing="" data-author-id="-uD01K8FQTeOSS5sniRFzQ" data-id="HdQrMeklJ_5hd_uPDRcvtdaMk2pMVS8d9sufcfiGx0U" data-score="0">
@@ -569,7 +569,7 @@  discard block
 block discarded – undo
569 569
 												<?php
570 570
 													$stmt = $__db->prepare("SELECT * FROM videos ORDER BY rand() LIMIT 20");
571 571
 													$stmt->execute();
572
-													while($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
572
+													while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) {	
573 573
 														$video['age'] = $__time_h->time_elapsed_string($video['publish']);		
574 574
 														$video['duration'] = $__time_h->timestamp($video['duration']);
575 575
 														$video['views'] = $__video_h->fetch_video_views($video['rid']);
Please login to merge, or discard this patch.
web/public/s/mod/sidebar_inbox.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,8 +39,8 @@
 block discarded – undo
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">
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,8 +40,9 @@
 block discarded – undo
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; ?>">
Please login to merge, or discard this patch.
web/public/inbox_ajax.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -17,29 +17,29 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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&amp;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>
Please login to merge, or discard this patch.
web/public/inbox/compose.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -10,18 +10,18 @@
 block discarded – undo
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']);
Please login to merge, or discard this patch.
web/public/inbox/notifications.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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&amp;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
 block discarded – undo
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
 block discarded – undo
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
                                 } ?>
Please login to merge, or discard this patch.
web/public/inbox/index.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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&amp;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
 block discarded – undo
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
 block discarded – undo
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
                                 } ?>
Please login to merge, or discard this patch.
web/public/inbox/sent.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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&amp;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
 block discarded – undo
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
 block discarded – undo
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
                                 } ?>
Please login to merge, or discard this patch.
web/public/inbox/pm.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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&amp;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
 block discarded – undo
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
 block discarded – undo
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
                                 } ?>
Please login to merge, or discard this patch.
web/public/get/unfavorite.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,8 +26,8 @@
 block discarded – undo
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']);
Please login to merge, or discard this patch.