Make dashboard view permanent across browsers

- settings are now saved on flash instead of cookies
This commit is contained in:
bergware
2025-02-02 18:43:00 +01:00
parent 945c91c21d
commit 1bb791f7ec
3 changed files with 163 additions and 85 deletions

View File

@@ -1,6 +1,6 @@
<?PHP
/* Copyright 2005-2023, Lime Technology
* Copyright 2012-2023, Bergware International.
/* Copyright 2005-2025, Lime Technology
* Copyright 2012-2025, Bergware International.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License version 2,
@@ -14,6 +14,7 @@
$docroot ??= ($_SERVER['DOCUMENT_ROOT'] ?: '/usr/local/emhttp');
$charts = '/var/tmp/charts_data.tmp';
$cookie = '/boot/config/cookie.json';
switch ($_POST['cmd']) {
case 'get':
@@ -22,5 +23,8 @@ case 'get':
case 'set':
file_put_contents($charts,$_POST['data']);
break;
case 'cookie':
file_put_contents($cookie,$_POST['data']);
break;
}
?>