@@ -8,10 +8,10 @@ |
||
8 | 8 | <?php $__db_h = new db_helper(); ?> |
9 | 9 | <?php $__time_h = new time_helper(); ?> |
10 | 10 | <?php |
11 | - $__server->page_embeds->page_title = "SubRocks - Sign Up"; |
|
12 | - $__server->page_embeds->page_description = "SubRocks is a site dedicated to bring back the 2012 layout of YouTube."; |
|
13 | - $__server->page_embeds->page_image = "/yt/imgbin/full-size-logo.png"; |
|
14 | - $__server->page_embeds->page_url = "https://subrock.rocks/"; |
|
11 | + $__server->page_embeds->page_title = "SubRocks - Sign Up"; |
|
12 | + $__server->page_embeds->page_description = "SubRocks is a site dedicated to bring back the 2012 layout of YouTube."; |
|
13 | + $__server->page_embeds->page_image = "/yt/imgbin/full-size-logo.png"; |
|
14 | + $__server->page_embeds->page_url = "https://subrock.rocks/"; |
|
15 | 15 | ?> |
16 | 16 | <!DOCTYPE html> |
17 | 17 | <html> |
@@ -8,10 +8,10 @@ |
||
8 | 8 | <?php $__db_h = new db_helper(); ?> |
9 | 9 | <?php $__time_h = new time_helper(); ?> |
10 | 10 | <?php |
11 | - $__server->page_embeds->page_title = "SubRocks - Sign In"; |
|
12 | - $__server->page_embeds->page_description = "SubRocks is a site dedicated to bring back the 2012 layout of YouTube."; |
|
13 | - $__server->page_embeds->page_image = "/yt/imgbin/full-size-logo.png"; |
|
14 | - $__server->page_embeds->page_url = "https://subrock.rocks/"; |
|
11 | + $__server->page_embeds->page_title = "SubRocks - Sign In"; |
|
12 | + $__server->page_embeds->page_description = "SubRocks is a site dedicated to bring back the 2012 layout of YouTube."; |
|
13 | + $__server->page_embeds->page_image = "/yt/imgbin/full-size-logo.png"; |
|
14 | + $__server->page_embeds->page_url = "https://subrock.rocks/"; |
|
15 | 15 | ?> |
16 | 16 | <!DOCTYPE html> |
17 | 17 | <html> |
@@ -10,10 +10,10 @@ |
||
10 | 10 | <?php $__time_h = new time_helper(); ?> |
11 | 11 | <?php if(!isset($_SESSION['siteusername'])) { header("Location: /sign_in"); } ?> |
12 | 12 | <?php |
13 | - $__server->page_embeds->page_title = "SubRocks - Upload Video"; |
|
14 | - $__server->page_embeds->page_description = "SubRocks is a site dedicated to bring back the 2012 layout of YouTube."; |
|
15 | - $__server->page_embeds->page_image = "/yt/imgbin/full-size-logo.png"; |
|
16 | - $__server->page_embeds->page_url = "https://subrock.rocks/"; |
|
13 | + $__server->page_embeds->page_title = "SubRocks - Upload Video"; |
|
14 | + $__server->page_embeds->page_description = "SubRocks is a site dedicated to bring back the 2012 layout of YouTube."; |
|
15 | + $__server->page_embeds->page_image = "/yt/imgbin/full-size-logo.png"; |
|
16 | + $__server->page_embeds->page_url = "https://subrock.rocks/"; |
|
17 | 17 | ?> |
18 | 18 | <!DOCTYPE html> |
19 | 19 | <html> |
@@ -8,7 +8,7 @@ discard block |
||
8 | 8 | <?php $__user_h = new user_helper($__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 - Upload Video"; |
14 | 14 | $__server->page_embeds->page_description = "SubRocks is a site dedicated to bring back the 2012 layout of YouTube."; |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | <div id="content-container"> |
45 | 45 | <!-- begin content --> |
46 | 46 | <div id="content"> |
47 | - <?php if($__user_h->if_upload_cooldown($_SESSION['siteusername'])) { ?> |
|
47 | + <?php if ($__user_h->if_upload_cooldown($_SESSION['siteusername'])) { ?> |
|
48 | 48 | <div id="masthead_child_div"><div class="yt-alert yt-alert-default yt-alert-error "> <div class="yt-alert-icon"> |
49 | 49 | <img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" class="icon master-sprite" alt="Alert icon"> |
50 | 50 | </div> |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | <b>Category</b> <br> |
108 | 108 | <select style="margin-top:5px;" name="category" class="yt-uix-button yt-uix-button-default"> |
109 | 109 | <?php $categories = ["None", "Film & Animation", "Autos & Vehicles", "Music", "Pets & Animals", "Sports", "Travel & Events", "Gaming", "People & Blogs", "Comedy", "Entertainment", "News & Politics", "Howto & Style", "Education", "Science & Technology", "Nonprofits & Activism"]; ?> |
110 | - <?php foreach($categories as $categoryTag) { ?> |
|
110 | + <?php foreach ($categories as $categoryTag) { ?> |
|
111 | 111 | <option value="<?php echo $categoryTag; ?>"><?php echo $categoryTag; ?></option> |
112 | 112 | <?php } ?> |
113 | 113 | </select><br><br> |
@@ -9,10 +9,10 @@ |
||
9 | 9 | <?php $__time_h = new time_helper(); ?> |
10 | 10 | <?php if(!isset($_SESSION['siteusername'])) { header("Location: /sign_in"); } ?> |
11 | 11 | <?php |
12 | - $__server->page_embeds->page_title = "SubRocks - Subscriptions"; |
|
13 | - $__server->page_embeds->page_description = "SubRocks is a site dedicated to bring back the 2012 layout of YouTube."; |
|
14 | - $__server->page_embeds->page_image = "/yt/imgbin/full-size-logo.png"; |
|
15 | - $__server->page_embeds->page_url = "https://subrock.rocks/"; |
|
12 | + $__server->page_embeds->page_title = "SubRocks - Subscriptions"; |
|
13 | + $__server->page_embeds->page_description = "SubRocks is a site dedicated to bring back the 2012 layout of YouTube."; |
|
14 | + $__server->page_embeds->page_image = "/yt/imgbin/full-size-logo.png"; |
|
15 | + $__server->page_embeds->page_url = "https://subrock.rocks/"; |
|
16 | 16 | ?> |
17 | 17 | <!DOCTYPE html> |
18 | 18 | <html dir="ltr"> |
@@ -7,7 +7,7 @@ discard block |
||
7 | 7 | <?php $__user_h = new user_helper($__db); ?> |
8 | 8 | <?php $__db_h = new db_helper(); ?> |
9 | 9 | <?php $__time_h = new time_helper(); ?> |
10 | -<?php if(!isset($_SESSION['siteusername'])) { header("Location: /sign_in"); } ?> |
|
10 | +<?php if (!isset($_SESSION['siteusername'])) { header("Location: /sign_in"); } ?> |
|
11 | 11 | <?php |
12 | 12 | $__server->page_embeds->page_title = "SubRocks - Subscriptions"; |
13 | 13 | $__server->page_embeds->page_description = "SubRocks is a site dedicated to bring back the 2012 layout of YouTube."; |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | ?> |
164 | 164 | |
165 | 165 | <div class="my_videos_ajax"> |
166 | - <?php while($user = $stmt->fetch(PDO::FETCH_ASSOC)) { ?> |
|
166 | + <?php while ($user = $stmt->fetch(PDO::FETCH_ASSOC)) { ?> |
|
167 | 167 | <div style="width: 33%;display: inline-block;"> |
168 | 168 | <img style="width: 50px;height:50px;" src="/dynamic/pfp/<?php echo $__user_h->fetch_pfp($user['reciever']); ?>"> |
169 | 169 | <span style="display: inline-block; vertical-align:top;width: 100px;font-size: 11px;"> |
@@ -8,10 +8,10 @@ |
||
8 | 8 | <?php $__db_h = new db_helper(); ?> |
9 | 9 | <?php $__time_h = new time_helper(); ?> |
10 | 10 | <?php |
11 | - $__server->page_embeds->page_title = "SubRocks - Edit Video"; |
|
12 | - $__server->page_embeds->page_description = "SubRocks is a site dedicated to bring back the 2012 layout of YouTube."; |
|
13 | - $__server->page_embeds->page_image = "/yt/imgbin/full-size-logo.png"; |
|
14 | - $__server->page_embeds->page_url = "https://subrock.rocks/"; |
|
11 | + $__server->page_embeds->page_title = "SubRocks - Edit Video"; |
|
12 | + $__server->page_embeds->page_description = "SubRocks is a site dedicated to bring back the 2012 layout of YouTube."; |
|
13 | + $__server->page_embeds->page_image = "/yt/imgbin/full-size-logo.png"; |
|
14 | + $__server->page_embeds->page_url = "https://subrock.rocks/"; |
|
15 | 15 | ?> |
16 | 16 | <?php if(!isset($_SESSION['siteusername'])) { header("Location: /sign_in"); } ?> |
17 | 17 | <?php $_video = $__video_h->fetch_video_rid($_GET['id']); ?> |
@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | $__server->page_embeds->page_image = "/yt/imgbin/full-size-logo.png"; |
14 | 14 | $__server->page_embeds->page_url = "https://subrock.rocks/"; |
15 | 15 | ?> |
16 | -<?php if(!isset($_SESSION['siteusername'])) { header("Location: /sign_in"); } ?> |
|
16 | +<?php if (!isset($_SESSION['siteusername'])) { header("Location: /sign_in"); } ?> |
|
17 | 17 | <?php $_video = $__video_h->fetch_video_rid($_GET['id']); ?> |
18 | 18 | <!DOCTYPE html> |
19 | 19 | <html dir="ltr"> |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | <b>Category</b> <br> |
178 | 178 | <select style="margin-top:5px;" name="category" class="yt-uix-button yt-uix-button-default"> |
179 | 179 | <?php $categories = ["None", "Film & Animation", "Autos & Vehicles", "Music", "Pets & Animals", "Sports", "Travel & Events", "Gaming", "People & Blogs", "Comedy", "Entertainment", "News & Politics", "Howto & Style", "Education", "Science & Technology", "Nonprofits & Activism"]; ?> |
180 | - <?php foreach($categories as $categoryTag) { ?> |
|
180 | + <?php foreach ($categories as $categoryTag) { ?> |
|
181 | 181 | <option value="<?php echo $categoryTag; ?>"><?php echo $categoryTag; ?></option> |
182 | 182 | <?php } ?> |
183 | 183 | </select><br><br> |
@@ -313,14 +313,15 @@ |
||
313 | 313 | for($i = 0;$i <= $countryLength; $i++) |
314 | 314 | { |
315 | 315 | $c = $countries[$i]; |
316 | - if ($c == $_user['country']) |
|
317 | - //country is the same as in database |
|
316 | + if ($c == $_user['country']) { |
|
317 | + //country is the same as in database |
|
318 | 318 | { |
319 | 319 | ?> |
320 | - <option value="<?php echo $c; ?>" selected="selected"><?php echo $c; ?></option> |
|
321 | - <?php |
|
320 | + <option value="<?php echo $c; |
|
322 | 321 | } |
323 | - else |
|
322 | + ?>" selected="selected"><?php echo $c; ?></option> |
|
323 | + <?php |
|
324 | + } else |
|
324 | 325 | { |
325 | 326 | ?> |
326 | 327 | <option value="<?php echo $c;?>"><?php echo $c; ?></option> |
@@ -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> |
@@ -4,46 +4,46 @@ discard block |
||
4 | 4 | <?php require_once($_SERVER['DOCUMENT_ROOT'] . "/s/classes/user_helper.php"); ?> |
5 | 5 | <?php require_once($_SERVER['DOCUMENT_ROOT'] . "/s/classes/video_helper.php"); ?> |
6 | 6 | <?php |
7 | - $request = (object) [ |
|
8 | - "search_term" => htmlspecialchars($_GET['search_query']), |
|
9 | - "like_search_term" => "%" . htmlspecialchars($_GET['search_query']) . "%", |
|
10 | - "search_amount" => 0 /* [fallback] */ |
|
11 | - ]; |
|
7 | + $request = (object) [ |
|
8 | + "search_term" => htmlspecialchars($_GET['search_query']), |
|
9 | + "like_search_term" => "%" . htmlspecialchars($_GET['search_query']) . "%", |
|
10 | + "search_amount" => 0 /* [fallback] */ |
|
11 | + ]; |
|
12 | 12 | |
13 | - $stmt = $__db->prepare("SELECT * FROM videos WHERE lower(title) LIKE lower(:search) "); |
|
14 | - $stmt->bindParam(":search", $request->like_search_term); |
|
15 | - $stmt->execute(); |
|
16 | - $request->search_amount = $stmt->rowCount(); |
|
13 | + $stmt = $__db->prepare("SELECT * FROM videos WHERE lower(title) LIKE lower(:search) "); |
|
14 | + $stmt->bindParam(":search", $request->like_search_term); |
|
15 | + $stmt->execute(); |
|
16 | + $request->search_amount = $stmt->rowCount(); |
|
17 | 17 | |
18 | - $results_per_page = 12; |
|
19 | - $number_of_result = $request->search_amount; |
|
20 | - $number_of_page = ceil ($number_of_result / $results_per_page); |
|
18 | + $results_per_page = 12; |
|
19 | + $number_of_result = $request->search_amount; |
|
20 | + $number_of_page = ceil ($number_of_result / $results_per_page); |
|
21 | 21 | |
22 | - if (!isset ($_GET['page']) ) { |
|
23 | - $page = 1; |
|
24 | - } else { |
|
25 | - $page = (int)$_GET['page']; |
|
26 | - } |
|
22 | + if (!isset ($_GET['page']) ) { |
|
23 | + $page = 1; |
|
24 | + } else { |
|
25 | + $page = (int)$_GET['page']; |
|
26 | + } |
|
27 | 27 | |
28 | - $page_first_result = ($page - 1) * $results_per_page; |
|
28 | + $page_first_result = ($page - 1) * $results_per_page; |
|
29 | 29 | |
30 | - $stmt6 = $__db->prepare("SELECT * FROM videos WHERE lower(title) LIKE lower(:search) ORDER BY id DESC LIMIT :pfirst, :pper"); |
|
31 | - $stmt6->bindParam(":search", $request->like_search_term); |
|
32 | - $stmt6->bindParam(":pfirst", $page_first_result); |
|
33 | - $stmt6->bindParam(":pper", $results_per_page); |
|
34 | - $stmt6->execute(); |
|
30 | + $stmt6 = $__db->prepare("SELECT * FROM videos WHERE lower(title) LIKE lower(:search) ORDER BY id DESC LIMIT :pfirst, :pper"); |
|
31 | + $stmt6->bindParam(":search", $request->like_search_term); |
|
32 | + $stmt6->bindParam(":pfirst", $page_first_result); |
|
33 | + $stmt6->bindParam(":pper", $results_per_page); |
|
34 | + $stmt6->execute(); |
|
35 | 35 | |
36 | - /* TODO :: Easy & Clean Pagination Class PLZ :((( ))) */ |
|
36 | + /* TODO :: Easy & Clean Pagination Class PLZ :((( ))) */ |
|
37 | 37 | ?> |
38 | 38 | <?php $__video_h = new video_helper($__db); ?> |
39 | 39 | <?php $__user_h = new user_helper($__db); ?> |
40 | 40 | <?php $__db_h = new db_helper(); ?> |
41 | 41 | <?php $__time_h = new time_helper(); ?> |
42 | 42 | <?php |
43 | - $__server->page_embeds->page_title = "SubRocks - Search"; |
|
44 | - $__server->page_embeds->page_description = "SubRocks is a site dedicated to bring back the 2012 layout of YouTube."; |
|
45 | - $__server->page_embeds->page_image = "/yt/imgbin/full-size-logo.png"; |
|
46 | - $__server->page_embeds->page_url = "https://subrock.rocks/"; |
|
43 | + $__server->page_embeds->page_title = "SubRocks - Search"; |
|
44 | + $__server->page_embeds->page_description = "SubRocks is a site dedicated to bring back the 2012 layout of YouTube."; |
|
45 | + $__server->page_embeds->page_image = "/yt/imgbin/full-size-logo.png"; |
|
46 | + $__server->page_embeds->page_url = "https://subrock.rocks/"; |
|
47 | 47 | ?> |
48 | 48 | <!DOCTYPE html> |
49 | 49 | <html> |
@@ -219,14 +219,14 @@ discard block |
||
219 | 219 | <div id="results-main-content"> |
220 | 220 | <ol id="search-results"> |
221 | 221 | <?php |
222 | - while($video = $stmt6->fetch(PDO::FETCH_ASSOC)) { |
|
223 | - $video['video_responses'] = $__video_h->get_video_responses($video['rid']); |
|
224 | - $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
|
225 | - $video['duration'] = $__time_h->timestamp($video['duration']); |
|
226 | - $video['views'] = $__video_h->fetch_video_views($video['rid']); |
|
227 | - $video['author'] = htmlspecialchars($video['author']); |
|
228 | - $video['title'] = htmlspecialchars($video['title']); |
|
229 | - $video['description'] = $__video_h->shorten_description($video['description'], 50, true); |
|
222 | + while($video = $stmt6->fetch(PDO::FETCH_ASSOC)) { |
|
223 | + $video['video_responses'] = $__video_h->get_video_responses($video['rid']); |
|
224 | + $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
|
225 | + $video['duration'] = $__time_h->timestamp($video['duration']); |
|
226 | + $video['views'] = $__video_h->fetch_video_views($video['rid']); |
|
227 | + $video['author'] = htmlspecialchars($video['author']); |
|
228 | + $video['title'] = htmlspecialchars($video['title']); |
|
229 | + $video['description'] = $__video_h->shorten_description($video['description'], 50, true); |
|
230 | 230 | ?> |
231 | 231 | <li class="yt-grid-box result-item-video *sr "> |
232 | 232 | <div id="" class="yt-uix-tile yt-lockup-list yt-tile-default yt-grid-box "> |
@@ -254,7 +254,7 @@ discard block |
||
254 | 254 | </li> |
255 | 255 | <?php } ?> |
256 | 256 | <?php if($request->search_amount == 0) |
257 | - echo "Your search query has brought no results.<br><br>"; |
|
257 | + echo "Your search query has brought no results.<br><br>"; |
|
258 | 258 | ?> |
259 | 259 | </ol> |
260 | 260 | </div> |
@@ -17,15 +17,15 @@ discard block |
||
17 | 17 | |
18 | 18 | $results_per_page = 12; |
19 | 19 | $number_of_result = $request->search_amount; |
20 | - $number_of_page = ceil ($number_of_result / $results_per_page); |
|
20 | + $number_of_page = ceil($number_of_result/$results_per_page); |
|
21 | 21 | |
22 | - if (!isset ($_GET['page']) ) { |
|
22 | + if (!isset ($_GET['page'])) { |
|
23 | 23 | $page = 1; |
24 | 24 | } else { |
25 | - $page = (int)$_GET['page']; |
|
25 | + $page = (int) $_GET['page']; |
|
26 | 26 | } |
27 | 27 | |
28 | - $page_first_result = ($page - 1) * $results_per_page; |
|
28 | + $page_first_result = ($page - 1)*$results_per_page; |
|
29 | 29 | |
30 | 30 | $stmt6 = $__db->prepare("SELECT * FROM videos WHERE lower(title) LIKE lower(:search) ORDER BY id DESC LIMIT :pfirst, :pper"); |
31 | 31 | $stmt6->bindParam(":search", $request->like_search_term); |
@@ -219,7 +219,7 @@ discard block |
||
219 | 219 | <div id="results-main-content"> |
220 | 220 | <ol id="search-results"> |
221 | 221 | <?php |
222 | - while($video = $stmt6->fetch(PDO::FETCH_ASSOC)) { |
|
222 | + while ($video = $stmt6->fetch(PDO::FETCH_ASSOC)) { |
|
223 | 223 | $video['video_responses'] = $__video_h->get_video_responses($video['rid']); |
224 | 224 | $video['age'] = $__time_h->time_elapsed_string($video['publish']); |
225 | 225 | $video['duration'] = $__time_h->timestamp($video['duration']); |
@@ -253,7 +253,7 @@ discard block |
||
253 | 253 | </div> |
254 | 254 | </li> |
255 | 255 | <?php } ?> |
256 | - <?php if($request->search_amount == 0) |
|
256 | + <?php if ($request->search_amount == 0) |
|
257 | 257 | echo "Your search query has brought no results.<br><br>"; |
258 | 258 | ?> |
259 | 259 | </ol> |
@@ -267,7 +267,7 @@ discard block |
||
267 | 267 | </div> |
268 | 268 | <div id="search-footer-box" class="searchFooterBox"> |
269 | 269 | <div class="yt-uix-pager" role="navigation"> |
270 | - <?php for($page = 1; $page<= $number_of_page; $page++) { ?> |
|
270 | + <?php for ($page = 1; $page <= $number_of_page; $page++) { ?> |
|
271 | 271 | <a href="/results?search_query=<?php echo $request->search_term; ?>&page=<?php echo $page; ?>"> |
272 | 272 | <button class="yt-uix-button yt-uix-button-default"><?php echo $page; ?></button> |
273 | 273 | </a> |
@@ -253,8 +253,9 @@ |
||
253 | 253 | </div> |
254 | 254 | </li> |
255 | 255 | <?php } ?> |
256 | - <?php if($request->search_amount == 0) |
|
256 | + <?php if($request->search_amount == 0) { |
|
257 | 257 | echo "Your search query has brought no results.<br><br>"; |
258 | +} |
|
258 | 259 | ?> |
259 | 260 | </ol> |
260 | 261 | </div> |
@@ -14,17 +14,17 @@ discard block |
||
14 | 14 | "action" => "l" /* fallback */ |
15 | 15 | ]; |
16 | 16 | |
17 | -if(!isset($_SESSION['siteusername']) || !isset($_GET['id'])) |
|
17 | +if (!isset($_SESSION['siteusername']) || !isset($_GET['id'])) |
|
18 | 18 | header('Location: ' . $_SERVER['HTTP_REFERER']); |
19 | 19 | |
20 | -if(isset($_GET['a']) && $_GET['a'] == "-1") |
|
20 | +if (isset($_GET['a']) && $_GET['a'] == "-1") |
|
21 | 21 | $request->action = "d"; |
22 | 22 | |
23 | 23 | $stmt = $__db->prepare("SELECT * FROM comment_likes WHERE sender = :username AND reciever = :reciever AND type = 'l'"); |
24 | 24 | $stmt->bindParam(":username", $_SESSION['siteusername']); |
25 | 25 | $stmt->bindParam(":reciever", $request->comment_id); |
26 | 26 | $stmt->execute(); |
27 | -while($comment = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
27 | +while ($comment = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
28 | 28 | $stmt = $__db->prepare("DELETE FROM comment_likes WHERE sender = :username AND reciever = :reciever"); |
29 | 29 | $stmt->execute(array( |
30 | 30 | ':username' => $_SESSION['siteusername'], |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | $stmt->bindParam(":username", $_SESSION['siteusername']); |
38 | 38 | $stmt->bindParam(":reciever", $request->comment_id); |
39 | 39 | $stmt->execute(); |
40 | -while($comment = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
40 | +while ($comment = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
41 | 41 | $stmt = $__db->prepare("DELETE FROM comment_likes WHERE sender = :username AND reciever = :reciever"); |
42 | 42 | $stmt->execute(array( |
43 | 43 | ':username' => $_SESSION['siteusername'], |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | header('Location: ' . $_SERVER['HTTP_REFERER']); |
47 | 47 | } |
48 | 48 | |
49 | -if($request->action == "l") { |
|
49 | +if ($request->action == "l") { |
|
50 | 50 | $stmt = $__db->prepare("INSERT INTO comment_likes (sender, reciever, type) VALUES (:sender, :reciever, 'l')"); |
51 | 51 | $stmt->bindParam(":sender", $_SESSION['siteusername']); |
52 | 52 | $stmt->bindParam(":reciever", $request->comment_id); |
@@ -14,11 +14,13 @@ |
||
14 | 14 | "action" => "l" /* fallback */ |
15 | 15 | ]; |
16 | 16 | |
17 | -if(!isset($_SESSION['siteusername']) || !isset($_GET['id'])) |
|
18 | - header('Location: ' . $_SERVER['HTTP_REFERER']); |
|
17 | +if(!isset($_SESSION['siteusername']) || !isset($_GET['id'])) { |
|
18 | + header('Location: ' . $_SERVER['HTTP_REFERER']); |
|
19 | +} |
|
19 | 20 | |
20 | -if(isset($_GET['a']) && $_GET['a'] == "-1") |
|
21 | +if(isset($_GET['a']) && $_GET['a'] == "-1") { |
|
21 | 22 | $request->action = "d"; |
23 | +} |
|
22 | 24 | |
23 | 25 | $stmt = $__db->prepare("SELECT * FROM comment_likes WHERE sender = :username AND reciever = :reciever AND type = 'l'"); |
24 | 26 | $stmt->bindParam(":username", $_SESSION['siteusername']); |
@@ -8,36 +8,36 @@ |
||
8 | 8 | <?php $__db_h = new db_helper(); ?> |
9 | 9 | <?php $__time_h = new time_helper(); ob_start(); ?> |
10 | 10 | <?php |
11 | - $request = (object) [ |
|
12 | - "search_term" => $_SESSION['siteusername'], |
|
13 | - "like_search_term" => "%" . $_SESSION['siteusername'] . "%", |
|
14 | - "search_amount" => 0 /* [fallback] */ |
|
15 | - ]; |
|
11 | + $request = (object) [ |
|
12 | + "search_term" => $_SESSION['siteusername'], |
|
13 | + "like_search_term" => "%" . $_SESSION['siteusername'] . "%", |
|
14 | + "search_amount" => 0 /* [fallback] */ |
|
15 | + ]; |
|
16 | 16 | |
17 | - $stmt = $__db->prepare("SELECT * FROM playlists WHERE lower(author) LIKE lower(:search) "); |
|
18 | - $stmt->bindParam(":search", $request->like_search_term); |
|
19 | - $stmt->execute(); |
|
20 | - $request->search_amount = $stmt->rowCount(); |
|
17 | + $stmt = $__db->prepare("SELECT * FROM playlists WHERE lower(author) LIKE lower(:search) "); |
|
18 | + $stmt->bindParam(":search", $request->like_search_term); |
|
19 | + $stmt->execute(); |
|
20 | + $request->search_amount = $stmt->rowCount(); |
|
21 | 21 | |
22 | - $results_per_page = 12; |
|
23 | - $number_of_result = $request->search_amount; |
|
24 | - $number_of_page = ceil ($number_of_result / $results_per_page); |
|
22 | + $results_per_page = 12; |
|
23 | + $number_of_result = $request->search_amount; |
|
24 | + $number_of_page = ceil ($number_of_result / $results_per_page); |
|
25 | 25 | |
26 | - if (!isset ($_GET['page']) ) { |
|
27 | - $page = 1; |
|
28 | - } else { |
|
29 | - $page = (int)$_GET['page']; |
|
30 | - } |
|
26 | + if (!isset ($_GET['page']) ) { |
|
27 | + $page = 1; |
|
28 | + } else { |
|
29 | + $page = (int)$_GET['page']; |
|
30 | + } |
|
31 | 31 | |
32 | - $page_first_result = ($page - 1) * $results_per_page; |
|
32 | + $page_first_result = ($page - 1) * $results_per_page; |
|
33 | 33 | |
34 | - $stmt6 = $__db->prepare("SELECT * FROM playlists WHERE lower(author) LIKE lower(:search) ORDER BY id DESC LIMIT :pfirst, :pper"); |
|
35 | - $stmt6->bindParam(":search", $request->like_search_term); |
|
36 | - $stmt6->bindParam(":pfirst", $page_first_result); |
|
37 | - $stmt6->bindParam(":pper", $results_per_page); |
|
38 | - $stmt6->execute(); |
|
34 | + $stmt6 = $__db->prepare("SELECT * FROM playlists WHERE lower(author) LIKE lower(:search) ORDER BY id DESC LIMIT :pfirst, :pper"); |
|
35 | + $stmt6->bindParam(":search", $request->like_search_term); |
|
36 | + $stmt6->bindParam(":pfirst", $page_first_result); |
|
37 | + $stmt6->bindParam(":pper", $results_per_page); |
|
38 | + $stmt6->execute(); |
|
39 | 39 | |
40 | - /* TODO :: Easy & Clean Pagination Class PLZ :((( ))) */ |
|
40 | + /* TODO :: Easy & Clean Pagination Class PLZ :((( ))) */ |
|
41 | 41 | ?> |
42 | 42 | <table style="width: 100%;"> |
43 | 43 | <tr> |
@@ -21,15 +21,15 @@ discard block |
||
21 | 21 | |
22 | 22 | $results_per_page = 12; |
23 | 23 | $number_of_result = $request->search_amount; |
24 | - $number_of_page = ceil ($number_of_result / $results_per_page); |
|
24 | + $number_of_page = ceil($number_of_result/$results_per_page); |
|
25 | 25 | |
26 | - if (!isset ($_GET['page']) ) { |
|
26 | + if (!isset ($_GET['page'])) { |
|
27 | 27 | $page = 1; |
28 | 28 | } else { |
29 | - $page = (int)$_GET['page']; |
|
29 | + $page = (int) $_GET['page']; |
|
30 | 30 | } |
31 | 31 | |
32 | - $page_first_result = ($page - 1) * $results_per_page; |
|
32 | + $page_first_result = ($page - 1)*$results_per_page; |
|
33 | 33 | |
34 | 34 | $stmt6 = $__db->prepare("SELECT * FROM playlists WHERE lower(author) LIKE lower(:search) ORDER BY id DESC LIMIT :pfirst, :pper"); |
35 | 35 | $stmt6->bindParam(":search", $request->like_search_term); |
@@ -50,10 +50,10 @@ discard block |
||
50 | 50 | </tr> |
51 | 51 | |
52 | 52 | <?php |
53 | - while($playlist = $stmt6->fetch(PDO::FETCH_ASSOC)) { |
|
53 | + while ($playlist = $stmt6->fetch(PDO::FETCH_ASSOC)) { |
|
54 | 54 | $playlist['videos'] = json_decode($playlist['videos']); |
55 | - if($__video_h->video_exists(@$playlist['videos'][0])) { |
|
56 | - if(count($playlist['videos']) != 0) { |
|
55 | + if ($__video_h->video_exists(@$playlist['videos'][0])) { |
|
56 | + if (count($playlist['videos']) != 0) { |
|
57 | 57 | $video = $__video_h->fetch_video_rid($playlist['videos'][0]); |
58 | 58 | $video['video_responses'] = $__video_h->get_video_responses($video['rid']); |
59 | 59 | $video['age'] = $__time_h->time_elapsed_string($video['publish']); |