@@ -95,5 +95,5 @@ require('./header.php');
diff --git a/include/discounts-edit.php b/include/discounts-edit.php
index 94f4c29..5c3ce8f 100644
--- a/include/discounts-edit.php
+++ b/include/discounts-edit.php
@@ -17,8 +17,8 @@
* along with this program. If not, see
.
*/
-require_once('./conf.php');
-require_once('./login-ajax.php');
+require_once(__DIR__ . '/../conf.php');
+require_once(__DIR__ . '/../login-ajax.php');
$response = new Response();
$response->success = true;
diff --git a/include/discounts-new.php b/include/discounts-new.php
index 2d7fca5..fd30215 100644
--- a/include/discounts-new.php
+++ b/include/discounts-new.php
@@ -17,8 +17,8 @@
* along with this program. If not, see
.
*/
-require_once('./conf.php');
-require_once('./login-ajax.php');
+require_once(__DIR__ . '/../conf.php');
+require_once(__DIR__ . '/../login-ajax.php');
$response = new Response();
diff --git a/include/discounts-overview.php b/include/discounts-overview.php
index 34f5016..c6c3421 100644
--- a/include/discounts-overview.php
+++ b/include/discounts-overview.php
@@ -17,7 +17,7 @@
* along with this program. If not, see
.
*/
-require_once('./login.php');
+require_once(__DIR__ . '/../login.php');
?>
diff --git a/include/discounts.php b/include/discounts.php
index 5da2dc4..1dae146 100644
--- a/include/discounts.php
+++ b/include/discounts.php
@@ -17,8 +17,8 @@
* along with this program. If not, see
.
*/
-require_once('./index.php');
-require_once('./login.php');
+require_once(__DIR__ . '/../index.php');
+require_once(__DIR__ . '/../login.php');
require('./header.php');
?>
diff --git a/include/file-get.php b/include/file-get.php
index b3f575d..c04b378 100644
--- a/include/file-get.php
+++ b/include/file-get.php
@@ -24,7 +24,7 @@
* along with this program. If not, see
.
*/
-require_once('./conf.php');
+require_once(__DIR__ . '/../conf.php');
$filename = $_REQUEST['name'];
$filepath = Constants::files_folder . $filename;
diff --git a/include/home.php b/include/home.php
index 9fac972..2b64290 100644
--- a/include/home.php
+++ b/include/home.php
@@ -17,8 +17,8 @@
* along with this program. If not, see
.
*/
-require_once('./index.php');
-require_once('./login.php');
+require_once(__DIR__ . '/../index.php');
+require_once(__DIR__ . '/../login.php');
require('./header.php');
?>
diff --git a/include/offers-edit.php b/include/offers-edit.php
index 761b3ee..7a42f2f 100644
--- a/include/offers-edit.php
+++ b/include/offers-edit.php
@@ -17,8 +17,8 @@
* along with this program. If not, see
.
*/
-require_once('./conf.php');
-require_once('./login-ajax.php');
+require_once(__DIR__ . '/../conf.php');
+require_once(__DIR__ . '/../login-ajax.php');
$response = new Response();
$response->success = true;
diff --git a/include/offers-new.php b/include/offers-new.php
index e93d01f..259509d 100644
--- a/include/offers-new.php
+++ b/include/offers-new.php
@@ -17,8 +17,8 @@
* along with this program. If not, see
.
*/
-require_once('./conf.php');
-require_once('./login-ajax.php');
+require_once(__DIR__ . '/../conf.php');
+require_once(__DIR__ . '/../login-ajax.php');
$response = new Response();
diff --git a/include/offers-overview.php b/include/offers-overview.php
index 29b52b3..65aea29 100644
--- a/include/offers-overview.php
+++ b/include/offers-overview.php
@@ -17,7 +17,7 @@
* along with this program. If not, see
.
*/
-require_once('./login.php');
+require_once(__DIR__ . '/../login.php');
?>
diff --git a/include/offers-view.php b/include/offers-view.php
index 5dee452..ec7acf9 100644
--- a/include/offers-view.php
+++ b/include/offers-view.php
@@ -17,7 +17,7 @@
* along with this program. If not, see
.
*/
-require_once('./login.php');
+require_once(__DIR__ . '/../login.php');
$_offer = new Offer($_pdo, $_id);
?>
diff --git a/include/offers.php b/include/offers.php
index 22bd332..6379f62 100644
--- a/include/offers.php
+++ b/include/offers.php
@@ -17,8 +17,8 @@
* along with this program. If not, see
.
*/
-require_once('./index.php');
-require_once('./login.php');
+require_once(__DIR__ . '/../index.php');
+require_once(__DIR__ . '/../login.php');
require('./header.php');
?>
diff --git a/include/pay.php b/include/pay.php
index 69626ea..a30c67a 100644
--- a/include/pay.php
+++ b/include/pay.php
@@ -17,7 +17,7 @@
* along with this program. If not, see
.
*/
-require_once('./index.php');
+require_once(__DIR__ . '/../index.php');
require('./header.php');
?>
diff --git a/include/settings.php b/include/settings.php
index 23d6371..865229d 100644
--- a/include/settings.php
+++ b/include/settings.php
@@ -17,8 +17,8 @@
* along with this program. If not, see
.
*/
-require_once('./index.php');
-require_once('./login.php');
+require_once(__DIR__ . '/../index.php');
+require_once(__DIR__ . '/../login.php');
require('./header.php');
?>
diff --git a/include/users-new.php b/include/users-new.php
index cc01af8..a3bc3e2 100644
--- a/include/users-new.php
+++ b/include/users-new.php
@@ -19,8 +19,8 @@
define('REQUIRE_ADMIN', true);
-require_once('./conf.php');
-require_once('./login-ajax.php');
+require_once(__DIR__ . '/../conf.php');
+require_once(__DIR__ . '/../login-ajax.php');
$response = new Response();
diff --git a/index.php b/index.php
index 4467853..0a27ed1 100644
--- a/index.php
+++ b/index.php
@@ -27,7 +27,7 @@
/**
* Load the basic configuration (sessions, database, class autoloading, etc.)
*/
-require_once('./conf.php');
+require_once(__DIR__ . '/conf.php');
// Fetch information from the REQUEST_URI.
$_request = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);
diff --git a/install/upgrade.php b/install/upgrade.php
index c759df0..7caf46e 100644
--- a/install/upgrade.php
+++ b/install/upgrade.php
@@ -20,7 +20,7 @@
error_reporting(E_ALL);
ini_set('display_errors', 1);
-require('../conf.php');
+require(__DIR__ . '/../conf.php');
function lower_version($that, $new) {
$that = explode('.', $that);
diff --git a/login-ajax.php b/login-ajax.php
index baab859..8b4f4cb 100644
--- a/login-ajax.php
+++ b/login-ajax.php
@@ -27,7 +27,7 @@
* along with this program. If not, see
.
*/
-require_once('./conf.php');
+require_once(__DIR__ . '/conf.php');
if (!isset($_SESSION['login']) || $_SESSION['login'] === false) {
print(json_encode(['success' => false, 'message' => 'You need to be logged in.']));
diff --git a/login.php b/login.php
index c902b10..ec223a5 100644
--- a/login.php
+++ b/login.php
@@ -27,7 +27,7 @@
* along with this program. If not, see
.
*/
-require_once('./conf.php');
+require_once(__DIR__ . '/conf.php');
if (isset($_GET['logout'])) {
$_SESSION['login'] = false;
diff --git a/nav.php b/nav.php
index 22875cb..d5995fc 100644
--- a/nav.php
+++ b/nav.php
@@ -32,10 +32,12 @@