Add super fancy No Refresh saving with a toast

This commit is contained in:
slawkens
2023-07-22 13:58:20 +02:00
parent b433615e68
commit 4d61b0ef85
5 changed files with 84 additions and 9 deletions

View File

@@ -0,0 +1,28 @@
<?php
const MYAAC_ADMIN = true;
require '../../common.php';
require SYSTEM . 'functions.php';
require SYSTEM . 'init.php';
require SYSTEM . 'login.php';
if(!admin()) {
http_response_code(500);
die('Access denied.');
}
if (!isset($_REQUEST['plugin'])) {
http_response_code(500);
die('Please enter plugin name.');
}
if (!isset($_POST['settings'])) {
http_response_code(500);
die('Please enter settings.');
}
$settings = Settings::getInstance();
$settings->save($_REQUEST['plugin'], $_POST['settings']);
echo 'Saved at ' . date('H:i');