From e7406a997b3b7950ecb78512f08c626c047374ec Mon Sep 17 00:00:00 2001 From: bergware Date: Sat, 25 Nov 2023 12:10:27 +0100 Subject: [PATCH] Enhanced boot page - Follow theme colors - Include array messages --- emhttp/plugins/dynamix/include/Boot.php | 158 ++++++++++++++---- .../dynamix/include/DefaultPageLayout.php | 4 +- 2 files changed, 128 insertions(+), 34 deletions(-) diff --git a/emhttp/plugins/dynamix/include/Boot.php b/emhttp/plugins/dynamix/include/Boot.php index cd3934bb0..f0bc1db75 100644 --- a/emhttp/plugins/dynamix/include/Boot.php +++ b/emhttp/plugins/dynamix/include/Boot.php @@ -31,44 +31,131 @@ $var = parse_ini_file("/var/local/emhttp/var.ini"); - - + +"> +"> + + + -
- -
- - -{$var['fsProgress']}" : ''; + +switch (_var($_POST,'cmd','shutdown')) { +case 'reboot': + if (isset($_POST['safemode'])) touch($safemode); else @unlink($safemode); + exec('/sbin/reboot -n'); + echo ''; + break; +case 'shutdown': + if (isset($_POST['safemode'])) touch($safemode); else @unlink($safemode); + exec('/sbin/poweroff -n'); + echo ''; + break; } +echo '
'; +echo '
'; +switch (_var($var,'fsState')) { +case 'Stopped': + echo " "._('Array Stopped')."$progress"; break; +case 'Starting': + echo " "._('Array Starting')."$progress"; break; +case 'Stopping': + echo " "._('Array Stopping')."$progress"; break; +default: + echo " "._('Array Started')."$progress"; break; +} +echo '
'; +echo '
'; +echo ''; ?> diff --git a/emhttp/plugins/dynamix/include/DefaultPageLayout.php b/emhttp/plugins/dynamix/include/DefaultPageLayout.php index 133ebdab6..4081600cc 100644 --- a/emhttp/plugins/dynamix/include/DefaultPageLayout.php +++ b/emhttp/plugins/dynamix/include/DefaultPageLayout.php @@ -44,8 +44,8 @@ function annotate($text) {echo "\n