@@ -10,9 +10,9 @@ |
||
10 | 10 | class video_updater { |
11 | 11 | public $__db; |
12 | 12 | |
13 | - public function __construct($conn){ |
|
13 | + public function __construct($conn){ |
|
14 | 14 | $this->__db = $conn; |
15 | - } |
|
15 | + } |
|
16 | 16 | |
17 | 17 | function update_row($video, $rowName, $new) { |
18 | 18 | $stmt = $this->__db->prepare("UPDATE videos SET ".$rowName." = :new WHERE rid = :rid"); |
@@ -10,12 +10,12 @@ |
||
10 | 10 | class video_updater { |
11 | 11 | public $__db; |
12 | 12 | |
13 | - public function __construct($conn){ |
|
13 | + public function __construct($conn) { |
|
14 | 14 | $this->__db = $conn; |
15 | 15 | } |
16 | 16 | |
17 | 17 | function update_row($video, $rowName, $new) { |
18 | - $stmt = $this->__db->prepare("UPDATE videos SET ".$rowName." = :new WHERE rid = :rid"); |
|
18 | + $stmt = $this->__db->prepare("UPDATE videos SET " . $rowName . " = :new WHERE rid = :rid"); |
|
19 | 19 | $stmt->bindParam(":new", $new); |
20 | 20 | $stmt->bindParam(":rid", $video); |
21 | 21 | $stmt->execute(); |
@@ -184,7 +184,7 @@ discard block |
||
184 | 184 | <!--<button class="yt-uix-button yt-uix-button-default" id="av-uplod">Select File</button>--> |
185 | 185 | </div><br><br> |
186 | 186 | <img src="/dynamic/pfp/<?php echo $_user['pfp']; ?>" style="width:100px;height:100px;"><br> |
187 | - <?php if($_user['pfp'] != "default.png") { ?> |
|
187 | + <?php if ($_user['pfp'] != "default.png") { ?> |
|
188 | 188 | <a href="/get/remove_profile_pic">Remove Profile Picture</a><br> |
189 | 189 | <?php } ?> |
190 | 190 | <br><hr class="thin-line-darker" style="width:unset;"> |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | <input style="width: 169px;position: relative;top: 10px;" type="file" name="videopagebanner" id="avatar-upload"> |
194 | 194 | <!--<button class="yt-uix-button yt-uix-button-default" id="av-uplod">Select File</button>--> |
195 | 195 | </div><br> |
196 | - <?php if(!empty($_user['subbutton'])) { ?> |
|
196 | + <?php if (!empty($_user['subbutton'])) { ?> |
|
197 | 197 | <a href="/get/remove_watch_banner">Remove Watch Page Banner</a><br> |
198 | 198 | <?php } ?><br><hr class="thin-line-darker" style="width:unset;"> |
199 | 199 | |
@@ -213,12 +213,12 @@ discard block |
||
213 | 213 | |
214 | 214 | <b>Featured Vid</b> |
215 | 215 | <div class="customization-module" id="featuredvid" action="/d/channel_update" enctype="multipart/form-data" style="display: inline-block;float:right;position: relative;bottom: 6px;"> |
216 | - <input style="padding: 5px;background-color: white;border: 1px solid #999;width: 291px;height: 12px;" id="biomd" placeholder="Video ID" value="<?php echo htmlspecialchars($_user['featured']);?>" name="videoid"> |
|
216 | + <input style="padding: 5px;background-color: white;border: 1px solid #999;width: 291px;height: 12px;" id="biomd" placeholder="Video ID" value="<?php echo htmlspecialchars($_user['featured']); ?>" name="videoid"> |
|
217 | 217 | </div><br><br><hr class="thin-line-darker" style="width:unset;"> |
218 | 218 | |
219 | 219 | <b>Website</b> |
220 | 220 | <div class="customization-module" id="featuredvid" action="/d/channel_update" enctype="multipart/form-data" style="float: right;position: relative;top: -7px;"> |
221 | - <input style="padding: 5px;background-color: white;border: 1px solid #999;width: 291px;height: 12px;" id="biomd" placeholder="Website URL" value="<?php echo htmlspecialchars($_user['website']);?>" name="website"> |
|
221 | + <input style="padding: 5px;background-color: white;border: 1px solid #999;width: 291px;height: 12px;" id="biomd" placeholder="Website URL" value="<?php echo htmlspecialchars($_user['website']); ?>" name="website"> |
|
222 | 222 | |
223 | 223 | </div><br><br><hr class="thin-line-darker" style="width:unset;"> |
224 | 224 | |
@@ -227,7 +227,7 @@ discard block |
||
227 | 227 | <span style="font-size: 11px;" class="grey-text">This will show what type of channel you are to other users.</span> |
228 | 228 | <div class="customization-module" id="channellayout" action="/d/channel_update" enctype="multipart/form-data" style="float: right;position: relative;top: -19px;"> |
229 | 229 | <select class="yt-uix-button yt-uix-button-default" style="position:relative;top:6px;" name="genre"> |
230 | - <?php foreach($categories as $category) { ?> |
|
230 | + <?php foreach ($categories as $category) { ?> |
|
231 | 231 | <option value="<?php echo $category; ?>"><?php echo $category; ?></option> |
232 | 232 | <?php } ?> |
233 | 233 | </select> |
@@ -5,7 +5,7 @@ discard block |
||
5 | 5 | <a id="logo-container" href="/" title="YouTube home"> |
6 | 6 | <img id="logo" src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="YouTube home"> |
7 | 7 | </a> |
8 | - <?php if(!isset($_SESSION['siteusername'])) { ?> |
|
8 | + <?php if (!isset($_SESSION['siteusername'])) { ?> |
|
9 | 9 | <div id="yt-masthead-signin"> |
10 | 10 | <a style="color: white; text-decoration: none;" href="/sign_in"> |
11 | 11 | <button type="button" class=" yt-uix-button yt-uix-button-primary yt-uix-button-size-default" href="/sign_up" role="button"> |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | <span id="yt-masthead-user-displayname" dir="ltr" class="yt-valign-container" onclick="yt.www.masthead.toggleExpandedMasthead();"> |
21 | 21 | <?php echo htmlspecialchars($_SESSION['siteusername']); ?> |
22 | 22 | </span> |
23 | - <?php if($__user_h->fetch_unread_pms($_SESSION['siteusername']) != 0) { ?> |
|
23 | + <?php if ($__user_h->fetch_unread_pms($_SESSION['siteusername']) != 0) { ?> |
|
24 | 24 | <a style="position:relative;top:1px;color: white;text-decoration: none;background-color: #d54343;padding: 7px;padding-left: 10px;margin-right: 12px;display: inline;" href="/inbox/"> |
25 | 25 | <?php echo $__user_h->fetch_unread_pms($_SESSION['siteusername']); ?> |
26 | 26 | </a> |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | </div> |
58 | 58 | </div> |
59 | 59 | </div> |
60 | -<?php if(isset($_SESSION['siteusername'])) { ?> |
|
60 | +<?php if (isset($_SESSION['siteusername'])) { ?> |
|
61 | 61 | <div id="masthead-expanded" class="hid" style="display: none;"> |
62 | 62 | <div id="masthead-expanded-container" class="with-sandbar"> |
63 | 63 | <div id="masthead-expanded-menus-container"> |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | <?php } ?> |
180 | 180 | </div> |
181 | 181 | <div id="alerts"> |
182 | - <?php if(isset($error['status'])) { ?> |
|
182 | + <?php if (isset($error['status'])) { ?> |
|
183 | 183 | <div id="masthead_child_div"><div class="yt-alert yt-alert-default yt-alert-error yt-alert-player"> <div class="yt-alert-icon"> |
184 | 184 | <img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" class="icon master-sprite" alt="Alert icon"> |
185 | 185 | </div> |
@@ -189,7 +189,7 @@ discard block |
||
189 | 189 | </div> |
190 | 190 | </div></div></div> |
191 | 191 | <?php } ?> |
192 | - <?php if(isset($_GET['error'])) { ?> |
|
192 | + <?php if (isset($_GET['error'])) { ?> |
|
193 | 193 | <div id="masthead_child_div"><div class="yt-alert yt-alert-default yt-alert-error "> <div class="yt-alert-icon"> |
194 | 194 | <img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" class="icon master-sprite" alt="Alert icon"> |
195 | 195 | </div> |
@@ -199,7 +199,7 @@ discard block |
||
199 | 199 | </div> |
200 | 200 | </div></div></div> |
201 | 201 | <?php } ?> |
202 | - <?php if(isset($_SESSION['error'])) { ?> |
|
202 | + <?php if (isset($_SESSION['error'])) { ?> |
|
203 | 203 | <div id="masthead_child_div"><div class="yt-alert yt-alert-default yt-alert-error"> <div class="yt-alert-icon"> |
204 | 204 | <img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" class="icon master-sprite" alt="Alert icon"> |
205 | 205 | </div> |
@@ -18,7 +18,7 @@ |
||
18 | 18 | $video = $_video_fetch_utils->fetch_video_rid($video_response['toid']); |
19 | 19 | ?> |
20 | 20 | <?php |
21 | -if($video['author'] == $_SESSION['siteusername']) { |
|
21 | +if ($video['author'] == $_SESSION['siteusername']) { |
|
22 | 22 | $stmt = $conn->prepare("DELETE FROM video_response WHERE id = ?"); |
23 | 23 | $stmt->bind_param("s", $_GET['id']); |
24 | 24 | $stmt->execute(); |
@@ -20,13 +20,13 @@ |
||
20 | 20 | $name = $friend['reciever']; |
21 | 21 | $sender = $friend['sender']; |
22 | 22 | |
23 | -if($name != $_SESSION['siteusername']) { |
|
23 | +if ($name != $_SESSION['siteusername']) { |
|
24 | 24 | $doesnotown = true; |
25 | -} else if($sender != $_SESSION['siteusername']) { |
|
25 | +} else if ($sender != $_SESSION['siteusername']) { |
|
26 | 26 | $doesnotown2 = true; |
27 | 27 | } |
28 | 28 | |
29 | -if(!isset($_GET['id'])) { |
|
29 | +if (!isset($_GET['id'])) { |
|
30 | 30 | die("ID is not set"); |
31 | 31 | } |
32 | 32 |
@@ -17,7 +17,7 @@ |
||
17 | 17 | $comment = $_user_fetch_utils->fetch_profile_comment_id($_GET['id']); |
18 | 18 | ?> |
19 | 19 | <?php |
20 | -if($comment['toid'] == $_SESSION['siteusername']) { |
|
20 | +if ($comment['toid'] == $_SESSION['siteusername']) { |
|
21 | 21 | $stmt = $conn->prepare("DELETE FROM profile_comments WHERE id = ?"); |
22 | 22 | $stmt->bind_param("s", $_GET['id']); |
23 | 23 | $stmt->execute(); |
@@ -4,15 +4,15 @@ |
||
4 | 4 | <?php require_once($_SERVER['DOCUMENT_ROOT'] . "/static/lib/new/fetch.php"); ?> |
5 | 5 | <?php require_once($_SERVER['DOCUMENT_ROOT'] . "/static/lib/new/insert.php"); ?> |
6 | 6 | <?php |
7 | - $_user_fetch_utils = new user_fetch_utils(); |
|
8 | - $_user_insert_utils = new user_insert_utils(); |
|
9 | - $_video_fetch_utils = new video_fetch_utils(); |
|
10 | - $_base_utils = new config_setup(); |
|
7 | + $_user_fetch_utils = new user_fetch_utils(); |
|
8 | + $_user_insert_utils = new user_insert_utils(); |
|
9 | + $_video_fetch_utils = new video_fetch_utils(); |
|
10 | + $_base_utils = new config_setup(); |
|
11 | 11 | |
12 | - $_base_utils->initialize_db_var($conn); |
|
13 | - $_video_fetch_utils->initialize_db_var($conn); |
|
14 | - $_user_insert_utils->initialize_db_var($conn); |
|
15 | - $_user_fetch_utils->initialize_db_var($conn); |
|
12 | + $_base_utils->initialize_db_var($conn); |
|
13 | + $_video_fetch_utils->initialize_db_var($conn); |
|
14 | + $_user_insert_utils->initialize_db_var($conn); |
|
15 | + $_user_fetch_utils->initialize_db_var($conn); |
|
16 | 16 | ?> |
17 | 17 | <?php |
18 | 18 | $name = $_GET['v']; |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | <?php |
18 | 18 | $name = $_GET['v']; |
19 | 19 | |
20 | -if(!isset($_SESSION['siteusername']) || !isset($_GET['v'])) { |
|
20 | +if (!isset($_SESSION['siteusername']) || !isset($_GET['v'])) { |
|
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 === 1) { |
|
28 | + if ($result->num_rows === 1) { |
|
29 | 29 | $_user_insert_utils->remove_like_video($_SESSION['siteusername'], $name); |
30 | 30 | } |
31 | 31 | |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | $stmt->bind_param("ss", $_SESSION['siteusername'], $name); |
34 | 34 | $stmt->execute(); |
35 | 35 | $result = $stmt->get_result(); |
36 | - if($result->num_rows === 1) { |
|
36 | + if ($result->num_rows === 1) { |
|
37 | 37 | $_user_insert_utils->remove_like_video($_SESSION['siteusername'], $name); |
38 | 38 | } else { |
39 | 39 | $_user_insert_utils->add_dislike_video($_SESSION['siteusername'], $name); |
@@ -19,7 +19,7 @@ |
||
19 | 19 | |
20 | 20 | $name = $friend['reciever']; |
21 | 21 | |
22 | -if($name != $_SESSION['siteusername'] || !isset($_GET['id'])) { |
|
22 | +if ($name != $_SESSION['siteusername'] || !isset($_GET['id'])) { |
|
23 | 23 | die("You are not logged in or you did not put in an argument"); |
24 | 24 | } |
25 | 25 |
@@ -5,17 +5,17 @@ |
||
5 | 5 | <?php require_once($_SERVER['DOCUMENT_ROOT'] . "/static/lib/new/fetch.php"); ?> |
6 | 6 | <?php require_once($_SERVER['DOCUMENT_ROOT'] . "/static/lib/new/insert.php"); ?> |
7 | 7 | <?php |
8 | - $_user_fetch_utils = new user_fetch_utils(); |
|
9 | - $_user_insert_utils = new user_insert_utils(); |
|
10 | - $_video_fetch_utils = new video_fetch_utils(); |
|
11 | - $_user_delete_utils = new user_delete_utils(); |
|
12 | - $_base_utils = new config_setup(); |
|
8 | + $_user_fetch_utils = new user_fetch_utils(); |
|
9 | + $_user_insert_utils = new user_insert_utils(); |
|
10 | + $_video_fetch_utils = new video_fetch_utils(); |
|
11 | + $_user_delete_utils = new user_delete_utils(); |
|
12 | + $_base_utils = new config_setup(); |
|
13 | 13 | |
14 | - $_base_utils->initialize_db_var($conn); |
|
15 | - $_video_fetch_utils->initialize_db_var($conn); |
|
16 | - $_user_insert_utils->initialize_db_var($conn); |
|
17 | - $_user_fetch_utils->initialize_db_var($conn); |
|
18 | - $_user_delete_utils->initialize_db_var($conn); |
|
14 | + $_base_utils->initialize_db_var($conn); |
|
15 | + $_video_fetch_utils->initialize_db_var($conn); |
|
16 | + $_user_insert_utils->initialize_db_var($conn); |
|
17 | + $_user_fetch_utils->initialize_db_var($conn); |
|
18 | + $_user_delete_utils->initialize_db_var($conn); |
|
19 | 19 | ?> |
20 | 20 | <?php |
21 | 21 | $name = $_GET['id']; |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | <?php |
21 | 21 | $name = $_GET['id']; |
22 | 22 | |
23 | -if(!isset($_SESSION['siteusername']) || !isset($_GET['id'])) { |
|
23 | +if (!isset($_SESSION['siteusername']) || !isset($_GET['id'])) { |
|
24 | 24 | die("You are not logged in or you did not put in an argument"); |
25 | 25 | } |
26 | 26 | |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | $stmt->bind_param("ss", $_SESSION['siteusername'], $name); |
29 | 29 | $stmt->execute(); |
30 | 30 | $result = $stmt->get_result(); |
31 | - if($result->num_rows === 1) { |
|
31 | + if ($result->num_rows === 1) { |
|
32 | 32 | $_user_delete_utils->remove_comment_like($_SESSION['siteusername'], $name); |
33 | 33 | } |
34 | 34 | |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | $stmt->bind_param("ss", $_SESSION['siteusername'], $name); |
37 | 37 | $stmt->execute(); |
38 | 38 | $result = $stmt->get_result(); |
39 | - if($result->num_rows === 1) { |
|
39 | + if ($result->num_rows === 1) { |
|
40 | 40 | $_user_delete_utils->remove_comment_like($_SESSION['siteusername'], $name); |
41 | 41 | } else { |
42 | 42 | $_user_insert_utils->add_comment_dislike($_SESSION['siteusername'], $name); |