#!/usr/bin/php -q $docroot = $docroot ?? $_SERVER['DOCUMENT_ROOT'] ?: '/usr/local/emhttp'; require_once "$docroot/webGui/include/Helpers.php"; extract(parse_plugin_cfg('dynamix',true)); // add translations $_SERVER['REQUEST_URI'] = 'dashboard'; $login_locale = $display['locale']; require_once "$docroot/webGui/include/Translations.php"; function write(...$messages){ $com = curl_init(); curl_setopt_array($com,[ CURLOPT_URL => 'http://localhost/pub/selectcase?buffer_length=1', CURLOPT_UNIX_SOCKET_PATH => '/var/run/nginx.socket', CURLOPT_POST => 1, CURLOPT_RETURNTRANSFER => true ]); foreach ($messages as $message) { curl_setopt($com, CURLOPT_POSTFIELDS, $message); curl_exec($com); } curl_close($com); } $boot = "/boot/config/plugins/dynamix"; $file = $argv[1]; $exist = is_file("$boot/$file"); $cmodel = $exist ? file_get_contents("$boot/$file") : ''; $style = [""; $script = [""; $html = ["