@@ -8,7 +8,7 @@ discard block |
||
8 | 8 | <?php $__user_u = new user_update($__db); ?> |
9 | 9 | <?php $__db_h = new db_helper(); ?> |
10 | 10 | <?php $__time_h = new time_helper(); ?> |
11 | -<?php if(!isset($_SESSION['siteusername'])) { header("Location: /sign_in"); } ?> |
|
11 | +<?php if (!isset($_SESSION['siteusername'])) { header("Location: /sign_in"); } ?> |
|
12 | 12 | <?php |
13 | 13 | $__server->page_embeds->page_title = "SubRocks - Sent Messages"; |
14 | 14 | $__server->page_embeds->page_description = "SubRocks is a site dedicated to bring back the 2012 layout of YouTube."; |
@@ -169,15 +169,15 @@ discard block |
||
169 | 169 | $stmt->execute(); |
170 | 170 | |
171 | 171 | $number_of_result = $stmt->rowCount(); |
172 | - $number_of_page = ceil ($number_of_result / $results_per_page); |
|
172 | + $number_of_page = ceil($number_of_result/$results_per_page); |
|
173 | 173 | |
174 | - if (!isset ($_GET['page']) ) { |
|
174 | + if (!isset ($_GET['page'])) { |
|
175 | 175 | $page = 1; |
176 | 176 | } else { |
177 | - $page = (int)$_GET['page']; |
|
177 | + $page = (int) $_GET['page']; |
|
178 | 178 | } |
179 | 179 | |
180 | - $page_first_result = ($page - 1) * $results_per_page; |
|
180 | + $page_first_result = ($page - 1)*$results_per_page; |
|
181 | 181 | |
182 | 182 | $stmt6 = $__db->prepare("SELECT * FROM pms WHERE owner = :search ORDER BY id DESC LIMIT :pfirst, :pper"); |
183 | 183 | $stmt6->bindParam(":search", $search); |
@@ -202,8 +202,8 @@ discard block |
||
202 | 202 | </tr> |
203 | 203 | |
204 | 204 | <?php |
205 | - while($inbox = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
206 | - if($__video_h->video_exists($inbox['video_attribute'])) { |
|
205 | + while ($inbox = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
206 | + if ($__video_h->video_exists($inbox['video_attribute'])) { |
|
207 | 207 | $inbox['video'] = $__video_h->fetch_video_rid($inbox['video_attribute']); |
208 | 208 | $inbox['video_attr_exists'] = true; |
209 | 209 | |
@@ -217,7 +217,7 @@ discard block |
||
217 | 217 | ?> |
218 | 218 | <tr style="margin-top: 5px;" id="videoslist"> |
219 | 219 | <!-- |
220 | - <?php if($inbox['readed'] == "n") { ?> |
|
220 | + <?php if ($inbox['readed'] == "n") { ?> |
|
221 | 221 | <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/"> |
222 | 222 | NEW |
223 | 223 | </a> |
@@ -240,7 +240,7 @@ discard block |
||
240 | 240 | <td class="video-manager-stats" style="background: none;padding-left: 8px;"> |
241 | 241 | <h3><?php echo htmlspecialchars($inbox['subject']); ?></h3> |
242 | 242 | <?php echo $__video_h->shorten_description($inbox['message'], 300, true); ?> |
243 | - <?php if($inbox['video_attr_exists']) { ?> |
|
243 | + <?php if ($inbox['video_attr_exists']) { ?> |
|
244 | 244 | <hr> |
245 | 245 | <ul> |
246 | 246 | <li class="video-list-item "><a href="/watch?v=<?php echo $inbox['video']['rid']; ?>" class="video-list-item-link yt-uix-sessionlink" data-sessionlink="ei=CNLr3rbS3rICFSwSIQodSW397Q%3D%3D&feature=g-sptl%26cid%3Dinp-hs-ytg"><span class="ux-thumb-wrap contains-addto "><span class="video-thumb ux-thumb yt-thumb-default-120 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="http://s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="<?php echo $inbox['video']['title']; ?>" data-thumb="/dynamic/thumbs/<?php echo $inbox['video']['thumbnail']; ?>" width="120"><span class="vertical-align"></span></span></span></span><span class="video-time"><?php echo $inbox['video']['duration']; ?></span> |
@@ -267,7 +267,7 @@ discard block |
||
267 | 267 | </div> |
268 | 268 | </center><br> |
269 | 269 | |
270 | - <?php for($page = 1; $page<= $number_of_page; $page++) { ?> |
|
270 | + <?php for ($page = 1; $page <= $number_of_page; $page++) { ?> |
|
271 | 271 | <button class="yt-uix-button yt-uix-button-default" onclick="ajax_fetch(<?php echo $page; ?>)"><?php echo $page; ?></button> |
272 | 272 | <?php } ?> |
273 | 273 | |
@@ -291,7 +291,7 @@ discard block |
||
291 | 291 | </script> |
292 | 292 | |
293 | 293 | <?php |
294 | - if($stmt6->rowCount() == 0) { echo " |
|
294 | + if ($stmt6->rowCount() == 0) { echo " |
|
295 | 295 | You currently have no sent messages in your inbox. |
296 | 296 | "; |
297 | 297 | } ?> |
@@ -8,7 +8,7 @@ discard block |
||
8 | 8 | <?php $__db_h = new db_helper(); ?> |
9 | 9 | <?php $__time_h = new time_helper(); ?> |
10 | 10 | <?php |
11 | -if(!isset($_SESSION['siteusername'])) |
|
11 | +if (!isset($_SESSION['siteusername'])) |
|
12 | 12 | header('Location: ' . $_SERVER['HTTP_REFERER'] . '&error=You have to be logged in to report videos.'); |
13 | 13 | |
14 | 14 | $_video = $__video_h->fetch_video_rid($_GET['v']); |
@@ -21,17 +21,17 @@ discard block |
||
21 | 21 | "username" => str_replace("@", "", $_SESSION['siteusername']), |
22 | 22 | // "avatar_url" => "https://subrock.rocks/dynamic/pfp/", |
23 | 23 | "tts" => false, |
24 | -], JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE ); |
|
24 | +], JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); |
|
25 | 25 | |
26 | -$ch = curl_init( $webhookurl ); |
|
27 | -curl_setopt( $ch, CURLOPT_HTTPHEADER, array('Content-type: application/json')); |
|
28 | -curl_setopt( $ch, CURLOPT_POST, 1); |
|
29 | -curl_setopt( $ch, CURLOPT_POSTFIELDS, $json_data); |
|
30 | -curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, 1); |
|
31 | -curl_setopt( $ch, CURLOPT_HEADER, 0); |
|
32 | -curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1); |
|
26 | +$ch = curl_init($webhookurl); |
|
27 | +curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-type: application/json')); |
|
28 | +curl_setopt($ch, CURLOPT_POST, 1); |
|
29 | +curl_setopt($ch, CURLOPT_POSTFIELDS, $json_data); |
|
30 | +curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); |
|
31 | +curl_setopt($ch, CURLOPT_HEADER, 0); |
|
32 | +curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); |
|
33 | 33 | |
34 | -$response = curl_exec( $ch ); |
|
35 | -curl_close( $ch ); |
|
34 | +$response = curl_exec($ch); |
|
35 | +curl_close($ch); |
|
36 | 36 | header('Location: ' . $_SERVER['HTTP_REFERER'] . '&success=Successfully reported this video.'); |
37 | 37 | ?> |
38 | 38 | \ No newline at end of file |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | <div id="content"> |
43 | 43 | <div class="guide-layout-container enable-fancy-subscribe-button"> |
44 | 44 | <div class="guide-container"> |
45 | - <?php if(!isset($_SESSION['siteusername'])) { ?> |
|
45 | + <?php if (!isset($_SESSION['siteusername'])) { ?> |
|
46 | 46 | <div id="guide-builder-promo"> |
47 | 47 | <h2> |
48 | 48 | Sign in to add channels to your homepage |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | </div> |
62 | 62 | <div class="guide"> |
63 | 63 | <?php |
64 | - if(isset($_SESSION['siteusername'])) { |
|
64 | + if (isset($_SESSION['siteusername'])) { |
|
65 | 65 | ?> |
66 | 66 | <div style="/*! margin-top: 0px; *//*! margin-left: 10px; *//*! margin-bottom: 13px; */height: 99px;" class="guide-section feed-header channel first"><img alt="" src="/dynamic/pfp/<?php echo $__user_h->fetch_pfp($_SESSION['siteusername']); ?>" style="height: 88px;position: relative;top: 4px;left: 4px;" class="feed-header-thumb channel-thumb" width="88px"><div id="links" style="/*! margin-left: 5px; */position: relative;left: 13px;top: 7px;"><div style="font-size: 11px;margin-bottom: 6px;" class="metadata"> |
67 | 67 | <a href="/user/<?php echo htmlspecialchars($_SESSION['siteusername']); ?>" style="color: inherit;">My channel |
@@ -172,8 +172,8 @@ discard block |
||
172 | 172 | </span> |
173 | 173 | </a> |
174 | 174 | </li> |
175 | - <?php if(!isset($_SESSION['siteusername'])) { ?> |
|
176 | - <?php foreach($__server->featured_channels as $channel) { ?> |
|
175 | + <?php if (!isset($_SESSION['siteusername'])) { ?> |
|
176 | + <?php foreach ($__server->featured_channels as $channel) { ?> |
|
177 | 177 | <li class="guide-item-container "> |
178 | 178 | <a class="guide-item" data-external-id="<?php echo htmlspecialchars($channel); ?>" data-feed-name="<?php echo htmlspecialchars($channel); ?>" data-feed-type="user"> |
179 | 179 | <span class="thumb"> <span class="video-thumb ux-thumb yt-thumb-square-28 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="http://s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Thumbnail" onerror="this.onerror=null;this.src='/dynamic/thumbs/default.jpg';" data-thumb="/dynamic/pfp/<?php echo $__user_h->fetch_pfp($channel); ?>" width="28"><span class="vertical-align"></span></span></span></span> |
@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | $stmt = $__db->prepare("SELECT * FROM subscribers WHERE sender = :username ORDER BY id DESC LIMIT 20"); |
189 | 189 | $stmt->bindParam(":username", $_SESSION['siteusername']); |
190 | 190 | $stmt->execute(); |
191 | - while($channel = $stmt->fetch(PDO::FETCH_ASSOC)) { $channel = $channel['reciever']; ?> |
|
191 | + while ($channel = $stmt->fetch(PDO::FETCH_ASSOC)) { $channel = $channel['reciever']; ?> |
|
192 | 192 | <li class="guide-item-container "> |
193 | 193 | <a class="guide-item" data-external-id="<?php echo htmlspecialchars($channel); ?>" data-feed-name="<?php echo htmlspecialchars($channel); ?>" data-feed-type="user"> |
194 | 194 | <span class="thumb"> <span class="video-thumb ux-thumb yt-thumb-square-28 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="http://s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Thumbnail" onerror="this.onerror=null;this.src='/dynamic/thumbs/default.jpg';" data-thumb="/dynamic/pfp/<?php echo $__user_h->fetch_pfp($channel); ?>" width="28"><span class="vertical-align"></span></span></span></span> |
@@ -227,7 +227,7 @@ discard block |
||
227 | 227 | <?php |
228 | 228 | $stmt = $__db->prepare("SELECT * FROM videos WHERE visibility = 'n' ORDER BY rand() LIMIT 4"); |
229 | 229 | $stmt->execute(); |
230 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
230 | + while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
231 | 231 | $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
232 | 232 | $video['duration'] = $__time_h->timestamp($video['duration']); |
233 | 233 | $video['views'] = $__video_h->fetch_video_views($video['rid']); |
@@ -250,7 +250,7 @@ discard block |
||
250 | 250 | <?php |
251 | 251 | $stmt = $__db->prepare("SELECT * FROM videos WHERE featured = 'v' AND visibility = 'n' ORDER BY id DESC LIMIT 4"); |
252 | 252 | $stmt->execute(); |
253 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
253 | + while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
254 | 254 | $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
255 | 255 | $video['duration'] = $__time_h->timestamp($video['duration']); |
256 | 256 | $video['views'] = $__video_h->fetch_video_views($video['rid']); |
@@ -283,7 +283,7 @@ discard block |
||
283 | 283 | <?php |
284 | 284 | $stmt = $__db->prepare("SELECT * FROM videos WHERE visibility = 'n' ORDER BY id DESC LIMIT 20"); |
285 | 285 | $stmt->execute(); |
286 | - while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
286 | + while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
287 | 287 | $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
288 | 288 | $video['duration'] = $__time_h->timestamp($video['duration']); |
289 | 289 | $video['views'] = $__video_h->fetch_video_views($video['rid']); |
@@ -286,7 +286,7 @@ discard block |
||
286 | 286 | </script> |
287 | 287 | <!--<button class="yt-uix-button yt-uix-button-default" id="av-uplod">Select File</button>--> |
288 | 288 | <img src="/dynamic/pfp/<?php echo $_user['pfp']; ?>" style="width:100px;height:100px;"><br> |
289 | - <?php if($_user['pfp'] != "default.png") { ?> |
|
289 | + <?php if ($_user['pfp'] != "default.png") { ?> |
|
290 | 290 | <a href="/get/remove_profile_pic">Remove Profile Picture</a><br> |
291 | 291 | <?php } ?> |
292 | 292 | <br><hr class="thin-line-darker" style="width:unset;"> |
@@ -296,7 +296,7 @@ discard block |
||
296 | 296 | <input style="width: 169px;position: relative;top: 10px;" type="file" name="videopagebanner" id="avatar-upload"> |
297 | 297 | <button class="yt-uix-button yt-uix-button-default" id="av-uplod">Select File</button> |
298 | 298 | </div><br> |
299 | - <?php if(!empty($_user['subbutton'])) { ?> |
|
299 | + <?php if (!empty($_user['subbutton'])) { ?> |
|
300 | 300 | <a href="/get/remove_watch_banner">Remove Watch Page Banner</a><br> |
301 | 301 | <?php } ?><br><hr class="thin-line-darker" style="width:unset;"> |
302 | 302 | |
@@ -322,19 +322,19 @@ discard block |
||
322 | 322 | |
323 | 323 | <b>Featured Video</b> |
324 | 324 | <div class="customization-module" id="featuredvid" action="/d/channel_update" enctype="multipart/form-data" style="display: inline-block;float:right;position: relative;bottom: 6px;"> |
325 | - <input class="yt-uix-form-input-text" style="width: 291px;" id="biomd" placeholder="Video ID" value="<?php echo htmlspecialchars($_user['featured']);?>" name="videoid"> |
|
325 | + <input class="yt-uix-form-input-text" style="width: 291px;" id="biomd" placeholder="Video ID" value="<?php echo htmlspecialchars($_user['featured']); ?>" name="videoid"> |
|
326 | 326 | </div><br><br><hr class="thin-line-darker" style="width:unset;"> |
327 | 327 | |
328 | 328 | <div style="position: relative;top: 7px;"> |
329 | 329 | <b>Featured Channels</b> |
330 | 330 | <div class="customization-module" id="featuredvid" action="/d/channel_update" enctype="multipart/form-data" style="display: inline-block;float:right;position: relative;bottom: 6px;"> |
331 | - <input class="yt-uix-form-input-text" style="width: 291px;" id="biomd" placeholder="Seperate by commas!" value="<?php echo htmlspecialchars($_user['featured_channels']);?>" name="featuredchannels"> |
|
331 | + <input class="yt-uix-form-input-text" style="width: 291px;" id="biomd" placeholder="Seperate by commas!" value="<?php echo htmlspecialchars($_user['featured_channels']); ?>" name="featuredchannels"> |
|
332 | 332 | </div> |
333 | 333 | </div><br><br><hr class="thin-line-darker" style="margin-top: 0px;width:unset;"><br> |
334 | 334 | |
335 | 335 | <b>Website</b> |
336 | 336 | <div class="customization-module" id="featuredvid" action="/d/channel_update" enctype="multipart/form-data" style="float: right;position: relative;top: -7px;"> |
337 | - <input class="yt-uix-form-input-text" style="width: 291px;" id="biomd" placeholder="Website URL" value="<?php echo htmlspecialchars($_user['website']);?>" name="website"> |
|
337 | + <input class="yt-uix-form-input-text" style="width: 291px;" id="biomd" placeholder="Website URL" value="<?php echo htmlspecialchars($_user['website']); ?>" name="website"> |
|
338 | 338 | |
339 | 339 | </div><br><br><hr class="thin-line-darker" style="width:unset;"> |
340 | 340 | |
@@ -344,7 +344,7 @@ discard block |
||
344 | 344 | <span style="font-size: 11px;" class="grey-text">This will show what type of channel you are to other users.</span> |
345 | 345 | <div class="customization-module" id="channellayout" action="/d/channel_update" enctype="multipart/form-data" style="float: right;position: relative;top: -19px;"> |
346 | 346 | <select class="yt-uix-button yt-uix-button-default" style="position:relative;top:6px;" name="genre"> |
347 | - <?php foreach($categories as $category) { ?> |
|
347 | + <?php foreach ($categories as $category) { ?> |
|
348 | 348 | <option value="<?php echo $category; ?>"><?php echo $category; ?></option> |
349 | 349 | <?php } ?> |
350 | 350 | </select> |
@@ -358,7 +358,7 @@ discard block |
||
358 | 358 | <select class="yt-uix-button yt-uix-button-default" style="position:relative;top:6px;" name="transparency"> |
359 | 359 | <?php |
360 | 360 | $trans = array( |
361 | - "1.1","1.0","0.9","0.8","0.7","0.6","0.5","0.4","0.3","0.2","0.1", |
|
361 | + "1.1", "1.0", "0.9", "0.8", "0.7", "0.6", "0.5", "0.4", "0.3", "0.2", "0.1", |
|
362 | 362 | ); |
363 | 363 | ?> |
364 | 364 | <option value="1.0">100% (Visible)</option> |
@@ -381,12 +381,12 @@ discard block |
||
381 | 381 | <select class="yt-uix-button yt-uix-button-default" style="position:relative;top:6px;" id="country" name="country" value="<?php echo $_user['country']?>"> |
382 | 382 | <?php |
383 | 383 | $countries = array( |
384 | - "Select country","Afghanistan", "Albania", "Algeria", "American Samoa", "Andorra", "Angola", "Anguilla", "Antarctica", "Antigua and Barbuda", "Argentina", "Armenia", "Aruba", "Australia", "Austria", "Azerbaijan", "Bahamas", "Bahrain", "Bangladesh", "Barbados", "Belarus", "Belgium", "Belize", "Benin", "Bermuda", "Bhutan", "Bolivia", "Bosnia and Herzegowina", "Botswana", "Bouvet Island", "Brazil", "British Indian Ocean Territory", "Brunei Darussalam", "Bulgaria", "Burkina Faso", "Burundi", "Cambodia", "Cameroon", "Canada", "Cape Verde", "Cayman Islands", "Central African Republic", "Chad", "Chile", "China", "Christmas Island", "Cocos (Keeling) Islands", "Colombia", "Comoros", "Congo", "Congo, the Democratic Republic of the", "Cook Islands", "Costa Rica", "Cote d'Ivoire", "Croatia (Hrvatska)", "Cuba", "Cyprus", "Czech Republic", "Denmark", "Djibouti", "Dominica", "Dominican Republic", "East Timor", "Ecuador", "Egypt", "El Salvador", "Equatorial Guinea", "Eritrea", "Estonia", "Ethiopia", "Falkland Islands (Malvinas)", "Faroe Islands", "Fiji", "Finland", "France", "France Metropolitan", "French Guiana", "French Polynesia", "French Southern Territories", "Gabon", "Gambia", "Georgia", "Germany", "Ghana", "Gibraltar", "Greece", "Greenland", "Grenada", "Guadeloupe", "Guam", "Guatemala", "Guinea", "Guinea-Bissau", "Guyana", "Haiti", "Heard and Mc Donald Islands", "Holy See (Vatican City State)", "Honduras", "Hong Kong", "Hungary", "Iceland", "India", "Indonesia", "Iran (Islamic Republic of)", "Iraq", "Ireland", "Israel", "Italy", "Jamaica", "Japan", "Jordan", "Kazakhstan", "Kenya", "Kiribati", "Korea, Democratic People's Republic of", "Korea, Republic of", "Kuwait", "Kyrgyzstan", "Lao, People's Democratic Republic", "Latvia", "Lebanon", "Lesotho", "Liberia", "Libyan Arab Jamahiriya", "Liechtenstein", "Lithuania", "Luxembourg", "Macau", "Macedonia, The Former Yugoslav Republic of", "Madagascar", "Malawi", "Malaysia", "Maldives", "Mali", "Malta", "Marshall Islands", "Martinique", "Mauritania", "Mauritius", "Mayotte", "Mexico", "Micronesia, Federated States of", "Moldova, Republic of", "Monaco", "Mongolia", "Montserrat", "Morocco", "Mozambique", "Myanmar", "Namibia", "Nauru", "Nepal", "Netherlands", "Netherlands Antilles", "New Caledonia", "New Zealand", "Nicaragua", "Niger", "Nigeria", "Niue", "Norfolk Island", "Northern Mariana Islands", "Norway", "Oman", "Pakistan", "Palau", "Panama", "Papua New Guinea", "Paraguay", "Peru", "Philippines", "Pitcairn", "Poland", "Portugal", "Puerto Rico", "Qatar", "Reunion", "Romania", "Russian Federation", "Rwanda", "Saint Kitts and Nevis", "Saint Lucia", "Saint Vincent and the Grenadines", "Samoa", "San Marino", "Sao Tome and Principe", "Saudi Arabia", "Senegal", "Seychelles", "Sierra Leone", "Singapore", "Slovakia (Slovak Republic)", "Slovenia", "Solomon Islands", "Somalia", "South Africa", "South Georgia and the South Sandwich Islands", "Spain", "Sri Lanka", "St. Helena", "St. Pierre and Miquelon", "Sudan", "Suriname", "Svalbard and Jan Mayen Islands", "Swaziland", "Sweden", "Switzerland", "Syrian Arab Republic", "Taiwan, Province of China", "Tajikistan", "Tanzania, United Republic of", "Thailand", "Togo", "Tokelau", "Tonga", "Trinidad and Tobago", "Tunisia", "Turkey", "Turkmenistan", "Turks and Caicos Islands", "Tuvalu", "Uganda", "Ukraine", "United Arab Emirates", "United Kingdom", "United States", "United States Minor Outlying Islands", "Uruguay", "Uzbekistan", "Vanuatu", "Venezuela", "Vietnam", "Virgin Islands (British)", "Virgin Islands (U.S.)", "Wallis and Futuna Islands", "Western Sahara", "Yemen", "Yugoslavia", "Zambia", "Zimbabwe" |
|
384 | + "Select country", "Afghanistan", "Albania", "Algeria", "American Samoa", "Andorra", "Angola", "Anguilla", "Antarctica", "Antigua and Barbuda", "Argentina", "Armenia", "Aruba", "Australia", "Austria", "Azerbaijan", "Bahamas", "Bahrain", "Bangladesh", "Barbados", "Belarus", "Belgium", "Belize", "Benin", "Bermuda", "Bhutan", "Bolivia", "Bosnia and Herzegowina", "Botswana", "Bouvet Island", "Brazil", "British Indian Ocean Territory", "Brunei Darussalam", "Bulgaria", "Burkina Faso", "Burundi", "Cambodia", "Cameroon", "Canada", "Cape Verde", "Cayman Islands", "Central African Republic", "Chad", "Chile", "China", "Christmas Island", "Cocos (Keeling) Islands", "Colombia", "Comoros", "Congo", "Congo, the Democratic Republic of the", "Cook Islands", "Costa Rica", "Cote d'Ivoire", "Croatia (Hrvatska)", "Cuba", "Cyprus", "Czech Republic", "Denmark", "Djibouti", "Dominica", "Dominican Republic", "East Timor", "Ecuador", "Egypt", "El Salvador", "Equatorial Guinea", "Eritrea", "Estonia", "Ethiopia", "Falkland Islands (Malvinas)", "Faroe Islands", "Fiji", "Finland", "France", "France Metropolitan", "French Guiana", "French Polynesia", "French Southern Territories", "Gabon", "Gambia", "Georgia", "Germany", "Ghana", "Gibraltar", "Greece", "Greenland", "Grenada", "Guadeloupe", "Guam", "Guatemala", "Guinea", "Guinea-Bissau", "Guyana", "Haiti", "Heard and Mc Donald Islands", "Holy See (Vatican City State)", "Honduras", "Hong Kong", "Hungary", "Iceland", "India", "Indonesia", "Iran (Islamic Republic of)", "Iraq", "Ireland", "Israel", "Italy", "Jamaica", "Japan", "Jordan", "Kazakhstan", "Kenya", "Kiribati", "Korea, Democratic People's Republic of", "Korea, Republic of", "Kuwait", "Kyrgyzstan", "Lao, People's Democratic Republic", "Latvia", "Lebanon", "Lesotho", "Liberia", "Libyan Arab Jamahiriya", "Liechtenstein", "Lithuania", "Luxembourg", "Macau", "Macedonia, The Former Yugoslav Republic of", "Madagascar", "Malawi", "Malaysia", "Maldives", "Mali", "Malta", "Marshall Islands", "Martinique", "Mauritania", "Mauritius", "Mayotte", "Mexico", "Micronesia, Federated States of", "Moldova, Republic of", "Monaco", "Mongolia", "Montserrat", "Morocco", "Mozambique", "Myanmar", "Namibia", "Nauru", "Nepal", "Netherlands", "Netherlands Antilles", "New Caledonia", "New Zealand", "Nicaragua", "Niger", "Nigeria", "Niue", "Norfolk Island", "Northern Mariana Islands", "Norway", "Oman", "Pakistan", "Palau", "Panama", "Papua New Guinea", "Paraguay", "Peru", "Philippines", "Pitcairn", "Poland", "Portugal", "Puerto Rico", "Qatar", "Reunion", "Romania", "Russian Federation", "Rwanda", "Saint Kitts and Nevis", "Saint Lucia", "Saint Vincent and the Grenadines", "Samoa", "San Marino", "Sao Tome and Principe", "Saudi Arabia", "Senegal", "Seychelles", "Sierra Leone", "Singapore", "Slovakia (Slovak Republic)", "Slovenia", "Solomon Islands", "Somalia", "South Africa", "South Georgia and the South Sandwich Islands", "Spain", "Sri Lanka", "St. Helena", "St. Pierre and Miquelon", "Sudan", "Suriname", "Svalbard and Jan Mayen Islands", "Swaziland", "Sweden", "Switzerland", "Syrian Arab Republic", "Taiwan, Province of China", "Tajikistan", "Tanzania, United Republic of", "Thailand", "Togo", "Tokelau", "Tonga", "Trinidad and Tobago", "Tunisia", "Turkey", "Turkmenistan", "Turks and Caicos Islands", "Tuvalu", "Uganda", "Ukraine", "United Arab Emirates", "United Kingdom", "United States", "United States Minor Outlying Islands", "Uruguay", "Uzbekistan", "Vanuatu", "Venezuela", "Vietnam", "Virgin Islands (British)", "Virgin Islands (U.S.)", "Wallis and Futuna Islands", "Western Sahara", "Yemen", "Yugoslavia", "Zambia", "Zimbabwe" |
|
385 | 385 | ); |
386 | 386 | |
387 | 387 | $countryLength = sizeof($countries); |
388 | 388 | $i = 0; |
389 | - for($i = 0;$i <= $countryLength; $i++) |
|
389 | + for ($i = 0; $i <= $countryLength; $i++) |
|
390 | 390 | { |
391 | 391 | $c = $countries[$i]; |
392 | 392 | if ($c == $_user['country']) |
@@ -399,7 +399,7 @@ discard block |
||
399 | 399 | else |
400 | 400 | { |
401 | 401 | ?> |
402 | - <option value="<?php echo $c;?>"><?php echo $c; ?></option> |
|
402 | + <option value="<?php echo $c; ?>"><?php echo $c; ?></option> |
|
403 | 403 | <?php |
404 | 404 | } |
405 | 405 | } |
@@ -246,7 +246,7 @@ discard block |
||
246 | 246 | Choose image. Non-square images wil be cropped.<br> |
247 | 247 | Suggested dimensions: 800x800 pixels. Max size: 1MB. |
248 | 248 | </p> |
249 | - <?php if($_user['pfp'] != "default.png") { ?> |
|
249 | + <?php if ($_user['pfp'] != "default.png") { ?> |
|
250 | 250 | <a style="font-size: 11px;" href="/get/remove_profile_pic">Remove Profile Picture</a><br> |
251 | 251 | <?php } ?> |
252 | 252 | <br> |
@@ -443,7 +443,7 @@ discard block |
||
443 | 443 | <td class="left-side-customization" style="width: 247px;"> |
444 | 444 | <h2>Channel information & Settings</h2> |
445 | 445 | <span style="font-size: 10px;color: grey;">Featured Video</span><br> |
446 | - <input class="yt-uix-form-input-text" style="width: 225px;" id="biomd" placeholder="Video ID" value="<?php echo htmlspecialchars($_user['featured']);?>" name="videoid"><br><br> |
|
446 | + <input class="yt-uix-form-input-text" style="width: 225px;" id="biomd" placeholder="Video ID" value="<?php echo htmlspecialchars($_user['featured']); ?>" name="videoid"><br><br> |
|
447 | 447 | <span style="font-size: 10px;color: grey;">Description</span><br> |
448 | 448 | <div id="bio" action="/d/channel_update" enctype="multipart/form-data"> |
449 | 449 | <textarea class="yt-uix-form-input-text" style="resize:none;height: 55px;width: 225px;background-color:white;border: 1px solid #d3d3d3;" id="biom" placeholder="Bio" name="bio"><?php echo htmlspecialchars($_user['bio']); ?></textarea><br> |
@@ -456,12 +456,12 @@ discard block |
||
456 | 456 | <h2>Advanced</h2> |
457 | 457 | <span style="font-size: 10px;color: grey;">Website URL</span><br> |
458 | 458 | <div id="featuredvid" action="/d/channel_update" enctype="multipart/form-data"> |
459 | - <input class="yt-uix-form-input-text" style="width: 225px;" id="biomd" placeholder="Website URL" value="<?php echo htmlspecialchars($_user['website']);?>" name="website"> |
|
459 | + <input class="yt-uix-form-input-text" style="width: 225px;" id="biomd" placeholder="Website URL" value="<?php echo htmlspecialchars($_user['website']); ?>" name="website"> |
|
460 | 460 | </div><br> |
461 | 461 | <div> |
462 | 462 | <span style="font-size: 10px;color: grey;">Featured Channels</span> |
463 | 463 | <div id="featuredvid" action="/d/channel_update" enctype="multipart/form-data"> |
464 | - <input class="yt-uix-form-input-text" style="width: 291px;" id="biomd" placeholder="Seperate by commas!" value="<?php echo htmlspecialchars($_user['featured_channels']);?>" name="featuredchannels"> |
|
464 | + <input class="yt-uix-form-input-text" style="width: 291px;" id="biomd" placeholder="Seperate by commas!" value="<?php echo htmlspecialchars($_user['featured_channels']); ?>" name="featuredchannels"> |
|
465 | 465 | </div> |
466 | 466 | </div><br> |
467 | 467 | |
@@ -469,11 +469,11 @@ discard block |
||
469 | 469 | <div id="countryselect" action="/d/channel_update" enctype="multipart/form-data"> |
470 | 470 | <select style="width: 246px;" class="yt-uix-button yt-uix-button-default" id="country" name="country" value="<?php echo $_user['country']?>"> |
471 | 471 | <?php |
472 | - $countries = ["Select country","Afghanistan", "Albania", "Algeria", "American Samoa", "Andorra", "Angola", "Anguilla", "Antarctica", "Antigua and Barbuda", "Argentina", "Armenia", "Aruba", "Australia", "Austria", "Azerbaijan", "Bahamas", "Bahrain", "Bangladesh", "Barbados", "Belarus", "Belgium", "Belize", "Benin", "Bermuda", "Bhutan", "Bolivia", "Bosnia and Herzegowina", "Botswana", "Bouvet Island", "Brazil", "British Indian Ocean Territory", "Brunei Darussalam", "Bulgaria", "Burkina Faso", "Burundi", "Cambodia", "Cameroon", "Canada", "Cape Verde", "Cayman Islands", "Central African Republic", "Chad", "Chile", "China", "Christmas Island", "Cocos (Keeling) Islands", "Colombia", "Comoros", "Congo", "Congo, the Democratic Republic of the", "Cook Islands", "Costa Rica", "Cote d'Ivoire", "Croatia (Hrvatska)", "Cuba", "Cyprus", "Czech Republic", "Denmark", "Djibouti", "Dominica", "Dominican Republic", "East Timor", "Ecuador", "Egypt", "El Salvador", "Equatorial Guinea", "Eritrea", "Estonia", "Ethiopia", "Falkland Islands (Malvinas)", "Faroe Islands", "Fiji", "Finland", "France", "France Metropolitan", "French Guiana", "French Polynesia", "French Southern Territories", "Gabon", "Gambia", "Georgia", "Germany", "Ghana", "Gibraltar", "Greece", "Greenland", "Grenada", "Guadeloupe", "Guam", "Guatemala", "Guinea", "Guinea-Bissau", "Guyana", "Haiti", "Heard and Mc Donald Islands", "Holy See (Vatican City State)", "Honduras", "Hong Kong", "Hungary", "Iceland", "India", "Indonesia", "Iran (Islamic Republic of)", "Iraq", "Ireland", "Israel", "Italy", "Jamaica", "Japan", "Jordan", "Kazakhstan", "Kenya", "Kiribati", "Korea, Democratic People's Republic of", "Korea, Republic of", "Kuwait", "Kyrgyzstan", "Lao, People's Democratic Republic", "Latvia", "Lebanon", "Lesotho", "Liberia", "Libyan Arab Jamahiriya", "Liechtenstein", "Lithuania", "Luxembourg", "Macau", "Macedonia, The Former Yugoslav Republic of", "Madagascar", "Malawi", "Malaysia", "Maldives", "Mali", "Malta", "Marshall Islands", "Martinique", "Mauritania", "Mauritius", "Mayotte", "Mexico", "Micronesia, Federated States of", "Moldova, Republic of", "Monaco", "Mongolia", "Montserrat", "Morocco", "Mozambique", "Myanmar", "Namibia", "Nauru", "Nepal", "Netherlands", "Netherlands Antilles", "New Caledonia", "New Zealand", "Nicaragua", "Niger", "Nigeria", "Niue", "Norfolk Island", "Northern Mariana Islands", "Norway", "Oman", "Pakistan", "Palau", "Panama", "Papua New Guinea", "Paraguay", "Peru", "Philippines", "Pitcairn", "Poland", "Portugal", "Puerto Rico", "Qatar", "Reunion", "Romania", "Russian Federation", "Rwanda", "Saint Kitts and Nevis", "Saint Lucia", "Saint Vincent and the Grenadines", "Samoa", "San Marino", "Sao Tome and Principe", "Saudi Arabia", "Senegal", "Seychelles", "Sierra Leone", "Singapore", "Slovakia (Slovak Republic)", "Slovenia", "Solomon Islands", "Somalia", "South Africa", "South Georgia and the South Sandwich Islands", "Spain", "Sri Lanka", "St. Helena", "St. Pierre and Miquelon", "Sudan", "Suriname", "Svalbard and Jan Mayen Islands", "Swaziland", "Sweden", "Switzerland", "Syrian Arab Republic", "Taiwan, Province of China", "Tajikistan", "Tanzania, United Republic of", "Thailand", "Togo", "Tokelau", "Tonga", "Trinidad and Tobago", "Tunisia", "Turkey", "Turkmenistan", "Turks and Caicos Islands", "Tuvalu", "Uganda", "Ukraine", "United Arab Emirates", "United Kingdom", "United States", "United States Minor Outlying Islands", "Uruguay", "Uzbekistan", "Vanuatu", "Venezuela", "Vietnam", "Virgin Islands (British)", "Virgin Islands (U.S.)", "Wallis and Futuna Islands", "Western Sahara", "Yemen", "Yugoslavia", "Zambia", "Zimbabwe"]; |
|
472 | + $countries = ["Select country", "Afghanistan", "Albania", "Algeria", "American Samoa", "Andorra", "Angola", "Anguilla", "Antarctica", "Antigua and Barbuda", "Argentina", "Armenia", "Aruba", "Australia", "Austria", "Azerbaijan", "Bahamas", "Bahrain", "Bangladesh", "Barbados", "Belarus", "Belgium", "Belize", "Benin", "Bermuda", "Bhutan", "Bolivia", "Bosnia and Herzegowina", "Botswana", "Bouvet Island", "Brazil", "British Indian Ocean Territory", "Brunei Darussalam", "Bulgaria", "Burkina Faso", "Burundi", "Cambodia", "Cameroon", "Canada", "Cape Verde", "Cayman Islands", "Central African Republic", "Chad", "Chile", "China", "Christmas Island", "Cocos (Keeling) Islands", "Colombia", "Comoros", "Congo", "Congo, the Democratic Republic of the", "Cook Islands", "Costa Rica", "Cote d'Ivoire", "Croatia (Hrvatska)", "Cuba", "Cyprus", "Czech Republic", "Denmark", "Djibouti", "Dominica", "Dominican Republic", "East Timor", "Ecuador", "Egypt", "El Salvador", "Equatorial Guinea", "Eritrea", "Estonia", "Ethiopia", "Falkland Islands (Malvinas)", "Faroe Islands", "Fiji", "Finland", "France", "France Metropolitan", "French Guiana", "French Polynesia", "French Southern Territories", "Gabon", "Gambia", "Georgia", "Germany", "Ghana", "Gibraltar", "Greece", "Greenland", "Grenada", "Guadeloupe", "Guam", "Guatemala", "Guinea", "Guinea-Bissau", "Guyana", "Haiti", "Heard and Mc Donald Islands", "Holy See (Vatican City State)", "Honduras", "Hong Kong", "Hungary", "Iceland", "India", "Indonesia", "Iran (Islamic Republic of)", "Iraq", "Ireland", "Israel", "Italy", "Jamaica", "Japan", "Jordan", "Kazakhstan", "Kenya", "Kiribati", "Korea, Democratic People's Republic of", "Korea, Republic of", "Kuwait", "Kyrgyzstan", "Lao, People's Democratic Republic", "Latvia", "Lebanon", "Lesotho", "Liberia", "Libyan Arab Jamahiriya", "Liechtenstein", "Lithuania", "Luxembourg", "Macau", "Macedonia, The Former Yugoslav Republic of", "Madagascar", "Malawi", "Malaysia", "Maldives", "Mali", "Malta", "Marshall Islands", "Martinique", "Mauritania", "Mauritius", "Mayotte", "Mexico", "Micronesia, Federated States of", "Moldova, Republic of", "Monaco", "Mongolia", "Montserrat", "Morocco", "Mozambique", "Myanmar", "Namibia", "Nauru", "Nepal", "Netherlands", "Netherlands Antilles", "New Caledonia", "New Zealand", "Nicaragua", "Niger", "Nigeria", "Niue", "Norfolk Island", "Northern Mariana Islands", "Norway", "Oman", "Pakistan", "Palau", "Panama", "Papua New Guinea", "Paraguay", "Peru", "Philippines", "Pitcairn", "Poland", "Portugal", "Puerto Rico", "Qatar", "Reunion", "Romania", "Russian Federation", "Rwanda", "Saint Kitts and Nevis", "Saint Lucia", "Saint Vincent and the Grenadines", "Samoa", "San Marino", "Sao Tome and Principe", "Saudi Arabia", "Senegal", "Seychelles", "Sierra Leone", "Singapore", "Slovakia (Slovak Republic)", "Slovenia", "Solomon Islands", "Somalia", "South Africa", "South Georgia and the South Sandwich Islands", "Spain", "Sri Lanka", "St. Helena", "St. Pierre and Miquelon", "Sudan", "Suriname", "Svalbard and Jan Mayen Islands", "Swaziland", "Sweden", "Switzerland", "Syrian Arab Republic", "Taiwan, Province of China", "Tajikistan", "Tanzania, United Republic of", "Thailand", "Togo", "Tokelau", "Tonga", "Trinidad and Tobago", "Tunisia", "Turkey", "Turkmenistan", "Turks and Caicos Islands", "Tuvalu", "Uganda", "Ukraine", "United Arab Emirates", "United Kingdom", "United States", "United States Minor Outlying Islands", "Uruguay", "Uzbekistan", "Vanuatu", "Venezuela", "Vietnam", "Virgin Islands (British)", "Virgin Islands (U.S.)", "Wallis and Futuna Islands", "Western Sahara", "Yemen", "Yugoslavia", "Zambia", "Zimbabwe"]; |
|
473 | 473 | |
474 | 474 | $countryLength = sizeof($countries); |
475 | 475 | $i = 0; |
476 | - for($i = 0;$i <= $countryLength; $i++) |
|
476 | + for ($i = 0; $i <= $countryLength; $i++) |
|
477 | 477 | { |
478 | 478 | $c = $countries[$i]; |
479 | 479 | if ($c == $_user['country']) |
@@ -486,7 +486,7 @@ discard block |
||
486 | 486 | else |
487 | 487 | { |
488 | 488 | ?> |
489 | - <option value="<?php echo $c;?>"><?php echo $c; ?></option> |
|
489 | + <option value="<?php echo $c; ?>"><?php echo $c; ?></option> |
|
490 | 490 | <?php |
491 | 491 | } |
492 | 492 | } |
@@ -499,7 +499,7 @@ discard block |
||
499 | 499 | <span style="font-size: 10px;color: grey;">Channel Genre</span><br> |
500 | 500 | <div id="channellayout" action="/d/channel_update" enctype="multipart/form-data"> |
501 | 501 | <select style="width: 246px;" class="yt-uix-button yt-uix-button-default" name="genre"> |
502 | - <?php foreach($categories as $category) { ?> |
|
502 | + <?php foreach ($categories as $category) { ?> |
|
503 | 503 | <option value="<?php echo $category; ?>"><?php echo $category; ?></option> |
504 | 504 | <?php } ?> |
505 | 505 | </select> |
@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | class user_helper { |
12 | 12 | public $__db; |
13 | 13 | |
14 | - public function __construct($conn){ |
|
14 | + public function __construct($conn) { |
|
15 | 15 | $this->__db = $conn; |
16 | 16 | } |
17 | 17 | |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | $stmt = $this->__db->prepare("SELECT pfp FROM users WHERE username = :username"); |
20 | 20 | $stmt->bindParam(":username", $username); |
21 | 21 | $stmt->execute(); |
22 | - while($row = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
22 | + while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
23 | 23 | $pfp = $row['pfp']; |
24 | 24 | } // why the while statement? just remove it (i cant be bothered to) |
25 | 25 | |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | |
47 | 47 | function if_admin($user) { |
48 | 48 | $stmt = $this->__db->prepare("SELECT status FROM users WHERE username = :user AND status = 'admin'"); |
49 | - $stmt->bindParam(":user", $user);; |
|
49 | + $stmt->bindParam(":user", $user); ; |
|
50 | 50 | $stmt->execute(); |
51 | 51 | |
52 | 52 | return $stmt->rowCount() === 1; |
@@ -39,8 +39,8 @@ |
||
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"> |
@@ -16,8 +16,8 @@ discard block |
||
16 | 16 | } |
17 | 17 | |
18 | 18 | |
19 | - if($_SERVER['REQUEST_METHOD'] == 'POST' && @$_GET['n']) { |
|
20 | - if(!empty($_GET["n"]) && $_GET['n'] == "pfp") { |
|
19 | + if ($_SERVER['REQUEST_METHOD'] == 'POST' && @$_GET['n']) { |
|
20 | + if (!empty($_GET["n"]) && $_GET['n'] == "pfp") { |
|
21 | 21 | $target_dir = "../dynamic/pfp/"; |
22 | 22 | $imageFileType = strtolower(pathinfo($_FILES["file"]["name"], PATHINFO_EXTENSION)); |
23 | 23 | $target_name = md5_file($_FILES["file"]["tmp_name"]) . "." . $imageFileType; |
@@ -27,8 +27,8 @@ discard block |
||
27 | 27 | $uploadOk = true; |
28 | 28 | $movedFile = false; |
29 | 29 | |
30 | - if($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg" |
|
31 | - && $imageFileType != "gif" ) { |
|
30 | + if ($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg" |
|
31 | + && $imageFileType != "gif") { |
|
32 | 32 | $fileerror = 'unsupported file type. must be jpg, png, jpeg, or gif'; |
33 | 33 | $uploadOk = false; |
34 | 34 | goto skip; |
@@ -51,8 +51,8 @@ discard block |
||
51 | 51 | } |
52 | 52 | } |
53 | 53 | } |
54 | - } else if($_SERVER['REQUEST_METHOD'] == 'POST' && @$_FILES['backgroundbgset']) { |
|
55 | - if(!empty($_FILES["backgroundbgset"]["name"])) { |
|
54 | + } else if ($_SERVER['REQUEST_METHOD'] == 'POST' && @$_FILES['backgroundbgset']) { |
|
55 | + if (!empty($_FILES["backgroundbgset"]["name"])) { |
|
56 | 56 | $target_dir = "../dynamic/banners/"; |
57 | 57 | $imageFileType = strtolower(pathinfo($_FILES["backgroundbgset"]["name"], PATHINFO_EXTENSION)); |
58 | 58 | $target_name = md5_file($_FILES["backgroundbgset"]["tmp_name"]) . "." . $imageFileType; |
@@ -62,14 +62,14 @@ discard block |
||
62 | 62 | $uploadOk = true; |
63 | 63 | $movedFile = false; |
64 | 64 | |
65 | - if($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg" |
|
66 | - && $imageFileType != "gif" ) { |
|
65 | + if ($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg" |
|
66 | + && $imageFileType != "gif") { |
|
67 | 67 | $fileerror = 'unsupported file type. must be jpg, png, jpeg, or gif'; |
68 | 68 | $uploadOk = false; |
69 | 69 | goto skip; |
70 | 70 | } |
71 | 71 | |
72 | - if($uploadOk) { |
|
72 | + if ($uploadOk) { |
|
73 | 73 | if (file_exists($target_file)) { |
74 | 74 | $movedFile = true; |
75 | 75 | } else { |
@@ -85,8 +85,8 @@ discard block |
||
85 | 85 | } |
86 | 86 | } |
87 | 87 | } |
88 | - } else if($_SERVER['REQUEST_METHOD'] == 'POST' && @$_POST['bannerset']) { |
|
89 | - if(!empty($_FILES["file"]["name"])) { |
|
88 | + } else if ($_SERVER['REQUEST_METHOD'] == 'POST' && @$_POST['bannerset']) { |
|
89 | + if (!empty($_FILES["file"]["name"])) { |
|
90 | 90 | $target_dir = "../dynamic/banners/"; |
91 | 91 | $imageFileType = strtolower(pathinfo($_FILES["file"]["name"], PATHINFO_EXTENSION)); |
92 | 92 | $target_name = md5_file($_FILES["file"]["tmp_name"]) . "." . $imageFileType; |
@@ -96,14 +96,14 @@ discard block |
||
96 | 96 | $uploadOk = true; |
97 | 97 | $movedFile = false; |
98 | 98 | |
99 | - if($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg" |
|
100 | - && $imageFileType != "gif" ) { |
|
99 | + if ($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg" |
|
100 | + && $imageFileType != "gif") { |
|
101 | 101 | $fileerror = 'unsupported file type. must be jpg, png, jpeg, or gif'; |
102 | 102 | $uploadOk = false; |
103 | 103 | goto skip; |
104 | 104 | } |
105 | 105 | |
106 | - if($uploadOk) { |
|
106 | + if ($uploadOk) { |
|
107 | 107 | if (file_exists($target_file)) { |
108 | 108 | $movedFile = true; |
109 | 109 | } else { |
@@ -119,8 +119,8 @@ discard block |
||
119 | 119 | } |
120 | 120 | } |
121 | 121 | } |
122 | - } else if($_SERVER['REQUEST_METHOD'] == 'POST' && @$_FILES['videopagebanner']) { |
|
123 | - if(!empty($_FILES["videopagebanner"]["name"])) { |
|
122 | + } else if ($_SERVER['REQUEST_METHOD'] == 'POST' && @$_FILES['videopagebanner']) { |
|
123 | + if (!empty($_FILES["videopagebanner"]["name"])) { |
|
124 | 124 | $target_dir = "/dynamic/subscribe/"; |
125 | 125 | $imageFileType = strtolower(pathinfo($_FILES["videopagebanner"]["name"], PATHINFO_EXTENSION)); |
126 | 126 | $target_name = md5_file($_FILES["videopagebanner"]["tmp_name"]) . "." . $imageFileType; |
@@ -130,14 +130,14 @@ discard block |
||
130 | 130 | $uploadOk = true; |
131 | 131 | $movedFile = false; |
132 | 132 | |
133 | - if($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg" |
|
134 | - && $imageFileType != "gif" ) { |
|
133 | + if ($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg" |
|
134 | + && $imageFileType != "gif") { |
|
135 | 135 | $fileerror = 'unsupported file type. must be jpg, png, jpeg, or gif'; |
136 | 136 | $uploadOk = false; |
137 | 137 | goto skip; |
138 | 138 | } |
139 | 139 | |
140 | - if($uploadOk) { |
|
140 | + if ($uploadOk) { |
|
141 | 141 | if (file_exists($target_file)) { |
142 | 142 | $movedFile = true; |
143 | 143 | } else { |
@@ -155,81 +155,81 @@ discard block |
||
155 | 155 | } |
156 | 156 | } |
157 | 157 | |
158 | - if(!empty($_POST['bio'])) { |
|
158 | + if (!empty($_POST['bio'])) { |
|
159 | 159 | $__user_u->update_row($_SESSION['siteusername'], "bio", $_POST['bio']); |
160 | 160 | } |
161 | 161 | |
162 | - if(!empty($_POST['featuredchannels'])) { |
|
162 | + if (!empty($_POST['featuredchannels'])) { |
|
163 | 163 | $__user_u->update_row($_SESSION['siteusername'], "featured_channels", $_POST['featuredchannels']); |
164 | 164 | } |
165 | 165 | |
166 | - if(!empty($_POST['css'])) { |
|
166 | + if (!empty($_POST['css'])) { |
|
167 | 167 | $__user_u->update_row($_SESSION['siteusername'], "css", $_POST['css']); |
168 | 168 | } |
169 | 169 | |
170 | - if(!empty($_POST['videoid'])) { |
|
170 | + if (!empty($_POST['videoid'])) { |
|
171 | 171 | $__user_u->update_row($_SESSION['siteusername'], "featured", $_POST['videoid']); |
172 | 172 | } |
173 | 173 | |
174 | - if(!empty($_POST['solidcolor'])) { |
|
174 | + if (!empty($_POST['solidcolor'])) { |
|
175 | 175 | $__user_u->update_row($_SESSION['siteusername'], "2012_bgoption", $_POST['bgoption']); |
176 | 176 | |
177 | - if($_POST['bgoption'] == "solid") |
|
177 | + if ($_POST['bgoption'] == "solid") |
|
178 | 178 | $__user_u->update_row($_SESSION['siteusername'], "2012_bg", ""); |
179 | 179 | |
180 | 180 | $__user_u->update_row($_SESSION['siteusername'], "primary_color", $_POST['solidcolor']); |
181 | 181 | } |
182 | 182 | |
183 | - if(!empty($_POST['transparency'])) { |
|
183 | + if (!empty($_POST['transparency'])) { |
|
184 | 184 | $__user_u->update_row($_SESSION['siteusername'], "transparency", $_POST['transparency']); |
185 | 185 | } |
186 | 186 | |
187 | - if(!empty($_POST['genre'])) { |
|
187 | + if (!empty($_POST['genre'])) { |
|
188 | 188 | $__user_u->update_row($_SESSION['siteusername'], "genre", $_POST['genre']); |
189 | 189 | } |
190 | 190 | |
191 | - if(!empty($_POST['bordercolor'])) { |
|
191 | + if (!empty($_POST['bordercolor'])) { |
|
192 | 192 | $__user_u->update_row($_SESSION['siteusername'], "border_color", $_POST['bordercolor']); |
193 | 193 | } |
194 | 194 | |
195 | - if(!empty($_POST['country'])) { |
|
195 | + if (!empty($_POST['country'])) { |
|
196 | 196 | $__user_u->update_row($_SESSION['siteusername'], "country", $_POST['country']); |
197 | 197 | } // duplicate? |
198 | 198 | |
199 | - if(!empty($_POST['header'])) { |
|
199 | + if (!empty($_POST['header'])) { |
|
200 | 200 | $__user_u->update_row($_SESSION['siteusername'], "custom_header", $_POST['header']); |
201 | 201 | } |
202 | 202 | |
203 | - if(!empty($_POST['customtext'])) { |
|
203 | + if (!empty($_POST['customtext'])) { |
|
204 | 204 | $__user_u->update_row($_SESSION['siteusername'], "custom_text", $_POST['customtext']); |
205 | 205 | } |
206 | 206 | |
207 | - if(!empty($_POST['country'])) { |
|
207 | + if (!empty($_POST['country'])) { |
|
208 | 208 | $__user_u->update_row($_SESSION['siteusername'], "custom_text", $_POST['country']); |
209 | 209 | } // duplicate? |
210 | 210 | |
211 | - if(!empty($_POST['website'])) { |
|
211 | + if (!empty($_POST['website'])) { |
|
212 | 212 | $__user_u->update_row($_SESSION['siteusername'], "website", $_POST['website']); |
213 | 213 | } |
214 | 214 | |
215 | - if(!empty($_POST['channelboxcolor'])) { |
|
215 | + if (!empty($_POST['channelboxcolor'])) { |
|
216 | 216 | $__user_u->update_row($_SESSION['siteusername'], "secondary_color", $_POST['channelboxcolor']); |
217 | 217 | } |
218 | 218 | |
219 | - if(!empty($_POST['backgroundcolor'])) { |
|
219 | + if (!empty($_POST['backgroundcolor'])) { |
|
220 | 220 | $__user_u->update_row($_SESSION['siteusername'], "third_color", $_POST['backgroundcolor']); |
221 | 221 | } |
222 | 222 | |
223 | - if(!empty($_POST['textmaincolor'])) { |
|
223 | + if (!empty($_POST['textmaincolor'])) { |
|
224 | 224 | $__user_u->update_row($_SESSION['siteusername'], "primary_color_text", $_POST['textmaincolor']); |
225 | 225 | } |
226 | 226 | |
227 | - if(!empty($_POST['layout_channel'])) { |
|
228 | - if($_POST['layout_channel'] == "feed" || $_POST['layout_channel'] == "featured" || $_POST['layout_channel'] == "playlists") |
|
227 | + if (!empty($_POST['layout_channel'])) { |
|
228 | + if ($_POST['layout_channel'] == "feed" || $_POST['layout_channel'] == "featured" || $_POST['layout_channel'] == "playlists") |
|
229 | 229 | $__user_u->update_row($_SESSION['siteusername'], "layout", $_POST['layout_channel']); |
230 | 230 | } |
231 | 231 | |
232 | - if(!empty($_POST['bgoptionset'])) { |
|
232 | + if (!empty($_POST['bgoptionset'])) { |
|
233 | 233 | $bgoption = $_POST['bgoption']; |
234 | 234 | $bgcolor = $_POST['solidcolor']; |
235 | 235 | $default = "default.png"; |
@@ -238,7 +238,7 @@ discard block |
||
238 | 238 | |
239 | 239 | $__user_u->update_row($_SESSION['siteusername'], "2012_bgcolor", $bgcolor); |
240 | 240 | |
241 | - if($bgoption == "solid") { |
|
241 | + if ($bgoption == "solid") { |
|
242 | 242 | $__user_u->update_row($_SESSION['siteusername'], "2012_bg ", $default); |
243 | 243 | } |
244 | 244 | } |
@@ -12,10 +12,10 @@ discard block |
||
12 | 12 | <?php $__db_h = new db_helper(); ?> |
13 | 13 | <?php $__time_h = new time_helper(); ?> |
14 | 14 | <?php |
15 | - if(isset($_SESSION['siteusername'])) |
|
15 | + if (isset($_SESSION['siteusername'])) |
|
16 | 16 | $_user_hp = $__user_h->fetch_user_username($_SESSION['siteusername']); |
17 | 17 | |
18 | - if(!$__user_h->user_exists($_GET['n'])) |
|
18 | + if (!$__user_h->user_exists($_GET['n'])) |
|
19 | 19 | header("Location: /?userdoesntexist"); |
20 | 20 | |
21 | 21 | $_user = $__user_h->fetch_user_username($_GET['n']); |
@@ -67,28 +67,28 @@ discard block |
||
67 | 67 | $_user['genre'] = strtolower($_user['genre']); |
68 | 68 | $_user['subscribed'] = $__user_h->if_subscribed(@$_SESSION['siteusername'], $_user['username']); |
69 | 69 | |
70 | - if(!check_valid_colorhex($_user['primary_color']) && strlen($_user['primary_color']) != 6) { $_user['primary_color'] = ""; } |
|
71 | - if(!check_valid_colorhex($_user['secondary_color']) && strlen($_user['secondary_color']) != 6) { $_user['secondary_color'] = ""; } |
|
72 | - if(!check_valid_colorhex($_user['third_color']) && strlen($_user['third_color']) != 6) { $_user['third_color'] = ""; } |
|
73 | - if(!check_valid_colorhex($_user['text_color']) && strlen($_user['text_color']) != 6) { $_user['text_color'] = ""; } |
|
74 | - if(!check_valid_colorhex($_user['primary_color_text']) && strlen($_user['primary_color_text']) != 6) { $_user['primary_color_text'] = ""; } |
|
75 | - if(!check_valid_colorhex($_user['2012_bgcolor']) && strlen($_user['2012_bgcolor']) != 6) { $_user['2012_bgcolor'] = ""; } |
|
70 | + if (!check_valid_colorhex($_user['primary_color']) && strlen($_user['primary_color']) != 6) { $_user['primary_color'] = ""; } |
|
71 | + if (!check_valid_colorhex($_user['secondary_color']) && strlen($_user['secondary_color']) != 6) { $_user['secondary_color'] = ""; } |
|
72 | + if (!check_valid_colorhex($_user['third_color']) && strlen($_user['third_color']) != 6) { $_user['third_color'] = ""; } |
|
73 | + if (!check_valid_colorhex($_user['text_color']) && strlen($_user['text_color']) != 6) { $_user['text_color'] = ""; } |
|
74 | + if (!check_valid_colorhex($_user['primary_color_text']) && strlen($_user['primary_color_text']) != 6) { $_user['primary_color_text'] = ""; } |
|
75 | + if (!check_valid_colorhex($_user['2012_bgcolor']) && strlen($_user['2012_bgcolor']) != 6) { $_user['2012_bgcolor'] = ""; } |
|
76 | 76 | |
77 | - if(isset($_SESSION['siteusername'])) |
|
77 | + if (isset($_SESSION['siteusername'])) |
|
78 | 78 | $__user_i->check_view_channel($_user['username'], @$_SESSION['siteusername']); |
79 | 79 | |
80 | - if($_SERVER['REQUEST_METHOD'] == 'POST') { |
|
80 | + if ($_SERVER['REQUEST_METHOD'] == 'POST') { |
|
81 | 81 | $error = array(); |
82 | 82 | |
83 | - if(!isset($_SESSION['siteusername'])){ $error['message'] = "you are not logged in"; $error['status'] = true; } |
|
84 | - if(!$_POST['comment']){ $error['message'] = "your comment cannot be blank"; $error['status'] = true; } |
|
85 | - if(strlen($_POST['comment']) > 1000){ $error['message'] = "your comment must be shorter than 1000 characters"; $error['status'] = true; } |
|
83 | + if (!isset($_SESSION['siteusername'])) { $error['message'] = "you are not logged in"; $error['status'] = true; } |
|
84 | + if (!$_POST['comment']) { $error['message'] = "your comment cannot be blank"; $error['status'] = true; } |
|
85 | + if (strlen($_POST['comment']) > 1000) { $error['message'] = "your comment must be shorter than 1000 characters"; $error['status'] = true; } |
|
86 | 86 | //if(!isset($_POST['g-recaptcha-response'])){ $error['message'] = "captcha validation failed"; $error['status'] = true; } |
87 | 87 | //if(!$_user_insert_utils->validateCaptcha($config['recaptcha_secret'], $_POST['g-recaptcha-response'])) { $error['message'] = "captcha validation failed"; $error['status'] = true; } |
88 | - 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; } |
|
88 | + 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 | 89 | //if(ifBlocked(@$_SESSION['siteusername'], $user['username'], $__db)) { $error = "This user has blocked you!"; $error['status'] = true; } |
90 | 90 | |
91 | - if(!isset($error['message'])) { |
|
91 | + if (!isset($error['message'])) { |
|
92 | 92 | $text = $_POST['comment']; |
93 | 93 | $stmt = $__db->prepare("INSERT INTO profile_comments (toid, author, comment) VALUES (:id, :username, :comment)"); |
94 | 94 | $stmt->bindParam(":id", $_user['username']); |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | |
99 | 99 | $_user_update_utils->update_comment_cooldown_time($_SESSION['siteusername']); |
100 | 100 | |
101 | - if(@$_SESSION['siteusername'] != $_user['username']) { |
|
101 | + if (@$_SESSION['siteusername'] != $_user['username']) { |
|
102 | 102 | $_user_insert_utils->send_message($_user['username'], "New comment", 'I commented "' . $_POST['comment'] . '" on your profile!', $_SESSION['siteusername']); |
103 | 103 | } |
104 | 104 | } |
@@ -136,11 +136,11 @@ discard block |
||
136 | 136 | <link rel="stylesheet" href="/yt/cssbin/www-extra.css"> |
137 | 137 | <style> |
138 | 138 | #content-container { |
139 | - background-color: <?php echo $_user['primary_color']; ?>; |
|
139 | + background-color: <?php echo $_user['primary_color']; ?>; |
|
140 | 140 | background-image: url(/dynamic/banners/<?php echo $_user['2012_bg']; ?>); |
141 | 141 | background-repeat: repeat; |
142 | 142 | <?php |
143 | - switch($_user['2012_bgoption']) { |
|
143 | + switch ($_user['2012_bgoption']) { |
|
144 | 144 | case "stretch": |
145 | 145 | echo "background-size: cover;"; |
146 | 146 | break; |
@@ -184,11 +184,11 @@ discard block |
||
184 | 184 | <div id="masthead-container"><?php require($_SERVER['DOCUMENT_ROOT'] . "/s/mod/header.php"); ?></div> |
185 | 185 | <div id="content-container"> |
186 | 186 | <!-- begin content --> |
187 | - <?php if(isset($_SESSION['siteusername']) && $_user['username'] == $_SESSION['siteusername']) { ?> |
|
187 | + <?php if (isset($_SESSION['siteusername']) && $_user['username'] == $_SESSION['siteusername']) { ?> |
|
188 | 188 | <div class="channel_customization"><?php require($_SERVER['DOCUMENT_ROOT'] . "/s/mod/channel_customization.php"); ?></div> |
189 | 189 | <?php } ?> |
190 | 190 | <?php |
191 | - if(empty(trim($_user['bio']))) |
|
191 | + if (empty(trim($_user['bio']))) |
|
192 | 192 | $_user['bio'] = "This user has no description."; |
193 | 193 | ?> |
194 | 194 | <div id="content"> |
@@ -243,7 +243,7 @@ discard block |
||
243 | 243 | <h1><?php echo htmlspecialchars($_user['username']); ?></h1> |
244 | 244 | </div> |
245 | 245 | <div class="upper-left-section enable-fancy-subscribe-button"> |
246 | - <?php if($_user['username'] != @$_SESSION['siteusername']) { ?> |
|
246 | + <?php if ($_user['username'] != @$_SESSION['siteusername']) { ?> |
|
247 | 247 | <div class="yt-subscription-button-hovercard yt-uix-hovercard"> |
248 | 248 | <button |
249 | 249 | href="#" |
@@ -251,7 +251,7 @@ discard block |
||
251 | 251 | title="" |
252 | 252 | id="subscribe-button" |
253 | 253 | type="button" |
254 | - class="yt-subscription-button <?php if($_user['subscribed']) { echo "subscribed "; } ?> yt-uix-button yt-uix-button-subscription yt-uix-tooltip" |
|
254 | + class="yt-subscription-button <?php if ($_user['subscribed']) { echo "subscribed "; } ?> yt-uix-button yt-uix-button-subscription yt-uix-tooltip" |
|
255 | 255 | role="button"><span class="yt-uix-button-icon-wrapper"><img class="yt-uix-button-icon yt-uix-button-icon-subscribe" |
256 | 256 | src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt=""></span><span class="yt-uix-button-content"> <span class="subscribe-label">Subscribe</span> |
257 | 257 | <span class="subscribed-label">Subscribed</span> |
@@ -272,7 +272,7 @@ discard block |
||
272 | 272 | <div class="header-stats"> |
273 | 273 | <div class="stat-entry"> |
274 | 274 | <span class="stat-value"><?php echo $_user['subscribers']; ?></span> |
275 | - <span class="stat-name"><?php if($_user['subscribers'] == 1){ ?>subscriber<?php }else{ ?>subscribers<?php } ?></span> |
|
275 | + <span class="stat-name"><?php if ($_user['subscribers'] == 1) { ?>subscriber<?php } else { ?>subscribers<?php } ?></span> |
|
276 | 276 | </div> |
277 | 277 | <div class="stat-entry"> |
278 | 278 | <span class="stat-value"><?php echo $_user['views']; ?></span> |
@@ -317,7 +317,7 @@ discard block |
||
317 | 317 | </div> |
318 | 318 | </div> |
319 | 319 | </div> |
320 | - <?php if($_user['featured'] != "None") { $video = $__video_h->fetch_video_rid($_user['featured']); } else { $_user['featured'] = false; } ?> |
|
320 | + <?php if ($_user['featured'] != "None") { $video = $__video_h->fetch_video_rid($_user['featured']); } else { $_user['featured'] = false; } ?> |
|
321 | 321 | <div id="branded-page-body"> |
322 | 322 | <?php require($_SERVER['DOCUMENT_ROOT'] . "/s/mod/channel_" . $_user['layout'] . ".php"); ?> |
323 | 323 | </div> |