$docroot = $docroot ?? $_SERVER['DOCUMENT_ROOT'] ?: '/usr/local/emhttp'; require_once "$docroot/webGui/include/Helpers.php"; $boot = "/boot/config/plugins/dynamix"; $file = $_GET['file'] ?? $_POST['file']; $model = $_POST['model'] ?? false; $exist = file_exists("$boot/$file"); if ($_POST['mode']=='set') { if ($model) file_put_contents("$boot/$file",$model); elseif ($exist) unlink("$boot/$file"); exit; } if ($_POST['mode']=='get') { if ($exist) echo file_get_contents("$boot/$file"); exit; } $casemodel = $exist ? file_get_contents("$boot/$file") : ''; ?> "> "> ">