diff --git a/html/account/index.php b/html/account/index.php
index 52017a6e..efa43a65 100755
--- a/html/account/index.php
+++ b/html/account/index.php
@@ -1,4 +1,11 @@
/login');
+}
+
require("../../include/variables.php");
require("../../include/init.php");
require("../../include/main-functions.php");
diff --git a/html/admin/index.php b/html/admin/index.php
index ed55fd9b..6a648bbb 100755
--- a/html/admin/index.php
+++ b/html/admin/index.php
@@ -1,4 +1,10 @@
/login');
+}
+
require("../../include/variables.php");
require("../../include/init.php");
require("../../include/main-functions.php");
@@ -7,11 +14,6 @@ require("../../include/panels.php");
$pdo = sqlConnect($sqlDatabaseHost, $sqlDatabaseName, $sqlDatabaseUser, $sqlDatabasePass);
-if ($_SESSION['userRole'] < 1) {
- header("Location: login.php");
- http_response_code(404);
-}
-
// Getting article informations
if (isset($_GET['article'])) {
diff --git a/html/login/index.php b/html/login/index.php
index 14a5cc56..44c7f2e8 100755
--- a/html/login/index.php
+++ b/html/login/index.php
@@ -1,4 +1,10 @@
/login');
+}
+
require("../../include/variables.php");
require("../../include/init.php");
require("../../include/main-functions.php");
@@ -6,11 +13,6 @@ require("../../include/panels.php");
$pdo = sqlConnect($sqlDatabaseHost, $sqlDatabaseName, $sqlDatabaseUser, $sqlDatabasePass);
-if (!isset($_SESSION['userID'])) {
- header("Location: /login");
- http_response_code(403);
-}
-
if (isset($_POST['delete-account']) && $_POST['delete-account'] == "delete-account") {
$sqlRequest = "DELETE FROM users WHERE ID = :userID";
$request = $pdo->prepare($sqlRequest);
diff --git a/html/settings/index.php b/html/settings/index.php
index f3bf8a7c..d03e0934 100755
--- a/html/settings/index.php
+++ b/html/settings/index.php
@@ -1,4 +1,11 @@
/login');
+}
+
require("../../include/variables.php");
require("../../include/init.php");
require("../../include/main-functions.php");
@@ -7,11 +14,6 @@ require("../../include/panels.php");
$pdo = sqlConnect($sqlDatabaseHost, $sqlDatabaseName, $sqlDatabaseUser, $sqlDatabasePass);
-if (!isset($_SESSION['userID'])) {
- header("Location: /login");
- http_response_code(403);
-}
-
if (isset($_POST['username']) && isset($_POST['email'])) {
if(empty($_POST['username']) == false) {
if(preg_match('!\S!u', $_POST['username']) && preg_match('!\S!u', $_POST['email'])) {
diff --git a/html/upload/index.php b/html/upload/index.php
index 10161554..0be9c759 100755
--- a/html/upload/index.php
+++ b/html/upload/index.php
@@ -1,4 +1,11 @@
/login');
+}
+
require("../../include/variables.php");
require("../../include/init.php");
require("../../include/main-functions.php");
@@ -7,11 +14,6 @@ require("../../include/panels.php");
$pdo = sqlConnect($sqlDatabaseHost, $sqlDatabaseName, $sqlDatabaseUser, $sqlDatabasePass);
-if ($_SESSION['userRole'] < 1) {
- header("Location: login.php");
- http_response_code(404);
-}
-
if(isset($_POST['article-content']) && isset($_POST['classification'])) {
$sqlRequest = "SELECT ID FROM articles WHERE ID >= 1 ORDER BY ID DESC LIMIT 1";
$request = $pdo->prepare($sqlRequest);