From eef52c3e87ff59b0b928f58cf8332dfde4060543 Mon Sep 17 00:00:00 2001 From: mazkdevf Date: Thu, 30 Jun 2022 11:30:26 +0300 Subject: [PATCH] Update, Fixed pages, Code Format, etc --- restorecord_db_schema.sql | 6 +- website source/admin/index.php | 804 +++++++++--------- website source/api/upgrade/index.php | 2 +- website source/auth/index.php | 8 +- .../dashboard/account/settings/index.php | 4 +- .../dashboard/account/upgrade/index.php | 196 ++--- .../dashboard/server/blacklist/index.php | 508 ++++++----- .../dashboard/server/members/index.php | 589 ++++++------- .../dashboard/server/settings/index.php | 659 +++++++------- website source/includes/connection.php | 24 +- website source/includes/functions.php | 20 +- website source/index.php | 34 +- website source/login/index.php | 2 +- website source/terms/index.php | 4 +- website source/verify/index.php | 467 +++++----- 15 files changed, 1621 insertions(+), 1706 deletions(-) diff --git a/restorecord_db_schema.sql b/restorecord_db_schema.sql index c7d0f20..a53f6de 100644 --- a/restorecord_db_schema.sql +++ b/restorecord_db_schema.sql @@ -144,19 +144,19 @@ ALTER TABLE `blacklist` -- AUTO_INCREMENT for table `members` -- ALTER TABLE `members` - MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=61; + MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=0; -- -- AUTO_INCREMENT for table `servers` -- ALTER TABLE `servers` - MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8; + MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=0; -- -- AUTO_INCREMENT for table `users` -- ALTER TABLE `users` - MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; + MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=0; COMMIT; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; diff --git a/website source/admin/index.php b/website source/admin/index.php index 43fe87a..cb8d840 100644 --- a/website source/admin/index.php +++ b/website source/admin/index.php @@ -13,8 +13,7 @@ session_start(); } -if (!isset($_SESSION['username'])) -{ +if (!isset($_SESSION['username'])) { header("Location: ../../../login/"); exit(); } @@ -27,82 +26,89 @@ $row = mysqli_fetch_array($result); $banned = $row['banned']; -if (!is_null($banned)) -{ - echo ""; - session_destroy(); - exit(); +if (!is_null($banned)) { + echo ""; + session_destroy(); + exit(); } $admin = $row['admin']; -if(!$admin) -{ - ?> - - -SUS - - - - - -⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣤⣤⣤⣤⣤⣶⣦⣤⣄⡀⠀⠀⠀⠀⠀⠀⠀⠀ -⠀⠀⠀⠀⠀⠀⠀⠀⢀⣴⣿⡿⠛⠉⠙⠛⠛⠛⠛⠻⢿⣿⣷⣤⡀⠀⠀⠀⠀⠀ -⠀⠀⠀⠀⠀⠀⠀⠀⣼⣿⠋⠀⠀⠀⠀⠀⠀⠀⢀⣀⣀⠈⢻⣿⣿⡄⠀⠀⠀⠀ -⠀⠀⠀⠀⠀⠀⠀⣸⣿⡏⠀⠀⠀⣠⣶⣾⣿⣿⣿⠿⠿⠿⢿⣿⣿⣿⣄⠀⠀⠀ -⠀⠀⠀⠀⠀⠀⠀⣿⣿⠁⠀⠀⢰⣿⣿⣯⠁⠀⠀⠀⠀⠀⠀⠀⠈⠙⢿⣷⡄⠀ -⠀⠀⣀⣤⣴⣶⣶⣿⡟⠀⠀⠀⢸⣿⣿⣿⣆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣷⠀ -⠀⢰⣿⡟⠋⠉⣹⣿⡇⠀⠀⠀⠘⣿⣿⣿⣿⣷⣦⣤⣤⣤⣶⣶⣶⣶⣿⣿⣿⠀ -⠀⢸⣿⡇⠀⠀⣿⣿⡇⠀⠀⠀⠀⠹⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠃⠀ -⠀⣸⣿⡇⠀⠀⣿⣿⡇⠀⠀⠀⠀⠀⠉⠻⠿⣿⣿⣿⣿⡿⠿⠿⠛⢻⣿⡇⠀⠀ -⠀⣿⣿⠁⠀⠀⣿⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣧⠀⠀ -⠀⣿⣿⠀⠀⠀⣿⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⠀⠀ -⠀⣿⣿⠀⠀⠀⣿⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⠀⠀ -⠀⢿⣿⡆⠀⠀⣿⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⡇⠀⠀ -⠀⠸⣿⣧⡀⠀⣿⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⠃⠀⠀ -⠀⠀⠛⢿⣿⣿⣿⣿⣇⠀⠀⠀⠀⠀⣰⣿⣿⣷⣶⣶⣶⣶⠶⠀⢠⣿⣿⠀⠀⠀ -⠀⠀⠀⠀⠀⠀⠀⣿⣿⠀⠀⠀⠀⠀⣿⣿⡇⠀⣽⣿⡏⠁⠀⠀⢸⣿⡇⠀⠀⠀ -⠀⠀⠀⠀⠀⠀⠀⣿⣿⠀⠀⠀⠀⠀⣿⣿⡇⠀⢹⣿⡆⠀⠀⠀⣸⣿⠇⠀⠀⠀ -⠀⠀⠀⠀⠀⠀⠀⢿⣿⣦⣄⣀⣠⣴⣿⣿⠁⠀⠈⠻⣿⣿⣿⣿⡿⠏⠀⠀⠀⠀ -⠀⠀⠀⠀⠀⠀⠀⠈⠛⠻⠿⠿⠿⠿⠋⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ - - - +if (!$admin) { +?> + + + + SUS + + + + + + + ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣤⣤⣤⣤⣤⣶⣦⣤⣄⡀⠀⠀⠀⠀⠀⠀⠀⠀ + ⠀⠀⠀⠀⠀⠀⠀⠀⢀⣴⣿⡿⠛⠉⠙⠛⠛⠛⠛⠻⢿⣿⣷⣤⡀⠀⠀⠀⠀⠀ + ⠀⠀⠀⠀⠀⠀⠀⠀⣼⣿⠋⠀⠀⠀⠀⠀⠀⠀⢀⣀⣀⠈⢻⣿⣿⡄⠀⠀⠀⠀ + ⠀⠀⠀⠀⠀⠀⠀⣸⣿⡏⠀⠀⠀⣠⣶⣾⣿⣿⣿⠿⠿⠿⢿⣿⣿⣿⣄⠀⠀⠀ + ⠀⠀⠀⠀⠀⠀⠀⣿⣿⠁⠀⠀⢰⣿⣿⣯⠁⠀⠀⠀⠀⠀⠀⠀⠈⠙⢿⣷⡄⠀ + ⠀⠀⣀⣤⣴⣶⣶⣿⡟⠀⠀⠀⢸⣿⣿⣿⣆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣷⠀ + ⠀⢰⣿⡟⠋⠉⣹⣿⡇⠀⠀⠀⠘⣿⣿⣿⣿⣷⣦⣤⣤⣤⣶⣶⣶⣶⣿⣿⣿⠀ + ⠀⢸⣿⡇⠀⠀⣿⣿⡇⠀⠀⠀⠀⠹⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠃⠀ + ⠀⣸⣿⡇⠀⠀⣿⣿⡇⠀⠀⠀⠀⠀⠉⠻⠿⣿⣿⣿⣿⡿⠿⠿⠛⢻⣿⡇⠀⠀ + ⠀⣿⣿⠁⠀⠀⣿⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣧⠀⠀ + ⠀⣿⣿⠀⠀⠀⣿⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⠀⠀ + ⠀⣿⣿⠀⠀⠀⣿⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⠀⠀ + ⠀⢿⣿⡆⠀⠀⣿⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⡇⠀⠀ + ⠀⠸⣿⣧⡀⠀⣿⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⠃⠀⠀ + ⠀⠀⠛⢿⣿⣿⣿⣿⣇⠀⠀⠀⠀⠀⣰⣿⣿⣷⣶⣶⣶⣶⠶⠀⢠⣿⣿⠀⠀⠀ + ⠀⠀⠀⠀⠀⠀⠀⣿⣿⠀⠀⠀⠀⠀⣿⣿⡇⠀⣽⣿⡏⠁⠀⠀⢸⣿⡇⠀⠀⠀ + ⠀⠀⠀⠀⠀⠀⠀⣿⣿⠀⠀⠀⠀⠀⣿⣿⡇⠀⢹⣿⡆⠀⠀⠀⣸⣿⠇⠀⠀⠀ + ⠀⠀⠀⠀⠀⠀⠀⢿⣿⣦⣄⣀⣠⣴⣿⣿⠁⠀⠈⠻⣿⣿⣿⣿⡿⠏⠀⠀⠀⠀ + ⠀⠀⠀⠀⠀⠀⠀⠈⠛⠻⠿⠿⠿⠿⠋⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ + + + + + RestoreCord - Admin - - + + - - - - - + + + + + + +
@@ -123,13 +129,13 @@
+ @@ -254,8 +257,10 @@ + Copyright © RestoreCord + @@ -268,12 +273,12 @@ - - + + - + @@ -289,7 +294,7 @@ - + @@ -301,8 +306,8 @@ - - + + @@ -310,6 +315,7 @@ - + + \ No newline at end of file diff --git a/website source/dashboard/server/blacklist/index.php b/website source/dashboard/server/blacklist/index.php index b4a575b..6799a76 100644 --- a/website source/dashboard/server/blacklist/index.php +++ b/website source/dashboard/server/blacklist/index.php @@ -10,8 +10,7 @@ session_start(); } -if (!isset($_SESSION['username'])) -{ +if (!isset($_SESSION['username'])) { header("Location: ../../../login/"); exit(); } @@ -24,11 +23,10 @@ $row = mysqli_fetch_array($result); $banned = $row['banned']; -if (!is_null($banned)) -{ - echo ""; - session_destroy(); - exit(); +if (!is_null($banned)) { + echo ""; + session_destroy(); + exit(); } $role = $row['role']; @@ -40,6 +38,7 @@ ?> + @@ -48,103 +47,93 @@ RestoreCord - Blacklist - + - + - - - + + + + + - - 0) // if the user already owns an app, proceed to change app or load only app - { - if (mysqli_num_rows($result) == 1) // if the user only owns one app, load that app (they can still change app after it's loaded) - + $result = mysqli_query($link, "SELECT * FROM `servers` WHERE `owner` = '$username' AND `banned` IS NULL"); // select all apps where owner is current user + if (mysqli_num_rows($result) > 0) // if the user already owns an app, proceed to change app or load only app + { - $row = mysqli_fetch_array($result); - $_SESSION['server_to_manage'] = $row["name"]; - $_SESSION['serverid'] = $row["guildid"]; -?> + + if (mysqli_num_rows($result) == 1) // if the user only owns one app, load that app (they can still change app after it's loaded) + + { + $row = mysqli_fetch_array($result); + $_SESSION['server_to_manage'] = $row["name"]; + $_SESSION['serverid'] = $row["guildid"]; + ?> - + - + + - - + + - - + ?> + @@ -197,13 +186,13 @@ - + + + + @@ -241,7 +230,7 @@ @@ -270,99 +259,91 @@ - - - - - -