@@ -10,7 +10,7 @@ discard block |
||
| 10 | 10 | <?php $__user_h = new user_helper($__db); ?> |
| 11 | 11 | <?php $__db_h = new db_helper(); ?> |
| 12 | 12 | <?php $__time_h = new time_helper(); error_reporting(E_ERROR | E_PARSE); ?> |
| 13 | -<?php if(!isset($_SESSION['siteusername'])) { header("Location: /sign_in"); } ?> |
|
| 13 | +<?php if (!isset($_SESSION['siteusername'])) { header("Location: /sign_in"); } ?> |
|
| 14 | 14 | <!DOCTYPE html> |
| 15 | 15 | <html dir="ltr"> |
| 16 | 16 | <head> |
@@ -163,15 +163,15 @@ discard block |
||
| 163 | 163 | $stmt->execute(); |
| 164 | 164 | |
| 165 | 165 | $number_of_result = $stmt->rowCount(); |
| 166 | - $number_of_page = ceil ($number_of_result / $results_per_page); |
|
| 166 | + $number_of_page = ceil($number_of_result/$results_per_page); |
|
| 167 | 167 | |
| 168 | - if (!isset ($_GET['page']) ) { |
|
| 168 | + if (!isset ($_GET['page'])) { |
|
| 169 | 169 | $page = 1; |
| 170 | 170 | } else { |
| 171 | - $page = (int)$_GET['page']; |
|
| 171 | + $page = (int) $_GET['page']; |
|
| 172 | 172 | } |
| 173 | 173 | |
| 174 | - $page_first_result = ($page - 1) * $results_per_page; |
|
| 174 | + $page_first_result = ($page - 1)*$results_per_page; |
|
| 175 | 175 | ?> |
| 176 | 176 | <?php |
| 177 | 177 | $stmt6 = $__db->prepare("SELECT * FROM favorite_video WHERE sender = :search ORDER BY id DESC LIMIT :pfirst, :pper"); |
@@ -191,8 +191,8 @@ discard block |
||
| 191 | 191 | </tr> |
| 192 | 192 | |
| 193 | 193 | <?php |
| 194 | - while($video = $stmt6->fetch(PDO::FETCH_ASSOC)) { |
|
| 195 | - if($__video_h->video_exists($video['reciever'])) { |
|
| 194 | + while ($video = $stmt6->fetch(PDO::FETCH_ASSOC)) { |
|
| 195 | + if ($__video_h->video_exists($video['reciever'])) { |
|
| 196 | 196 | $_video = $__video_h->fetch_video_rid($video['reciever']); |
| 197 | 197 | $_video['video_responses'] = $__video_h->get_video_responses($_video['rid']); |
| 198 | 198 | $_video['age'] = $__time_h->time_elapsed_string($_video['publish']); |
@@ -202,19 +202,19 @@ discard block |
||
| 202 | 202 | $_video['title'] = htmlspecialchars($_video['title']); |
| 203 | 203 | $_video['description'] = $__video_h->shorten_description($_video['description'], 50); |
| 204 | 204 | |
| 205 | - if($_video['thumbnail'] == ".png" && $_video['filename'] == ".mp4") { |
|
| 205 | + if ($_video['thumbnail'] == ".png" && $_video['filename'] == ".mp4") { |
|
| 206 | 206 | $status = "Corrupted"; |
| 207 | - } else if($_video['visibility'] == "v") { |
|
| 207 | + } else if ($_video['visibility'] == "v") { |
|
| 208 | 208 | $status = "Approved"; |
| 209 | - } else if($_video['visibility'] == "n") { |
|
| 209 | + } else if ($_video['visibility'] == "n") { |
|
| 210 | 210 | $status = "Approved"; |
| 211 | - } else if($_video['visibility'] == "o") { |
|
| 211 | + } else if ($_video['visibility'] == "o") { |
|
| 212 | 212 | $status = "Disapproved"; |
| 213 | 213 | } else { |
| 214 | 214 | $status = "Unknown"; |
| 215 | 215 | } |
| 216 | 216 | |
| 217 | - if($_video['commenting'] == "a") |
|
| 217 | + if ($_video['commenting'] == "a") |
|
| 218 | 218 | $_video['commentstatus'] = "Commenting allowed"; |
| 219 | 219 | else |
| 220 | 220 | $_video['commentstatus'] = "Commenting disallowed"; |
@@ -260,7 +260,7 @@ discard block |
||
| 260 | 260 | </div> |
| 261 | 261 | </center> |
| 262 | 262 | |
| 263 | - <?php for($page = 1; $page<= $number_of_page; $page++) { ?> |
|
| 263 | + <?php for ($page = 1; $page <= $number_of_page; $page++) { ?> |
|
| 264 | 264 | <button class="yt-uix-button yt-uix-button-default" onclick="ajax_fetch_videomanager(<?php echo $page; ?>)"><?php echo $page; ?></button> |
| 265 | 265 | <?php } ?> |
| 266 | 266 | |
@@ -306,7 +306,7 @@ discard block |
||
| 306 | 306 | </script> |
| 307 | 307 | |
| 308 | 308 | <?php |
| 309 | - if($stmt6->rowCount() == 0) { echo " |
|
| 309 | + if ($stmt6->rowCount() == 0) { echo " |
|
| 310 | 310 | <br>Welcome to your favorite vidoes page.<br> |
| 311 | 311 | You can add videos that you like and the video will be added here! |
| 312 | 312 | "; |
@@ -3,7 +3,7 @@ discard block |
||
| 3 | 3 | |
| 4 | 4 | switch ($requestedPage[1]) { |
| 5 | 5 | case 'player': |
| 6 | - if($requestedPage[1] == "2009player" && $requestedPage[2] == "assets") { |
|
| 6 | + if ($requestedPage[1] == "2009player" && $requestedPage[2] == "assets") { |
|
| 7 | 7 | $a = implode("/", $requestedPage); |
| 8 | 8 | $i = implode(".", $requestedPage); |
| 9 | 9 | $file = file_get_contents($_SERVER['DOCUMENT_ROOT'] . $a); |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | |
| 42 | 42 | $file_info = new finfo(FILEINFO_MIME_TYPE); |
| 43 | 43 | $mime_type = $file_info->buffer($file); |
| 44 | - if($mime_type == "text/plain") |
|
| 44 | + if ($mime_type == "text/plain") |
|
| 45 | 45 | header('Content-Type: text/css'); |
| 46 | 46 | else |
| 47 | 47 | header('Content-Type: ' . $mime_type); |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | $__db_h = new db_helper(); |
| 83 | 83 | $__time_h = new time_helper(); |
| 84 | 84 | |
| 85 | - if(empty($requestedPage[1])) |
|
| 85 | + if (empty($requestedPage[1])) |
|
| 86 | 86 | require_once($_SERVER['DOCUMENT_ROOT'] . "/homepage.php"); |
| 87 | 87 | else |
| 88 | 88 | require_once($_SERVER['DOCUMENT_ROOT'] . "/" . $requestedPage[1] . ".php"); |