diff --git a/README.md b/README.md
index 0062c15..0d37dec 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
# Adlerka.Top
-The code for Adlerka.top
+The code for https://adlerka.top
[![MIT License](https://img.shields.io/badge/License-MIT-green.svg)](https://choosealicense.com/licenses/mit/)
diff --git a/assets/scripts/home/account.js b/assets/scripts/home/account.js
deleted file mode 100644
index b28b04f..0000000
--- a/assets/scripts/home/account.js
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
diff --git a/index.php b/index.php
index 078d973..8789e0a 100644
--- a/index.php
+++ b/index.php
@@ -1,4 +1,6 @@
-prepare("INSERT INTO Users (FirstName, LastName, Email, PasswordHash, PrivilegeLevel, isActivated, ActivationToken, RegisteredAt) VALUES (?, ?, ?, ?, ?, 1, ?, NOW())");
$privilege_level = $routerConfig["logged_in_default_permission_level"];
+ /** @noinspection SpellCheckingInspection */
$stmt->bind_param("ssssis", $firstname, $lastname, $email, $passwordHash, $privilege_level, $activation_token);
$stmt->execute();
if ($stmt->affected_rows > 0) {
@@ -188,6 +189,7 @@ function updateUserProfile($firstName, $lastName, $nickname, $minecraft_nickname
$userID = $_SESSION["ID"];
$stmt = $mysqli->prepare("UPDATE Users SET FirstName = ?, LastName = ?, Nickname = ?, MinecraftNick = ? WHERE ID = ?");
+ /** @noinspection SpellCheckingInspection */
$stmt->bind_param("ssssi", $firstName, $lastName, $nickname, $minecraft_nickname, $userID);
$stmt->execute();
@@ -206,6 +208,7 @@ function updateUserEmail($email): array
{
global $mysqli;
$status = ["Status" => "Fail"];
+ /** @noinspection SpellCheckingInspection */
$validmail = false;
if (isLoggedIn() && !empty($email)) {
@@ -221,9 +224,11 @@ function updateUserEmail($email): array
if ($email != $old_email) {
if (isEmailAvailable($email)) {
+ /** @noinspection SpellCheckingInspection */
$validmail = true;
}
} else {
+ /** @noinspection SpellCheckingInspection */
$validmail = true;
}
diff --git a/lib/config.php b/lib/config.php
index 81f2f31..2de72eb 100644
--- a/lib/config.php
+++ b/lib/config.php
@@ -3,7 +3,7 @@
{
global $routerConfig;
- $routerConfig["default_page"] = "domov";
+ $routerConfig["default_page"] = "index";
$routerConfig["default_site"] = "home";
diff --git a/lib/page.php b/lib/page.php
index 6459ea5..936f3b4 100644
--- a/lib/page.php
+++ b/lib/page.php
@@ -111,45 +111,12 @@ function getPage($page_name = null): array|false|string
$page_title = $page_name;
}
- $site_name = $routerRequest["subdomain"];
-
- if(!empty($pageMetadata["parameters"]["page_style"])){
- $style_location = $pageMetadata["parameters"]["page_style"];
- }
- else{
- $style_location = "assets/styles/$site_name/$page_name.css";
- }
-
- if(file_exists($style_location)) {
- $style_tag = $style_location;
- }
- else{
- $style_tag = "";
- }
-
- if(!empty($pageMetadata["parameters"]["page_script"])){
- $script_location = $pageMetadata["parameters"]["page_script"];
- }
- else{
- $script_location = "assets/scripts/$site_name/$page_name.js";
- }
-
- if(file_exists($style_location)) {
- $script_tag = $script_location;
- }
- else{
- $script_tag = "";
- }
-
-
$navpages = generateNavigation();
$nav = str_replace("__NAV_PAGES__", $navpages, $nav);
$out = $skeleton;
$out = str_replace("__TEMPLATE__NAV__", $nav, $out);
- $out = str_replace("__TEMPLATE_PAGE_STYLE_TAG__", $style_tag, $out);
- $out = str_replace("__TEMPLATE_PAGE_SCRIPT_TAG__", $script_tag, $out);
$out = str_replace("__TEMPLATE__PAGE__", $page, $out);
return str_replace("__TEMPLATE_PAGE_TITLE__", $page_title, $out);
}
\ No newline at end of file
diff --git a/lib/router.php b/lib/router.php
index 628a2b4..4223fcd 100644
--- a/lib/router.php
+++ b/lib/router.php
@@ -25,7 +25,6 @@ function initRouter(): bool
if($routerRequest["subdomain"] == $routerConfig["default_site"]){
$routerRequest["subdomain"] = "";
$needsRedirect = true;
- header("redirReasonApex: yes");
}
}
@@ -35,7 +34,6 @@ function initRouter(): bool
// Page name is empty
$needsRedirect = true;
$routerRequest["page_name"] = $routerConfig["default_page"];
- header("redirReasonPage: yes");
}
diff --git a/pages/home/domov.html b/pages/home/domov.html
deleted file mode 100644
index cfb87d5..0000000
--- a/pages/home/domov.html
+++ /dev/null
@@ -1,6 +0,0 @@
- Neoficiálna študentská stránka pre adlerku Neoficiálna študentská stránka pre AdlerkuVitaj na tejto úžasnej stránke
-
-Vitaj, na tejto úžasnej stránke
+
+
Najlepší Minecraft®™ server na Adlerke