From 66c159a6251c5c06525709ca2db90142754a52dc Mon Sep 17 00:00:00 2001 From: Ludovic Poujol Date: Wed, 15 Feb 2023 11:36:25 +0100 Subject: [PATCH] Display the web-add.sh version --- inc/auth.php | 2 ++ tpl/header.tpl.php | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/inc/auth.php b/inc/auth.php index 791bca1..c92dbc6 100644 --- a/inc/auth.php +++ b/inc/auth.php @@ -20,6 +20,7 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST)) { $_SESSION['auth'] = true; $_SESSION['user'] = $input_username; $_SESSION['user_id'] = posix_getpwnam($input_username) ? posix_getpwnam($input_username)['uid'] : 65534; + $_SESSION['cli_version'] = run_webadd_cmd('version')[0]; unset($_SESSION['error']); } elseif (isset($conf['logins'][$input_username]) && strlen($conf['logins'][$input_username]) == 64 && hash("sha256",$input_password) === $conf['logins'][$input_username]) { @@ -27,6 +28,7 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST)) { $_SESSION['auth'] = true; $_SESSION['user'] = $input_username; $_SESSION['user_id'] = posix_getpwnam($input_username) ? posix_getpwnam($input_username)['uid'] : 65534; + $_SESSION['cli_version'] = run_webadd_cmd('version')[0]; unset($_SESSION['error']); } else { diff --git a/tpl/header.tpl.php b/tpl/header.tpl.php index 85a81f7..e1e6fab 100644 --- a/tpl/header.tpl.php +++ b/tpl/header.tpl.php @@ -21,7 +21,7 @@ -EvoAdmin - Powered by Evolix +Evoadmin-web - Powered by Evolix @@ -31,10 +31,10 @@
-

EvoAdmin +

Evoadmin-web