summaryrefslogtreecommitdiff
path: root/emotes
diff options
context:
space:
mode:
Diffstat (limited to 'emotes')
-rw-r--r--emotes/delete.php6
-rw-r--r--emotes/index.php12
-rw-r--r--emotes/rate.php8
-rw-r--r--emotes/setmanip.php8
-rw-r--r--emotes/upload.php14
5 files changed, 24 insertions, 24 deletions
diff --git a/emotes/delete.php b/emotes/delete.php
index 6252e45..159e293 100644
--- a/emotes/delete.php
+++ b/emotes/delete.php
@@ -1,7 +1,7 @@
<?php
-include_once "../../src/alert.php";
-include_once "../../src/config.php";
-include_once "../../src/accounts.php";
+include_once "{$_SERVER['DOCUMENT_ROOT']}/lib/alert.php";
+include_once "{$_SERVER['DOCUMENT_ROOT']}/lib/config.php";
+include_once "{$_SERVER['DOCUMENT_ROOT']}/lib/accounts.php";
if (!authorize_user(true)) {
generate_alert("/account", "Not authorized", 403);
diff --git a/emotes/index.php b/emotes/index.php
index af14120..80a8c1d 100644
--- a/emotes/index.php
+++ b/emotes/index.php
@@ -1,10 +1,10 @@
<?php
-include "../../src/emote.php";
-include "../../src/accounts.php";
-include_once "../../src/config.php";
-include "../../src/partials.php";
-include "../../src/utils.php";
-include "../../src/alert.php";
+include "{$_SERVER['DOCUMENT_ROOT']}/lib/emote.php";
+include "{$_SERVER['DOCUMENT_ROOT']}/lib/accounts.php";
+include_once "{$_SERVER['DOCUMENT_ROOT']}/lib/config.php";
+include "{$_SERVER['DOCUMENT_ROOT']}/lib/partials.php";
+include "{$_SERVER['DOCUMENT_ROOT']}/lib/utils.php";
+include "{$_SERVER['DOCUMENT_ROOT']}/lib/alert.php";
authorize_user();
diff --git a/emotes/rate.php b/emotes/rate.php
index 1e8eb67..fbea404 100644
--- a/emotes/rate.php
+++ b/emotes/rate.php
@@ -1,8 +1,8 @@
<?php
-include_once "../../src/alert.php";
-include_once "../../src/utils.php";
-include_once "../../src/config.php";
-include_once "../../src/accounts.php";
+include_once "{$_SERVER['DOCUMENT_ROOT']}/lib/alert.php";
+include_once "{$_SERVER['DOCUMENT_ROOT']}/lib/utils.php";
+include_once "{$_SERVER['DOCUMENT_ROOT']}/lib/config.php";
+include_once "{$_SERVER['DOCUMENT_ROOT']}/lib/accounts.php";
if (!RATING_ENABLE) {
generate_alert("/404.php", "Emote ratings are disabled", 403);
diff --git a/emotes/setmanip.php b/emotes/setmanip.php
index 129790d..cf8add6 100644
--- a/emotes/setmanip.php
+++ b/emotes/setmanip.php
@@ -1,8 +1,8 @@
<?php
-include_once "../../src/config.php";
-include "../../src/accounts.php";
-include "../../src/alert.php";
-include_once "../../src/utils.php";
+include_once "{$_SERVER['DOCUMENT_ROOT']}/lib/config.php";
+include "{$_SERVER['DOCUMENT_ROOT']}/lib/accounts.php";
+include "{$_SERVER['DOCUMENT_ROOT']}/lib/alert.php";
+include_once "{$_SERVER['DOCUMENT_ROOT']}/lib/utils.php";
if (!authorize_user(true)) {
return;
diff --git a/emotes/upload.php b/emotes/upload.php
index 644e4b6..01ae1ee 100644
--- a/emotes/upload.php
+++ b/emotes/upload.php
@@ -1,8 +1,8 @@
<?php
-include "../../src/accounts.php";
-include_once "../../src/config.php";
-include_once "../../src/alert.php";
-include_once "../../src/captcha.php";
+include "{$_SERVER['DOCUMENT_ROOT']}/lib/accounts.php";
+include_once "{$_SERVER['DOCUMENT_ROOT']}/lib/config.php";
+include_once "{$_SERVER['DOCUMENT_ROOT']}/lib/alert.php";
+include_once "{$_SERVER['DOCUMENT_ROOT']}/lib/captcha.php";
if (!EMOTE_UPLOAD) {
generate_alert("/404.php", "Emote upload is disabled", 403);
@@ -36,14 +36,14 @@ function abort_upload(string $path, PDO $db, string $id)
rmdir($path);
}
-include "../../src/utils.php";
-include "../../src/images.php";
+include "{$_SERVER['DOCUMENT_ROOT']}/lib/utils.php";
+include "{$_SERVER['DOCUMENT_ROOT']}/lib/images.php";
$max_width = EMOTE_MAX_SIZE[0];
$max_height = EMOTE_MAX_SIZE[1];
if ($_SERVER['REQUEST_METHOD'] != "POST") {
- include "../../src/partials.php";
+ include "{$_SERVER['DOCUMENT_ROOT']}/lib/partials.php";
echo '' ?>
<html>