From 490c11dc7581ab9c08c52591514d69f242d6f1b4 Mon Sep 17 00:00:00 2001 From: Daniele Briggi Date: Mon, 29 Jul 2024 10:41:33 +0000 Subject: [PATCH] fix(admin-panels): include paths --- admin/backups.php | 4 ++-- admin/commands.php | 4 ++-- admin/connections.php | 4 ++-- admin/console.php | 4 ++-- admin/console_action.php | 4 ++-- admin/databases.php | 4 ++-- admin/download.php | 2 +- admin/include/footer.php | 18 +++++++++--------- admin/include/header.php | 4 ++-- admin/index.php | 4 ++-- admin/latency.php | 4 ++-- admin/login.php | 2 +- admin/login_action.php | 6 +++--- admin/logs.php | 4 ++-- admin/plugins.php | 4 ++-- admin/settings.php | 4 ++-- admin/stats.php | 4 ++-- admin/upload_action.php | 4 ++-- admin/users.php | 4 ++-- vercel.json | 11 +++++------ 20 files changed, 49 insertions(+), 50 deletions(-) diff --git a/admin/backups.php b/admin/backups.php index 891b267..8940ff5 100644 --- a/admin/backups.php +++ b/admin/backups.php @@ -1,4 +1,4 @@ - +
@@ -12,4 +12,4 @@
- + diff --git a/admin/commands.php b/admin/commands.php index 1011f5c..5179d76 100644 --- a/admin/commands.php +++ b/admin/commands.php @@ -1,4 +1,4 @@ - +
@@ -12,4 +12,4 @@
- + diff --git a/admin/connections.php b/admin/connections.php index 543a99f..40e0527 100644 --- a/admin/connections.php +++ b/admin/connections.php @@ -1,4 +1,4 @@ - +
@@ -12,4 +12,4 @@
- + diff --git a/admin/console.php b/admin/console.php index d160e5b..327a4c2 100644 --- a/admin/console.php +++ b/admin/console.php @@ -1,4 +1,4 @@ - +
@@ -34,4 +34,4 @@ global $jsinclude; $jsinclude = "console.js"; ?> - + diff --git a/admin/console_action.php b/admin/console_action.php index 9685f61..74c6970 100644 --- a/admin/console_action.php +++ b/admin/console_action.php @@ -2,8 +2,8 @@ use SQLiteCloud\SQLiteCloudRowset; -include_once('auth.php'); -include_once('common.php'); +include_once(__DIR__ . '/auth.php'); +include_once(__DIR__ . '/common.php'); $data = json_decode(file_get_contents('php://input'), true); $database = $data["database"]; diff --git a/admin/databases.php b/admin/databases.php index f4865a0..96cf5fe 100644 --- a/admin/databases.php +++ b/admin/databases.php @@ -1,4 +1,4 @@ - +
@@ -46,4 +46,4 @@ function on_column($value, $row, $col) global $jsinclude; $jsinclude = "upload.js"; ?> - + diff --git a/admin/download.php b/admin/download.php index 57e4196..fe1a7f8 100644 --- a/admin/download.php +++ b/admin/download.php @@ -1,6 +1,6 @@ ' . $jscript . ''; - } - if (isset($jsinclude)) { - echo ''; - } - echo "\n"; - ?> + if (isset($jscript)) { + echo ''; + } + if (isset($jsinclude)) { + echo ''; + } + echo "\n"; + ?> diff --git a/admin/include/header.php b/admin/include/header.php index bb5d81b..6e40c09 100644 --- a/admin/include/header.php +++ b/admin/include/header.php @@ -1,6 +1,6 @@ diff --git a/admin/index.php b/admin/index.php index 35106a8..22ab5ec 100644 --- a/admin/index.php +++ b/admin/index.php @@ -1,4 +1,4 @@ - +
@@ -21,4 +21,4 @@
- + diff --git a/admin/latency.php b/admin/latency.php index b774af4..a638725 100644 --- a/admin/latency.php +++ b/admin/latency.php @@ -1,4 +1,4 @@ - +
@@ -12,4 +12,4 @@
- + diff --git a/admin/login.php b/admin/login.php index 5b4b40d..38393a3 100644 --- a/admin/login.php +++ b/admin/login.php @@ -1,4 +1,4 @@ - + diff --git a/admin/login_action.php b/admin/login_action.php index 29d668a..8dd6d10 100644 --- a/admin/login_action.php +++ b/admin/login_action.php @@ -6,13 +6,13 @@ $password = $data["password"]; $port = $data["port"]; -include_once('common.php'); +include_once(__DIR__ . '/common.php'); $rc = do_real_connect($hostname, $port, $username, $password); $r = null; if ($rc === true) { // successfully connected - $r = array('result' => 1); + $r = ['result' => 1]; $_SESSION['start'] = time(); $_SESSION['port'] = $port; $_SESSION['hostname'] = $hostname; @@ -20,7 +20,7 @@ $_SESSION['password'] = $password; } else { // error - $r = array('result' => 0, 'msg' => $rc); + $r = ['result' => 0, 'msg' => $rc]; } echo json_encode($r); diff --git a/admin/logs.php b/admin/logs.php index 11d6071..0f12f7b 100644 --- a/admin/logs.php +++ b/admin/logs.php @@ -1,4 +1,4 @@ - +
@@ -43,4 +43,4 @@ function on_column($value, $row, $col)
- + diff --git a/admin/plugins.php b/admin/plugins.php index c4b3d93..a94cfe7 100644 --- a/admin/plugins.php +++ b/admin/plugins.php @@ -1,4 +1,4 @@ - +
@@ -12,4 +12,4 @@
- + diff --git a/admin/settings.php b/admin/settings.php index ab43218..c9b8313 100644 --- a/admin/settings.php +++ b/admin/settings.php @@ -1,4 +1,4 @@ - +
@@ -12,4 +12,4 @@
- + diff --git a/admin/stats.php b/admin/stats.php index 06b4a80..cb02791 100644 --- a/admin/stats.php +++ b/admin/stats.php @@ -1,4 +1,4 @@ - +
@@ -34,4 +34,4 @@ $jscript = $script1 . "\n" . $script2 . "\n" . $script3 . "\n" . $script4 . "\n"; ?> - + diff --git a/admin/upload_action.php b/admin/upload_action.php index 82d2da9..ded2461 100644 --- a/admin/upload_action.php +++ b/admin/upload_action.php @@ -1,7 +1,7 @@ +
@@ -12,4 +12,4 @@
- + diff --git a/vercel.json b/vercel.json index 81724bd..1d1d349 100644 --- a/vercel.json +++ b/vercel.json @@ -2,18 +2,17 @@ "builds": [ { "src": "admin/**/*.php", - "use": "vercel-php@0.3.6", - "config": { - "includeFiles": [ - "admin/**/*" - ] - } + "use": "vercel-php@0.3.6" } ], "routes": [ { "src": "/(.*)", "dest": "/admin/$1" + }, + { + "src": "/assets/(.*)", + "dest": "/admin/assets/$1" } ] }