@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | $name = $_GET['v']; |
20 | 20 | $author = $_SESSION['siteusername']; |
21 | 21 | |
22 | -if(!isset($_SESSION['siteusername']) || !isset($_GET['user'])) { |
|
22 | +if (!isset($_SESSION['siteusername']) || !isset($_GET['user'])) { |
|
23 | 23 | header('Location: ' . $_SERVER['HTTP_REFERER']); |
24 | 24 | } |
25 | 25 | |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | $stmt->bind_param("ss", $_SESSION['siteusername'], $name); |
28 | 28 | $stmt->execute(); |
29 | 29 | $result = $stmt->get_result(); |
30 | - if($result->num_rows === 1) die('You already favorited this video!'); |
|
30 | + if ($result->num_rows === 1) die('You already favorited this video!'); |
|
31 | 31 | $stmt->close(); |
32 | 32 | |
33 | 33 | $stmt = $conn->prepare("INSERT INTO favorite_video (sender, reciever) VALUES (?, ?)"); |
@@ -27,8 +27,10 @@ |
||
27 | 27 | $stmt->bind_param("ss", $_SESSION['siteusername'], $name); |
28 | 28 | $stmt->execute(); |
29 | 29 | $result = $stmt->get_result(); |
30 | - if($result->num_rows === 1) die('You already favorited this video!'); |
|
31 | -$stmt->close(); |
|
30 | + if($result->num_rows === 1) { |
|
31 | + die('You already favorited this video!'); |
|
32 | + } |
|
33 | + $stmt->close(); |
|
32 | 34 | |
33 | 35 | $stmt = $conn->prepare("INSERT INTO favorite_video (sender, reciever) VALUES (?, ?)"); |
34 | 36 | $stmt->bind_param("ss", $_SESSION['siteusername'], $name); |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | <?php |
18 | 18 | $name = $_GET['user']; |
19 | 19 | |
20 | -if(!isset($_SESSION['siteusername']) || !isset($_GET['user'])) { |
|
20 | +if (!isset($_SESSION['siteusername']) || !isset($_GET['user'])) { |
|
21 | 21 | die("You are not logged in or you did not put in an argument"); |
22 | 22 | } |
23 | 23 | |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | $stmt->bind_param("ss", $_SESSION['siteusername'], $name); |
26 | 26 | $stmt->execute(); |
27 | 27 | $result = $stmt->get_result(); |
28 | - if($result->num_rows === 0) die('You haven\'t blocked this person!'); |
|
28 | + if ($result->num_rows === 0) die('You haven\'t blocked this person!'); |
|
29 | 29 | $stmt->close(); |
30 | 30 | |
31 | 31 | $stmt = $conn->prepare("DELETE FROM block WHERE sender = ? AND reciever = ?"); |
@@ -25,8 +25,10 @@ |
||
25 | 25 | $stmt->bind_param("ss", $_SESSION['siteusername'], $name); |
26 | 26 | $stmt->execute(); |
27 | 27 | $result = $stmt->get_result(); |
28 | - if($result->num_rows === 0) die('You haven\'t blocked this person!'); |
|
29 | -$stmt->close(); |
|
28 | + if($result->num_rows === 0) { |
|
29 | + die('You haven\'t blocked this person!'); |
|
30 | + } |
|
31 | + $stmt->close(); |
|
30 | 32 | |
31 | 33 | $stmt = $conn->prepare("DELETE FROM block WHERE sender = ? AND reciever = ?"); |
32 | 34 | $stmt->bind_param("ss", $_SESSION['siteusername'], $name); |
@@ -10,7 +10,7 @@ |
||
10 | 10 | <?php $__time_h = new time_helper(); ?> |
11 | 11 | <?php |
12 | 12 | |
13 | -if($_user_fetch_utils->video_responded($_GET['reciever'], $_GET['sending']) == 0) { |
|
13 | +if ($_user_fetch_utils->video_responded($_GET['reciever'], $_GET['sending']) == 0) { |
|
14 | 14 | $stmt = $conn->prepare("INSERT INTO video_response (toid, author, video) VALUES (?, ?, ?)"); |
15 | 15 | $stmt->bind_param("sss", $_GET['reciever'], $_SESSION['siteusername'], $_GET['sending']); |
16 | 16 | $stmt->execute(); |
@@ -27,14 +27,14 @@ |
||
27 | 27 | } |
28 | 28 | */ |
29 | 29 | |
30 | -if(!$__user_h->user_exists($_GET['n'])) { |
|
30 | +if (!$__user_h->user_exists($_GET['n'])) { |
|
31 | 31 | $request->error->message = "This user does not exist!"; $request->error->status = ""; |
32 | 32 | } |
33 | 33 | |
34 | -if($__user_h->if_subscribed(@$_SESSION['siteusername'], $request->name)) |
|
34 | +if ($__user_h->if_subscribed(@$_SESSION['siteusername'], $request->name)) |
|
35 | 35 | { $request->error->message = "You are already subscribed to this person!"; $request->error->status = ""; } |
36 | 36 | |
37 | -if($request->error->status == "OK") { |
|
37 | +if ($request->error->status == "OK") { |
|
38 | 38 | $stmt = $__db->prepare("INSERT INTO subscribers (sender, reciever) VALUES (:sender, :reciever)"); |
39 | 39 | $stmt->bindParam(":sender", $request->sender); |
40 | 40 | $stmt->bindParam(":reciever", $request->name); |
@@ -12,11 +12,11 @@ discard block |
||
12 | 12 | $name = $_GET['user']; |
13 | 13 | $author = $_SESSION['siteusername']; |
14 | 14 | |
15 | -if(!isset($_SESSION['siteusername']) || !isset($_GET['user'])) { |
|
15 | +if (!isset($_SESSION['siteusername']) || !isset($_GET['user'])) { |
|
16 | 16 | header('Location: ' . $_SERVER['HTTP_REFERER']); |
17 | 17 | } |
18 | 18 | |
19 | -if($name == $_SESSION['siteusername']) { |
|
19 | +if ($name == $_SESSION['siteusername']) { |
|
20 | 20 | header('Location: ' . $_SERVER['HTTP_REFERER']); |
21 | 21 | } |
22 | 22 | |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | $stmt->bind_param("ss", $_SESSION['siteusername'], $name); |
25 | 25 | $stmt->execute(); |
26 | 26 | $result = $stmt->get_result(); |
27 | - if($result->num_rows === 1) die('You already blocked this person!'); |
|
27 | + if ($result->num_rows === 1) die('You already blocked this person!'); |
|
28 | 28 | $stmt->close(); |
29 | 29 | |
30 | 30 | $stmt = $conn->prepare("INSERT INTO block (sender, reciever) VALUES (?, ?)"); |
@@ -24,8 +24,10 @@ |
||
24 | 24 | $stmt->bind_param("ss", $_SESSION['siteusername'], $name); |
25 | 25 | $stmt->execute(); |
26 | 26 | $result = $stmt->get_result(); |
27 | - if($result->num_rows === 1) die('You already blocked this person!'); |
|
28 | -$stmt->close(); |
|
27 | + if($result->num_rows === 1) { |
|
28 | + die('You already blocked this person!'); |
|
29 | + } |
|
30 | + $stmt->close(); |
|
29 | 31 | |
30 | 32 | $stmt = $conn->prepare("INSERT INTO block (sender, reciever) VALUES (?, ?)"); |
31 | 33 | $stmt->bind_param("ss", $_SESSION['siteusername'], $name); |
@@ -27,8 +27,8 @@ |
||
27 | 27 | if($request->error->status == "OK") { |
28 | 28 | $stmt = $__db->prepare("DELETE FROM subscribers WHERE sender=:sender AND reciever=:reciever"); |
29 | 29 | $stmt->execute(array( |
30 | - ':sender' => $request->sender, |
|
31 | - ':reciever' => $request->name, |
|
30 | + ':sender' => $request->sender, |
|
31 | + ':reciever' => $request->name, |
|
32 | 32 | )); |
33 | 33 | } else { |
34 | 34 | echo json_encode($request->error); |
@@ -21,10 +21,10 @@ |
||
21 | 21 | ] |
22 | 22 | ]; |
23 | 23 | |
24 | -if(!$__user_h->if_subscribed(@$_SESSION['siteusername'], $request->name)) |
|
24 | +if (!$__user_h->if_subscribed(@$_SESSION['siteusername'], $request->name)) |
|
25 | 25 | { $request->error->message = "You aren't subscribed to this person!"; $request->error->status = ""; } |
26 | 26 | |
27 | -if($request->error->status == "OK") { |
|
27 | +if ($request->error->status == "OK") { |
|
28 | 28 | $stmt = $__db->prepare("DELETE FROM subscribers WHERE sender=:sender AND reciever=:reciever"); |
29 | 29 | $stmt->execute(array( |
30 | 30 | ':sender' => $request->sender, |
@@ -13,10 +13,10 @@ discard block |
||
13 | 13 | <?php $__db_h = new db_helper(); ?> |
14 | 14 | <?php $__time_h = new time_helper(); ?> |
15 | 15 | <?php |
16 | - if(isset($_SESSION['siteusername'])) |
|
16 | + if (isset($_SESSION['siteusername'])) |
|
17 | 17 | $_user_hp = $__user_h->fetch_user_username($_SESSION['siteusername']); |
18 | 18 | |
19 | - if(!$__user_h->user_exists($_GET['n'])) |
|
19 | + if (!$__user_h->user_exists($_GET['n'])) |
|
20 | 20 | header("Location: /?userdoesntexist"); |
21 | 21 | |
22 | 22 | $_user = $__user_h->fetch_user_username($_GET['n']); |
@@ -68,28 +68,28 @@ discard block |
||
68 | 68 | |
69 | 69 | $_user['genre'] = strtolower($_user['genre']); |
70 | 70 | |
71 | - if(!check_valid_colorhex($_user['primary_color']) && strlen($_user['primary_color']) != 6) { $_user['primary_color'] = ""; } |
|
72 | - if(!check_valid_colorhex($_user['secondary_color']) && strlen($_user['secondary_color']) != 6) { $_user['secondary_color'] = ""; } |
|
73 | - if(!check_valid_colorhex($_user['third_color']) && strlen($_user['third_color']) != 6) { $_user['third_color'] = ""; } |
|
74 | - if(!check_valid_colorhex($_user['text_color']) && strlen($_user['text_color']) != 6) { $_user['text_color'] = ""; } |
|
75 | - if(!check_valid_colorhex($_user['primary_color_text']) && strlen($_user['primary_color_text']) != 6) { $_user['primary_color_text'] = ""; } |
|
76 | - if(!check_valid_colorhex($_user['2009_bgcolor']) && strlen($_user['2009_bgcolor']) != 6) { $_user['2009_bgcolor'] = ""; } |
|
71 | + if (!check_valid_colorhex($_user['primary_color']) && strlen($_user['primary_color']) != 6) { $_user['primary_color'] = ""; } |
|
72 | + if (!check_valid_colorhex($_user['secondary_color']) && strlen($_user['secondary_color']) != 6) { $_user['secondary_color'] = ""; } |
|
73 | + if (!check_valid_colorhex($_user['third_color']) && strlen($_user['third_color']) != 6) { $_user['third_color'] = ""; } |
|
74 | + if (!check_valid_colorhex($_user['text_color']) && strlen($_user['text_color']) != 6) { $_user['text_color'] = ""; } |
|
75 | + if (!check_valid_colorhex($_user['primary_color_text']) && strlen($_user['primary_color_text']) != 6) { $_user['primary_color_text'] = ""; } |
|
76 | + if (!check_valid_colorhex($_user['2009_bgcolor']) && strlen($_user['2009_bgcolor']) != 6) { $_user['2009_bgcolor'] = ""; } |
|
77 | 77 | |
78 | - if(isset($_SESSION['siteusername'])) |
|
78 | + if (isset($_SESSION['siteusername'])) |
|
79 | 79 | $__user_i->check_view_channel($_user['username'], @$_SESSION['siteusername']); |
80 | 80 | |
81 | - if($_SERVER['REQUEST_METHOD'] == 'POST') { |
|
81 | + if ($_SERVER['REQUEST_METHOD'] == 'POST') { |
|
82 | 82 | $error = array(); |
83 | 83 | |
84 | - if(!isset($_SESSION['siteusername'])){ $error['message'] = "you are not logged in"; $error['status'] = true; } |
|
85 | - if(!$_POST['comment']){ $error['message'] = "your comment cannot be blank"; $error['status'] = true; } |
|
86 | - if(strlen($_POST['comment']) > 1000){ $error['message'] = "your comment must be shorter than 1000 characters"; $error['status'] = true; } |
|
84 | + if (!isset($_SESSION['siteusername'])) { $error['message'] = "you are not logged in"; $error['status'] = true; } |
|
85 | + if (!$_POST['comment']) { $error['message'] = "your comment cannot be blank"; $error['status'] = true; } |
|
86 | + if (strlen($_POST['comment']) > 1000) { $error['message'] = "your comment must be shorter than 1000 characters"; $error['status'] = true; } |
|
87 | 87 | //if(!isset($_POST['g-recaptcha-response'])){ $error['message'] = "captcha validation failed"; $error['status'] = true; } |
88 | 88 | //if(!$_user_insert_utils->validateCaptcha($config['recaptcha_secret'], $_POST['g-recaptcha-response'])) { $error['message'] = "captcha validation failed"; $error['status'] = true; } |
89 | - 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; } |
|
89 | + 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; } |
|
90 | 90 | //if(ifBlocked(@$_SESSION['siteusername'], $user['username'], $__db)) { $error = "This user has blocked you!"; $error['status'] = true; } |
91 | 91 | |
92 | - if(!isset($error['message'])) { |
|
92 | + if (!isset($error['message'])) { |
|
93 | 93 | $text = $_POST['comment']; |
94 | 94 | $stmt = $__db->prepare("INSERT INTO profile_comments (toid, author, comment) VALUES (:id, :username, :comment)"); |
95 | 95 | $stmt->bindParam(":id", $_user['username']); |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | |
100 | 100 | $_user_update_utils->update_comment_cooldown_time($_SESSION['siteusername']); |
101 | 101 | |
102 | - if(@$_SESSION['siteusername'] != $_user['username']) { |
|
102 | + if (@$_SESSION['siteusername'] != $_user['username']) { |
|
103 | 103 | $_user_insert_utils->send_message($_user['username'], "New comment", 'I commented "' . $_POST['comment'] . '" on your profile!', $_SESSION['siteusername']); |
104 | 104 | } |
105 | 105 | } |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | <link rel="stylesheet" href="/yt/cssbin/www-extra.css"> |
126 | 126 | <style> |
127 | 127 | #content-container { |
128 | - background-color: <?php echo $_user['primary_color']; ?>; |
|
128 | + background-color: <?php echo $_user['primary_color']; ?>; |
|
129 | 129 | background-image: url(/dynamic/banners/<?php echo $_user['2009_bg']; ?>); |
130 | 130 | background-repeat: repeat; |
131 | 131 | background-position: center top; |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | <div id="content-container"> |
143 | 143 | <!-- begin content --> |
144 | 144 | <div id="content"> |
145 | - <?php if(isset($_SESSION['siteusername']) && $_user['username'] == $_SESSION['siteusername']) { ?> |
|
145 | + <?php if (isset($_SESSION['siteusername']) && $_user['username'] == $_SESSION['siteusername']) { ?> |
|
146 | 146 | <div class="channel_customization"><?php echo require($_SERVER['DOCUMENT_ROOT'] . "/s/mod/channel_customization.php"); ?></div> |
147 | 147 | <?php } ?> |
148 | 148 | |
@@ -197,7 +197,7 @@ discard block |
||
197 | 197 | <h1><?php echo htmlspecialchars($_user['username']); ?></h1> |
198 | 198 | </div> |
199 | 199 | <div class="upper-left-section enable-fancy-subscribe-button"> |
200 | - <?php if($_user['username'] != @$_SESSION['siteusername']) { ?> |
|
200 | + <?php if ($_user['username'] != @$_SESSION['siteusername']) { ?> |
|
201 | 201 | <div class="yt-subscription-button-hovercard yt-uix-hovercard"> |
202 | 202 | <button href="https://accounts.google.com/ServiceLogin?uilel=3&service=youtube&passive=true&continue=http%3A%2F%2Fwww.youtube.com%2Fsignin%3Faction_handle_signin%3Dtrue%26feature%3Dsubscribe%26nomobiletemp%3D1%26hl%3Den_US%26next%3D%252Fuser%252F<?php echo htmlspecialchars($_user['username']); ?>%253Ffeature%253Dg-logo-xit&hl=en_US&ltmpl=sso" onclick=";window.location.href=this.getAttribute('href');return false;" title="" type="button" class="yt-subscription-button subscription-button-with-recommended-channels yt-uix-button yt-uix-button-subscription yt-uix-tooltip" data-enable-hovercard="true" data-subscription-value="UCIwFjwMjI0y7PDBVEO9-bkQ" data-force-position="" data-position="" data-subscription-feature="channels3" data-subscription-type="channel" role="button"><span class="yt-uix-button-icon-wrapper"><img class="yt-uix-button-icon yt-uix-button-icon-subscribe" src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt=""></span><span class="yt-uix-button-content"> <span class="subscribe-label">Subscribe</span> |
203 | 203 | <span class="subscribed-label">Subscribed</span> |
@@ -273,12 +273,12 @@ discard block |
||
273 | 273 | </div> |
274 | 274 | </div> |
275 | 275 | </div> |
276 | - <?php if($_user['featured'] != "None") { $video = $__video_h->fetch_video_rid($_user['featured']); } else { $_user['featured'] = false; } ?> |
|
276 | + <?php if ($_user['featured'] != "None") { $video = $__video_h->fetch_video_rid($_user['featured']); } else { $_user['featured'] = false; } ?> |
|
277 | 277 | <div id="branded-page-body"> |
278 | 278 | <div class="channel-tab-content channel-layout-two-column selected blogger-template"> |
279 | 279 | <div class="tab-content-body"> |
280 | 280 | <div class="primary-pane"> |
281 | - <?php if($_user['featured'] != false && $__video_h->video_exists($_user['featured'])) { ?> |
|
281 | + <?php if ($_user['featured'] != false && $__video_h->video_exists($_user['featured'])) { ?> |
|
282 | 282 | <div class="channels-featured-video channel-module yt-uix-c3-module-container has-visible-edge"> |
283 | 283 | <div class="module-view featured-video-view-module"> |
284 | 284 | <div class="channels-video-player " data-swf-config="{"assets": {"html": "\/html5_player_template", "css": "http:\/\/s.ytimg.com\/yt\/cssbin\/www-player-vfllhw7HB.css", "js": "http:\/\/s.ytimg.com\/yt\/jsbin\/html5player-vflzTrRqK.js"}, "url": "http:\/\/s.ytimg.com\/yt\/swfbin\/watch_as3-vflbPspVE.swf", "min_version": "8.0.0", "args": {"ttsurl": "http:\/\/www.youtube.com\/api\/timedtext?sparams=asr_langs%2Ccaps%2Cv%2Cexpire\u0026asr_langs=en%2Cko%2Cja%2Ces\u0026v=/watch?v=<?php echo $video['rid']; ?>\u0026caps=asr\u0026expire=1339746882\u0026key=yttt1\u0026signature=A1B858FF427B45672676C7403417ED1F4091A806.C347A6021C0F843E46F2056AEBA38FC93A0A47B8\u0026hl=en_US", "el": "profilepage", "fexp": "904001,907342,904824,910206,908620,907217,907335,921602,919306,922600,919316,920704,912804,913542,919324,912706", "url_encoded_fmt_stream_map": "url=http%3A%2F%2Fo-o.preferred.nuq04s10.v1.lscache4.c.youtube.com%2Fvideoplayback%3Fupn%3D_7WL7XeDtjs%26sparams%3Dcp%252Cid%252Cip%252Cipbits%252Citag%252Cratebypass%252Csource%252Cupn%252Cexpire%26fexp%3D904001%252C907342%252C904824%252C910206%252C908620%252C907217%252C907335%252C921602%252C919306%252C922600%252C919316%252C920704%252C912804%252C913542%252C919324%252C912706%26ms%3Dau%26itag%3D44%26ip%3D207.0.0.0%26signature%3D9B9B5ECF02F2F66BDCCB0ACED26D3406F9F83241.1B2CC833461E3D2C4D081B7DFBC65B0948C61FB9%26sver%3D3%26mt%3D1339721111%26ratebypass%3Dyes%26source%3Dyoutube%26expire%3D1339743583%26key%3Dyt1%26ipbits%3D8%26cp%3DU0hSTldPUV9NTUNOMl9PSVVGOmdTcVlPRFNNTEdM%26id%3D56ffd0bfee85d71f\u0026quality=large\u0026fallback_host=tc.v1.cache4.c.youtube.com\u0026type=video%2Fwebm%3B+codecs%3D%22vp8.0%2C+vorbis%22\u0026itag=44,url=http%3A%2F%2Fo-o.preferred.nuq04s10.v14.lscache1.c.youtube.com%2Fvideoplayback%3Fupn%3D_7WL7XeDtjs%26sparams%3Dalgorithm%252Cburst%252Ccp%252Cfactor%252Cid%252Cip%252Cipbits%252Citag%252Csource%252Cupn%252Cexpire%26fexp%3D904001%252C907342%252C904824%252C910206%252C908620%252C907217%252C907335%252C921602%252C919306%252C922600%252C919316%252C920704%252C912804%252C913542%252C919324%252C912706%26mt%3D1339721111%26ms%3Dau%26algorithm%3Dthrottle-factor%26itag%3D35%26ip%3D207.0.0.0%26burst%3D40%26sver%3D3%26signature%3DB702D7CA72653169BDC2C945B5A35F4A23A3FEBF.ACC660CDAB11901FF8D3DA8D384D61F0AB0F0125%26source%3Dyoutube%26expire%3D1339743583%26key%3Dyt1%26ipbits%3D8%26factor%3D1.25%26cp%3DU0hSTldPUV9NTUNOMl9PSVVGOmdTcVlPRFNNTEdM%26id%3D56ffd0bfee85d71f\u0026quality=large\u0026fallback_host=tc.v14.cache1.c.youtube.com\u0026type=video%2Fx-flv\u0026itag=35,url=http%3A%2F%2Fo-o.preferred.nuq04s10.v24.lscache3.c.youtube.com%2Fvideoplayback%3Fupn%3D_7WL7XeDtjs%26sparams%3Dcp%252Cid%252Cip%252Cipbits%252Citag%252Cratebypass%252Csource%252Cupn%252Cexpire%26fexp%3D904001%252C907342%252C904824%252C910206%252C908620%252C907217%252C907335%252C921602%252C919306%252C922600%252C919316%252C920704%252C912804%252C913542%252C919324%252C912706%26ms%3Dau%26itag%3D43%26ip%3D207.0.0.0%26signature%3D9FABDD8C013AA137B87DF2D154D1B90E6827A2A3.880FECDEC066236D85FCF223CF472B62B8F9B3A4%26sver%3D3%26mt%3D1339721111%26ratebypass%3Dyes%26source%3Dyoutube%26expire%3D1339743583%26key%3Dyt1%26ipbits%3D8%26cp%3DU0hSTldPUV9NTUNOMl9PSVVGOmdTcVlPRFNNTEdM%26id%3D56ffd0bfee85d71f\u0026quality=medium\u0026fallback_host=tc.v24.cache3.c.youtube.com\u0026type=video%2Fwebm%3B+codecs%3D%22vp8.0%2C+vorbis%22\u0026itag=43,url=http%3A%2F%2Fo-o.preferred.nuq04s10.v3.lscache7.c.youtube.com%2Fvideoplayback%3Fupn%3D_7WL7XeDtjs%26sparams%3Dalgorithm%252Cburst%252Ccp%252Cfactor%252Cid%252Cip%252Cipbits%252Citag%252Csource%252Cupn%252Cexpire%26fexp%3D904001%252C907342%252C904824%252C910206%252C908620%252C907217%252C907335%252C921602%252C919306%252C922600%252C919316%252C920704%252C912804%252C913542%252C919324%252C912706%26mt%3D1339721111%26ms%3Dau%26algorithm%3Dthrottle-factor%26itag%3D34%26ip%3D207.0.0.0%26burst%3D40%26sver%3D3%26signature%3D1BA326B784DAA9F62FD789CBB5C2FABFCD5D351C.C4618E3AB2AB08C61C6A982A36F405DA886B5D5A%26source%3Dyoutube%26expire%3D1339743583%26key%3Dyt1%26ipbits%3D8%26factor%3D1.25%26cp%3DU0hSTldPUV9NTUNOMl9PSVVGOmdTcVlPRFNNTEdM%26id%3D56ffd0bfee85d71f\u0026quality=medium\u0026fallback_host=tc.v3.cache7.c.youtube.com\u0026type=video%2Fx-flv\u0026itag=34,url=http%3A%2F%2Fo-o.preferred.nuq04s10.v14.lscache1.c.youtube.com%2Fvideoplayback%3Fupn%3D_7WL7XeDtjs%26sparams%3Dcp%252Cid%252Cip%252Cipbits%252Citag%252Cratebypass%252Csource%252Cupn%252Cexpire%26fexp%3D904001%252C907342%252C904824%252C910206%252C908620%252C907217%252C907335%252C921602%252C919306%252C922600%252C919316%252C920704%252C912804%252C913542%252C919324%252C912706%26ms%3Dau%26itag%3D18%26ip%3D207.0.0.0%26signature%3D8806EA8FAE16557A2F9732068442133EA0A0760F.D91694A47E6B0BF627965CDA46010F36105A28FE%26sver%3D3%26mt%3D1339721111%26ratebypass%3Dyes%26source%3Dyoutube%26expire%3D1339743583%26key%3Dyt1%26ipbits%3D8%26cp%3DU0hSTldPUV9NTUNOMl9PSVVGOmdTcVlPRFNNTEdM%26id%3D56ffd0bfee85d71f\u0026quality=medium\u0026fallback_host=tc.v14.cache1.c.youtube.com\u0026type=video%2Fmp4%3B+codecs%3D%22avc1.42001E%2C+mp4a.40.2%22\u0026itag=18,url=http%3A%2F%2Fo-o.preferred.nuq04s10.v4.lscache1.c.youtube.com%2Fvideoplayback%3Fupn%3D_7WL7XeDtjs%26sparams%3Dalgorithm%252Cburst%252Ccp%252Cfactor%252Cid%252Cip%252Cipbits%252Citag%252Csource%252Cupn%252Cexpire%26fexp%3D904001%252C907342%252C904824%252C910206%252C908620%252C907217%252C907335%252C921602%252C919306%252C922600%252C919316%252C920704%252C912804%252C913542%252C919324%252C912706%26mt%3D1339721111%26ms%3Dau%26algorithm%3Dthrottle-factor%26itag%3D5%26ip%3D207.0.0.0%26burst%3D40%26sver%3D3%26signature%3D011CB6739AB60ED79D032DE2F62EB016D8A8E462.C2C0ABE42F26DBA18F2BC6E0D074EB99A95C0DF0%26source%3Dyoutube%26expire%3D1339743583%26key%3Dyt1%26ipbits%3D8%26factor%3D1.25%26cp%3DU0hSTldPUV9NTUNOMl9PSVVGOmdTcVlPRFNNTEdM%26id%3D56ffd0bfee85d71f\u0026quality=small\u0026fallback_host=tc.v4.cache1.c.youtube.com\u0026type=video%2Fx-flv\u0026itag=5,url=http%3A%2F%2Fo-o.preferred.nuq04s10.v12.lscache3.c.youtube.com%2Fvideoplayback%3Fupn%3D_7WL7XeDtjs%26sparams%3Dalgorithm%252Cburst%252Ccp%252Cfactor%252Cid%252Cip%252Cipbits%252Citag%252Csource%252Cupn%252Cexpire%26fexp%3D904001%252C907342%252C904824%252C910206%252C908620%252C907217%252C907335%252C921602%252C919306%252C922600%252C919316%252C920704%252C912804%252C913542%252C919324%252C912706%26mt%3D1339721111%26ms%3Dau%26algorithm%3Dthrottle-factor%26itag%3D36%26ip%3D207.0.0.0%26burst%3D40%26sver%3D3%26signature%3D988FDD37CBA8DB74C1148EE17921D8549434297C.A2C1796F2BA0427C9FE370BFB6B3B09BA1D81B07%26source%3Dyoutube%26expire%3D1339743583%26key%3Dyt1%26ipbits%3D8%26factor%3D1.25%26cp%3DU0hSTldPUV9NTUNOMl9PSVVGOmdTcVlPRFNNTEdM%26id%3D56ffd0bfee85d71f\u0026quality=small\u0026fallback_host=tc.v12.cache3.c.youtube.com\u0026type=video%2F3gpp\u0026itag=36", "allow_embed": 1, "vq": "auto", "account_playback_token": "", "allow_ratings": 1, "keywords": "Rehearsal,Dance,justin,bieber,believe,as,long,you,love,me,rodney,jerkins,pattie,mallette,jeremy,dad,mom,scooter,braun,island,def,jam,usher,rbmg,making,of,the,album,webisode,june,19th,19,new,amazing,song,big,sean,hit,record,<?php echo htmlspecialchars($_user['username']); ?>,always,still,studio,singing,kuk,harrell,producer,sing,boy,guy,man,smash,single,nick,demoura,dancers,sweat,beliebers,hard,work,tour,band", "cc3_module": "http:\/\/s.ytimg.com\/yt\/swfbin\/subtitles3_module-vflu_Qeod.swf", "track_embed": 0, "is_purchased": false, "ps": "default", "fmt_list": "44\/854x480\/99\/0\/0,35\/854x480\/9\/0\/115,43\/640x360\/99\/0\/0,34\/640x360\/9\/0\/115,18\/640x360\/9\/0\/115,5\/320x240\/7\/0\/0,36\/320x240\/99\/0\/0", "author": "<?php echo htmlspecialchars($_user['username']); ?>", "muted": "0", "cc_module": "http:\/\/s.ytimg.com\/yt\/swfbin\/subtitle_module-vflq8KnSi.swf", "length_seconds": 82, "feature": "g-logo-xit", "enablejsapi": 1, "rel": 0, "plid": "AATCeEL9eg3Ls9t-", "cc_font": "Arial Unicode MS, arial, verdana, _sans", "ftoken": "", "sdetail": "f:g-logo-xit,p:\/", "status": "ok", "cc_asr": 1, "watermark": ",http:\/\/s.ytimg.com\/yt\/img\/watermark\/youtube_watermark-vflHX6b6E.png,http:\/\/s.ytimg.com\/yt\/img\/watermark\/youtube_hd_watermark-vflAzLcD6.png", "sourceid": "y", "timestamp": 1339721682, "has_cc": true, "view_count": 2600, "quality_cap": "highres", "hl": "en_US", "tmi": "1", "no_get_video_log": "1", "eurl": "http:\/\/www.youtube.com\/user\/<?php echo htmlspecialchars($_user['username']); ?>", "iurl": "http:\/\/i3.ytimg.com\/vi\//watch?v=<?php echo $video['rid']; ?>\/hqdefault.jpg", "endscreen_module": "http:\/\/s.ytimg.com\/yt\/swfbin\/endscreen-vflJBKwqC.swf", "referrer": "http:\/\/www.youtube.com\/", "avg_rating": 4.97805486284, "video_id": "/watch?v=<?php echo $video['rid']; ?>", "sendtmp": "1", "sk": "bwv_lGOGF4u1g0p7puy7ERICN8NZ5cVFC", "is_video_preview": false, "token": "vjVQa1PpcFMSYb-unvOiIgSL8pW9tObJUMfrEc1mxfE=", "thumbnail_url": "http:\/\/i3.ytimg.com\/vi\//watch?v=<?php echo $video['rid']; ?>\/default.jpg", "iurlsd": "http:\/\/i3.ytimg.com\/vi\//watch?v=<?php echo $video['rid']; ?>\/sddefault.jpg", "autoplay": "1"}, "url_v9as2": "http:\/\/s.ytimg.com\/yt\/swfbin\/cps-vflhvG6F4.swf", "params": {"allowscriptaccess": "always", "allowfullscreen": "true", "bgcolor": "#000000"}, "attrs": {"width": "640", "id": "movie_player", "height": "390"}, "url_v8": "http:\/\/s.ytimg.com\/yt\/swfbin\/cps-vflhvG6F4.swf", "html5": false}" data-video-id="/watch?v=<?php echo $video['rid']; ?>"> |
@@ -324,7 +324,7 @@ discard block |
||
324 | 324 | $stmt = $__db->prepare("SELECT * FROM videos WHERE author = :username ORDER BY id DESC LIMIT 20"); |
325 | 325 | $stmt->bindParam(":username", $_user['username']); |
326 | 326 | $stmt->execute(); |
327 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
327 | + while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
328 | 328 | ?> |
329 | 329 | <li class="blogger-video"> |
330 | 330 | <div class="video yt-tile-visible"> |
@@ -406,7 +406,7 @@ discard block |
||
406 | 406 | </div> |
407 | 407 | <hr class="yt-horizontal-rule "> |
408 | 408 | </div> |
409 | - <?php if(!empty($_user['website'])) { ?> |
|
409 | + <?php if (!empty($_user['website'])) { ?> |
|
410 | 410 | <div class="user-profile-item"> |
411 | 411 | <div class="yt-c3-profile-custom-url field-container "> |
412 | 412 | <a href="<?php echo addhttp(htmlspecialchars($_user['website'])); ?>" rel="me nofollow" target="_blank" title="<?php echo htmlspecialchars($_user['website']); ?>" class="yt-uix-redirect-link"> |
@@ -455,7 +455,7 @@ discard block |
||
455 | 455 | <h5>Country</h5> |
456 | 456 | <span class="value"><?php echo htmlspecialchars($_user['country']); ?></span> |
457 | 457 | </div> |
458 | - <?php if($_user['genre'] != "none") { ?> |
|
458 | + <?php if ($_user['genre'] != "none") { ?> |
|
459 | 459 | <div class="user-profile-item "> |
460 | 460 | <h5>Channel Genre</h5> |
461 | 461 | <span class="value"><?php echo htmlspecialchars($_user['genre']); ?></span> |
@@ -59,28 +59,28 @@ |
||
59 | 59 | require_once($_SERVER['DOCUMENT_ROOT'] . "/" . $requestedPage[1] . "/" . $requestedPage[2] . ".php"); |
60 | 60 | die(); |
61 | 61 | break; |
62 | - case 'd': |
|
63 | - if ($requestedPage[2] == "") { |
|
64 | - $requestedPage[2] = "index"; |
|
65 | - } |
|
66 | - require_once($_SERVER['DOCUMENT_ROOT'] . "/" . $requestedPage[1] . "/" . $requestedPage[2] . ".php"); |
|
67 | - die(); |
|
68 | - break; |
|
62 | + case 'd': |
|
63 | + if ($requestedPage[2] == "") { |
|
64 | + $requestedPage[2] = "index"; |
|
65 | + } |
|
66 | + require_once($_SERVER['DOCUMENT_ROOT'] . "/" . $requestedPage[1] . "/" . $requestedPage[2] . ".php"); |
|
67 | + die(); |
|
68 | + break; |
|
69 | 69 | case 'user': |
70 | 70 | $_GET['n'] = $requestedPage[2]; |
71 | 71 | require_once($_SERVER['DOCUMENT_ROOT'] . "/channel.php"); |
72 | 72 | die(); |
73 | 73 | break; |
74 | 74 | default: |
75 | - require_once($_SERVER['DOCUMENT_ROOT'] . "/s/classes/config.inc.php"); |
|
76 | - require_once($_SERVER['DOCUMENT_ROOT'] . "/s/classes/db_helper.php"); |
|
77 | - require_once($_SERVER['DOCUMENT_ROOT'] . "/s/classes/time_manip.php"); |
|
78 | - require_once($_SERVER['DOCUMENT_ROOT'] . "/s/classes/user_helper.php"); |
|
79 | - require_once($_SERVER['DOCUMENT_ROOT'] . "/s/classes/video_helper.php"); |
|
80 | - $__video_h = new video_helper($__db); |
|
81 | - $__user_h = new user_helper($__db); |
|
82 | - $__db_h = new db_helper(); |
|
83 | - $__time_h = new time_helper(); |
|
75 | + require_once($_SERVER['DOCUMENT_ROOT'] . "/s/classes/config.inc.php"); |
|
76 | + require_once($_SERVER['DOCUMENT_ROOT'] . "/s/classes/db_helper.php"); |
|
77 | + require_once($_SERVER['DOCUMENT_ROOT'] . "/s/classes/time_manip.php"); |
|
78 | + require_once($_SERVER['DOCUMENT_ROOT'] . "/s/classes/user_helper.php"); |
|
79 | + require_once($_SERVER['DOCUMENT_ROOT'] . "/s/classes/video_helper.php"); |
|
80 | + $__video_h = new video_helper($__db); |
|
81 | + $__user_h = new user_helper($__db); |
|
82 | + $__db_h = new db_helper(); |
|
83 | + $__time_h = new time_helper(); |
|
84 | 84 | |
85 | 85 | if(empty($requestedPage[1])) |
86 | 86 | require_once($_SERVER['DOCUMENT_ROOT'] . "/homepage.php"); |
@@ -3,7 +3,7 @@ discard block |
||
3 | 3 | |
4 | 4 | switch ($requestedPage[1]) { |
5 | 5 | case '2009player': |
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"); |
@@ -41,10 +41,11 @@ 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") |
|
45 | - header('Content-Type: text/css'); |
|
46 | - else |
|
47 | - header('Content-Type: ' . $mime_type); |
|
44 | + if($mime_type == "text/plain") { |
|
45 | + header('Content-Type: text/css'); |
|
46 | + } else { |
|
47 | + header('Content-Type: ' . $mime_type); |
|
48 | + } |
|
48 | 49 | echo $file; |
49 | 50 | break; |
50 | 51 | case 'inbox': |
@@ -82,10 +83,11 @@ discard block |
||
82 | 83 | $__db_h = new db_helper(); |
83 | 84 | $__time_h = new time_helper(); |
84 | 85 | |
85 | - if(empty($requestedPage[1])) |
|
86 | - require_once($_SERVER['DOCUMENT_ROOT'] . "/homepage.php"); |
|
87 | - else |
|
88 | - require_once($_SERVER['DOCUMENT_ROOT'] . "/" . $requestedPage[1] . ".php"); |
|
86 | + if(empty($requestedPage[1])) { |
|
87 | + require_once($_SERVER['DOCUMENT_ROOT'] . "/homepage.php"); |
|
88 | + } else { |
|
89 | + require_once($_SERVER['DOCUMENT_ROOT'] . "/" . $requestedPage[1] . ".php"); |
|
90 | + } |
|
89 | 91 | die(); |
90 | 92 | break; |
91 | 93 | } |
92 | 94 | \ No newline at end of file |